Building libstdc++ non-shared with -fpic ?
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Sat Jul 1 08:39:00 GMT 2000
> > 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
More information about the Gcc
mailing list