configure.ac (SYSTEM_HEADER_DIR, [...]): Set correctly.
[gcc.git] / gcc / configure
index 47f70e6c2f4e55c29993eb1b571ca0d63c8b4ed5..bde3dd8f77a3b1925d13fe1e8826597d9d3f0a87 100755 (executable)
@@ -719,6 +719,7 @@ BUILD_CFLAGS
 CXX_FOR_BUILD
 CC_FOR_BUILD
 inhibit_libc
+BUILD_SYSTEM_HEADER_DIR
 SYSTEM_HEADER_DIR
 ALL
 CROSS
@@ -734,6 +735,7 @@ INCINTL
 LIBINTL_DEP
 LIBINTL
 USE_NLS
+get_gcc_base_ver
 extra_opt_files
 extra_modes_file
 NATIVE_SYSTEM_HEADER_DIR
@@ -918,6 +920,7 @@ with_multilib_list
 enable_rpath
 with_libiconv_prefix
 enable_sjlj_exceptions
+with_gcc_major_version_only
 enable_secureplt
 enable_leading_mingw64_underscores
 enable_cld
@@ -1721,6 +1724,8 @@ Optional Packages:
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -3639,6 +3644,11 @@ else
 fi
 
 
+case $target in
+    *darwin*) ld64_flag=yes;; # Darwin can only use a ld64-compatible linker.
+    *) ld64_flag=no;;
+esac
+
 # With pre-defined ld
 
 # Check whether --with-ld was given.
@@ -3651,6 +3661,8 @@ if test x"${DEFAULT_LINKER+set}" = x"set"; then
     as_fn_error "cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" "$LINENO" 5
   elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
     gnu_ld_flag=yes
+  elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep ld64- > /dev/null; then
+    ld64_flag=yes
   fi
 
 cat >>confdefs.h <<_ACEOF
@@ -5019,7 +5031,7 @@ case "${target}" 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.
+         # libs.
          *-mdynamic-no-pic*) PICFLAG_FOR_TARGET='-fno-common -mno-dynamic-no-pic' ;;
          *) PICFLAG_FOR_TARGET=-fno-common ;;
        esac
@@ -5034,6 +5046,10 @@ 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.
@@ -5064,7 +5080,8 @@ case "${target}" in
        PICFLAG_FOR_TARGET=-fpic
        ;;
     # FIXME: Simplify to sh*-*-netbsd*?
-    sh-*-netbsdelf* | shl*-*-netbsdelf*)
+    sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
+      sh64-*-netbsd* | sh64l*-*-netbsd*)
        PICFLAG_FOR_TARGET=-fpic
        ;;
     # Default to -fPIC unless specified otherwise.
@@ -6758,63 +6775,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 strict_warn=
 save_CXXFLAGS="$CXXFLAGS"
-for real_option in -Wmissing-format-attribute; do
-  # Do the check with the no- prefix removed since gcc silently
-  # accepts any -Wno-* option on purpose
-  case $real_option in
-    -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
-    *) option=$real_option ;;
-  esac
-  as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports $option" >&5
-$as_echo_n "checking whether $CXX supports $option... " >&6; }
-if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  CXXFLAGS="$option"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  eval "$as_acx_Woption=yes"
-else
-  eval "$as_acx_Woption=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-eval ac_res=\$$as_acx_Woption
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :
-  strict_warn="$strict_warn${strict_warn:+ }$real_option"
-fi
-  done
-CXXFLAGS="$save_CXXFLAGS"
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-save_CXXFLAGS="$CXXFLAGS"
-for real_option in -Woverloaded-virtual; do
+for real_option in -Wmissing-format-attribute -Woverloaded-virtual; do
   # Do the check with the no- prefix removed since gcc silently
   # accepts any -Wno-* option on purpose
   case $real_option in
@@ -7135,13 +7096,8 @@ 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
 
-cat >>confdefs.h <<_ACEOF
-#define CHECKING_P $ac_checking
-_ACEOF
+$as_echo "#define CHECKING_P 1" >>confdefs.h
 
   nocommon_flag=-fno-common
 else
@@ -7149,6 +7105,14 @@ else
 
 fi
 
+if test x$ac_extra_checking != x ; then
+
+$as_echo "#define ENABLE_EXTRA_CHECKING 1" >>confdefs.h
+
+else
+  $as_echo "#define ENABLE_EXTRA_CHECKING 0" >>confdefs.h
+
+fi
 if test x$ac_df_checking != x ; then
 
 $as_echo "#define ENABLE_DF_CHECKING 1" >>confdefs.h
@@ -7692,7 +7656,7 @@ if test "${with_bugurl+set}" = set; then :
           ;;
      esac
 else
-  BUGURL="http://gcc.gnu.org/bugs.html"
+  BUGURL="https://gcc.gnu.org/bugs/"
 
 fi
 
@@ -11901,6 +11865,21 @@ static struct plugin_gcc_version gcc_version = {basever, datestamp,
                                                configuration_arguments};
 EOF
 
