configure.ac (HAVE_AS_GOTOF_IN_DATA): Use $as_ix86_gas_32_opt to assemble for 32bit...
[platform/upstream/gcc.git] / gcc / configure
index 31407ef..9fec1cc 100755 (executable)
@@ -822,6 +822,7 @@ host_subdir
 build_subdir
 build_libsubdir
 target_noncanonical
+host_noncanonical
 target_os
 target_vendor
 target_cpu
@@ -904,6 +905,7 @@ enable_decimal_float
 enable_fixed_point
 enable_threads
 enable_tls
+enable_vtable_verify
 enable_objc_gc
 with_dwarf2
 enable_shared
@@ -1596,7 +1598,7 @@ Optional Features:
                           enable expensive run-time checks. With LIST, enable
                           only specific categories of checks. Categories are:
                           yes,no,all,none,release. Flags are:
-                          assert,df,fold,gc,gcac,gimple,misc,
+                          assert,df,extra,fold,gc,gcac,gimple,misc,
                           rtlflag,rtl,runtime,tree,valgrind,types
   --enable-coverage[=LEVEL]
                           enable compiler's code coverage collection. Use to
@@ -1619,6 +1621,7 @@ Optional Features:
                           package
   --enable-tls            enable or disable generation of tls code overriding
                           the assembler check for tls support
+  --enable-vtable-verify  enable vtable verification feature
   --enable-objc-gc        enable the use of Boehm's garbage collector with the
                           GNU Objective-C runtime
   --disable-shared        don't provide a shared libgcc
@@ -1750,8 +1753,8 @@ Some influential environment variables:
   CPP         C preprocessor
   GMPLIBS     How to link GMP
   GMPINC      How to find GMP include files
-  ISLLIBS     How to link ISL
-  ISLINC      How to find ISL include files
+  ISLLIBS     How to link isl
+  ISLINC      How to find isl include files
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -3321,7 +3324,7 @@ test -n "$target_alias" &&
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
 
-# Determine the noncanonical target name, for directory use.
+# Determine the noncanonical host name, for Ada.
  case ${build_alias} in
   "") build_noncanonical=${build} ;;
   *) build_noncanonical=${build_alias} ;;
@@ -3332,6 +3335,10 @@ esac
   *) host_noncanonical=${host_alias} ;;
 esac
 
+
+
+
+# Determine the noncanonical target name, for directory use.
  case ${target_alias} in
   "") target_noncanonical=${host_noncanonical} ;;
   *) target_noncanonical=${target_alias} ;;
@@ -5026,10 +5033,6 @@ case "${target}" in
        ;;
     i[34567]86-*-mingw* | x86_64-*-mingw*)
        ;;
-    i[34567]86-*-interix[3-9]*)
-       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-       # Instead, we relocate shared libraries at runtime.
-       ;;
     i[34567]86-*-nto-qnx*)
        # QNX uses GNU C++, but need to define -shared option too, otherwise
        # it will coredump.
@@ -5060,8 +5063,7 @@ case "${target}" in
        PICFLAG_FOR_TARGET=-fpic
        ;;
     # FIXME: Simplify to sh*-*-netbsd*?
-    sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
-      sh64-*-netbsd* | sh64l*-*-netbsd*)
+    sh-*-netbsdelf* | shl*-*-netbsdelf*)
        PICFLAG_FOR_TARGET=-fpic
        ;;
     # Default to -fPIC unless specified otherwise.
@@ -6534,6 +6536,40 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::swap in <utility>" >&5
+$as_echo_n "checking for std::swap in <utility>... " >&6; }
+if test "${ac_cv_std_swap_in_utility+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <utility>
+
+int
+main ()
+{
+int a, b; std::swap(a,b);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_std_swap_in_utility=yes
+else
+  ac_cv_std_swap_in_utility=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_std_swap_in_utility" >&5
+$as_echo "$ac_cv_std_swap_in_utility" >&6; }
+if test $ac_cv_std_swap_in_utility = yes; then
+
+$as_echo "#define HAVE_SWAP_IN_UTILITY 1" >>confdefs.h
+
+fi
+
 # Check whether compiler is affected by placement new aliasing bug (PR 29286).
 # If the host compiler is affected by the bug, and we build with optimization
 # enabled (which happens e.g. when cross-compiling), the pool allocator may
