i386: Align branches within a fixed boundary
[deliverable/binutils-gdb.git] / config / picflag.m4
index bd818125a66b06fa1accd1b16541647e473bb2fc..8b106f9af8868e6816633a0edf4dbcfad729520e 100644 (file)
@@ -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
This page took 0.023224 seconds and 4 git commands to generate.