This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


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

Re: Why -prefer-pic?


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

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