diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-10-13 05:22:55 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-10-13 05:23:13 -0700 |
commit | 6c0005b8f4a8bf5f239be761deee6e5ee4faa25e (patch) | |
tree | 338c19915ac1557dbcfb38157a068b9a997b3e36 /gold/configure | |
parent | 29700bfff45955f1323573a8270625d38e9bdbb6 (diff) | |
download | binutils-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')
-rwxr-xr-x | gold/configure | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/gold/configure b/gold/configure index 199a739..e264a65 100755 --- a/gold/configure +++ b/gold/configure @@ -665,6 +665,10 @@ STATIC_TLS_TRUE TLS_FALSE TLS_TRUE MERGE_CONSTANTS_FLAG +CFLAGS_CF_PROTECTION_FALSE +CFLAGS_CF_PROTECTION_TRUE +GCC9_FALSE +GCC9_TRUE MCMODEL_MEDIUM_FALSE MCMODEL_MEDIUM_TRUE FN_PTRS_IN_SO_WITHOUT_PIC_FALSE @@ -7491,6 +7495,68 @@ else fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc >= 9" >&5 +$as_echo_n "checking for gcc >= 9... " >&6; } +if ${gold_cv_prog_gcc9+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if !defined __GNUC__ || __GNUC__ < 9 +error +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gold_cv_prog_gcc9=yes +else + gold_cv_prog_gcc9=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_prog_gcc9" >&5 +$as_echo "$gold_cv_prog_gcc9" >&6; } + if test "$gold_cv_prog_gcc9" = "yes"; then + GCC9_TRUE= + GCC9_FALSE='#' +else + GCC9_TRUE='#' + GCC9_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fcf-protection" >&5 +$as_echo_n "checking for -fcf-protection... " >&6; } +if ${gold_cv_cflags_cf_protection+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if !defined __x86_64__ || !defined __CET__ +error +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gold_cv_cflags_cf_protection=yes +else + gold_cv_cflags_cf_protection=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_cflags_cf_protection" >&5 +$as_echo "$gold_cv_cflags_cf_protection" >&6; } + if test "$gold_cv_cflags_cf_protection" = "yes"; then + CFLAGS_CF_PROTECTION_TRUE= + CFLAGS_CF_PROTECTION_FALSE='#' +else + CFLAGS_CF_PROTECTION_TRUE='#' + CFLAGS_CF_PROTECTION_FALSE= +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fmerge-constants" >&5 $as_echo_n "checking whether $CC supports -fmerge-constants... " >&6; } if ${gold_cv_merge_constants+:} false; then : @@ -10444,6 +10510,14 @@ if test -z "${MCMODEL_MEDIUM_TRUE}" && test -z "${MCMODEL_MEDIUM_FALSE}"; then as_fn_error $? "conditional \"MCMODEL_MEDIUM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GCC9_TRUE}" && test -z "${GCC9_FALSE}"; then + as_fn_error $? "conditional \"GCC9\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CFLAGS_CF_PROTECTION_TRUE}" && test -z "${CFLAGS_CF_PROTECTION_FALSE}"; then + as_fn_error $? "conditional \"CFLAGS_CF_PROTECTION\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${TLS_TRUE}" && test -z "${TLS_FALSE}"; then as_fn_error $? "conditional \"TLS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |