aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac52
1 files changed, 21 insertions, 31 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 2c43b38..2532523 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -563,35 +563,6 @@ if test $ac_cv_std_swap_in_utility = yes; then
[Define if <utility> defines std::swap.])
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"
- AC_MSG_CHECKING([whether $CXX is affected by placement new aliasing bug])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-#error compiler not affected by placement new aliasing bug
-#endif
-])],
- [AC_MSG_RESULT([yes]); aliasing_flags='-fno-strict-aliasing'],
- [AC_MSG_RESULT([no])])
-
- CXXFLAGS="$saved_CXXFLAGS"
-fi
-AC_SUBST(aliasing_flags)
-
-
-
# ---------------------
# Warnings and checking
# ---------------------
@@ -3336,8 +3307,8 @@ case $target in
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.
gcc_GAS_CHECK_FEATURE([.sleb128 and .uleb128], gcc_cv_as_leb128,
[$check_leb128_asflags],
[ .data
@@ -3359,6 +3330,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.
:
@@ -6421,6 +6397,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
@@ -6448,6 +6425,9 @@ if test x"$ld64_flag" = x"yes"; then
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
@@ -6476,6 +6456,13 @@ if test x"$ld64_flag" = x"yes"; then
fi
AC_MSG_RESULT($gcc_cv_ld64_export_dynamic)
+ AC_MSG_CHECKING(linker for -no_deduplicate support)
+ 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
+ AC_MSG_RESULT($gcc_cv_ld64_no_deduplicate)
+
AC_MSG_CHECKING(linker for -platform_version support)
gcc_cv_ld64_platform_version=1
if $gcc_cv_ld -platform_version macos 10.5 0.0 < /dev/null 2>&1 | grep 'unknown option' > /dev/null; then
@@ -6502,6 +6489,9 @@ if test x"$ld64_flag" = x"yes"; then
AC_DEFINE_UNQUOTED(LD64_HAS_EXPORT_DYNAMIC, $gcc_cv_ld64_export_dynamic,
[Define to 1 if ld64 supports '-export_dynamic'.])
+ AC_DEFINE_UNQUOTED(LD64_HAS_NO_DEDUPLICATE, $gcc_cv_ld64_no_deduplicate,
+ [Define to 1 if ld64 supports '-no_deduplicate'.])
+
AC_DEFINE_UNQUOTED(LD64_HAS_PLATFORM_VERSION, $gcc_cv_ld64_platform_version,
[Define to 1 if ld64 supports '-platform_version'.])