+# Determine what GCC version number to use in filesystem paths.
+
+  get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+  withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+        get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+      fi
+
+fi
+
+
+
+
 # Internationalization
 # If we haven't got the data from the intl directory,
 # assume NLS is disabled.
@@ -12236,62 +12215,29 @@ done
 CROSS=
 ALL=all.internal
 SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
+BUILD_SYSTEM_HEADER_DIR=$SYSTEM_HEADER_DIR
 
-if test "x$with_build_sysroot" != x; then
-  build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
-else
-  # This value is used, even on a native system, because
-  # CROSS_SYSTEM_HEADER_DIR is just
-  # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
-  build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
-fi
-
-if test x$host != x$target
-then
-       CROSS="-DCROSS_DIRECTORY_STRUCTURE"
-       ALL=all.cross
-       SYSTEM_HEADER_DIR=$build_system_header_dir
-       case "$host","$target" in
-       # Darwin crosses can use the host system's libraries and headers,
-       # because of the fat library support.  Of course, it must be the
-       # same version of Darwin on both sides.  Allow the user to
-       # just say --target=foo-darwin without a version number to mean
-       # "the version on this system".
-           *-*-darwin*,*-*-darwin*)
-               hostos=`echo $host | sed 's/.*-darwin/darwin/'`
-               targetos=`echo $target | sed 's/.*-darwin/darwin/'`
-               if test $hostos = $targetos -o $targetos = darwin ; then
-                   CROSS=
-                   SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
-                   with_headers=yes
-               fi
-               ;;
-
-           i?86-*-*,x86_64-*-* \
-           | powerpc*-*-*,powerpc64*-*-*)
-               CROSS="$CROSS -DNATIVE_CROSS" ;;
-       esac
+if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x ||
+   test x$build != x$host || test "x$with_build_sysroot" != x; then
+  if test "x$with_build_sysroot" != x; then
+    BUILD_SYSTEM_HEADER_DIR=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
+  else
+    BUILD_SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
+  fi
 
-       case $target in
-               *-*-mingw*)
-                       if test "x$with_headers" = x; then
-                               with_headers=yes
-                       fi
-                       ;;
-               *)
-                       ;;
-       esac
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
-        SYSTEM_HEADER_DIR=$build_system_header_dir
-fi
+  if test x$host != x$target
+  then
+    CROSS="-DCROSS_DIRECTORY_STRUCTURE"
+    ALL=all.cross
+    SYSTEM_HEADER_DIR=$BUILD_SYSTEM_HEADER_DIR
+  elif test "x$TARGET_SYSTEM_ROOT" != x; then
+    SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
+  fi
 
-if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
-  if test "x$with_headers" != x && test "x$with_headers" != xyes; then
-    target_header_dir=$with_headers
+  if test "x$with_build_sysroot" != "x"; then
+    target_header_dir="${with_build_sysroot}${native_system_header_dir}"
   elif test "x$with_sysroot" = x; then
     target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include"
-  elif test "x$with_build_sysroot" != "x"; then
-    target_header_dir="${with_build_sysroot}${native_system_header_dir}"
   elif test "x$with_sysroot" = xyes; then
     target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}"
   else
@@ -18476,7 +18422,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18479 "configure"
+#line 18425 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18582,7 +18528,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18585 "configure"
+#line 18531 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -22485,6 +22431,7 @@ $as_echo "#define HAVE_GAS_BALIGN_AND_P2ALIGN 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .p2align with maximum skip" >&5
 $as_echo_n "checking assembler for .p2align with maximum skip... " >&6; }
 if test "${gcc_cv_as_max_skip_p2align+set}" = set; then :
@@ -22520,6 +22467,7 @@ $as_echo "#define HAVE_GAS_MAX_SKIP_P2ALIGN 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .literal16" >&5
 $as_echo_n "checking assembler for .literal16... " >&6; }
 if test "${gcc_cv_as_literal16+set}" = set; then :
@@ -22555,6 +22503,7 @@ $as_echo "#define HAVE_GAS_LITERAL16 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working .subsection -1" >&5
 $as_echo_n "checking assembler for working .subsection -1... " >&6; }
 if test "${gcc_cv_as_subsection_m1+set}" = set; then :
@@ -22602,6 +22551,7 @@ $as_echo "#define HAVE_GAS_SUBSECTION_ORDERING 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weak" >&5
 $as_echo_n "checking assembler for .weak... " >&6; }
 if test "${gcc_cv_as_weak+set}" = set; then :
@@ -22637,6 +22587,7 @@ $as_echo "#define HAVE_GAS_WEAK 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .weakref" >&5
 $as_echo_n "checking assembler for .weakref... " >&6; }
 if test "${gcc_cv_as_weakref+set}" = set; then :
@@ -22672,6 +22623,7 @@ $as_echo "#define HAVE_GAS_WEAKREF 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .nsubspa comdat" >&5
 $as_echo_n "checking assembler for .nsubspa comdat... " >&6; }
 if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then :
@@ -22708,6 +22660,7 @@ $as_echo "#define HAVE_GAS_NSUBSPA_COMDAT 1" >>confdefs.h
 
 fi
 
