Don't use -prefer-pic if target doesn't support shared libraries

Alexandre Oliva aoliva@redhat.com
Thu May 3 13:12:00 GMT 2001


Certain targets, such as mn10300-elf, just don't support shared
libraries, so it doesn't make sense to generate PIC code for it.  It
even gets GCC to generate code that is rejected by the assembler.

This patch arranges for -prefer-pic not to be used in case shared
libraries are not enabled.  Then, libtool will decide whether or not
to generate PIC code based on the --with[out]-pic configure flag,
defaulting to PIC if shared libraries are supported, and non-PIC
otherwise, IIRC.

Tested on alpha-linux-gnu-x-mn10300-elf.  Ok to install?



More information about the Libstdc++ mailing list