]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/configure
Use -z ignore instead of --as-needed on Solaris
[thirdparty/gcc.git] / gcc / configure
index 10ff5aeb43391be071d20c7b112dbeed692d7135..a33da7a73f8d2fffb38a48ac6a3029ad9a59b27b 100755 (executable)
@@ -674,7 +674,6 @@ MAINT
 zlibinc
 zlibdir
 HOST_LIBS
-GGC
 libgcc_visibility
 gcc_cv_readelf
 gcc_cv_objdump
@@ -1670,7 +1669,8 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-plugin-ld=[ARG]  specify the plugin linker
   --with-long-double-128  use 128-bit long double by default
-  --with-gc={page,zone}   choose the garbage collection mechanism to use with
+  --with-gc={page,zone}   this option is not supported anymore. It used to
+                          choose the garbage collection mechanism to use with
                           the compiler
   --with-system-zlib      use installed libz
   --with-linker-hash-style={sysv,gnu,both}
@@ -4893,7 +4893,9 @@ case "${target}" 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.
@@ -7079,7 +7081,7 @@ else
     powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
     i?86*-*-gnu* | \
     i?86*-*-mingw* | x86_64*-*-mingw* | \
-    i?86*-*-cygwin*)
+    i?86*-*-cygwin* | x86_64*-*-cygwin*)
       enable_decimal_float=yes
       ;;
     *)
@@ -11136,6 +11138,9 @@ if test x$enable___cxa_atexit = xyes || \
       *-*-mingw32*)
        use_cxa_atexit=yes
        ;;
+      powerpc-ibm-aix*)
+       use_cxa_atexit=yes
+       ;;
       *)
        ac_fn_c_check_func "$LINENO" "__cxa_atexit" "ac_cv_func___cxa_atexit"
 if test "x$ac_cv_func___cxa_atexit" = x""yes; then :
@@ -17825,7 +17830,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 17828 "configure"
+#line 17833 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17931,7 +17936,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 17934 "configure"
+#line 17939 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -22052,11 +22057,14 @@ else
   enable_gnu_indirect_function="$default_gnu_indirect_function"
 fi
 
-if test x$enable_gnu_indirect_function = xyes; then
 
-$as_echo "#define HAVE_GNU_INDIRECT_FUNCTION 1" >>confdefs.h
+gif=`if test x$enable_gnu_indirect_function = xyes; then echo 1; else echo 0; fi`
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GNU_INDIRECT_FUNCTION $gif
+_ACEOF
+
 
-fi
 
 if test $in_tree_ld != yes ; then
   ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
@@ -23202,6 +23210,18 @@ foo:   data8   25
        tls_first_minor=13
        tls_as_opt=--fatal-warnings
        ;;
+  microblaze*-*-*)
+    conftest_s='
+       .section .tdata,"awT",@progbits
+x:
+       .word 2
+       .text
+       addik r5,r20,x@TLSGD
+       addik r5,r20,x@TLSLDM'
+       tls_first_major=2
+       tls_first_minor=20
+       tls_as_opt='--fatal-warnings'
+       ;;
   mips*-*-*)
     conftest_s='
        .section .tdata,"awT",@progbits
@@ -23650,6 +23670,12 @@ elif test x$gcc_cv_ld != x; then
       gcc_cv_ld_static_dynamic=yes
   else
     case "$target" in
+      # AIX ld uses -b flags
+      *-*-aix4.[23]* | *-*-aix[5-9]*)
+       gcc_cv_ld_static_dynamic=yes
+       gcc_cv_ld_static_option="-bstatic"
+       gcc_cv_ld_dynamic_option="-bdynamic"
+       ;;
       # HP-UX ld uses -a flags to select between shared and archive.
       *-*-hpux*)
        if test x"$gnu_ld" = xno; then