@@ -7041,7 +7077,7 @@ else
 
 # Determine the default checks.
 if test x$is_release = x ; then
-  ac_checking_flags=yes
+  ac_checking_flags=yes,extra
 else
   ac_checking_flags=release
 fi
@@ -7053,32 +7089,33 @@ do
        case $check in
        # these set all the flags to specific states
        yes)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
-                       ac_fold_checking= ; ac_gc_checking=1 ;
+                       ac_fold_checking= ; ac_gc_checking=1 ; ac_extra_checking= ;
                        ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
                        ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
                        ac_tree_checking=1 ; ac_valgrind_checking= ;
                        ac_types_checking=1 ;;
        no|none)        ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
-                       ac_fold_checking= ; ac_gc_checking= ;
+                       ac_fold_checking= ; ac_gc_checking= ; ac_extra_checking= ;
                        ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
                        ac_rtlflag_checking= ; ac_runtime_checking= ;
                        ac_tree_checking= ; ac_valgrind_checking= ;
                        ac_types_checking= ;;
        all)            ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
-                       ac_fold_checking=1 ; ac_gc_checking=1 ;
+                       ac_fold_checking=1 ; ac_gc_checking=1 ; ac_extra_checking=1 ;
                        ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
                        ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
                        ac_tree_checking=1 ; ac_valgrind_checking= ;
                        ac_types_checking=1 ;;
        release)        ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
-                       ac_fold_checking= ; ac_gc_checking= ;
+                       ac_fold_checking= ; ac_gc_checking= ; ac_extra_checking= ;
                        ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
                        ac_rtlflag_checking= ; ac_runtime_checking=1 ;
                        ac_tree_checking= ; ac_valgrind_checking= ;
                        ac_types_checking= ;;
        # these enable particular checks
        assert)         ac_assert_checking=1 ;;
-       df)             ac_df_checking=1 ;;
+       df)             ac_df_checking=1 ;;
+       extra)          ac_extra_checking=1 ;;
        fold)           ac_fold_checking=1 ;;
        gc)             ac_gc_checking=1 ;;
        gcac)           ac_gc_always_collect=1 ;;
@@ -7097,8 +7134,13 @@ IFS="$ac_save_IFS"
 
 nocommon_flag=""
 if test x$ac_checking != x ; then
+  if test x$ac_extra_checking != x ; then
+    ac_checking=2
+  fi
 
-$as_echo "#define CHECKING_P 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define CHECKING_P $ac_checking
+_ACEOF
 
   nocommon_flag=-fno-common
 else
@@ -7552,6 +7594,20 @@ else
 fi
 
 
+# Check whether --enable-vtable-verify was given.
+if test "${enable_vtable_verify+set}" = set; then :
+  enableval=$enable_vtable_verify;
+else
+  enable_vtable_verify=no
+fi
+
+vtable_verify=`if test x$enable_vtable_verify = xyes; then echo 1; else echo 0; fi`
+
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_VTABLE_VERIFY $vtable_verify
+_ACEOF
+
+
 # Check whether --enable-objc-gc was given.
 if test "${enable_objc_gc+set}" = set; then :
   enableval=$enable_objc_gc; if test x$enable_objc_gc = xno; then
@@ -7700,6 +7756,13 @@ fi
 
 for tgt in `echo $enable_offload_targets | sed 's/,/ /g'`; do
   tgt=`echo $tgt | sed 's/=.*//'`
+
+  if echo "$tgt" | grep "^hsa" > /dev/null ; then
+    enable_hsa=1
+  else
+    enable_offloading=1
+  fi
+
   if test x"$offload_targets" = x; then
     offload_targets=$tgt
   else
