diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-03-18 07:54:15 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-03-18 08:02:46 -0700 |
commit | 538c15fc2a29ff142f2ec71d253d4027946ece09 (patch) | |
tree | f2001e5ebfe80d2d2ac6a98eebb0e879f473cba3 /config | |
parent | 835f2fae11e41956523df3839cd50471b708e97d (diff) | |
download | gdb-538c15fc2a29ff142f2ec71d253d4027946ece09.zip gdb-538c15fc2a29ff142f2ec71d253d4027946ece09.tar.gz gdb-538c15fc2a29ff142f2ec71d253d4027946ece09.tar.bz2 |
GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
Check if host supports multi-byte NOPs before enabling CET on host.
config/
PR binutils/27397
* cet.m4 (GCC_CET_HOST_FLAGS): Check if host supports multi-byte
NOPs.
libiberty/
PR binutils/27397
* configure: Regenerated.
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 6 | ||||
-rw-r--r-- | config/cet.m4 | 19 |
2 files changed, 22 insertions, 3 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index 95dcc85..6f7b3c7 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,9 @@ +2021-03-18 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/27397 + * cet.m4 (GCC_CET_HOST_FLAGS): Check if host supports multi-byte + NOPs. + 2021-02-13 Mike Frysinger <vapier@gentoo.org> * debuginfod.m4: Delete m4_include(../config/pkg.m4). diff --git a/config/cet.m4 b/config/cet.m4 index c67fb4f..7718be1 100644 --- a/config/cet.m4 +++ b/config/cet.m4 @@ -130,6 +130,18 @@ fi if test x$may_have_cet = xyes; then if test x$cross_compiling = xno; then AC_TRY_RUN([ +int +main () +{ + asm ("endbr32"); + return 0; +} + ], + [have_multi_byte_nop=yes], + [have_multi_byte_nop=no]) + have_cet=no + if test x$have_multi_byte_nop = xyes; then + AC_TRY_RUN([ static void foo (void) { @@ -155,9 +167,10 @@ main () bar (); return 0; } - ], - [have_cet=no], - [have_cet=yes]) + ], + [have_cet=no], + [have_cet=yes]) + fi if test x$enable_cet = xno -a x$have_cet = xyes; then AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host]) fi |