+
 # .hidden needs to be supported in both the assembler and the linker,
 # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
 # This is irritatingly difficult to feature test for; we have to check the
 # ld, we don't know its patchlevel version, so we set the baseline at 2.13
 # to be safe.
 # The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
+case "${target}" in
+  *-*-aix*)
+    conftest_s='       .globl foobar,hidden'
+    ;;
+  *)
+    conftest_s='       .hidden foobar
+foobar:'
+    ;;
+esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .hidden" >&5
 $as_echo_n "checking assembler for .hidden... " >&6; }
 if test "${gcc_cv_as_hidden+set}" = set; then :
@@ -22727,8 +22689,7 @@ else
   then gcc_cv_as_hidden=yes
 fi
   elif test x$gcc_cv_as != x; then
-    $as_echo ' .hidden foobar
-foobar:' > conftest.s
+    $as_echo "$conftest_s" > 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
@@ -22747,6 +22708,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_hidden" >&5
 $as_echo "$gcc_cv_as_hidden" >&6; }
 
+
 case "${target}" in
   *-*-darwin*)
     # Darwin as has some visibility support, though with a different syntax.
@@ -22862,6 +22824,9 @@ else
     fi
   else
     case "${target}" in
+      *-*-aix[789]*)
+        gcc_cv_ld_hidden=yes
+        ;;
       *-*-darwin*)
        # Darwin ld has some visibility support.
        gcc_cv_ld_hidden=yes
@@ -23198,6 +23163,11 @@ if test $gcc_cv_as_leb128 = yes; then
 
 $as_echo "#define HAVE_AS_LEB128 1" >>confdefs.h
 
+fi
+if test $gcc_cv_as_leb128 != yes; then
+
+$as_echo "#define HAVE_AS_LEB128 0" >>confdefs.h
+
 fi
 
 # Check if we have assembler support for unwind directives.
@@ -23278,6 +23248,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_directive" >&5
 $as_echo "$gcc_cv_as_cfi_directive" >&6; }
 
+
 if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_objdump != x; then
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working cfi advance" >&5
 $as_echo_n "checking assembler for working cfi advance... " >&6; }
@@ -23315,6 +23286,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_advance_working" >&5
 $as_echo "$gcc_cv_as_cfi_advance_working" >&6; }
 
+
 else
   # no objdump, err on the side of caution
   gcc_cv_as_cfi_advance_working=no
@@ -23358,6 +23330,7 @@ fi
 $as_echo "$gcc_cv_as_cfi_personality_directive" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_GAS_CFI_PERSONALITY_DIRECTIVE `if test $gcc_cv_as_cfi_personality_directive = yes;
     then echo 1; else echo 0; fi`
@@ -23410,6 +23383,7 @@ $as_echo "$gcc_cv_as_cfi_sections_directive" >&6; }
 
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_GAS_CFI_SECTIONS_DIRECTIVE `if test $gcc_cv_as_cfi_sections_directive = yes;
     then echo 1; else echo 0; fi`
@@ -23513,6 +23487,7 @@ fi
 $as_echo "$gcc_cv_as_eh_frame" >&6; }
 
 
+
 if test $gcc_cv_as_eh_frame = buggy; then
 
 $as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h
@@ -23550,6 +23525,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
 $as_echo "$gcc_cv_as_shf_merge" >&6; }
 
+
 if test $gcc_cv_as_shf_merge = no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5
 $as_echo_n "checking assembler for section merging support... " >&6; }
@@ -23582,6 +23558,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_shf_merge" >&5
 $as_echo "$gcc_cv_as_shf_merge" >&6; }
 
+
 fi
 
 cat >>confdefs.h <<_ACEOF
@@ -23620,6 +23597,7 @@ $as_echo "#define HAVE_AS_STABS_DIRECTIVE 1" >>confdefs.h
 
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for COMDAT group support (GNU as)" >&5
 $as_echo_n "checking assembler for COMDAT group support (GNU as)... " >&6; }
 if test "${gcc_cv_as_comdat_group+set}" = set; then :
@@ -23651,6 +23629,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group" >&5
 $as_echo "$gcc_cv_as_comdat_group" >&6; }
 
+
 if test $gcc_cv_as_comdat_group = yes; then
   gcc_cv_as_comdat_group_percent=no
   gcc_cv_as_comdat_group_group=no
@@ -23686,6 +23665,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_percent" >&5
 $as_echo "$gcc_cv_as_comdat_group_percent" >&6; }
 
+
  if test $gcc_cv_as_comdat_group_percent = yes; then
    gcc_cv_as_comdat_group_group=no
  else
@@ -23736,6 +23716,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_comdat_group_group" >&5
 $as_echo "$gcc_cv_as_comdat_group_group" >&6; }
 
+
        ;;
    esac
    if test -z "${gcc_cv_as_comdat_group_group+set}"; then
@@ -23843,6 +23824,7 @@ $as_echo "#define HAVE_GAS_DISCRIMINATOR 1" >>confdefs.h
 
 fi
 