@@ -7711,7 +7774,7 @@ cat >>confdefs.h <<_ACEOF
 #define OFFLOAD_TARGETS "$offload_targets"
 _ACEOF
 
-if test x"$offload_targets" != x; then
+if test x"$enable_offloading" != x; then
 
 $as_echo "#define ENABLE_OFFLOADING 1" >>confdefs.h
 
@@ -7721,6 +7784,12 @@ $as_echo "#define ENABLE_OFFLOADING 0" >>confdefs.h
 
 fi
 
+if test x"$enable_hsa" = x1 ; then
+
+$as_echo "#define ENABLE_HSA 1" >>confdefs.h
+
+fi
+
 
 # Check whether --with-multilib-list was given.
 if test "${with_multilib_list+set}" = set; then :
@@ -12216,7 +12285,7 @@ elif test "x$TARGET_SYSTEM_ROOT" != x; then
 fi
 
 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
-  if test "x$with_headers" != x; then
+  if test "x$with_headers" != x && test "x$with_headers" != xyes; then
     target_header_dir=$with_headers
   elif test "x$with_sysroot" = x; then
     target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include"
@@ -18406,7 +18475,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18409 "configure"
+#line 18478 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18512,7 +18581,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18515 "configure"
+#line 18584 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -23802,6 +23871,12 @@ foo:   .long   25
        tls_first_minor=13
        tls_as_opt=--fatal-warnings
        ;;
+  arc*-*-*)
+    conftest_s='
+       add_s r0,r0, @foo@tpoff'
+       tls_first_major=2
+       tls_first_minor=23
+       ;;
   cris-*-*|crisv32-*-*)
     conftest_s='
        .section ".tdata","awT",@progbits
@@ -25045,6 +25120,42 @@ $as_echo "#define HAVE_AS_SPARC4 1" >>confdefs.h
 
 fi
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for SPARC5 and VIS 4.0 instructions" >&5
+$as_echo_n "checking assembler for SPARC5 and VIS 4.0 instructions... " >&6; }
+if test "${gcc_cv_as_sparc_sparc5+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_as_sparc_sparc5=no
+  if test x$gcc_cv_as != x; then
+    $as_echo '.text
+       .register %g2, #scratch
+       .register %g3, #scratch
+       .align 4
+       subxc %g1, %g2, %g3
+       fpadd8 %f0, %f2, %f4' > conftest.s
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags -xarch=sparc5 -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_sparc5=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_sparc5" >&5
+$as_echo "$gcc_cv_as_sparc_sparc5" >&6; }
+if test $gcc_cv_as_sparc_sparc5 = yes; then
+
+$as_echo "#define HAVE_AS_SPARC5_VIS4 1" >>confdefs.h
+
+fi
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for LEON instructions" >&5
 $as_echo_n "checking assembler for LEON instructions... " >&6; }
 if test "${gcc_cv_as_sparc_leon+set}" = set; then :
@@ -25111,7 +25222,7 @@ _ACEOF
 
     esac
     case $target_os in
-      cygwin* | pe | mingw32* | interix*)
+      cygwin* | pe | mingw32*)
        # Recent binutils allows the three-operand form of ".comm" on PE.  This
        # definition is used unconditionally to initialise the default state of
        # the target option variable that governs usage of the feature.
@@ -25596,52 +25707,6 @@ $as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h
 
 fi
 
-    # These two are used unconditionally by i386.[ch]; it is to be defined
-    # to 1 if the feature is present, 0 otherwise.
-    as_ix86_gotoff_in_data_opt=
-    if test x$gas = xyes; then
-      as_ix86_gotoff_in_data_opt="--32"
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTOFF in data" >&5
-$as_echo_n "checking assembler for GOTOFF in data... " >&6; }
-if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  gcc_cv_as_ix86_gotoff_in_data=no
-    if test $in_tree_gas = yes; then
-    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
-  then gcc_cv_as_ix86_gotoff_in_data=yes
-fi
-  elif test x$gcc_cv_as != x; then
-    $as_echo ' .text
-.L0:
-       nop
-       .data
-       .long .L0@GOTOFF' > conftest.s
-    if { ac_try='$gcc_cv_as $gcc_cv_as_flags $as_ix86_gotoff_in_data_opt -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_gotoff_in_data=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_gotoff_in_data" >&5
-$as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; }
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
-_ACEOF
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for rep and lock prefix" >&5
 $as_echo_n "checking assembler for rep and lock prefix... " >&6; }
 if test "${gcc_cv_as_ix86_rep_lock_prefix+set}" = set; then :
