diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-07-15 06:16:01 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-07-30 05:36:24 -0700 |
commit | 4712bde3cabed644884a52386404765fca3b0ac2 (patch) | |
tree | 6a119dbfd7885c36e123657a74433210701654f5 /libbacktrace/configure | |
parent | 9e67b4356efe4291fdb170fb116092f4ed9d2f05 (diff) | |
download | gcc-4712bde3cabed644884a52386404765fca3b0ac2.zip gcc-4712bde3cabed644884a52386404765fca3b0ac2.tar.gz gcc-4712bde3cabed644884a52386404765fca3b0ac2.tar.bz2 |
Require CET support only for the final GCC build
With --enable-cet, require CET support only for the final GCC build.
Don't enable CET without CET support for non-bootstrap build, in stage1
nor for build support.
config/
PR bootstrap/96202
* cet.m4 (GCC_CET_HOST_FLAGS): Don't enable CET without CET
support in stage1 nor for build support.
gcc/
PR bootstrap/96202
* configure: Regenerated.
libbacktrace/
PR bootstrap/96202
* configure: Regenerated.
libcc1/
PR bootstrap/96202
* configure: Regenerated.
libcpp/
PR bootstrap/96202
* configure: Regenerated.
libdecnumber/
PR bootstrap/96202
* configure: Regenerated.
libiberty/
PR bootstrap/96202
* configure: Regenerated.
lto-plugin/
PR bootstrap/96202
* configure: Regenerated.
Diffstat (limited to 'libbacktrace/configure')
-rwxr-xr-x | libbacktrace/configure | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/libbacktrace/configure b/libbacktrace/configure index 37c38e7..d4b3523 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -12169,7 +12169,7 @@ case "$host" in case "$enable_cet" in auto) # Check if target supports multi-byte NOPs - # and if assembler supports CET insn. + # and if compiler and assembler support CET insn. cet_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fcf-protection" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12409,7 +12409,7 @@ case "$host" in case "$enable_cet" in auto) # Check if target supports multi-byte NOPs - # and if assembler supports CET insn. + # and if compiler and assembler support CET. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12435,7 +12435,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; yes) - # Check if assembler supports CET. + # Check if compiler and assembler support CET. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12448,11 +12448,24 @@ asm ("setssbsy"); } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - + support_cet=yes else - as_fn_error $? "assembler with CET support is required for --enable-cet" "$LINENO" 5 + support_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $support_cet = "no"; then + if test x$enable_bootstrap != xno \ + && test -z "${with_build_subdir}" \ + && (test ! -f ../stage_current \ + || test `cat ../stage_current` != "stage1"); then + # Require CET support only for the final GCC build. + as_fn_error $? "compiler and assembler with CET support are required for --enable-cet" "$LINENO" 5 + else + # Don't enable CET without CET support for non-bootstrap + # build, in stage1 nor for build support. + enable_cet=no + fi + fi ;; esac CFLAGS="$cet_save_CFLAGS" |