+
 # Thread-local storage - the check is heavily parameterized.
 conftest_s=
 tls_first_major=
@@ -24163,6 +24145,17 @@ x3:    .space 4
        tls_first_minor=14
        tls_as_opt="-a32 --fatal-warnings"
        ;;
+  riscv*-*-*)
+    conftest_s='
+       .section .tdata,"awT",@progbits
+x:     .word 2
+       .text
+       la.tls.gd a0,x
+        call __tls_get_addr'
+       tls_first_major=2
+       tls_first_minor=21
+       tls_as_opt='--fatal-warnings'
+       ;;
   s390-*-*)
     conftest_s='
        .section ".tdata","awT",@progbits
@@ -24340,6 +24333,7 @@ $as_echo "$gcc_cv_as_tls" >&6; }
 if test $gcc_cv_as_tls = yes; then
   set_have_as_tls=yes
 fi
+
 fi
 if test $set_have_as_tls = yes ; then
 
@@ -24485,6 +24479,46 @@ _ACEOF
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_lto_plugin" >&5
 $as_echo "$gcc_cv_lto_plugin" >&6; }
 
+# Target OS-specific assembler checks.
+
+case "$target_os" in
+  darwin*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mmacosx-version-min option" >&5
+$as_echo_n "checking assembler for -mmacosx-version-min option... " >&6; }
+if test "${gcc_cv_as_mmacosx_version_min+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_as_mmacosx_version_min=no
+  if test x$gcc_cv_as != x; then
+    $as_echo '.text' > conftest.s
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mmacosx-version-min=10.1 -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_mmacosx_version_min=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_mmacosx_version_min" >&5
+$as_echo "$gcc_cv_as_mmacosx_version_min" >&6; }
+if test $gcc_cv_as_mmacosx_version_min = yes; then
+
+$as_echo "#define HAVE_AS_MMACOSX_VERSION_MIN_OPTION 1" >>confdefs.h
+
+fi
+
+    ;;
+esac
+
+# Target CPU-specific assembler checks.
+
 case "$target" in
   aarch64*-*-*)
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mabi option" >&5
@@ -24513,6 +24547,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_aarch64_mabi" >&5
 $as_echo "$gcc_cv_as_aarch64_mabi" >&6; }
 
+
     if test x$gcc_cv_as_aarch64_mabi = xyes; then
 
 $as_echo "#define HAVE_AS_MABI_OPTION 1" >>confdefs.h
@@ -24572,6 +24607,7 @@ if test $gcc_cv_as_aarch64_picreloc = yes; then
 $as_echo "#define HAVE_AS_SMALL_PIC_RELOCS 1" >>confdefs.h
 
 fi
+
     # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
     # Check whether --enable-fix-cortex-a53-835769 was given.
 if test "${enable_fix_cortex_a53_835769+set}" = set; then :
@@ -24660,6 +24696,7 @@ if test $gcc_cv_as_alpha_explicit_relocs = yes; then
 $as_echo "#define HAVE_AS_EXPLICIT_RELOCS 1" >>confdefs.h
 
 fi
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for jsrdirect relocation support" >&5
 $as_echo_n "checking assembler for jsrdirect relocation support... " >&6; }
 if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then :
@@ -24697,6 +24734,7 @@ if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
 $as_echo "#define HAVE_AS_JSRDIRECT_RELOCS 1" >>confdefs.h
 
 fi
+
     ;;
 
   avr-*-*)
@@ -24731,6 +24769,7 @@ $as_echo "#define HAVE_AS_AVR_MLINK_RELAX_OPTION 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mrmw option" >&5
 $as_echo_n "checking assembler for -mrmw option... " >&6; }
 if test "${gcc_cv_as_avr_mrmw+set}" = set; then :
@@ -24761,6 +24800,7 @@ if test $gcc_cv_as_avr_mrmw = yes; then
 $as_echo "#define HAVE_AS_AVR_MRMW_OPTION 1" >>confdefs.h
 
 fi
+
     ;;
 
   cris-*-*)
@@ -24798,6 +24838,7 @@ if test $gcc_cv_as_cris_no_mul_bug = yes; then
 $as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h
 
 fi
+
     ;;
 
   sparc*-*-*)
@@ -24832,6 +24873,7 @@ $as_echo "#define HAVE_AS_REGISTER_PSEUDO_OP 1" >>confdefs.h
 
 fi
 
+
     { $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 :
@@ -24863,6 +24905,7 @@ $as_echo "#define HAVE_AS_RELAX_OPTION 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for GOTDATA_OP relocs" >&5
 $as_echo_n "checking assembler for GOTDATA_OP relocs... " >&6; }
 if test "${gcc_cv_as_sparc_gotdata_op+set}" = set; then :
@@ -24912,6 +24955,7 @@ $as_echo "#define HAVE_AS_SPARC_GOTDATA_OP 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5
 $as_echo_n "checking assembler for unaligned pcrel relocs... " >&6; }
 if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then :
