aboutsummaryrefslogtreecommitdiff
path: root/gold/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-10-13 05:22:55 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-10-13 05:23:13 -0700
commit6c0005b8f4a8bf5f239be761deee6e5ee4faa25e (patch)
tree338c19915ac1557dbcfb38157a068b9a997b3e36 /gold/configure.ac
parent29700bfff45955f1323573a8270625d38e9bdbb6 (diff)
downloadbinutils-6c0005b8f4a8bf5f239be761deee6e5ee4faa25e.zip
binutils-6c0005b8f4a8bf5f239be761deee6e5ee4faa25e.tar.gz
binutils-6c0005b8f4a8bf5f239be761deee6e5ee4faa25e.tar.bz2
gold: Skip some incremental tests
Skip incremental_test_2, incremental_test_3, incremental_test_4, incremental_test_5, incremental_copy_test, incremental_common_test_1 and incremental_comdat_test_1 when -fcf-protection is used to compile gold since gold doesn't properly support -fcf-protection on Intel CET enabled OS. Also skip incremental_copy_test and incremental_comdat_test_1 for GCC 9 or later since they failed with GCC 9 or later. PR gold/23539 * configure.ac: Check for GCC 9 or later and for -fcf-protection. * configure: Regenerated. * testsuite/Makefile.am (check_PROGRAMS): Skip incremental_test_2, incremental_test_3, incremental_test_4, incremental_test_5, incremental_copy_test, incremental_common_test_1 and incremental_comdat_test_1 for -fcf-protection. Also Skip incremental_copy_test and incremental_comdat_test_1 for GCC 9 or later. * testsuite/Makefile.in: Regenerated.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index eca4f01..6e3978b 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -372,6 +372,26 @@ dnl Whether we can test -mcmodel=medium.
AM_CONDITIONAL(MCMODEL_MEDIUM,
[test "$target_cpu" = "x86_64" -a "$have_mcmodel_medium" = "yes" -a "$gold_cv_prog_gcc41" = "yes"])
+dnl Test for gcc 9 or later. Some incremental tests fail with GCC 9 or
+dnl later.
+AC_CACHE_CHECK([for gcc >= 9], [gold_cv_prog_gcc9],
+[AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#if !defined __GNUC__ || __GNUC__ < 9
+error
+#endif
+])], [gold_cv_prog_gcc9=yes], [gold_cv_prog_gcc9=no])])
+AM_CONDITIONAL(GCC9, [test "$gold_cv_prog_gcc9" = "yes"])
+
+dnl Test for -fcf-protection on x86-64. Some incremental tests fail with
+dnl -fcf-protection.
+AC_CACHE_CHECK([for -fcf-protection], [gold_cv_cflags_cf_protection],
+[AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#if !defined __x86_64__ || !defined __CET__
+error
+#endif
+])], [gold_cv_cflags_cf_protection=yes], [gold_cv_cflags_cf_protection=no])])
+AM_CONDITIONAL(CFLAGS_CF_PROTECTION, [test "$gold_cv_cflags_cf_protection" = "yes"])
+
AC_CACHE_CHECK([whether $CC supports -fmerge-constants],
[gold_cv_merge_constants], [
save_CFLAGS="$CFLAGS"