From 9051b548274bffef9f41e720e1894d12cf68a47c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 29 May 2020 12:23:33 -0700 Subject: [PATCH] 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. --- config/cet.m4 | 17 +++++++++-------- gcc/configure | 12 ++++++------ libatomic/configure | 5 +++-- libbacktrace/configure | 17 +++++++++-------- libcc1/configure | 12 ++++++------ libcpp/configure | 12 ++++++------ libdecnumber/configure | 12 ++++++------ libgcc/configure | 5 +++-- libgfortran/configure | 9 +++++---- libgomp/configure | 4 ++-- libiberty/configure | 12 ++++++------ libitm/configure | 5 +++-- libobjc/configure | 9 +++++---- libphobos/configure | 9 +++++---- libquadmath/configure | 5 +++-- libsanitizer/configure | 5 +++-- libssp/configure | 9 +++++---- libstdc++-v3/configure | 5 +++-- libvtv/configure | 5 +++-- lto-plugin/configure | 12 ++++++------ zlib/configure | 9 +++++---- 21 files changed, 102 insertions(+), 88 deletions(-) diff --git a/config/cet.m4 b/config/cet.m4 index 2bb2c8a95ac..911fbd46475 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" ]) diff --git a/gcc/configure b/gcc/configure index 4531d50eb0f..46850710424 100755 --- a/gcc/configure +++ b/gcc/configure @@ -31747,7 +31747,7 @@ $as_echo_n "checking for CET support... " >&6; } 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) @@ -31798,7 +31798,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; *) may_have_cet=no @@ -31806,9 +31806,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; 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. @@ -31896,8 +31896,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -CFLAGS="$save_CFLAGS" -LDFLAGS="$save_LDFLAGS" +CFLAGS="$cet_save_CFLAGS" +LDFLAGS="$cet_save_LDFLAGS" case x$enable_languages in *jit*) diff --git a/libatomic/configure b/libatomic/configure index 478670a6fe7..b441636c85b 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -15589,13 +15589,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15620,7 +15621,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. diff --git a/libbacktrace/configure b/libbacktrace/configure index d851e807d2d..b453bae5ae6 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -12163,13 +12163,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12194,7 +12195,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. @@ -12403,7 +12404,7 @@ $as_echo_n "checking for CET support... " >&6; } 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) @@ -12454,7 +12455,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; *) may_have_cet=no @@ -12462,9 +12463,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; 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. @@ -12552,8 +12553,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -CFLAGS="$save_CFLAGS" -LDFLAGS="$save_LDFLAGS" +CFLAGS="$cet_save_CFLAGS" +LDFLAGS="$cet_save_LDFLAGS" case x$enable_languages in *jit*) diff --git a/libcc1/configure b/libcc1/configure index 5e790db36b0..37dbeac4908 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -14560,7 +14560,7 @@ $as_echo_n "checking for CET support... " >&6; } 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) @@ -14611,7 +14611,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; *) may_have_cet=no @@ -14619,9 +14619,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; 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. @@ -14709,8 +14709,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -CFLAGS="$save_CFLAGS" -LDFLAGS="$save_LDFLAGS" +CFLAGS="$cet_save_CFLAGS" +LDFLAGS="$cet_save_LDFLAGS" diff --git a/libcpp/configure b/libcpp/configure index 6a967cff6ac..3329e20c392 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -7559,7 +7559,7 @@ $as_echo_n "checking for CET support... " >&6; } 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) @@ -7610,7 +7610,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; *) may_have_cet=no @@ -7618,9 +7618,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; 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. @@ -7708,8 +7708,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -CFLAGS="$save_CFLAGS" -LDFLAGS="$save_LDFLAGS" +CFLAGS="$cet_save_CFLAGS" +LDFLAGS="$cet_save_LDFLAGS" case x$enable_languages in *jit*) diff --git a/libdecnumber/configure b/libdecnumber/configure index 577b250930c..df6fdcfbc7f 100755 --- a/libdecnumber/configure +++ b/libdecnumber/configure @@ -5212,7 +5212,7 @@ $as_echo_n "checking for CET support... " >&6; } 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) @@ -5263,7 +5263,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; *) may_have_cet=no @@ -5271,9 +5271,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; 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. @@ -5361,8 +5361,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -CFLAGS="$save_CFLAGS" -LDFLAGS="$save_LDFLAGS" +CFLAGS="$cet_save_CFLAGS" +LDFLAGS="$cet_save_LDFLAGS" case x$enable_languages in *jit*) diff --git a/libgcc/configure b/libgcc/configure index 5d0c79bcd75..13548cacb85 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -4907,13 +4907,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4938,7 +4939,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. diff --git a/libgfortran/configure b/libgfortran/configure index 97d9616e425..195f8bbce4c 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -6008,13 +6008,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6039,7 +6040,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. @@ -12722,7 +12723,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12725 "configure" +#line 12726 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12828,7 +12829,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12831 "configure" +#line 12832 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgomp/configure b/libgomp/configure index e5710b26749..9ffa66c18d9 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -16753,7 +16753,7 @@ case "$host" 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16778,7 +16778,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. diff --git a/libiberty/configure b/libiberty/configure index 3f82c5bb865..1f8e23f0d23 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -5286,7 +5286,7 @@ $as_echo_n "checking for CET support... " >&6; } 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) @@ -5337,7 +5337,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; *) may_have_cet=no @@ -5345,9 +5345,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; 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. @@ -5438,8 +5438,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -CFLAGS="$save_CFLAGS" -LDFLAGS="$save_LDFLAGS" +CFLAGS="$cet_save_CFLAGS" +LDFLAGS="$cet_save_LDFLAGS" diff --git a/libitm/configure b/libitm/configure index be70ea6f76f..90965f339fc 100755 --- a/libitm/configure +++ b/libitm/configure @@ -17884,13 +17884,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17915,7 +17916,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. diff --git a/libobjc/configure b/libobjc/configure index 6975a727d5e..c4f66880924 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -3460,13 +3460,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3491,7 +3492,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. @@ -10778,7 +10779,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10781 "configure" +#line 10782 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10884,7 +10885,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10887 "configure" +#line 10888 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libphobos/configure b/libphobos/configure index 4551e9fddef..a8d151cdccb 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -5580,13 +5580,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5611,7 +5612,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. @@ -11737,7 +11738,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11740 "configure" +#line 11741 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11843,7 +11844,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11846 "configure" +#line 11847 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libquadmath/configure b/libquadmath/configure index dee79cf99a0..a28788aae8c 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -13033,13 +13033,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13064,7 +13065,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. diff --git a/libsanitizer/configure b/libsanitizer/configure index 7ec074491c1..04eca04fbe5 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -16856,13 +16856,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16887,7 +16888,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. diff --git a/libssp/configure b/libssp/configure index 2eb4c7998d5..ff342ac6e1f 100755 --- a/libssp/configure +++ b/libssp/configure @@ -4332,13 +4332,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4363,7 +4364,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. @@ -10999,7 +11000,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11002 "configure" +#line 11003 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11105,7 +11106,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11108 "configure" +#line 11109 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 502f6602001..b5beb456a62 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -77482,13 +77482,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -77513,7 +77514,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. diff --git a/libvtv/configure b/libvtv/configure index eced2b23ce0..b796e0197d5 100755 --- a/libvtv/configure +++ b/libvtv/configure @@ -15674,13 +15674,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15705,7 +15706,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. diff --git a/lto-plugin/configure b/lto-plugin/configure index 36c6ecc5875..69f6fce05c5 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -5682,7 +5682,7 @@ $as_echo_n "checking for CET support... " >&6; } 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) @@ -5733,7 +5733,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; *) may_have_cet=no @@ -5741,9 +5741,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; 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. @@ -5831,8 +5831,8 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -CFLAGS="$save_CFLAGS" -LDFLAGS="$save_LDFLAGS" +CFLAGS="$cet_save_CFLAGS" +LDFLAGS="$cet_save_LDFLAGS" diff --git a/zlib/configure b/zlib/configure index ae1f1934911..f9a2689e05c 100755 --- a/zlib/configure +++ b/zlib/configure @@ -4163,13 +4163,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 $as_echo_n "checking for CET support... " >&6; } +# 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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4194,7 +4195,7 @@ else enable_cet=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" + CFLAGS="$cet_save_CFLAGS" ;; yes) # Check if assembler supports CET. @@ -10742,7 +10743,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10745 "configure" +#line 10746 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10848,7 +10849,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10851 "configure" +#line 10852 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -- 2.30.2