diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-05-29 12:23:33 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-05-29 12:56:40 -0700 |
commit | 9051b548274bffef9f41e720e1894d12cf68a47c (patch) | |
tree | 5b382dcf5ffd2a24dbdb58ebec70bfe0beac215c /config | |
parent | 7deca8c0b3765787627b11387b56b97b01a8bf33 (diff) | |
download | gcc-9051b548274bffef9f41e720e1894d12cf68a47c.zip gcc-9051b548274bffef9f41e720e1894d12cf68a47c.tar.gz gcc-9051b548274bffef9f41e720e1894d12cf68a47c.tar.bz2 |
Avoid nested save_CFLAGS and save_LDFLAGS
Avoid nested save_CFLAGS and save_LDFLAGS by replacing save_CFLAGS and
save_LDFLAGS with cet_save_CFLAGS and cet_save_LDFLAGS in cet.m4.
config/
PR bootstrap/95413
* cet.m4: Replace save_CFLAGS and save_LDFLAGS with
cet_save_CFLAGS and cet_save_LDFLAGS.
gcc/
PR bootstrap/95413
* configure: Regenerated.
libatomic/
PR bootstrap/95413
* configure: Regenerated.
libbacktrace/
PR bootstrap/95413
* configure: Regenerated.
libcc1/
PR bootstrap/95413
* configure: Regenerated.
libcpp/
PR bootstrap/95413
* configure: Regenerated.
libdecnumber/
PR bootstrap/95413
* configure: Regenerated.
libgcc/
PR bootstrap/95413
* configure: Regenerated.
libgfortran/
PR bootstrap/95413
* configure: Regenerated.
libgomp/
PR bootstrap/95413
* configure: Regenerated.
libiberty/
PR bootstrap/95413
* configure: Regenerated.
libitm/
PR bootstrap/95413
* configure: Regenerated.
libobjc/
PR bootstrap/95413
* configure: Regenerated.
libphobos/
PR bootstrap/95413
* configure: Regenerated.
libquadmath/
PR bootstrap/95413
* configure: Regenerated.
libsanitizer/
PR bootstrap/95413
* configure: Regenerated.
libssp/
PR bootstrap/95413
* configure: Regenerated.
libstdc++-v3/
PR bootstrap/95413
* configure: Regenerated.
libvtv/
PR bootstrap/95413
* configure: Regenerated.
lto-plugin/
PR bootstrap/95413
* configure: Regenerated.
zlib/
PR bootstrap/95413
* configure: Regenerated.
Diffstat (limited to 'config')
-rw-r--r-- | config/cet.m4 | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/config/cet.m4 b/config/cet.m4 index 2bb2c8a..911fbd464 100644 --- a/config/cet.m4 +++ b/config/cet.m4 @@ -7,13 +7,14 @@ GCC_ENABLE(cet, auto, ,[enable Intel CET in target libraries], permit yes|no|auto) AC_MSG_CHECKING([for CET support]) +# NB: Avoid nested save_CFLAGS and save_LDFLAGS. case "$host" in i[[34567]]86-*-linux* | x86_64-*-linux*) case "$enable_cet" in auto) # Check if target supports multi-byte NOPs # and if assembler supports CET insn. - save_CFLAGS="$CFLAGS" + cet_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fcf-protection" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( @@ -27,7 +28,7 @@ asm ("setssbsy"); ])], [enable_cet=yes], [enable_cet=no]) - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. @@ -64,7 +65,7 @@ AC_MSG_CHECKING([for CET support]) case "$host" in i[[34567]]86-*-linux* | x86_64-*-linux*) may_have_cet=yes - save_CFLAGS="$CFLAGS" + cet_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fcf-protection" case "$enable_cet" in auto) @@ -93,7 +94,7 @@ asm ("setssbsy"); [AC_MSG_ERROR([assembler with CET support is required for --enable-cet])]) ;; esac - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; *) may_have_cet=no @@ -101,9 +102,9 @@ asm ("setssbsy"); ;; esac -save_CFLAGS="$CFLAGS" +cet_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fcf-protection=none" -save_LDFLAGS="$LDFLAGS" +cet_save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,-z,ibt,-z,shstk" if test x$may_have_cet = xyes; then # Check whether -fcf-protection=none -Wl,-z,ibt,-z,shstk work. @@ -159,6 +160,6 @@ if test x$enable_cet = xyes; then else AC_MSG_RESULT([no]) fi -CFLAGS="$save_CFLAGS" -LDFLAGS="$save_LDFLAGS" +CFLAGS="$cet_save_CFLAGS" +LDFLAGS="$cet_save_LDFLAGS" ]) |