Why -prefer-pic?
Alexandre Oliva
oliva@lsd.ic.unicamp.br
Fri Dec 8 16:32:00 GMT 2000
On Dec 8, 2000, Laurynas Biveinis <lauras@softhome.net> wrote:
> Can somebody explain, why libsupc++\Makefile.am uses -prefer-pic
> flag?
So that a shared libstdc++ built out of libsupc++ gets PIC code.
Ditto for any other shared libraries linked with libsupc++ but not
with libstdc++. That's the same reason why libgcc is PIC by default.
> Under DJGPP it causes problems: it forces -fPIC -DPIC for static
> libraries. But we don't support shared libraries, and -fPIC makes
> us crash there.
If DJGPP don't support PIC at all, we have to adjust libtool so that
it learns about this fact. It would also be advisable to have -fPIC
be a no-op on DJGPP.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Libstdc++
mailing list