Re: PIE support

2005-12-01 Thread Ralf Wildenhues
* Paul Jakma wrote on Thu, Dec 01, 2005 at 01:19:38PM CET: > On Thu, 1 Dec 2005, Ralf Wildenhues wrote: > > >Try 'gcc -v' in all cases to see what's happening. Try 'gld > >--verbose' and 'gcc -v -Wl,--verbose' to see what the linker > >thinks. > > Hmm, ok. It's using the solaris linker. How do

Re: PIE support

2005-12-01 Thread Paul Jakma
On Thu, 1 Dec 2005, Ralf Wildenhues wrote: I think not. First of all, underscore'd symbols are forbidden country for non-implementation-tools like libtool. Second, don't ever use the same symbol for two different meanings, one being, that GCC tells you this is -fpic, the other being what lib

Re: PIE support

2005-12-01 Thread Paul Jakma
On Wed, 30 Nov 2005, Ralf Wildenhues wrote: Because: when one day 100 compilers support this, they may use 10 different #defines for this notion. Or not, who knows. Sure. Then you should possibly also define __PIC__ for completeness / symmetry? (relying on gcc to provide that at present righ

Re: PIE support

2005-12-01 Thread Ralf Wildenhues
Hi Paul, * Paul Jakma wrote on Thu, Dec 01, 2005 at 11:43:03AM CET: > On Wed, 30 Nov 2005, Ralf Wildenhues wrote: > > >Because: when one day 100 compilers support this, they may use 10 > >different #defines for this notion. Or not, who knows. > > Sure. Then you should possibly also define __PI

Re: PIE support

2005-11-30 Thread Ralf Wildenhues
* Paul Jakma wrote on Wed, Nov 30, 2005 at 07:10:30PM CET: > On Tue, 29 Nov 2005, Ralf Wildenhues wrote: > > >see http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00145.html ). Or, > >to not avoid further namespace invasion, maybe `-DPIC -DLT_PIE'. > >For CC and CXX tags? Suggestions? Maybe only a

Re: PIE support

2005-11-30 Thread Ralf Wildenhues
Hi Paul, * Paul Jakma wrote on Wed, Nov 30, 2005 at 08:13:14PM CET: > On Wed, 30 Nov 2005, Mike Frysinger wrote: > > >PIE and PIC arent the same thing > The distinction between the two is mostly important at link-time. Ie > a collection of PIC and/or PIE objects can be linked together into a >

Re: PIE support (was: 1.5.18: suppressing non-C language checks / pass flags to cc in link mode)

2005-11-30 Thread Paul Jakma
On Wed, 30 Nov 2005, Mike Frysinger wrote: PIE and PIC arent the same thing -fPIC is for creating position independent code for shared objects while -fPIE is for creating position independent code for executables Right, I did know that ;). The distinction between the two is mostly important

Re: PIE support

2005-11-30 Thread Simon Richter
Hi, Mike Frysinger wrote: I don't know, but PIE and PIC don't compile to same thing AFAICT. I don't know the significance of that though. IIRC -pie is only a linker flag that a) affects selection of the linker script b) disallows certain relocation types c) notes the position-independence

Re: PIE support (was: 1.5.18: suppressing non-C language checks / pass flags to cc in link mode)

2005-11-30 Thread Mike Frysinger
On Wed, Nov 30, 2005 at 06:10:30PM +, Paul Jakma wrote: > On Tue, 29 Nov 2005, Ralf Wildenhues wrote: > > >This seems to me the superior solution. Thus, let's kill the > >--with-pic idea, too. It won't get us over main.o > >compiled-without-libtool and neither one of -fpic or -fpie in > >

Re: PIE support (was: 1.5.18: suppressing non-C language checks / pass flags to cc in link mode)

2005-11-30 Thread Paul Jakma
On Tue, 29 Nov 2005, Ralf Wildenhues wrote: This seems to me the superior solution. Thus, let's kill the --with-pic idea, too. It won't get us over main.o compiled-without-libtool and neither one of -fpic or -fpie in CFLAGS anyway. And I can't see why it should be more useful to have two P

Re: PIE support

2005-11-30 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Tue, Nov 29, 2005 at 07:57:00PM CET: > > My tests with gcc-3.4.4 show that -fpie/-fPIE always override > -fpic/-fPIC, independent of the order in which they were passed. > (What an unfortunate choice, by the way. Oh well.) This is http://gcc.gnu.org/bugzilla/show_bug.c