+2020-05-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ 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.
+
2020-05-12 H.J. Lu <hongjiu.lu@intel.com>
Sync with GCC
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])
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(
[],
])],
[enable_cet=yes],
[enable_cet=no])
+ CFLAGS="$save_CFLAGS"
;;
yes)
# Check if assembler supports CET.