X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=config%2Fpicflag.m4;h=8b106f9af8868e6816633a0edf4dbcfad729520e;hb=389fe8647555af73fca362bb066786b8cfe52761;hp=bd818125a66b06fa1accd1b16541647e473bb2fc;hpb=acf89cab13c1826d83dce1c7ae8ea805bc034bda;p=deliverable%2Fbinutils-gdb.git diff --git a/config/picflag.m4 b/config/picflag.m4 index bd818125a6..8b106f9af8 100644 --- a/config/picflag.m4 +++ b/config/picflag.m4 @@ -7,9 +7,15 @@ AC_DEFUN([_GCC_PICFLAG], [ case "${$2}" in # PIC is the default on some targets or must not be used. *-*-darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - $1=-fno-common + # For darwin, common symbols are not allowed in MH_DYLIB files + case "${CFLAGS}" in + # If we are using a compiler supporting mdynamic-no-pic + # and the option has been tested as safe to add, then cancel + # it here, since the code generated is incompatible with shared + # libs. + *-mdynamic-no-pic*) $1='-fno-common -mno-dynamic-no-pic' ;; + *) $1=-fno-common ;; + esac ;; alpha*-dec-osf5*) # PIC is the default. @@ -17,7 +23,9 @@ case "${$2}" in hppa*64*-*-hpux*) # PIC is the default for 64-bit PA HP-UX. ;; - i[[34567]]86-*-cygwin* | i[[34567]]86-*-mingw* | x86_64-*-mingw*) + i[[34567]]86-*-cygwin* | x86_64-*-cygwin*) + ;; + i[[34567]]86-*-mingw* | x86_64-*-mingw*) ;; i[[34567]]86-*-interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. @@ -48,9 +56,6 @@ case "${$2}" in i[[34567]]86-*-* | x86_64-*-*) $1=-fpic ;; - m68k-*-*) - $1=-fpic - ;; # FIXME: Override -fPIC default in libgcc only? sh-*-linux* | sh[[2346lbe]]*-*-linux*) $1=-fpic