@@ -25710,6 +25775,18 @@ $as_echo "#define HAVE_AS_IX86_UD2 1" >>confdefs.h
 
 fi
 
+    # Enforce 32-bit output with gas and gld.
+    if test x$gas = xyes; then
+      as_ix86_gas_32_opt="--32"
+    fi
+    if echo "$ld_ver" | grep GNU > /dev/null; then
+      if $gcc_cv_ld -V 2>/dev/null | grep elf_i386_sol2 > /dev/null; then
+        ld_ix86_gld_32_opt="-melf_i386_sol2"
+      else
+        ld_ix86_gld_32_opt="-melf_i386"
+      fi
+    fi
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for R_386_TLS_GD_PLT reloc" >&5
 $as_echo_n "checking assembler for R_386_TLS_GD_PLT reloc... " >&6; }
 if test "${gcc_cv_as_ix86_tlsgdplt+set}" = set; then :
@@ -25718,7 +25795,7 @@ else
   gcc_cv_as_ix86_tlsgdplt=no
   if test x$gcc_cv_as != x; then
     $as_echo 'call    tls_gd@tlsgdplt' > conftest.s
-    if { ac_try='$gcc_cv_as $gcc_cv_as_flags  -o conftest.o conftest.s >&5'
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags $as_ix86_gas_32_opt -o conftest.o conftest.s >&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25726,7 +25803,7 @@ else
   test $ac_status = 0; }; }
     then
        if test x$gcc_cv_ld != x \
-        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
+        && $gcc_cv_ld $ld_ix86_gld_32_opt -o conftest conftest.o -G > /dev/null 2>&1; then
           gcc_cv_as_ix86_tlsgdplt=yes
         fi
         rm -f conftest
@@ -25750,6 +25827,7 @@ fi
 tls_ld:
        .section .text,"ax",@progbits
         call    tls_ld@tlsldmplt'
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for R_386_TLS_LDM_PLT reloc" >&5
 $as_echo_n "checking assembler for R_386_TLS_LDM_PLT reloc... " >&6; }
 if test "${gcc_cv_as_ix86_tlsldmplt+set}" = set; then :
@@ -25758,7 +25836,7 @@ else
   gcc_cv_as_ix86_tlsldmplt=no
   if test x$gcc_cv_as != x; then
     $as_echo "$conftest_s" > conftest.s
-    if { ac_try='$gcc_cv_as $gcc_cv_as_flags  -o conftest.o conftest.s >&5'
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags $as_ix86_gas_32_opt -o conftest.o conftest.s >&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25766,7 +25844,7 @@ else
   test $ac_status = 0; }; }
     then
        if test x$gcc_cv_ld != x \
-        && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
+        && $gcc_cv_ld $ld_ix86_gld_32_opt -o conftest conftest.o -G > /dev/null 2>&1; then
           gcc_cv_as_ix86_tlsldmplt=yes
         fi
         rm -f conftest
@@ -25786,17 +25864,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-    # Enforce 32-bit output with gas and gld.
-    if test x$gas = xyes; then
-      as_ix86_tls_ldm_opt="--32"
-    fi
-    if echo "$ld_ver" | grep GNU > /dev/null; then
-      if $gcc_cv_ld -V 2>/dev/null | grep elf_i386_sol2 > /dev/null; then
-        ld_ix86_tls_ldm_opt="-melf_i386_sol2"
-      else
-        ld_ix86_tls_ldm_opt="-melf_i386"
-      fi
-    fi
     conftest_s='
        .section .text,"ax",@progbits
         .globl  _start