@@ -25002,7 +25046,9 @@ $as_echo "#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1" >>confdefs.h
 
 fi
 
-fi # unaligned pcrel relocs
+
+fi
+ # unaligned pcrel relocs
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for offsetable %lo()" >&5
 $as_echo_n "checking assembler for offsetable %lo()... " >&6; }
@@ -25041,6 +25087,7 @@ $as_echo "#define HAVE_AS_OFFSETABLE_LO10 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for FMAF, HPC, and VIS 3.0 instructions" >&5
 $as_echo_n "checking assembler for FMAF, HPC, and VIS 3.0 instructions... " >&6; }
 if test "${gcc_cv_as_sparc_fmaf+set}" = set; then :
@@ -25079,6 +25126,7 @@ $as_echo "#define HAVE_AS_FMAF_HPC_VIS3 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for SPARC4 instructions" >&5
 $as_echo_n "checking assembler for SPARC4 instructions... " >&6; }
 if test "${gcc_cv_as_sparc_sparc4+set}" = set; then :
@@ -25121,6 +25169,7 @@ $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 :
@@ -25157,6 +25206,7 @@ $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 :
@@ -25193,6 +25243,7 @@ if test $gcc_cv_as_sparc_leon = yes; then
 $as_echo "#define HAVE_AS_LEON 1" >>confdefs.h
 
 fi
+
     ;;
 
   i[34567]86-*-* | x86_64-*-*)
@@ -25258,6 +25309,7 @@ fi
 $as_echo "$gcc_cv_as_comm_has_align" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_GAS_ALIGNED_COMM `if test $gcc_cv_as_comm_has_align = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25304,6 +25356,7 @@ if test $gcc_cv_as_ix86_pe_secrel32 = yes; then
 $as_echo "#define HAVE_GAS_PE_SECREL32_RELOC 1" >>confdefs.h
 
 fi
+
        # Test if the assembler supports the extended form of the .section
        # directive that specifies section alignment.  LTO support uses this,
        # but normally only after installation, so we warn but don't fail the
@@ -25338,6 +25391,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_section_has_align" >&5
 $as_echo "$gcc_cv_as_section_has_align" >&6; }
 
+
        if test x$gcc_cv_as_section_has_align != xyes; then
          case ",$enable_languages," in
            *,lto,*)
@@ -25383,6 +25437,7 @@ fi
 $as_echo "$gcc_cv_as_section_has_e" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_GAS_SECTION_EXCLUDE `if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25419,6 +25474,7 @@ $as_echo "#define HAVE_AS_IX86_FILDS 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for fildq and fistpq mnemonics" >&5
 $as_echo_n "checking assembler for fildq and fistpq mnemonics... " >&6; }
 if test "${gcc_cv_as_ix86_fildq+set}" = set; then :
@@ -25450,6 +25506,7 @@ $as_echo "#define HAVE_AS_IX86_FILDQ 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for cmov syntax" >&5
 $as_echo_n "checking assembler for cmov syntax... " >&6; }
 if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then :
@@ -25481,6 +25538,7 @@ $as_echo "#define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ffreep mnemonic" >&5
 $as_echo_n "checking assembler for ffreep mnemonic... " >&6; }
 if test "${gcc_cv_as_ix86_ffreep+set}" = set; then :
@@ -25512,6 +25570,7 @@ $as_echo "#define HAVE_AS_IX86_FFREEP 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5
 $as_echo_n "checking assembler for .quad directive... " >&6; }
 if test "${gcc_cv_as_ix86_quad+set}" = set; then :
@@ -25543,6 +25602,7 @@ $as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5
 $as_echo_n "checking assembler for sahf mnemonic... " >&6; }
 if test "${gcc_cv_as_ix86_sahf+set}" = set; then :