@@ -23921,6 +23947,39 @@ $as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h
 
 fi
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for #nobits" >&5
+$as_echo_n "checking assembler for #nobits... " >&6; }
+if test "${gcc_cv_as_sparc_nobits+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_as_sparc_nobits=no
+  if test x$gcc_cv_as != x; then
+    $as_echo '.section "nobits",#alloc,#write,#nobits
+       .section "progbits",#alloc,#write,#progbits' > conftest.s
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags  -o conftest.o conftest.s >&5'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+    then
+       gcc_cv_as_sparc_nobits=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.o conftest.s
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_nobits" >&5
+$as_echo "$gcc_cv_as_sparc_nobits" >&6; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_AS_SPARC_NOBITS `if test $gcc_cv_as_sparc_nobits = yes; then echo 1; else echo 0; fi`
+_ACEOF
+
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -relax option" >&5
 $as_echo_n "checking assembler for -relax option... " >&6; }
 if test "${gcc_cv_as_sparc_relax+set}" = set; then :
@@ -24219,7 +24278,7 @@ fi
        # wrappers to aid in interposing and redirecting operators new, delete,
        # etc., as per n2800 #17.6.4.6 [replacement.functions].  Check if we
        # are configuring for a version of Cygwin that exports the wrappers.
-       if test x$host = x$target; then
+       if test x$host = x$target && test x$host_cpu = xi686; then
          ac_fn_c_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj"
 if test "x$ac_cv_func___wrap__Znaj" = x""yes; then :
   gcc_ac_cygwin_dll_wrappers=yes
@@ -24588,6 +24647,39 @@ if test $gcc_cv_as_ix86_sahf = yes; then
 
 $as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h
 
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for interunit movq mnemonic" >&5
+$as_echo_n "checking assembler for interunit movq mnemonic... " >&6; }
+if test "${gcc_cv_as_ix86_interunit_movq+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_as_ix86_interunit_movq=no
+  if test x$gcc_cv_as != x; then
+    $as_echo '.code64
+       movq %mm0, %rax
+       movq %rax, %xmm0' > conftest.s
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags  -o conftest.o conftest.s >&5'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+    then
+       gcc_cv_as_ix86_interunit_movq=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.o conftest.s
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_interunit_movq" >&5
+$as_echo "$gcc_cv_as_ix86_interunit_movq" >&6; }
+if test $gcc_cv_as_ix86_interunit_movq = yes; then
+
+$as_echo "#define HAVE_AS_IX86_INTERUNIT_MOVQ 1" >>confdefs.h
+
 fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for hle prefixes" >&5
@@ -25664,6 +25756,37 @@ if test $gcc_cv_as_mips_gnu_attribute = yes; then
 
 $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
 
+fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .micromips support" >&5
+$as_echo_n "checking assembler for .micromips support... " >&6; }
+if test "${gcc_cv_as_micromips_support+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_as_micromips_support=no
+  if test x$gcc_cv_as != x; then
+    $as_echo '.set micromips' > conftest.s
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags  -o conftest.o conftest.s >&5'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+    then
+       gcc_cv_as_micromips_support=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.o conftest.s
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_micromips_support" >&5
+$as_echo "$gcc_cv_as_micromips_support" >&6; }
+if test $gcc_cv_as_micromips_support = yes; then
+
+$as_echo "#define HAVE_GAS_MICROMIPS 1" >>confdefs.h
+
 fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .dtprelword support" >&5
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5
 $as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker CIEv3 in .eh_frame support" >&5