@@ -25816,7 +25883,7 @@ else
   gcc_cv_as_ix86_tlsldm=no
   if test x$gcc_cv_as != x; then
     $as_echo "$conftest_s" > conftest.s
-    if { ac_try='$gcc_cv_as $gcc_cv_as_flags $as_ix86_tls_ldm_opt -o conftest.o conftest.s >&5'
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags $as_ix86_gas_32_opt -o conftest.o conftest.s >&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -25824,7 +25891,7 @@ else
   test $ac_status = 0; }; }
     then
        if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
-           && $gcc_cv_ld $ld_ix86_tls_ldm_opt -o conftest conftest.o $ld_tls_libs -lc > /dev/null 2>&1; then
+           && $gcc_cv_ld $ld_ix86_gld_32_opt -o conftest conftest.o $ld_tls_libs -lc > /dev/null 2>&1; then
           if $gcc_cv_objdump -d conftest 2>/dev/null | grep nop > /dev/null \
              || dis conftest 2>/dev/null | grep nop > /dev/null; then
             gcc_cv_as_ix86_tlsldm=yes
@@ -25847,6 +25914,99 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+    conftest_s='
+       .data
+bar:
+       .byte 1
+       .text
+       .global _start
+_start:
+        cmpl $0, bar@GOT
+        jmp *_start@GOT'
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for R_386_GOT32X reloc" >&5
+$as_echo_n "checking assembler for R_386_GOT32X reloc... " >&6; }
+if test "${gcc_cv_as_ix86_got32x+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_as_ix86_got32x=no
+  if test x$gcc_cv_as != x; then
+    $as_echo "$conftest_s" > conftest.s
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags $as_ix86_gas_32_opt -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
+       if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
+           && test x$gcc_cv_readelf != x \
+           && $gcc_cv_readelf --relocs --wide conftest.o 2>&1 \
+              | grep R_386_GOT32X > /dev/null 2>&1 \
+           && $gcc_cv_ld $ld_ix86_gld_32_opt -o conftest conftest.o > /dev/null 2>&1; then
+          if $gcc_cv_objdump -dw conftest 2>&1 \
+             | grep 0xffffff > /dev/null 2>&1; then
+            gcc_cv_as_ix86_got32x=no
+          else
+            gcc_cv_as_ix86_got32x=yes
+          fi
+        fi
+        rm -f conftest
+    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_got32x" >&5
+$as_echo "$gcc_cv_as_ix86_got32x" >&6; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_AS_IX86_GOT32X `if test x"$gcc_cv_as_ix86_got32x" = xyes; then echo 1; else echo 0; fi`
+_ACEOF
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTOFF in data" >&5
+$as_echo_n "checking assembler for GOTOFF in data... " >&6; }
+if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_as_ix86_gotoff_in_data=no
+    if test $in_tree_gas = yes; then
+    if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
+  then gcc_cv_as_ix86_gotoff_in_data=yes
+fi
+  elif test x$gcc_cv_as != x; then
+    $as_echo ' .text
+.L0:
+       nop
+       .data
+       .long .L0@GOTOFF' > conftest.s
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags $as_ix86_gas_32_opt -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_gotoff_in_data=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_gotoff_in_data" >&5
+$as_echo "$gcc_cv_as_ix86_gotoff_in_data" >&6; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi`
+_ACEOF
+
+
     ;;
 
   ia64*-*-*)
     ;;
 
   powerpc*-*-*)
+
     case $target in
-      *-*-aix*) conftest_s='   .machine "pwr5"
-       .csect .text[PR]
-       mfcr 3,128';;
       *-*-darwin*)
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .machine directive support" >&5
 $as_echo_n "checking assembler for .machine directive support... " >&6; }
@@ -25927,7 +26085,14 @@ $as_echo "$gcc_cv_as_machine_directive" >&6; }
          echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
          test x$build = x$target && exit 1
        fi
-       conftest_s='    .text
+        ;;
+    esac
+
+    case $target in
+      *-*-aix*) conftest_s='   .machine "pwr5"
+       .csect .text[PR]
+       mfcr 3,128';;
+      *-*-darwin*) conftest_s='        .text
        mfcr r3,128';;
       *) conftest_s='  .machine power4
        .text
@@ -26602,8 +26767,8 @@ fi
 
     case $target in
       *-*-aix*)
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .ref support" >&5
-$as_echo_n "checking assembler for .ref support... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for AIX .ref support" >&5
+$as_echo_n "checking assembler for AIX .ref support... " >&6; }
 if test "${gcc_cv_as_aix_ref+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
@@ -26641,13 +26806,9 @@ if test $gcc_cv_as_aix_ref = yes; then
 $as_echo "#define HAVE_AS_REF 1" >>confdefs.h
 
 fi
-       ;;
-    esac
 
-    case $target in
-      *-*-aix*)
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for dwarf location lists section support" >&5
-$as_echo_n "checking assembler for dwarf location lists section support... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for AIX DWARF location lists section support" >&5
+$as_echo_n "checking assembler for AIX DWARF location lists section support... " >&6; }
 if test "${gcc_cv_as_aix_dwloc+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
@@ -26657,7 +26818,9 @@ else
   then gcc_cv_as_aix_dwloc=yes
 fi
   elif test x$gcc_cv_as != x; then
-    $as_echo ' .dwsect 0xB0000
+    $as_echo ' .dwsect 0xA0000
+       Lframe..0:
+               .vbyte 4,Lframe..0:
          ' > 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
@@ -27402,7 +27565,7 @@ else
   gcc_cv_as_compress_debug=no
   if test x$gcc_cv_as != x; then
     $as_echo '' > conftest.s
-    if { ac_try='$gcc_cv_as $gcc_cv_as_flags --compress-debug-sections -o conftest.o conftest.s >&5'
+    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=$?
@@ -27414,6 +27577,15 @@ else
    if $gcc_cv_as --compress-debug-sections -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null
    then
      gcc_cv_as_compress_debug=0
+   # Since binutils 2.26, gas supports --compress-debug-sections=type,
+   # defaulting to the ELF gABI format.
+   elif $gcc_cv_as --compress-debug-sections=zlib-gnu -o conftest.o conftest.s > /dev/null 2>&1
+   then
+     gcc_cv_as_compress_debug=2
+     gcc_cv_as_compress_debug_option="--compress-debug-sections"
+     gcc_cv_as_no_compress_debug_option="--nocompress-debug-sections"
+   # Before binutils 2.26, gas only supported --compress-debug-options and
+   # emitted the traditional GNU format.
    elif $gcc_cv_as --compress-debug-sections -o conftest.o conftest.s > /dev/null 2>&1
    then
      gcc_cv_as_compress_debug=1
@@ -27421,8 +27593,6 @@ else
      gcc_cv_as_no_compress_debug_option="--nocompress-debug-sections"
    else
      gcc_cv_as_compress_debug=0
-   # FIXME: Future gas versions will support ELF gABI style via
-   # --compress-debug-sections[=type].
    fi
     else
       echo "configure: failed program was" >&5
@@ -27926,27 +28096,30 @@ $as_echo "$gcc_cv_ld_eh_gc_sections_bug" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for compressed debug sections" >&5
 $as_echo_n "checking linker for compressed debug sections... " >&6; }
 # gold/gld support compressed debug sections since binutils 2.19/2.21
+# In binutils 2.26, gld gained support for the ELF gABI format.
 if test $in_tree_ld = yes ; then
   gcc_cv_ld_compress_debug=0
   if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 19 -o "$gcc_cv_gld_major_version" -gt 2 \
      && test $in_tree_ld_is_elf = yes && test $ld_is_gold = yes; then
     gcc_cv_ld_compress_debug=2
     gcc_cv_ld_compress_debug_option="--compress-debug-sections"
+  elif test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 26 -o "$gcc_cv_gld_major_version" -gt 2 \
+     && test $in_tree_ld_is_elf = yes && test $ld_is_gold = no; then
+    gcc_cv_ld_compress_debug=3
+    gcc_cv_ld_compress_debug_option="--compress-debug-sections"
   elif test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2 \
      && test $in_tree_ld_is_elf = yes; then
     gcc_cv_ld_compress_debug=1
   fi
 elif echo "$ld_ver" | grep GNU > /dev/null; then
-  gcc_cv_ld_compress_debug=1
-  if test 0"$ld_date" -lt 20050308; then
-    if test -n "$ld_date"; then
-      # If there was date string, but was earlier than 2005-03-08, fail
-      gcc_cv_ld_compress_debug=0
-    elif test "$ld_vers_major" -lt 2; then
-      gcc_cv_ld_compress_debug=0
-    elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 21; then
-      gcc_cv_ld_compress_debug=0
-    fi
+  if test "$ld_vers_major" -lt 2 \
+     || test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 21; then
+    gcc_cv_ld_compress_debug=0
+  elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 26; then
+    gcc_cv_ld_compress_debug=1
+  else
+    gcc_cv_ld_compress_debug=3
+    gcc_cv_ld_compress_debug_option="--compress-debug-sections"
   fi
   if test $ld_is_gold = yes; then
     gcc_cv_ld_compress_debug=2
@@ -28399,7 +28572,7 @@ else
        *-*-musl*)
         # All versions of musl provide stack protector
         gcc_cv_libc_provides_ssp=yes;;
-       *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
+       *-*-linux* | *-*-kfreebsd*-gnu)
       # glibc 2.4 and later provides __stack_chk_fail and
       # either __stack_chk_guard, or TLS access to stack guard canary.
 
@@ -28433,7 +28606,7 @@ fi
         # realistically usable GNU/Hurd configurations.
         # All supported versions of musl provide it as well
         gcc_cv_libc_provides_ssp=yes;;
-       *-*-darwin* | *-*-freebsd*)
+       *-*-darwin* | *-*-freebsd* | *-*-netbsd*)
         ac_fn_cxx_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
 if test "x$ac_cv_func___stack_chk_fail" = x""yes; then :
   gcc_cv_libc_provides_ssp=yes
@@ -28526,6 +28699,24 @@ $as_echo "#define TARGET_DEFAULT_LONG_DOUBLE_128 1" >>confdefs.h
 
 fi
 
+# Check if the target LIBC supports exporting the AT_PLATFORM and AT_HWCAP
+# values in the TCB.  Currently, only GLIBC 2.23 and later support this.
+gcc_cv_libc_provides_hwcap_in_tcb=no
+case "$target" in
+  powerpc*-*-linux*)
+
+if test $glibc_version_major -gt 2 \
+  || ( test $glibc_version_major -eq 2 && test $glibc_version_minor -ge 23 ); then :
+  gcc_cv_libc_provides_hwcap_in_tcb=yes
+fi
+    ;;
+esac
+if test x$gcc_cv_libc_provides_hwcap_in_tcb = xyes; then
+
+$as_echo "#define TARGET_LIBC_PROVIDES_HWCAP_IN_TCB 1" >>confdefs.h
+
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dl_iterate_phdr in target C library" >&5
 $as_echo_n "checking dl_iterate_phdr in target C library... " >&6; }
 gcc_cv_target_dl_iterate_phdr=unknown
@@ -28932,13 +29123,11 @@ $as_echo "#define HAVE_isl 1" >>confdefs.h
 
 fi
 
-# Check whether isl_schedule_constraints_compute_schedule is available;
-# it's new in ISL-0.13.
 # Check whether isl_options_set_schedule_serialize_sccs is available;
-# it's new in ISL-0.15.
+# it's new in isl 0.15.
 if test "x${ISLLIBS}" != "x" ; then
   saved_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS $ISLINC"
+  CXXFLAGS="$CXXFLAGS $ISLINC $GMPINC"
   saved_LIBS="$LIBS"
   LIBS="$LIBS $ISLLIBS $GMPLIBS"