diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-05-16 06:07:12 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-05-16 06:07:12 -0700 |
commit | 56770bdab2585be4d3171b3512d2167106dca53e (patch) | |
tree | 5f65216007622ed9dcfef23220d941d7cd4171a2 /config/cet.m4 | |
parent | 9bf058f09457de5efd094b87081b7d031ce96cbc (diff) | |
download | gdb-56770bdab2585be4d3171b3512d2167106dca53e.zip gdb-56770bdab2585be4d3171b3512d2167106dca53e.tar.gz gdb-56770bdab2585be4d3171b3512d2167106dca53e.tar.bz2 |
Sync config with GCC
Sync with GCC
2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/95147
* cet.m4 (GCC_CET_FLAGS): Also check if -fcf-protection works
when defaulting to auto.
2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
* cet.m4 (GCC_CET_FLAGS): Change default to auto.
Diffstat (limited to 'config/cet.m4')
-rw-r--r-- | config/cet.m4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/cet.m4 b/config/cet.m4 index d960869..2bb2c8a 100644 --- a/config/cet.m4 +++ b/config/cet.m4 @@ -3,7 +3,7 @@ dnl GCC_CET_FLAGS dnl (SHELL-CODE_HANDLER) dnl AC_DEFUN([GCC_CET_FLAGS],[dnl -GCC_ENABLE(cet, no, ,[enable Intel CET in target libraries], +GCC_ENABLE(cet, auto, ,[enable Intel CET in target libraries], permit yes|no|auto) AC_MSG_CHECKING([for CET support]) @@ -13,6 +13,8 @@ case "$host" in auto) # Check if target supports multi-byte NOPs # and if assembler supports CET insn. + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fcf-protection" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [], @@ -25,6 +27,7 @@ asm ("setssbsy"); ])], [enable_cet=yes], [enable_cet=no]) + CFLAGS="$save_CFLAGS" ;; yes) # Check if assembler supports CET. |