@@ -25575,6 +25635,7 @@ $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 :
@@ -25604,6 +25665,7 @@ fi
 $as_echo "$gcc_cv_as_ix86_interunit_movq" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_IX86_INTERUNIT_MOVQ `if test $gcc_cv_as_ix86_interunit_movq = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25640,6 +25702,7 @@ $as_echo "#define HAVE_AS_IX86_HLE 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for swap suffix" >&5
 $as_echo_n "checking assembler for swap suffix... " >&6; }
 if test "${gcc_cv_as_ix86_swap+set}" = set; then :
@@ -25671,6 +25734,7 @@ $as_echo "#define HAVE_AS_IX86_SWAP 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for different section symbol subtraction" >&5
 $as_echo_n "checking assembler for different section symbol subtraction... " >&6; }
 if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then :
@@ -25708,6 +25772,7 @@ $as_echo "#define HAVE_AS_IX86_DIFF_SECT_DELTA 1" >>confdefs.h
 
 fi
 
+
     { $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 :
@@ -25745,6 +25810,7 @@ $as_echo "#define HAVE_AS_IX86_REP_LOCK_PREFIX 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for ud2 mnemonic" >&5
 $as_echo_n "checking assembler for ud2 mnemonic... " >&6; }
 if test "${gcc_cv_as_ix86_ud2+set}" = set; then :
@@ -25776,6 +25842,7 @@ $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"
@@ -25823,6 +25890,7 @@ $as_echo "#define HAVE_AS_IX86_TLSGDPLT 1" >>confdefs.h
 
 fi
 
+
     conftest_s='
        .section .tdata,"aw'$tls_section_flag'",@progbits
 tls_ld:
@@ -25860,6 +25928,7 @@ fi
 $as_echo "$gcc_cv_as_ix86_tlsldmplt" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_IX86_TLSLDMPLT `if test $gcc_cv_as_ix86_tlsldmplt = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25910,6 +25979,7 @@ fi
 $as_echo "$gcc_cv_as_ix86_tlsldm" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_IX86_TLSLDM `if test $gcc_cv_as_ix86_tlsldm = yes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -25963,6 +26033,7 @@ fi
 $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
@@ -26003,6 +26074,7 @@ fi
 $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
@@ -26057,6 +26129,7 @@ fi
 $as_echo "$gcc_cv_as_ix86_tls_get_addr_via_got" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_IX86_TLS_GET_ADDR_GOT `if test x"$gcc_cv_as_ix86_tls_get_addr_via_got" = xyes; then echo 1; else echo 0; fi`
 _ACEOF
@@ -26102,6 +26175,7 @@ $as_echo "#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1" >>confdefs.h
 
 fi
 
+
     ;;
 
   powerpc*-*-*)
@@ -26134,6 +26208,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_machine_directive" >&5
 $as_echo "$gcc_cv_as_machine_directive" >&6; }
 
+
        if test x$gcc_cv_as_machine_directive != xyes; then
          echo "*** This target requires an assembler supporting \".machine\"" >&2
          echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
@@ -26188,6 +26263,7 @@ $as_echo "#define HAVE_AS_MFCRF 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "pwr5"
        .csect .text[PR]
@@ -26232,6 +26308,7 @@ $as_echo "#define HAVE_AS_POPCNTB 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "pwr5x"
        .csect .text[PR]
@@ -26276,6 +26353,7 @@ $as_echo "#define HAVE_AS_FPRND 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "pwr6"
        .csect .text[PR]
@@ -26320,6 +26398,7 @@ $as_echo "#define HAVE_AS_MFPGPR 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .csect .text[PR]
 LCF..0:
@@ -26368,6 +26447,7 @@ $as_echo "#define HAVE_AS_REL16 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "pwr6"
        .csect .text[PR]
@@ -26412,6 +26492,7 @@ $as_echo "#define HAVE_AS_CMPB 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "pwr6"
        .csect .text[PR]
@@ -26456,6 +26537,7 @@ $as_echo "#define HAVE_AS_DFP 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "pwr7"
        .csect .text[PR]
@@ -26500,6 +26582,7 @@ $as_echo "#define HAVE_AS_VSX 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "pwr7"
        .csect .text[PR]
@@ -26544,6 +26627,7 @@ $as_echo "#define HAVE_AS_POPCNTD 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "pwr8"
        .csect .text[PR]';;
@@ -26586,6 +26670,7 @@ $as_echo "#define HAVE_AS_POWER8 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "pwr9"
        .csect .text[PR]';;
@@ -26628,6 +26713,7 @@ $as_echo "#define HAVE_AS_POWER9 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .csect .text[PR]
        lwsync';;
@@ -26670,6 +26756,7 @@ $as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*) conftest_s='   .machine "476"
        .csect .text[PR]
@@ -26714,6 +26801,7 @@ $as_echo "#define HAVE_AS_DCI 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
 $as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
 if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then :
@@ -26749,6 +26837,7 @@ $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for tls marker support" >&5
 $as_echo_n "checking assembler for tls marker support... " >&6; }
 if test "${gcc_cv_as_powerpc_tls_markers+set}" = set; then :
@@ -26784,6 +26873,7 @@ $as_echo "#define HAVE_AS_TLS_MARKERS 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for prologue entry point marker support" >&5
 $as_echo_n "checking assembler for prologue entry point marker support... " >&6; }
 if test "${gcc_cv_as_powerpc_entry_markers+set}" = set; then :
@@ -26819,6 +26909,7 @@ $as_echo "#define HAVE_AS_ENTRY_MARKERS 1" >>confdefs.h
 
 fi
 
+
     case $target in
       *-*-aix*)
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for AIX .ref support" >&5
@@ -26861,6 +26952,7 @@ $as_echo "#define HAVE_AS_REF 1" >>confdefs.h
 
 fi
 
+
        { $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 :
@@ -26898,6 +26990,7 @@ if test $gcc_cv_as_aix_dwloc = yes; then
 $as_echo "#define HAVE_XCOFF_DWARF_EXTRAS 1" >>confdefs.h
 
 fi
+
        ;;
     esac
     ;;
@@ -26939,6 +27032,7 @@ if test $gcc_cv_as_mips_explicit_relocs = yes; then
        fi
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mno-shared support" >&5
 $as_echo_n "checking assembler for -mno-shared support... " >&6; }
 if test "${gcc_cv_as_mips_no_shared+set}" = set; then :
@@ -26974,6 +27068,7 @@ $as_echo "#define HAVE_AS_NO_SHARED 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5
 $as_echo_n "checking assembler for .gnu_attribute support... " >&6; }
 if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then :
@@ -27009,6 +27104,7 @@ $as_echo "#define HAVE_AS_GNU_ATTRIBUTE 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .module support" >&5
 $as_echo_n "checking assembler for .module support... " >&6; }
 if test "${gcc_cv_as_mips_dot_module+set}" = set; then :
@@ -27040,6 +27136,7 @@ if test $gcc_cv_as_mips_dot_module = yes; then
 $as_echo "#define HAVE_AS_DOT_MODULE 1" >>confdefs.h
 
 fi
+
     if test x$gcc_cv_as_mips_dot_module = xno \
        && test x$with_fp_32 != x; then
       as_fn_error "Requesting --with-fp-32= requires assembler support for .module." "$LINENO" 5
@@ -27076,6 +27173,7 @@ $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_n "checking assembler for .dtprelword support... " >&6; }
 if test "${gcc_cv_as_mips_dtprelword+set}" = set; then :
@@ -27115,6 +27213,7 @@ $as_echo "#define HAVE_AS_DTPRELWORD 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for DSPR1 mult with four accumulators support" >&5
 $as_echo_n "checking assembler for DSPR1 mult with four accumulators support... " >&6; }
 if test "${gcc_cv_as_mips_dspr1_mult+set}" = set; then :
@@ -27154,6 +27253,7 @@ $as_echo "#define HAVE_AS_DSPR1_MULT 1" >>confdefs.h
 
 fi
 
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker for explicit JALR relocation" >&5
 $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; }
     gcc_cv_as_ld_jalr_reloc=no
@@ -27273,6 +27373,7 @@ if test $gcc_cv_as_mips_nan = yes; then
 $as_echo "#define HAVE_AS_NAN 1" >>confdefs.h
 
 fi
+
     if test x$gcc_cv_as_mips_nan = xno \
        && test x$with_nan != x; then
       as_fn_error "Requesting --with-nan= requires assembler support for -mnan=" "$LINENO" 5
@@ -27313,6 +27414,7 @@ if test $gcc_cv_as_s390_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 .machine and .machinemode support" >&5
 $as_echo_n "checking assembler for .machine and .machinemode support... " >&6; }
 if test "${gcc_cv_as_s390_machine_machinemode+set}" = set; then :
@@ -27350,6 +27452,7 @@ if test $gcc_cv_as_s390_machine_machinemode = yes; then
 $as_echo "#define HAVE_AS_MACHINE_MACHINEMODE 1" >>confdefs.h
 
 fi
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for architecture modifiers support" >&5
 $as_echo_n "checking assembler for architecture modifiers support... " >&6; }
 if test "${gcc_cv_as_s390_architecture_modifiers+set}" = set; then :
@@ -27384,6 +27487,7 @@ if test $gcc_cv_as_s390_architecture_modifiers = yes; then
 $as_echo "#define HAVE_AS_ARCHITECTURE_MODIFIERS 1" >>confdefs.h
 
 fi
+
     ;;
 esac
 
@@ -27412,8 +27516,8 @@ esac
 # version to the per-target configury.
 case "$cpu_type" in
   aarch64 | alpha | arm | avr | bfin | cris | i386 | m32c | m68k | microblaze \
-  | mips | nios2 | pa | rs6000 | score | sparc | spu | tilegx | tilepro \
-  | visium | xstormy16 | xtensa)
+  | mips | nios2 | pa | riscv | rs6000 | score | sparc | spu | tilegx \
+  | tilepro | visium | xstormy16 | xtensa)
     insn="nop"
     ;;
   ia64 | s390)
@@ -27464,6 +27568,7 @@ fi
 $as_echo "$gcc_cv_as_dwarf2_debug_line" >&6; }
 
 
+
 # The .debug_line file table must be in the exact order that
 # we specified the files, since these indices are also used
 # by DW_AT_decl_file.  Approximate this test by testing if
@@ -27496,6 +27601,7 @@ fi
 $as_echo "$gcc_cv_as_dwarf2_file_buggy" >&6; }
 
 
+
  if test $gcc_cv_as_dwarf2_debug_line = yes \
  && test $gcc_cv_as_dwarf2_file_buggy = no; then
 
@@ -27539,6 +27645,7 @@ $as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h
 
 fi
 
+
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5
 $as_echo_n "checking assembler for --gstabs option... " >&6; }
 if test "${gcc_cv_as_gstabs_flag+set}" = set; then :
@@ -27575,6 +27682,7 @@ $as_echo "#define HAVE_AS_GSTABS_DEBUG_FLAG 1" >>confdefs.h
 
 fi
 
+
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --debug-prefix-map option" >&5
 $as_echo_n "checking assembler for --debug-prefix-map option... " >&6; }
 if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then :
@@ -27609,6 +27717,7 @@ if test $gcc_cv_as_debug_prefix_map_flag = yes; then
 $as_echo "#define HAVE_AS_DEBUG_PREFIX_MAP 1" >>confdefs.h
 
 fi
+
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for compressed debug sections" >&5
@@ -27659,6 +27768,7 @@ fi
 $as_echo "$gcc_cv_as_compress_debug" >&6; }
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define HAVE_AS_COMPRESS_DEBUG $gcc_cv_as_compress_debug
 _ACEOF
@@ -27705,6 +27815,7 @@ $as_echo "#define HAVE_GAS_LCOMM_WITH_ALIGNMENT 1" >>confdefs.h
 
 fi
 
+
 if test x$with_sysroot = x && test x$host = x$target \
    && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
    && test "$prefix" != "NONE"; then
@@ -27801,6 +27912,7 @@ if test $glibc_version_major -gt 2 \
 fi
 
 fi
+
 fi
 
 if test x$enable_gnu_unique_object = xyes; then
@@ -28225,6 +28337,71 @@ _ACEOF
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_compress_debug" >&5
 $as_echo "$gcc_cv_ld_compress_debug" >&6; }
 
+if test x"$ld64_flag" = x"yes"; then
+
+  # Set defaults for possibly untestable items.
+  gcc_cv_ld64_export_dynamic=0
+
+  if test "$build" = "$host"; then
+    darwin_try_test=1
+  else
+    darwin_try_test=0
+  fi
+
+  # On Darwin, because of FAT library support, it is often possible to execute
+  # exes from compatible archs even when the host differs from the build system.
+  case "$build","$host" in
+    x86_64-*-darwin*,i?86-*-darwin* | powerpc64*-*-darwin*,powerpc*-*-darwin*)
+       darwin_try_test=1;;
+    *) ;;
+  esac
+
+  # If the configurer specified a minimum ld64 version to be supported, then use
+  # that to determine feature support.
+  if test x"${gcc_cv_ld64_version}" != x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking ld64 specified version" >&5
+$as_echo_n "checking ld64 specified version... " >&6; }
+    gcc_cv_ld64_major=`echo "$gcc_cv_ld64_version" | sed -e 's/\..*//'`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_major" >&5
+$as_echo "$gcc_cv_ld64_major" >&6; }
+   if test "$gcc_cv_ld64_major" -ge 236; then
+      gcc_cv_ld64_export_dynamic=1
+    fi
+  elif test -x "$gcc_cv_ld" -a "$darwin_try_test" -eq 1; then
+    # If the version was not specified, try to find it.
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker version" >&5
+$as_echo_n "checking linker version... " >&6; }
+    if test x"${gcc_cv_ld64_version}" = x; then
+      gcc_cv_ld64_version=`$gcc_cv_ld -v 2>&1 | grep ld64 | sed s/.*ld64-// | awk '{print $1}'`
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_version" >&5
+$as_echo "$gcc_cv_ld64_version" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for -export_dynamic support" >&5
+$as_echo_n "checking linker for -export_dynamic support... " >&6; }
+    gcc_cv_ld64_export_dynamic=1
+    if $gcc_cv_ld -export_dynamic < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then
+      gcc_cv_ld64_export_dynamic=0
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_export_dynamic" >&5
+$as_echo "$gcc_cv_ld64_export_dynamic" >&6; }
+  fi
+
+  if test x"${gcc_cv_ld64_version}" != x; then
+
+cat >>confdefs.h <<_ACEOF
+#define LD64_VERSION "${gcc_cv_ld64_version}"
+_ACEOF
+
+  fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define LD64_HAS_EXPORT_DYNAMIC $gcc_cv_ld64_export_dynamic
+_ACEOF
+
+fi
+
 # --------
 # UNSORTED
 # --------
@@ -29244,47 +29421,6 @@ $as_echo "#define HAVE_isl 1" >>confdefs.h
 
 fi
 
-# Check whether isl_options_set_schedule_serialize_sccs is available;
-# it's new in isl 0.15.
-if test "x${ISLLIBS}" != "x" ; then
-  saved_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS $ISLINC $GMPINC"
-  saved_LIBS="$LIBS"
-  LIBS="$LIBS $ISLLIBS $GMPLIBS"
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking for isl_options_set_schedule_serialize_sccs" >&5
-$as_echo_n "checking Checking for isl_options_set_schedule_serialize_sccs... " >&6; }
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <isl/schedule.h>
-int
-main ()
-{
-isl_options_set_schedule_serialize_sccs (NULL, 0);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_has_isl_options_set_schedule_serialize_sccs=yes
-else
-  ac_has_isl_options_set_schedule_serialize_sccs=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5
-$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; }
-
-  LIBS="$saved_LIBS"
-  CXXFLAGS="$saved_CXXFLAGS"
-
-  if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
-
-$as_echo "#define HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS 1" >>confdefs.h
-
-  fi
-fi
-
 # Check for plugin support
    # Check whether --enable-plugin was given.
 if test "${enable_plugin+set}" = set; then :