This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Building libstdc++ non-shared with -fpic ?
- To: rearnsha at arm dot com
- Subject: Re: Building libstdc++ non-shared with -fpic ?
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sat, 1 Jul 2000 17:38:02 +0200
- CC: lundril at gmx dot net, gcc at gcc dot gnu dot org, rearnsha at arm dot com
- References: <200007011436.PAA01009@cam-mail2.cambridge.arm.com>
> > 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