diff options
Diffstat (limited to 'gcc/configure')
| -rwxr-xr-x | gcc/configure | 1151 |
1 files changed, 804 insertions, 347 deletions
diff --git a/gcc/configure b/gcc/configure index 1696595..f349c1d 100755 --- a/gcc/configure +++ b/gcc/configure @@ -635,7 +635,6 @@ LIBOBJS CET_HOST_FLAGS LD_PICFLAG PICFLAG -enable_default_pie libgccjit_version enable_host_bind_now LIBGDIAGNOSTICS @@ -649,6 +648,7 @@ ISLLIBS GMPINC GMPLIBS target_cpu_default +jit_target_objs rust_target_objs d_target_objs fortran_target_objs @@ -658,6 +658,8 @@ use_gcc_stdint xm_defines xm_include_list xm_file_list +tm_jit_include_list +tm_jit_file_list tm_rust_include_list tm_rust_file_list tm_d_include_list @@ -758,6 +760,7 @@ LIPO NMEDIT DSYMUTIL STRIP +LLVM_CONFIG OBJDUMP ac_ct_DUMPBIN DUMPBIN @@ -872,7 +875,6 @@ c_strict_warn strict_warn c_loose_warn loose_warn -aliasing_flags CPP EGREP GREP @@ -1064,6 +1066,7 @@ enable_versioned_jit enable_default_pie enable_cet enable_s390_excess_float_precision +enable_x86_64_mfentry ' ac_precious_vars='build_alias host_alias @@ -1842,6 +1845,7 @@ Optional Features: --enable-s390-excess-float-precision on s390 targets, evaluate float with double precision when in standards-conforming mode + --enable-x86-64-mfentry enable -mfentry by default on x86-64 targets Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -7124,45 +7128,6 @@ $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 -# get miscompiled. Use -fno-strict-aliasing to work around this problem. -# Since there is no reliable feature check for the presence of this bug, -# we simply use a GCC version number check. (This should never trigger for -# stages 2 or 3 of a native bootstrap.) -aliasing_flags= -if test "$GCC" = yes; then - saved_CXXFLAGS="$CXXFLAGS" - - # The following test compilation will succeed if and only if $CXX accepts - # -fno-strict-aliasing *and* is older than GCC 4.3. - CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX is affected by placement new aliasing bug" >&5 -$as_echo_n "checking whether $CXX is affected by placement new aliasing bug... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) -#error compiler not affected by placement new aliasing bug -#endif - -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; aliasing_flags='-fno-strict-aliasing' -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - CXXFLAGS="$saved_CXXFLAGS" -fi - - - - # --------------------- # Warnings and checking # --------------------- @@ -10526,6 +10491,8 @@ if test "x$ZSTD_LIB" != x \ ZSTD_LDFLAGS=-L$ZSTD_LIB fi +saved_CXXFLAGS="$CXXFLAGS" +saved_LDFLAGS="$LDFLAGS" CXXFLAGS="$CXXFLAGS $ZSTD_CPPFLAGS" LDFLAGS="$LDFLAGS $ZSTD_LDFLAGS" @@ -10634,6 +10601,9 @@ elif test "x$with_zstd" != x; then fi fi +CXXFLAGS="$saved_CXXFLAGS" +LDFLAGS="$saved_LDFLAGS" + for ac_func in times clock kill getrlimit setrlimit atoq \ @@ -11306,6 +11276,7 @@ fi + use_additional=yes acl_save_prefix="$prefix" @@ -14234,6 +14205,7 @@ $as_echo "$LIBICONV" >&6; } + use_additional=yes acl_save_prefix="$prefix" @@ -15149,6 +15121,17 @@ for f in $tm_rust_file; do esac done +tm_jit_file_list= +tm_jit_include_list= +for f in $tm_jit_file; do + case $f in + * ) + tm_jit_file_list="${tm_jit_file_list} \$(srcdir)/config/$f" + tm_jit_include_list="${tm_jit_include_list} config/$f" + ;; + esac +done + xm_file_list= xm_include_list= for f in $xm_file; do @@ -16491,8 +16474,360 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown -plugin_option= + +# Try CLANG_PLUGIN_FILE first since GCC_PLUGIN_OPTION may return the +# wrong plugin_option with clang. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang" >&5 +$as_echo_n "checking for clang... " >&6; } +if ${clang_cv_is_clang+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __clang__ + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + clang_cv_is_clang=yes +else + clang_cv_is_clang=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5 +$as_echo "$clang_cv_is_clang" >&6; } + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}llvm-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LLVM_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LLVM_CONFIG"; then + ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LLVM_CONFIG="${ac_tool_prefix}llvm-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG +if test -n "$LLVM_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5 +$as_echo "$LLVM_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_LLVM_CONFIG"; then + ac_ct_LLVM_CONFIG=$LLVM_CONFIG + # Extract the first word of "llvm-config", so it can be a program name with args. +set dummy llvm-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LLVM_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LLVM_CONFIG"; then + ac_cv_prog_ac_ct_LLVM_CONFIG="$ac_ct_LLVM_CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LLVM_CONFIG="llvm-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LLVM_CONFIG=$ac_cv_prog_ac_ct_LLVM_CONFIG +if test -n "$ac_ct_LLVM_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LLVM_CONFIG" >&5 +$as_echo "$ac_ct_LLVM_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_LLVM_CONFIG" = x; then + LLVM_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LLVM_CONFIG=$ac_ct_LLVM_CONFIG + fi +else + LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG" +fi + + plugin_file= + if test $clang_cv_is_clang = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } + plugin_names="LLVMgold.so" + for plugin in $plugin_names; do + plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` + if test "$plugin_file" != "$plugin"; then + break; + fi + if test -n "${LLVM_CONFIG}"; then + plugin_file=`${LLVM_CONFIG} --libdir`/$plugin + if test -f "$plugin_file"; then + break; + fi + fi + plugin_file= + done + if test -z "$plugin_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + + if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 + fi + plugin_option="--plugin $plugin_file" + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_file= + fi + rm -f conftest.* + fi + fi + plugin_file="$plugin_file" + +if test -n "$plugin_file"; then + plugin_option="--plugin $plugin_file" +else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test -z "${AR}"; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= for plugin in $plugin_names; do plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` if test x$plugin_so = x$plugin; then @@ -16503,7 +16838,24 @@ for plugin in $plugin_names; do break fi done +if test -z "$plugin_option"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } + touch conftest.c + ${AR} $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= + fi + rm -f conftest.* +fi +plugin_option="$plugin_option" +fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -16598,17 +16950,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then - if $AR --help 2>&1 | grep -q "\--plugin"; then - touch conftest.c - $AR $plugin_option rc conftest.a conftest.c - if test "$?" != 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} - else + case "$AR" in + *"$plugin_option"*) + ;; + *) + if $AR --help 2>&1 | grep -q "\--plugin"; then AR="$AR $plugin_option" fi - rm -f conftest.* - fi + ;; + esac fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -16815,9 +17165,15 @@ fi test -z "$RANLIB" && RANLIB=: if test -n "$plugin_option" && test "$RANLIB" != ":"; then - if $RANLIB --help 2>&1 | grep -q "\--plugin"; then - RANLIB="$RANLIB $plugin_option" - fi + case "$RANLIB" in + *"$plugin_option"*) + ;; + *) + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi + ;; + esac fi @@ -21520,7 +21876,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 21523 "configure" +#line 21879 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -21626,7 +21982,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 21629 "configure" +#line 21985 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -25210,6 +25566,18 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_mold" >&5 $as_echo "$ld_is_mold" >&6; } +# Check to see if we are using Wild instead of ld +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using wild" >&5 +$as_echo_n "checking whether we are using wild... " >&6; } +ld_is_wild=no +if test x$gcc_cv_ld != x; then + if $gcc_cv_ld --version 2>/dev/null | sed 1q \ + | grep "Wild" > /dev/null; then + ld_is_wild=yes + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_wild" >&5 +$as_echo "$ld_is_wild" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking gold linker with split stack support as non default" >&5 $as_echo_n "checking gold linker with split stack support as non default... " >&6; } @@ -25674,6 +26042,9 @@ else powerpc*-*-darwin*) gcc_cv_as_flags="-arch ppc" ;; + amdgcn*) + gcc_cv_as_flags="--filetype=obj -triple=amdgcn--amdhsa" + ;; *) gcc_cv_as_flags=" " ;; @@ -25688,7 +26059,7 @@ if ${gcc_cv_as_balign_and_p2align+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_balign_and_p2align=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.balign 4 .p2align 2' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' @@ -25721,7 +26092,7 @@ if ${gcc_cv_as_max_skip_p2align+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_max_skip_p2align=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.p2align 4,,7' > 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 @@ -25753,7 +26124,7 @@ if ${gcc_cv_as_literal16+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_literal16=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.literal16' > 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 @@ -25785,7 +26156,7 @@ if ${gcc_cv_as_subsection_m1+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_subsection_m1=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'conftest_label1: .word 0 .subsection -1 conftest_label2: .word 0 @@ -25797,7 +26168,7 @@ conftest_label2: .word 0 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then - if test x$gcc_cv_nm != x; then + if test x"$gcc_cv_nm" != x; then $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 @@ -25828,7 +26199,7 @@ if ${gcc_cv_as_weak+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_weak=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .weak foobar' > 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 @@ -25860,7 +26231,7 @@ if ${gcc_cv_as_weakref+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_weakref=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .weakref foobar, barfnot' > 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 @@ -25892,7 +26263,7 @@ if ${gcc_cv_as_nsubspa_comdat+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_nsubspa_comdat=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .SPACE $TEXT$ .NSUBSPA $CODE$,COMDAT' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' @@ -25941,7 +26312,7 @@ if ${gcc_cv_as_hidden+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_hidden=no - if test x$gcc_cv_as != x; then + 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' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -25975,7 +26346,7 @@ if ${gcc_cv_as_base64+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_base64=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .section .rodata .base64 "Tm9uIHB1ZG9yIGVzdCBuaWwgc2NpcmUsIHB1ZG9yIG5pbCBkaXNjZXJlIHZlbGxlLgo="' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' @@ -26008,7 +26379,7 @@ if ${gcc_cv_as_cv_ucomp+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_cv_ucomp=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.cv_ucomp 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 @@ -26071,9 +26442,9 @@ bar: ret .size bar, .-bar EOF - if test x$gcc_cv_as != x \ - && test x$gcc_cv_ld != x \ - && test x$gcc_cv_readelf != x \ + if test x"$gcc_cv_as" != x \ + && test x"$gcc_cv_ld" != x \ + && test x"$gcc_cv_readelf" != x \ && $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1 \ && $gcc_cv_readelf --relocs --wide conftest \ @@ -26117,6 +26488,17 @@ if test $in_tree_ld != yes ; then ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` + case "${target}" in + *-*-solaris2*) + if test "$ld_vers_major" -gt 2; then + : + elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -ge 30; then + : + else + as_fn_error $? "GNU ld 2.30 or later is required on Solaris (found GNU ld $ld_ver)" "$LINENO" 5 + fi + ;; + esac else case "${target}" in *-*-solaris2*) @@ -26160,6 +26542,8 @@ else : elif test x"$ld_is_mold" = xyes; then : + elif test x"$ld_is_wild" = xyes; then + : elif echo "$ld_ver" | grep GNU > /dev/null; then if test 0"$ld_date" -lt 20020404; then if test -n "$ld_date"; then @@ -26223,7 +26607,7 @@ if test $in_tree_ld = yes ; then && test $in_tree_ld_is_elf = yes; then gcc_cv_ld_ro_rw_mix=read-write fi -elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then +elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x -a x"$gcc_cv_objdump" != x ; then echo '.section myfoosect, "a"' > conftest1.s echo '.section myfoosect, "aw"' > conftest2.s echo '.byte 1' >> conftest2.s @@ -26232,8 +26616,11 @@ elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1; then + # Note the Wild linker has --gc-sections on by default. if $gcc_cv_ld -shared -o conftest1.so conftest1.o \ - conftest2.o conftest3.o > /dev/null 2>&1 \ + conftest2.o conftest3.o --no-gc-sections > /dev/null 2>&1 \ + || $gcc_cv_ld -shared -o conftest1.so conftest1.o \ + conftest2.o conftest3.o > /dev/null 2>&1 \ || $gcc_cv_ld -r -o conftest1.so conftest1.o \ conftest2.o conftest3.o > /dev/null 2>&1; then gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ @@ -26305,7 +26692,7 @@ fi && test $in_tree_ld_is_elf = yes; then gcc_cv_initfini_array=yes fi - elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then + elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x -a x"$gcc_cv_objdump" != x ; then case $target:$gas in *:yes) sh_flags='"a"' @@ -26506,7 +26893,7 @@ if ${gcc_cv_as_mno_relax+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mno_relax=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mno-relax -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -26536,15 +26923,15 @@ fi esac # Check if we have .[us]leb128, and support symbol arithmetic with it. -# Older versions of GAS and some non-GNU assemblers, have a bugs handling -# these directives, even when they appear to accept them. +# Older versions of GAS and some non-GNU assemblers have bugs in handling +# of these directives, even when they appear to accept them. { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .sleb128 and .uleb128" >&5 $as_echo_n "checking assembler for .sleb128 and .uleb128... " >&6; } if ${gcc_cv_as_leb128+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_leb128=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .data .uleb128 L2 - L1 L1: @@ -26571,6 +26958,11 @@ elif test "x$gcc_cv_otool" != x; then | grep '04 80 0a 8e 78 80 80 80 80 80 80 80 80 80 01' >/dev/null; then gcc_cv_as_leb128=yes fi +elif test "x$gcc_cv_readelf" != x; then + if $gcc_cv_readelf -x .data conftest.o 2>/dev/null \ + | grep '04800a8e 78808080 80808080 808001' >/dev/null; then + gcc_cv_as_leb128=yes + fi else # play safe, assume the assembler is broken. : @@ -26610,7 +27002,7 @@ if ${gcc_cv_as_cfi_directive+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_cfi_directive=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text .cfi_startproc .cfi_offset 0, 0 @@ -26667,6 +27059,12 @@ else esac fi ;; + x86_64-*-darwin* | i?86-*-darwin* | powerpc*-darwin-*) + # Darwin has assemblers that support .cfi_ instructions, but that then + # triggers emission of compact unwind which has incompatibilities with + # current GCC output. + gcc_cv_as_cfi_directive=no + ;; *-*-*) gcc_cv_as_cfi_directive=yes ;; @@ -26689,7 +27087,7 @@ if ${gcc_cv_as_cfi_advance_working+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_cfi_advance_working=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text .cfi_startproc .cfi_adjust_cfa_offset 64 @@ -26739,7 +27137,7 @@ if ${gcc_cv_as_cfi_personality_directive+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_cfi_personality_directive=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text .cfi_startproc .cfi_personality 0, symbol @@ -26775,7 +27173,7 @@ if ${gcc_cv_as_cfi_sections_directive+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_cfi_sections_directive=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text .cfi_sections .debug_frame, .eh_frame .cfi_startproc @@ -26829,7 +27227,7 @@ if ${gcc_cv_as_eh_frame+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_eh_frame=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text .LFB1: .4byte 0 @@ -26928,7 +27326,7 @@ if ${gcc_cv_as_section_exclude_e+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_section_exclude_e=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section foo1,"e" .byte 0,0,0,0' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' @@ -26970,7 +27368,7 @@ if ${gcc_cv_as_section_exclude_hash+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_section_exclude_hash=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$conftest_s .byte 0,0,0,0" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' @@ -27002,9 +27400,9 @@ _ACEOF # Test if the assembler supports the section flag 'R' for specifying # section with SHF_GNU_RETAIN. case "${target}" in - # Solaris may use GNU assembler with Solairs ld. Even if GNU + # Solaris may use GNU assembler with Solaris ld. Even if GNU # assembler supports the section flag 'R', it doesn't mean that - # Solairs ld supports it. + # Solaris ld supports it. *-*-solaris2*) gcc_cv_as_shf_gnu_retain=no ;; @@ -27015,7 +27413,7 @@ if ${gcc_cv_as_shf_gnu_retain+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_shf_gnu_retain=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section .foo,"awR",%progbits .byte 0' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' @@ -27048,9 +27446,9 @@ _ACEOF # Test if the assembler supports the section flag 'o' for specifying # section with link-order. case "${target}" in - # Solaris may use GNU assembler with Solairs ld. Even if GNU + # Solaris may use GNU assembler with Solaris ld. Even if GNU # assembler supports the section flag 'o', it doesn't mean that - # Solairs ld supports it. + # Solaris ld supports it. *-*-solaris2*) gcc_cv_as_section_link_order=no ;; @@ -27061,7 +27459,7 @@ if ${gcc_cv_as_section_link_order+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_section_link_order=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section .foo,"a" .byte 0 .section __patchable_function_entries,"awo",%progbits,.foo @@ -27099,7 +27497,7 @@ if ${gcc_cv_as_shf_merge+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_shf_merge=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -27127,7 +27525,7 @@ if ${gcc_cv_as_shf_merge_percent+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_shf_merge_percent=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -27162,7 +27560,7 @@ if ${gcc_cv_as_comdat_group+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_comdat_group=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -27193,7 +27591,7 @@ if ${gcc_cv_as_comdat_group_percent+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_comdat_group_percent=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -27244,7 +27642,7 @@ if ${gcc_cv_as_comdat_group_group+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_comdat_group_group=no - if test x$gcc_cv_as != x; then + 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' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -27276,6 +27674,8 @@ if test x"$ld_is_gold" = xyes; then comdat_group=yes elif test x"$ld_is_mold" = xyes; then comdat_group=yes +elif test x"$ld_is_wild" = xyes; then + comdat_group=yes elif test $in_tree_ld = yes ; then comdat_group=no 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 \ @@ -27296,21 +27696,8 @@ elif echo "$ld_ver" | grep GNU > /dev/null; then fi else case "${target}" in - *-*-solaris2.1[1-9]*) - comdat_group=no - # Sun ld has COMDAT group support since Solaris 9, but it doesn't - # interoperate with GNU as until Solaris 11 build 130, i.e. ld - # version 1.688. - # - # If using Sun as for COMDAT group as emitted by GCC, one needs at - # least ld version 1.2267. - if test "$ld_vers_major" -gt 1; then - comdat_group=yes - elif test "x$gas_flag" = xyes && test "$ld_vers_minor" -ge 1688; then - comdat_group=yes - elif test "$ld_vers_minor" -ge 2267; then - comdat_group=yes - fi + *-*-solaris2*) + comdat_group=yes ;; *) # Assume linkers other than GNU ld don't support COMDAT group. @@ -27343,7 +27730,7 @@ if ${gcc_cv_as_is_stmt+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_is_stmt=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text .file 1 "conf.c" .loc 1 1 0 is_stmt 1' > conftest.s @@ -27377,7 +27764,7 @@ if ${gcc_cv_as_discriminator+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_discriminator=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text .file 1 "conf.c" .loc 1 1 0 discriminator 1' > conftest.s @@ -27840,7 +28227,7 @@ if ${gcc_cv_as_tls+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_tls=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$conftest_s" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags $tls_as_opt -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -27864,6 +28251,35 @@ if test $gcc_cv_as_tls = yes; then fi fi +case $target_os in + win32 | pe | cygwin* | mingw32*) + if test $set_have_as_tls = yes; then + # Hack to check whether ld breaks on @secrel32 for Windows + if test $in_tree_ld = yes; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 44 -o "$gcc_cv_gld_major_version" -gt 2; then + : # ld support for @secrel32 was fixed in this version + else + as_fn_error $? "ld version is known to have broken secrel32 relocations, configure without --enable-tls or with --disable-tls to remove this error. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881 for more information." "$LINENO" 5 + fi + elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x -a x"$gcc_cv_objdump" != x; then + echo '.text' > conftest.s + echo 'foo: nop' >> conftest.s + echo '.data' >> conftest.s + echo '.secrel32 foo' >> conftest.s + if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 && $gcc_cv_ld -o conftest.exe conftest.o > /dev/null; then + if $gcc_cv_objdump -h conftest.exe | grep '\.reloc\>' > /dev/null; then + as_fn_error $? "ld has broken secrel32 relocations, configure without --enable-tls or with --disable-tls to remove this error. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881 for more information." "$LINENO" 5 + fi + else + as_fn_error $? "Error occurred while checking for broken secrel32 relocations. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881 for more information." "$LINENO" 5 + fi + rm -f conftest.s conftest.o conftest.exe + else + as_fn_error $? "Cannot check for broken secrel32 relocations to determine --enable-tls support. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881 for more information." "$LINENO" 5 + fi + fi + ;; +esac if test $set_have_as_tls = yes ; then $as_echo "#define HAVE_AS_TLS 1" >>confdefs.h @@ -28068,7 +28484,7 @@ if ${gcc_cv_as_mmacosx_version_min+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mmacosx_version_min=no - if test x$gcc_cv_as != x; then + 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 @@ -28100,7 +28516,7 @@ if ${gcc_cv_as_darwin_build_version+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_darwin_build_version=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .build_version macos, 10, 14 sdk_version 10, 14' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mmacosx-version-min=10.14 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -28139,7 +28555,7 @@ if ${gcc_cv_as_aarch64_mabi+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_aarch64_mabi=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mabi=lp64 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -28192,7 +28608,7 @@ if ${gcc_cv_as_aarch64_picreloc+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_aarch64_picreloc=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text ldr x0, [x2, #:gotpage_lo15:globalsym] @@ -28220,6 +28636,43 @@ $as_echo "#define HAVE_AS_SMALL_PIC_RELOCS 1" >>confdefs.h fi + # Check if we have binutils support for AEABI build attributes. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for support of AEABI build attributes" >&5 +$as_echo_n "checking assembler for support of AEABI build attributes... " >&6; } +if ${gcc_cv_as_aarch64_aeabi_build_attributes+:} false; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_aarch64_aeabi_build_attributes=no + if test x"$gcc_cv_as" != x; then + $as_echo ' + .aeabi_subsection aeabi_feature_and_bits, optional, ULEB128 + .aeabi_attribute Tag_Feature_BTI, 1 + .aeabi_attribute Tag_Feature_PAC, 1 + .aeabi_attribute Tag_Feature_GCS, 1 + ' > 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_aarch64_aeabi_build_attributes=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_aarch64_aeabi_build_attributes" >&5 +$as_echo "$gcc_cv_as_aarch64_aeabi_build_attributes" >&6; } +if test $gcc_cv_as_aarch64_aeabi_build_attributes = yes; then + +$as_echo "#define HAVE_AS_AEABI_BUILD_ATTRIBUTES 1" >>confdefs.h + +fi + # Enable Branch Target Identification Mechanism and Return Address # Signing by default. # Check whether --enable-standard-branch-protection was given. @@ -28287,7 +28740,7 @@ if ${gcc_cv_as_alpha_explicit_relocs+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_alpha_explicit_relocs=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .set nomacro .text extbl $3, $2, $3 !lituse_bytoff!1 @@ -28330,7 +28783,7 @@ if ${gcc_cv_as_alpha_jsrdirect_relocs+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_alpha_jsrdirect_relocs=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .set nomacro .text ldq $27, a($29) !literal!1 @@ -28367,7 +28820,7 @@ if ${gcc_cv_as_avr_mlink_relax+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_avr_mlink_relax=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --mlink-relax -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -28399,7 +28852,7 @@ if ${gcc_cv_as_avr_mrmw+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_avr_mrmw=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mrmw -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -28431,7 +28884,7 @@ if ${gcc_cv_as_avr_mgccisr+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_avr_mgccisr=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text __gcc_isr 1 __gcc_isr 2 @@ -28595,7 +29048,7 @@ if ${gcc_cv_as_cris_no_mul_bug+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_cris_no_mul_bug=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -no-mul-bug-abort -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -28629,7 +29082,7 @@ if ${gcc_cv_as_sparc_relax+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_relax=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -relax -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -28661,7 +29114,7 @@ if ${gcc_cv_as_sparc_gotdata_op+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_gotdata_op=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text .align 4 foo: @@ -28711,7 +29164,7 @@ if ${gcc_cv_as_sparc_ua_pcrel+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_ua_pcrel=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text foo: nop @@ -28751,7 +29204,7 @@ if ${gcc_cv_as_sparc_ua_pcrel_hidden+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_ua_pcrel_hidden=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.data .align 4 .byte 0x31 @@ -28805,7 +29258,7 @@ if ${gcc_cv_as_sparc_offsetable_lo10+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_offsetable_lo10=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text or %g1, %lo(ab) + 12, %g1 or %g1, %lo(ab + 12), %g1' > conftest.s @@ -28843,7 +29296,7 @@ if ${gcc_cv_as_sparc_fmaf+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_fmaf=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text .register %g2, #scratch .register %g3, #scratch @@ -28882,7 +29335,7 @@ if ${gcc_cv_as_sparc_sparc4+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_sparc4=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text .register %g2, #scratch .register %g3, #scratch @@ -28925,7 +29378,7 @@ if ${gcc_cv_as_sparc_sparc5+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_sparc5=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text .register %g2, #scratch .register %g3, #scratch @@ -28962,7 +29415,7 @@ if ${gcc_cv_as_sparc_sparc6+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_sparc6=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text .register %g2, #scratch .register %g3, #scratch @@ -28999,7 +29452,7 @@ if ${gcc_cv_as_sparc_leon+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_sparc_leon=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text .register %g2, #scratch .register %g3, #scratch @@ -29070,7 +29523,7 @@ if ${gcc_cv_as_comm_has_align+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_comm_has_align=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.comm foo,1,32' > 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 @@ -29103,7 +29556,7 @@ if ${gcc_cv_as_ix86_pe_secrel32+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_pe_secrel32=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text foo: nop .data @@ -29145,7 +29598,7 @@ if ${gcc_cv_as_section_has_align+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_section_has_align=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section lto_test,"dr0"' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -fatal-warnings -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -29184,7 +29637,7 @@ if ${gcc_cv_as_mllvm_x86_pad_for_align+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mllvm_x86_pad_for_align=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mllvm -x86-pad-for-align=false -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -29218,7 +29671,7 @@ if ${gcc_cv_as_ix86_xbrace_comment+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_xbrace_comment=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -xbrace_comment=no -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -29250,7 +29703,7 @@ if ${gcc_cv_as_ix86_filds+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_filds=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'filds (%ebp); fists (%ebp)' > 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 @@ -29282,7 +29735,7 @@ if ${gcc_cv_as_ix86_fildq+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_fildq=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'fildq (%ebp); fistpq (%ebp)' > 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 @@ -29314,7 +29767,7 @@ if ${gcc_cv_as_ix86_cmov_sun_syntax+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_cmov_sun_syntax=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'cmovl.l %edx, %eax' > 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 @@ -29346,7 +29799,7 @@ if ${gcc_cv_as_ix86_ffreep+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_ffreep=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'ffreep %st(1)' > 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 @@ -29378,7 +29831,7 @@ if ${gcc_cv_as_ix86_quad+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_quad=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.quad 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 @@ -29410,7 +29863,7 @@ if ${gcc_cv_as_ix86_sahf+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_sahf=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.code64 sahf' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' @@ -29443,7 +29896,7 @@ if ${gcc_cv_as_ix86_interunit_movq+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_interunit_movq=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.code64 movq %mm0, %rax movq %rax, %xmm0' > conftest.s @@ -29478,7 +29931,7 @@ if ${gcc_cv_as_ix86_hle+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_hle=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'lock xacquire cmpxchg %esi, (%ecx)' > 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 @@ -29510,7 +29963,7 @@ if ${gcc_cv_as_ix86_swap+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_swap=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'movl.s %esp, %ebp' > 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 @@ -29542,7 +29995,7 @@ if ${gcc_cv_as_ix86_diff_sect_delta+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_diff_sect_delta=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section .rodata .L1: .long .L2-.L1 @@ -29580,7 +30033,7 @@ if ${gcc_cv_as_ix86_rep_lock_prefix+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_rep_lock_prefix=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'rep movsl rep ret rep nop @@ -29618,7 +30071,7 @@ if ${gcc_cv_as_ix86_ud2+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_ud2=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'ud2' > 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 @@ -29648,12 +30101,11 @@ fi 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 + if test x$gnu_ld = xyes; then + case $target in + *-*-solaris2*) ld_ix86_gld_32_opt="-melf_i386_sol2" ;; + *) ld_ix86_gld_32_opt="-melf_i386" ;; + esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for R_386_TLS_GD_PLT reloc" >&5 @@ -29662,7 +30114,7 @@ if ${gcc_cv_as_ix86_tlsgdplt+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_tlsgdplt=no - if test x$gcc_cv_as != x; then + 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 $as_ix86_gas_32_opt -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -29704,7 +30156,7 @@ if ${gcc_cv_as_ix86_tlsldmplt+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_tlsldmplt=no - if test x$gcc_cv_as != x; then + 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 @@ -29752,7 +30204,7 @@ if ${gcc_cv_as_ix86_tlsldm+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_tlsldm=no - if test x$gcc_cv_as != x; then + 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 @@ -29801,7 +30253,7 @@ if ${gcc_cv_as_ix86_got32x+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_got32x=no - if test x$gcc_cv_as != x; then + 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 @@ -29842,12 +30294,11 @@ _ACEOF # Check if gas and gld support "addq %r23,foo@GOTTPOFF(%rip), %r15" # with R_X86_64_CODE_6_GOTTPOFF relocation. - if echo "$ld_ver" | grep GNU > /dev/null; then - if $gcc_cv_ld -V 2>/dev/null | grep elf_x86_64_sol2 > /dev/null; then - ld_ix86_gld_64_opt="-melf_x86_64_sol2" - else - ld_ix86_gld_64_opt="-melf_x86_64" - fi + if test x$gnu_ld = xyes; then + case $target in + *-*-solaris2*) ld_ix86_gld_64_opt="-melf_x86_64_sol2" ;; + *) ld_ix86_gld_64_opt="-melf_x86_64" ;; + esac fi # Enforce 64-bit output with gas and gld. if test x$gas = xyes; then @@ -29869,7 +30320,7 @@ if ${gcc_cv_as_x86_64_code_6_gottpoff+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_x86_64_code_6_gottpoff=no - if test x$gcc_cv_as != x; then + 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_64_opt -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -29914,7 +30365,7 @@ if ${gcc_cv_as_ix86_gotoff_in_data+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_gotoff_in_data=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text .L0: nop @@ -29969,7 +30420,7 @@ if ${gcc_cv_as_ix86_tls_get_addr_via_got+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ix86_tls_get_addr_via_got=no - if test x$gcc_cv_as != x; then + 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 @@ -30008,7 +30459,7 @@ if ${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .text addl r15 = @ltoffx(x#), gp ;; @@ -30050,7 +30501,7 @@ if ${gcc_cv_as_machine_directive+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_machine_directive=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .machine ppc7400' > 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 @@ -30096,7 +30547,7 @@ if ${gcc_cv_as_powerpc_mfcrf+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_powerpc_mfcrf=no - if test x$gcc_cv_as != x; then + 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' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30139,7 +30590,7 @@ if ${gcc_cv_as_power10_htm+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_power10_htm=no - if test x$gcc_cv_as != x; then + 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' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30184,7 +30635,7 @@ if ${gcc_cv_as_powerpc_rel16+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_powerpc_rel16=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$conftest_s" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30225,7 +30676,7 @@ if ${gcc_cv_as_powerpc_vsx+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_powerpc_vsx=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$conftest_s" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30257,7 +30708,7 @@ if ${gcc_cv_as_powerpc_gnu_attribute+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_powerpc_gnu_attribute=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.gnu_attribute 4,1' > 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 @@ -30289,7 +30740,7 @@ if ${gcc_cv_as_powerpc_entry_markers+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_powerpc_entry_markers=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .reloc .,R_PPC64_ENTRY; nop' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a64 --fatal-warnings -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30321,7 +30772,7 @@ if ${gcc_cv_as_powerpc_pltseq_markers+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_powerpc_pltseq_markers=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .reloc .,R_PPC_PLTSEQ; nop' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 --fatal-warnings -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30355,7 +30806,7 @@ if ${gcc_cv_as_aix_ref+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_aix_ref=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .csect stuff[rw] stuff: .long 1 @@ -30392,7 +30843,7 @@ if ${gcc_cv_as_aix_dwloc+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_aix_dwloc=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .dwsect 0xA0000 Lframe..0: .vbyte 4,Lframe..0 @@ -30431,7 +30882,7 @@ if ${gcc_cv_as_mips_explicit_relocs_pcrel+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mips_explicit_relocs_pcrel=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' lui $4,%pcrel_hi(foo)' > 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 @@ -30464,7 +30915,7 @@ if ${gcc_cv_as_mips_explicit_relocs+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mips_explicit_relocs=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' lw $4,%gp_rel(foo)($4)' > 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 @@ -30505,7 +30956,7 @@ if ${gcc_cv_as_mips_no_shared+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mips_no_shared=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'nop' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mno-shared -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30537,7 +30988,7 @@ if ${gcc_cv_as_mips_gnu_attribute+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mips_gnu_attribute=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.gnu_attribute 4,1' > 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 @@ -30569,7 +31020,7 @@ if ${gcc_cv_as_mips_dot_module+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mips_dot_module=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.module mips2 .module fp=xx' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -32 -o conftest.o conftest.s >&5' @@ -30606,7 +31057,7 @@ if ${gcc_cv_as_micromips_support+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_micromips_support=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.set micromips' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30638,7 +31089,7 @@ if ${gcc_cv_as_mips_dtprelword+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mips_dtprelword=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.section .tdata,"awT",@progbits x: .word 2 @@ -30674,7 +31125,7 @@ if ${gcc_cv_as_mips_dspr1_mult+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mips_dspr1_mult=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .set mips32r2 .set nodspr2 .set dsp @@ -30717,7 +31168,7 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6; && test $in_tree_ld_is_elf = yes; then gcc_cv_as_ld_jalr_reloc=yes fi - elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x; then + elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x -a x"$gcc_cv_objdump" != x; then echo ' .ent x' > conftest.s echo 'x: lw $2,%got_disp(y)($3)' >> conftest.s echo ' lw $25,%call16(y)($28)' >> conftest.s @@ -30758,9 +31209,9 @@ else -o "$gcc_cv_gld_major_version" -gt 2; then gcc_cv_ld_mips_personality_relaxation=yes fi - elif test x$gcc_cv_as != x \ - -a x$gcc_cv_ld != x \ - -a x$gcc_cv_readelf != x ; then + elif test x"$gcc_cv_as" != x \ + -a x"$gcc_cv_ld" != x \ + -a x"$gcc_cv_readelf" != x ; then cat > conftest.s <<EOF .cfi_startproc .cfi_personality 0x80,indirect_ptr @@ -30803,7 +31254,7 @@ if ${gcc_cv_as_mips_nan+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_mips_nan=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mnan=2008 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30842,7 +31293,7 @@ if ${gcc_cv_as_msp430_gnu_attribute+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_msp430_gnu_attribute=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.gnu_attribute 4,1' > 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 @@ -30873,7 +31324,7 @@ if ${gcc_cv_as_msp430_mspabi_attribute+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_msp430_mspabi_attribute=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.mspabi_attribute 4,2' > 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 @@ -30911,7 +31362,7 @@ if ${gcc_cv_as_riscv_attribute+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_riscv_attribute=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.attribute stack_align,4' > 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 @@ -30942,7 +31393,7 @@ if ${gcc_cv_as_riscv_isa_spec+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_riscv_isa_spec=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -misa-spec=2.2 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -30973,7 +31424,7 @@ if ${gcc_cv_as_riscv_march_zifencei+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_riscv_march_zifencei=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -march=rv32i_zifencei2p0 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31004,7 +31455,7 @@ if ${gcc_cv_as_riscv_march_zaamo_zalrsc+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_riscv_march_zaamo_zalrsc=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -march=rv32i_zaamo_zalrsc -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31035,7 +31486,7 @@ if ${gcc_cv_as_riscv_march_b+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_riscv_march_b=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -march=rv32i_b -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31068,7 +31519,7 @@ if ${gcc_cv_as_loongarch_dtprelword+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_loongarch_dtprelword=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags 2,18,0 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31103,7 +31554,7 @@ if ${gcc_cv_as_loongarch_explicit_relocs+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_loongarch_explicit_relocs=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'a:pcalau12i $t0,%pc_hi20(a)' > 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 @@ -31134,7 +31585,7 @@ if ${gcc_cv_as_loongarch_call36+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_loongarch_call36=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'pcaddu18i $r1, %call36(a) jirl $r1, $r1, 0' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' @@ -31166,7 +31617,7 @@ if ${gcc_cv_as_loongarch_eh_frame_pcrel_encoding_support+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_loongarch_eh_frame_pcrel_encoding_support=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.cfi_startproc .cfi_personality 0x9b,a .cfi_lsda 0x1b,b @@ -31200,7 +31651,7 @@ if ${gcc_cv_as_loongarch_relax+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_loongarch_relax=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mrelax -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31231,7 +31682,7 @@ if ${gcc_cv_as_loongarch_cond_branch_relax+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_loongarch_cond_branch_relax=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'a: .rept 32769 nop @@ -31266,7 +31717,7 @@ if ${gcc_cv_as_loongarch_tls_le_relaxation_support+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_loongarch_tls_le_relaxation_support=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo 'lu12i.w $t0,%le_hi20_r(a)' > 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 @@ -31291,6 +31742,38 @@ $as_echo "#define HAVE_AS_TLS_LE_RELAXATION 1" >>confdefs.h fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for 16-byte atomic support" >&5 +$as_echo_n "checking assembler for 16-byte atomic support... " >&6; } +if ${gcc_cv_as_loongarch_16_byte_atomic_support+:} false; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_loongarch_16_byte_atomic_support=no + if test x"$gcc_cv_as" != x; then + $as_echo 'vori.b $vr0, $vr1, 0 + sc.q $a0, $a1, $a2, 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 + (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_loongarch_16_byte_atomic_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_loongarch_16_byte_atomic_support" >&5 +$as_echo "$gcc_cv_as_loongarch_16_byte_atomic_support" >&6; } +if test $gcc_cv_as_loongarch_16_byte_atomic_support = yes; then + +$as_echo "#define HAVE_AS_16B_ATOMIC 1" >>confdefs.h + +fi + ;; s390*-*-*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .gnu_attribute support" >&5 @@ -31299,7 +31782,7 @@ if ${gcc_cv_as_s390_gnu_attribute+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_s390_gnu_attribute=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.gnu_attribute 8,1' > 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 @@ -31330,7 +31813,7 @@ if ${gcc_cv_as_s390_machine_machinemode+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_s390_machine_machinemode=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .machinemode push .machinemode pop .machine push @@ -31364,7 +31847,7 @@ if ${gcc_cv_as_s390_architecture_modifiers+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_s390_architecture_modifiers=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .machine z13+vx ' > 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 @@ -31395,7 +31878,7 @@ if ${gcc_cv_as_s390_vector_loadstore_alignment_hints+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_s390_vector_loadstore_alignment_hints=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' vl %v24,0(%r15),3 ' > 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 @@ -31426,7 +31909,7 @@ if ${gcc_cv_as_s390_vector_loadstore_alignment_hints_on_z13+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_s390_vector_loadstore_alignment_hints_on_z13=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' vl %v24,0(%r15),3 ' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mzarch -march=z13 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31479,7 +31962,7 @@ case "$target" in { $as_echo "$as_me:${as_lineno-$LINENO}: checking llvm assembler version" >&5 $as_echo_n "checking llvm assembler version... " >&6; } gcc_cv_as_version="unknown" - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then gcc_cv_as_version=`$gcc_cv_as --version 2>&1 | sed -ne '/version/s/.* \([0-9]\)/\1/p' || echo error` case "$gcc_cv_as_version" in 13.0.[1-9]*) ;; # 13.0.1+ @@ -31504,7 +31987,7 @@ if ${gcc_cv_as_arm_option_extensions+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_arm_option_extensions=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.text .thumb .syntax unified @@ -31564,7 +32047,7 @@ if ${gcc_cv_as_dwarf2_debug_line+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_dwarf2_debug_line=no - if test x$gcc_cv_as != x; then + 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' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31604,7 +32087,7 @@ if ${gcc_cv_as_dwarf2_file_buggy+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_dwarf2_file_buggy=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo ' .file 1 "foo.s" .file 1 "bar.s"' > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5' @@ -31648,7 +32131,7 @@ if ${gcc_cv_as_dwarf2_debug_view+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_dwarf2_debug_view=no - if test x$gcc_cv_as != x; then + 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' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31682,7 +32165,7 @@ if ${gcc_cv_as_gdwarf2_flag+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_gdwarf2_flag=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$insn" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf2 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31714,7 +32197,7 @@ if ${gcc_cv_as_gdwarf_5_flag+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_gdwarf_5_flag=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$insn" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf-5 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31918,7 +32401,7 @@ if ${gcc_cv_as_debug_line_32_flag+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_debug_line_32_flag=no - if test x$gcc_cv_as != x; then + 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' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31948,7 +32431,7 @@ if ${gcc_cv_as_debug_line_64_flag+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_debug_line_64_flag=no - if test x$gcc_cv_as != x; then + 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' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -31980,7 +32463,7 @@ if ${gcc_cv_as_dwarf_4_debug_line_flag+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_dwarf_4_debug_line_flag=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$conftest_s" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf-4 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -32035,7 +32518,7 @@ if ${gcc_cv_as_dwarf_4_app_flag+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_dwarf_4_app_flag=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$conftest_s" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf-4 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -32076,7 +32559,7 @@ if ${gcc_cv_as_working_gdwarf_n_flag+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_working_gdwarf_n_flag=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$conftest_s" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf-4 -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -32116,7 +32599,7 @@ if ${gcc_cv_as_debug_prefix_map_flag+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_debug_prefix_map_flag=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo "$insn" > conftest.s if { ac_try='$gcc_cv_as $gcc_cv_as_flags --debug-prefix-map /a=/b -o conftest.o conftest.s >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -32149,7 +32632,7 @@ if ${gcc_cv_as_compress_debug+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_compress_debug=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '' > 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 @@ -32209,7 +32692,7 @@ if ${gcc_cv_as_lcomm_with_alignment+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_lcomm_with_alignment=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.lcomm bar,4,16' > 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 @@ -32297,7 +32780,7 @@ if ${gcc_cv_as_gnu_unique_object+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_as_gnu_unique_object=no - if test x$gcc_cv_as != x; then + if test x"$gcc_cv_as" != x; then $as_echo '.type foo, '$target_type_format_char'gnu_unique_object' > 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 @@ -32401,10 +32884,7 @@ elif test x$gcc_cv_ld != x; then else case "$target" in *-*-solaris2*) - # Sun ld has various bugs in .eh_frame_hdr support before version 1.2251. - if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251; then - gcc_cv_ld_eh_frame_hdr=yes - fi + gcc_cv_ld_eh_frame_hdr=yes ;; esac fi @@ -32422,11 +32902,7 @@ $as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; } $as_echo_n "checking linker position independent executable support... " >&6; } gcc_cv_ld_pie=no if test $in_tree_ld = yes ; then - case "$target" in - # Full PIE support on Solaris was only introduced in gld 2.26. - *-*-solaris2*) gcc_gld_pie_min_version=26 ;; - *) gcc_gld_pie_min_version=15 ;; - esac + gcc_gld_pie_min_version=15 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge "$gcc_gld_pie_min_version" -o "$gcc_cv_gld_major_version" -gt 2 \ && test $in_tree_ld_is_elf = yes; then gcc_cv_ld_pie=yes @@ -32435,21 +32911,11 @@ elif test x$gcc_cv_ld != x; then # Check if linker supports -pie option if $gcc_cv_ld --help 2>&1 | grep -- -pie > /dev/null; then gcc_cv_ld_pie=yes - case "$target" in - *-*-solaris2*) - if echo "$ld_ver" | grep GNU > /dev/null \ - && test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 26; then - gcc_cv_ld_pie=no - fi - ;; - esac else case "$target" in - *-*-solaris2.1[1-9]*) + *-*-solaris2*) # Solaris 11.3 added PIE support. - if $gcc_cv_ld -z help 2>&1 | grep -- type.*pie > /dev/null; then - gcc_cv_ld_pie=yes - fi + gcc_cv_ld_pie=yes ;; esac fi @@ -32470,7 +32936,7 @@ if test $gcc_cv_ld_pie = yes ; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 25 -o "$gcc_cv_gld_major_version" -gt 2; then gcc_cv_ld_pie_copyreloc=yes fi - elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then + elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x ; then # Check if linker supports -pie option with copy reloc case "$target" in i?86-*-linux* | x86_64-*-linux*) @@ -32522,7 +32988,7 @@ if test $in_tree_ld = yes ; then && test $in_tree_ld_is_elf = yes; then gcc_cv_ld_eh_gc_sections=yes fi -elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then +elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x -a x"$gcc_cv_objdump" != x ; then cat > conftest.s <<EOF .section .text .globl _start @@ -32605,7 +33071,7 @@ if test $in_tree_ld = yes ; then && test $in_tree_ld_is_elf = yes; then gcc_cv_ld_eh_gc_sections_bug=yes fi -elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x -a x$gcc_cv_as_comdat_group = xyes; then +elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x -a x"$gcc_cv_objdump" != x -a x$gcc_cv_as_comdat_group = xyes; then gcc_cv_ld_eh_gc_sections_bug=yes cat > conftest.s <<EOF .section .text @@ -32658,11 +33124,12 @@ else case "${target}" in *-*-solaris2*) # Introduced in Solaris 11.2. - if $gcc_cv_ld --help 2>&1 | grep -- '-z compress-sections' > /dev/null; then - gcc_cv_ld_compress_debug=1 - gcc_cv_ld_compress_debug_option="-z compress-sections" - else - gcc_cv_ld_compress_debug=0 + gcc_cv_ld_compress_debug=1 + gcc_cv_ld_compress_debug_option="-z compress-sections" + # Detect zstd debug section compression support. Introduced in + # Solaris 11.4 SRU 90. + if $gcc_cv_ld --help 2>&1 | grep -- '-z compress-sections.*\<zstd\>' > /dev/null; then + gcc_cv_ld_compress_debug=2 fi ;; *) @@ -32692,6 +33159,7 @@ if test x"$ld64_flag" = x"yes"; then gcc_cv_ld64_platform_version=0 gcc_cv_ld64_macos_version_min=0 gcc_cv_ld64_demangle=0 + gcc_cv_ld64_no_deduplicate=0 if test "$build" = "$host"; then darwin_try_test=1 @@ -32721,6 +33189,9 @@ $as_echo "$gcc_cv_ld64_major" >&6; } if test "$gcc_cv_ld64_major" -ge 236; then gcc_cv_ld64_export_dynamic=1 fi + if test "$gcc_cv_ld64_major" -ge 262; then + gcc_cv_ld64_no_deduplicate=1 + fi if test "$gcc_cv_ld64_major" -ge 512; then gcc_cv_ld64_platform_version=1 gcc_cv_ld64_macos_version_min=1 @@ -32755,6 +33226,15 @@ $as_echo_n "checking linker for -export_dynamic support... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_export_dynamic" >&5 $as_echo "$gcc_cv_ld64_export_dynamic" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for -no_deduplicate support" >&5 +$as_echo_n "checking linker for -no_deduplicate support... " >&6; } + gcc_cv_ld64_no_deduplicate=1 + if $gcc_cv_ld -no_deduplicate < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then + gcc_cv_ld64_no_deduplicate=0 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld64_no_deduplicate" >&5 +$as_echo "$gcc_cv_ld64_no_deduplicate" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for -platform_version support" >&5 $as_echo_n "checking linker for -platform_version support... " >&6; } gcc_cv_ld64_platform_version=1 @@ -32796,6 +33276,12 @@ _ACEOF cat >>confdefs.h <<_ACEOF +#define LD64_HAS_NO_DEDUPLICATE $gcc_cv_ld64_no_deduplicate +_ACEOF + + + +cat >>confdefs.h <<_ACEOF #define LD64_HAS_PLATFORM_VERSION $gcc_cv_ld64_platform_version _ACEOF @@ -32947,21 +33433,12 @@ elif test x$gcc_cv_ld != x; then ;; esac fi -# --as-needed/-z ignore can only be used if libgcc_s.so.1 uses -# dl_iterate_phdr, i.e. since Solaris 11. case "$target" in - *-*-solaris2.1[1-9]*) - case "$target" in - i?86-*-* | x86_64-*-*) - if echo "$ld_ver" | grep GNU > /dev/null; then - # Doesn't work with gld on Solaris/x86 due to PR ld/12320. - gcc_cv_ld_as_needed=no - fi - ;; - esac - ;; - *-*-solaris2*) - gcc_cv_ld_as_needed=no + i?86-*-solaris2* | x86_64-*-solaris2*) + if echo "$ld_ver" | grep GNU > /dev/null; then + # Doesn't work with gld on Solaris/x86 due to PR ld/12320. + gcc_cv_ld_as_needed=no + fi ;; esac @@ -33036,7 +33513,7 @@ else -o "$gcc_cv_gld_major_version" -gt 2; then gcc_cv_ld_ppc_attr=yes fi - elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then + elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x ; then # check that merging the long double .gnu_attribute doesn't warn cat > conftest1.s <<EOF .gnu_attribute 4,1 @@ -33092,7 +33569,7 @@ else 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; then gcc_cv_ld_no_dot_syms=yes fi - elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then + elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x ; then cat > conftest1.s <<EOF .text bl .foo @@ -33138,7 +33615,7 @@ else if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2; then gcc_cv_ld_large_toc=yes fi - elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then + elif test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x ; then cat > conftest.s <<EOF .section ".tbss","awT",@nobits .align 3 @@ -33146,7 +33623,7 @@ ie0: .space 8 .global _start .text _start: - addis 9,13,ie0@got@tprel@ha + addis 9,2,ie0@got@tprel@ha ld 9,ie0@got@tprel@l(9) EOF if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \ @@ -33170,7 +33647,7 @@ $as_echo_n "checking linker toc pointer alignment... " >&6; } if ${gcc_cv_ld_toc_align+:} false; then : $as_echo_n "(cached) " >&6 else - if test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_nm != x; then + if test x"$gcc_cv_as" != x -a x"$gcc_cv_ld" != x -a x"$gcc_cv_nm" != x; then cat > conftest.s <<EOF .global _start .text @@ -33209,7 +33686,7 @@ if ${gcc_cv_ld_large_toc+:} false; then : $as_echo_n "(cached) " >&6 else gcc_cv_ld_large_toc=no - if test x$gcc_cv_as != x ; then + if test x"$gcc_cv_as" != x ; then cat > conftest.s <<EOF .toc LC..1: @@ -33283,36 +33760,6 @@ $as_echo "$as_me: WARNING: --build-id is not supported by your linker; --enable- fi fi -# In binutils 2.21, GNU ld gained support for new emulations fully -# supporting the Solaris 2 ABI. Detect their presence in the linker used. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker *_sol2 emulation support" >&5 -$as_echo_n "checking linker *_sol2 emulation support... " >&6; } -if ${gcc_cv_ld_sol2_emulation+:} false; then : - $as_echo_n "(cached) " >&6 -else - gcc_cv_ld_sol2_emulation=no - if test $in_tree_ld = yes ; then - if 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_sol2_emulation=yes - fi - elif test x$gcc_cv_ld != x; then - if $gcc_cv_ld -V 2>/dev/null | sed -e '1,/Supported emulations/d;q' | \ - grep _sol2 > /dev/null; then - gcc_cv_ld_sol2_emulation=yes - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_sol2_emulation" >&5 -$as_echo "$gcc_cv_ld_sol2_emulation" >&6; } -if test x"$gcc_cv_ld_sol2_emulation" = xyes; then - -$as_echo "#define HAVE_LD_SOL2_EMULATION 1" >>confdefs.h - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --sysroot support" >&5 $as_echo_n "checking linker --sysroot support... " >&6; } if ${gcc_cv_ld_sysroot+:} false; then : @@ -33337,44 +33784,6 @@ $as_echo "#define HAVE_LD_SYSROOT 1" >>confdefs.h fi -case $target in -*-*-solaris2*) - # Check for system-provided CRTs on Solaris 11.x and Solaris 12. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking system-provided CRTs on Solaris" >&5 -$as_echo_n "checking system-provided CRTs on Solaris... " >&6; } -if ${gcc_cv_solaris_crts+:} false; then : - $as_echo_n "(cached) " >&6 -else - gcc_cv_solaris_crts=no - if test x$host != x$target; then - if test "x$with_sysroot" = xyes; then - target_sysroot="${test_exec_prefix}/${target_noncanonical}/sys-root" - else - target_sysroot="${with_sysroot}" - fi - fi - target_libdir="$target_sysroot/usr/lib" - # At the time they were added, gcrt1.o became a symlink for backwards - # compatibility on x86, while crt1.o was added on sparc, so check for that. - case $target in - i?86-*-solaris2* | x86_64-*-solaris2*) - if test -h "$target_libdir/gcrt1.o"; then gcc_cv_solaris_crts=yes; fi - ;; - sparc*-*-solaris2*) - if test -f "$target_libdir/crt1.o"; then gcc_cv_solaris_crts=yes; fi - ;; - esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_solaris_crts" >&5 -$as_echo "$gcc_cv_solaris_crts" >&6; } - ;; -esac -if test x$gcc_cv_solaris_crts = xyes; then - -$as_echo "#define HAVE_SOLARIS_CRTS 1" >>confdefs.h - -fi - # Check whether --enable-libssp was given. if test "${enable_libssp+set}" = set; then : enableval=$enable_libssp; case "${enableval}" in @@ -33482,6 +33891,12 @@ $as_echo "#define ENABLE_DEFAULT_SSP 1" >>confdefs.h fi +if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then + +$as_echo "#define TARGET_PROVIDES_LIBATOMIC 1" >>confdefs.h + +fi + # Test for <sys/sdt.h> on the target. { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 @@ -34100,6 +34515,9 @@ fi + + + # Echo link setup. if test x${build} = x${host} ; then if test x${host} = x${target} ; then @@ -34520,7 +34938,6 @@ $as_echo "#define ENABLE_DEFAULT_PIE 1" >>confdefs.h fi - # Check if -fno-PIE works. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fno-PIE option" >&5 $as_echo_n "checking for -fno-PIE option... " >&6; } @@ -34956,6 +35373,46 @@ $as_echo "#define ENABLE_S390_EXCESS_FLOAT_PRECISION 1" >>confdefs.h ;; esac +# On x86-64, when profiling is enabled with shrink wrapping, the mcount +# call may not be placed at the function entry after +# pushq %rbp +# movq %rsp,%rbp +# As the result, the profile data may be skewed which makes PGO less +# effective: +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120881 +# Enable -mfentry by default on x86-64 to put the profiling counter call +# before the prologue. +# Check whether --enable-x86-64-mfentry was given. +if test "${enable_x86_64_mfentry+set}" = set; then : + enableval=$enable_x86_64_mfentry; case "${enableval}" in + yes | no | auto) + enable_x86_64_mfentry=$enableval + ;; + *) + as_fn_error $? "'$enable_x86_64_mfentry' is an invalid value for --enable-x86-64-mfentry. Valid choices are 'yes', 'no' and 'auto'." "$LINENO" 5 + ;; + esac +else + enable_x86_64_mfentry=auto +fi + + +if test x"$enable_x86_64_mfentry" = xauto; then + case "${target}" in + i?86-*-*gnu* | x86_64-*-*gnu*) + # Enable -mfentry by default with glibc on x86. + enable_x86_64_mfentry=yes + ;; + esac +fi + +gif=`if test x$enable_x86_64_mfentry = xyes; then echo 1; else echo 0; fi` + +cat >>confdefs.h <<_ACEOF +#define ENABLE_X86_64_MFENTRY $gif +_ACEOF + + # Check if the linker supports '-z now' ld_now_support=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker -z now option" >&5 @@ -36390,7 +36847,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; "gccdepdir":C) ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs build/$DEPDIR - for lang in $subdirs c-family common analyzer text-art rtl-ssa sym-exec + for lang in $subdirs c-family common analyzer custom-sarif-properties diagnostics text-art rtl-ssa sym-exec do ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/mkinstalldirs $lang/$DEPDIR done ;; |
