Re: -fPIC -fPIE

2012-11-22 Thread Andreas Schwab
Richard Earnshaw writes: > -- namely one to restore the state to standard (not pic or pie). -fno-pic -fno-pie Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: -fPIC -fPIE

2012-11-22 Thread Richard Earnshaw
stand. We should only deviate from that rule for exceptional reasons. The fact that libtool acts a certain way is not an exceptional reason; libtool can change behaviour easily enough, and that change will be backward compatible. Note that even before my patch, gcc -fpic -fpie was equivalent to -fpi

Re: -fPIC -fPIE

2012-11-21 Thread Ian Lance Taylor
ew is this: we have a simple rule for options that is very easy to understand. We should only deviate from that rule for exceptional reasons. The fact that libtool acts a certain way is not an exceptional reason; libtool can change behaviour easily enough, and that change will be backward compat

Re: -fPIC -fPIE

2012-11-21 Thread Paolo Bonzini
On Wed, Nov 21, 2012 at 8:02 PM, Ian Lance Taylor wrote: >> The main advantage is that you can compile a program with CFLAGS="-O2 -g >> -fPIE", and libtool's adding of -fPIC for shared libraries will work >> reliably. If -fPIE can still override -fPIC, the result depends on >> whether -fPIC comes

Re: -fPIC -fPIE

2012-11-21 Thread Ian Lance Taylor
On Wed, Nov 21, 2012 at 8:56 AM, Paolo Bonzini wrote: > Il 14/11/2012 15:27, Ian Lance Taylor ha scritto: >> On Wed, Nov 14, 2012 at 5:36 AM, Richard Earnshaw wrote: >>> On 13/11/12 14:56, Ian Lance Taylor wrote: >>>> >>>> Currently -fPIC -fPIE see

Re: -fPIC -fPIE

2012-11-21 Thread Paolo Bonzini
Il 14/11/2012 15:27, Ian Lance Taylor ha scritto: > On Wed, Nov 14, 2012 at 5:36 AM, Richard Earnshaw wrote: >> On 13/11/12 14:56, Ian Lance Taylor wrote: >>> >>> Currently -fPIC -fPIE seems to be the same as -fPIE. Unfortunately, >>> -fPIE -fPIC also seems t

Re: -fPIC -fPIE

2012-11-14 Thread Ian Lance Taylor
On Wed, Nov 14, 2012 at 5:36 AM, Richard Earnshaw wrote: > On 13/11/12 14:56, Ian Lance Taylor wrote: >> >> Currently -fPIC -fPIE seems to be the same as -fPIE. Unfortunately, >> -fPIE -fPIC also seems to be the same as -fPIE. It seems to me that, >> as is usual w

Re: -fPIC -fPIE

2012-11-14 Thread Richard Earnshaw
On 13/11/12 14:56, Ian Lance Taylor wrote: Currently -fPIC -fPIE seems to be the same as -fPIE. Unfortunately, -fPIE -fPIC also seems to be the same as -fPIE. It seems to me that, as is usual with conflicting options, we should use the one that appears last on the command line. Do we have an

Re: -fPIC -fPIE

2012-11-13 Thread Ian Lance Taylor
On Tue, Nov 13, 2012 at 7:00 AM, H.J. Lu wrote: > On Tue, Nov 13, 2012 at 6:56 AM, Ian Lance Taylor wrote: >> Currently -fPIC -fPIE seems to be the same as -fPIE. Unfortunately, >> -fPIE -fPIC also seems to be the same as -fPIE. It seems to me that, >> as is usual with co

Re: -fPIC -fPIE

2012-11-13 Thread H.J. Lu
On Tue, Nov 13, 2012 at 6:56 AM, Ian Lance Taylor wrote: > Currently -fPIC -fPIE seems to be the same as -fPIE. Unfortunately, > -fPIE -fPIC also seems to be the same as -fPIE. It seems to me that, > as is usual with conflicting options, we should use the one that > appears last on

-fPIC -fPIE

2012-11-13 Thread Ian Lance Taylor
Currently -fPIC -fPIE seems to be the same as -fPIE. Unfortunately, -fPIE -fPIC also seems to be the same as -fPIE. It seems to me that, as is usual with conflicting options, we should use the one that appears last on the command line. Do we have an existing mechanism in options processing for