This is the mail archive of the gcc@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]

Re: Building libstdc++ non-shared with -fpic ?


> > Why do you require artificial limitations on the compilation system,
> > when there is no technical reason to require them?
> 
> Why are you assuming that the whole world is based on the ELF model of 
> linking?  It doesn't work for a.out based shared libs or for HPUX SOM (or 
> whatever it's called in HPUX 10).  

It seems I was exaggerating. However, the original poster asked about
his homegrown Linux system, on which indeed -fPIC is not required for
shared libraries.

> On a.out the linkers generally just get it wrong (since they can't
> always tell non-pic code from pic code).

See, generalising is difficult :-) On Linux a.out shared library
system, the libraries where never compiled
position-independent. Instead, they were linked to a fixed position.

I was just fighting the common misbelieve that shared libraries *must*
be compiled with -fPIC.

Regards,
Martin

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