diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-09-02 15:58:26 -0700 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-09-02 15:58:26 -0700 |
commit | 071b4126c613881f4cb25b4e5c39032964827f88 (patch) | |
tree | 7ed805786566918630d1d617b1ed8f7310f5fd8e /gcc/configure | |
parent | 845d23f3ea08ba873197c275a8857eee7edad996 (diff) | |
parent | caa1c2f42691d68af4d894a5c3e700ecd2dba080 (diff) | |
download | gcc-devel/gfortran-test.zip gcc-devel/gfortran-test.tar.gz gcc-devel/gfortran-test.tar.bz2 |
Merge branch 'master' into gfortran-testdevel/gfortran-test
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 83 |
1 files changed, 39 insertions, 44 deletions
diff --git a/gcc/configure b/gcc/configure index bacdd29..5a779db0 100755 --- a/gcc/configure +++ b/gcc/configure @@ -872,7 +872,6 @@ c_strict_warn strict_warn c_loose_warn loose_warn -aliasing_flags CPP EGREP GREP @@ -7126,45 +7125,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 # --------------------- @@ -11308,6 +11268,7 @@ fi + use_additional=yes acl_save_prefix="$prefix" @@ -14236,6 +14197,7 @@ $as_echo "$LIBICONV" >&6; } + use_additional=yes acl_save_prefix="$prefix" @@ -21522,7 +21484,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 21525 "configure" +#line 21487 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -21628,7 +21590,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 21631 "configure" +#line 21593 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -25676,6 +25638,9 @@ else powerpc*-*-darwin*) gcc_cv_as_flags="-arch ppc" ;; + amdgcn*) + gcc_cv_as_flags="--filetype=obj -triple=amdgcn--amdhsa" + ;; *) gcc_cv_as_flags=" " ;; @@ -26538,8 +26503,8 @@ 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 : @@ -26573,6 +26538,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. : @@ -26669,6 +26639,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 ;; @@ -32760,6 +32736,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 @@ -32789,6 +32766,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 @@ -32823,6 +32803,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 @@ -32864,6 +32853,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 |