This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc corrections for better pie support


On Mon, 8 Nov 2004, Peter S. Mazinger wrote:

> from gcc/opts.c
> 
> if (flag_pie)
>   flag_pic = flag_pie;
> if (flag_pic && !flag_pie)
>   flag_shlib = 1;
> 
> if they would override each other the above test would be pointless.
> the above means for me: if -fpic is defined w/o -fpie only than a shared 
> lib is built.
> 
> > > You should look into the code, the code says to me, that the 
> > > resulting object won't be used in shared libs, specifically the part 
> > > where a check is done to see if both -fpic and -fpie are set.
> > 
> > -fno-pic/-fpic/-fPIC/-fpie/-fPIE are supposed to override each other,
> > the last one on the command line ought to win.

I think they are in groups and within groups they (should) override each 
other
fno-PIC|fno-pic|fPIC|fpic
fno-PIE|fno-pie|fPIE|fpie

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]