diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 8 | ||||
-rw-r--r-- | config/cet.m4 | 23 |
2 files changed, 26 insertions, 5 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index ba1fc7f..a6454d3 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,11 @@ +2020-09-08 Alan Modra <amodra@gmail.com> + + Sync from gcc + 2020-07-15 H.J. Lu <hjl.tools@gmail.com> + PR bootstrap/96202 + * cet.m4 (GCC_CET_HOST_FLAGS): Don't enable CET without CET + support in stage1 nor for build support. + 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * largefile.m4 (ACX_LARGEFILE) <sparc-*-solaris*|i?86-*-solaris*>: diff --git a/config/cet.m4 b/config/cet.m4 index 911fbd4..c67fb4f 100644 --- a/config/cet.m4 +++ b/config/cet.m4 @@ -13,7 +13,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" AC_COMPILE_IFELSE( @@ -70,7 +70,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. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [], @@ -85,13 +85,26 @@ asm ("setssbsy"); [enable_cet=no]) ;; yes) - # Check if assembler supports CET. + # Check if compiler and assembler support CET. AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [], [asm ("setssbsy");])], - [], - [AC_MSG_ERROR([assembler with CET support is required for --enable-cet])]) + [support_cet=yes], + [support_cet=no]) + 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. + AC_MSG_ERROR([compiler and assembler with CET support are required for --enable-cet]) + 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" |