[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [autoconf] Problems Configuring (C Compiler cannot produce executabl

From: Jeffrey Walton
Subject: Re: [autoconf] Problems Configuring (C Compiler cannot produce executables)
Date: Wed, 22 Aug 2012 00:54:58 -0400

On Wed, Aug 22, 2012 at 12:44 AM, Russ Allbery <address@hidden> wrote:
> Jeffrey Walton <address@hidden> writes:
>> According to Pinksi at GCC, -fPIC can be used for both. Both -fPIC and
>> -fPIE produce a relocatable section. I know from experience readelf(1)
>> produces the same result (DYN).
>> When using -fPIE, the optimizer can begin optomizing sooner. Andrew
>> Pinski (GCC developer): "With PIE, global variables and functions are
>> considered to bind local while with PIC they are considered to bind
>> globally (aka override able)." [1]
>> Pinski specifically recommended -fPIC because of this situation
>> (inability to configure executables and shared objects separately when
>> using the GNU tool chain).
> Well, all that's fine and good, but then you passed those flags into GCC
> and they didn't, er, work.  :)  So reality seems to have come into
> conflict with the advice you got.

> I know for certain that the Debian set of hardening flags, which use
> -fPIE, not -fPIC, for executables, work across a *very large* array of
> open source software (although we do have to omit -fPIE from the default
> set since -fPIE breaks some software), and I believe that other
> distributions do the same.  I won't venture to express an opinion on the
> relative merits of -fPIC versus -fPIE, particularly to compiler experts,
> but in my humble opinion you should prefer flags that actually function.

I think the solution is to update Make so that there are separate
LD_EXE_FLAGS and LD_SO_FLAGS. But that was rejected too...

I just wish everyone would get in line so things function as expected
from cradle to grave. There's too much "it's not my fault." It reminds
me of the old Macs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]