+$as_echo_n "checking linker CIEv3 in .eh_frame support... " >&6; }
+gcc_cv_ld_eh_frame_ciev3=no
+if test $in_tree_ld = yes ; then
+  if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \
+     && test $in_tree_ld_is_elf = yes; then
+    gcc_cv_ld_eh_frame_ciev3=yes
+  fi
+elif test x$gcc_cv_ld != x; then
+  if echo "$ld_ver" | grep GNU > /dev/null; then
+    gcc_cv_ld_eh_frame_ciev3=yes
+    if test 0"$ld_date" -lt 20040513; then
+      if test -n "$ld_date"; then
+       # If there was date string, but was earlier than 2004-05-13, fail
+       gcc_cv_ld_eh_frame_ciev3=no
+      elif test "$ld_vers_major" -lt 2; then
+       gcc_cv_ld_eh_frame_ciev3=no
+      elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then
+       gcc_cv_ld_eh_frame_ciev3=no
+      fi
+    fi
+  else
+    case "$target" in
+      *-*-solaris2*)
+        # Sun ld added support for CIE v3 in .eh_frame in Solaris 11.1.
+        if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2324; then
+          gcc_cv_ld_eh_frame_ciev3=yes
+        fi
+        ;;
+    esac
+  fi
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LD_EH_FRAME_CIEV3 `if test x"$gcc_cv_ld_eh_frame_ciev3" = xyes; then echo 1; else echo 0; fi`
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_ciev3" >&5
+$as_echo "$gcc_cv_ld_eh_frame_ciev3" >&6; }
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker position independent executable support" >&5
 $as_echo_n "checking linker position independent executable support... " >&6; }
 gcc_cv_ld_pie=no
@@ -26394,6 +26557,8 @@ if test "${gcc_cv_ld_as_needed+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   gcc_cv_ld_as_needed=no
+gcc_cv_ld_as_needed_option='--as-needed'
+gcc_cv_ld_no_as_needed_option='--no-as-needed'
 if test $in_tree_ld = yes ; then
   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \
      && test $in_tree_ld_is_elf = yes; then
@@ -26403,6 +26568,15 @@ elif test x$gcc_cv_ld != x; then
        # Check if linker supports --as-needed and --no-as-needed options
        if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then
                gcc_cv_ld_as_needed=yes
+       else
+         case "$target" in
+           # Solaris 2 ld always supports -z ignore/-z record.
+           *-*-solaris2*)
+             gcc_cv_ld_as_needed=yes
+             gcc_cv_ld_as_needed_option="-z ignore"
+             gcc_cv_ld_no_as_needed_option="-z record"
+             ;;
+         esac
        fi
 fi
 
@@ -26413,6 +26587,16 @@ if test x"$gcc_cv_ld_as_needed" = xyes; then
 
 $as_echo "#define HAVE_LD_AS_NEEDED 1" >>confdefs.h
 
+
+cat >>confdefs.h <<_ACEOF
+#define LD_AS_NEEDED_OPTION "$gcc_cv_ld_as_needed_option"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define LD_NO_AS_NEEDED_OPTION "$gcc_cv_ld_no_as_needed_option"
+_ACEOF
+
 fi
 
 case "$target:$tm_file" in
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_target_dl_iterate_phdr" >&5
 $as_echo "$gcc_cv_target_dl_iterate_phdr" >&6; }
 
-# Find out what GC implementation we want, or may, use.
+# We no longer support different GC mechanisms.  Emit an error if
+# the user configures with --with-gc.
 
 # Check whether --with-gc was given.
 if test "${with_gc+set}" = set; then :
-  withval=$with_gc; case "$withval" in
-  page)
-    GGC=ggc-$withval
-    ;;
-  zone)
-    GGC=ggc-$withval
-
-$as_echo "#define GGC_ZONE 1" >>confdefs.h
-
-    ;;
-  *)
-    as_fn_error "$withval is an invalid option to --with-gc" "$LINENO" 5
-    ;;
-esac
-else
-  GGC=ggc-page
+  withval=$with_gc; as_fn_error "Configure option --with-gc is only supported up to GCC 4.7.x" "$LINENO" 5
 fi
 
 
-echo "Using $GGC for garbage collection."
-
 # Libraries to use on the host.  This will normally be set by the top
 # level Makefile.  Here we simply capture the value for our Makefile.
 if test -z "${HOST_LIBS+set}"; then