diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-02-12 16:30:23 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-05-03 05:00:05 -0700 |
commit | fd7eb4bc94cafa745eba75c64fa483a1689a5aad (patch) | |
tree | fe9a68be3e55f37d4353b944e77a472dcbf4f5d4 /config/cet.m4 | |
parent | 4f48c335d36674f90046b2823f0ac1c0545dc082 (diff) | |
download | gcc-fd7eb4bc94cafa745eba75c64fa483a1689a5aad.zip gcc-fd7eb4bc94cafa745eba75c64fa483a1689a5aad.tar.gz gcc-fd7eb4bc94cafa745eba75c64fa483a1689a5aad.tar.bz2 |
GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
Sync with binutils for PR binutils/27397. Check if host supports
multi-byte NOPs before enabling CET on host.
config/
PR bootstrap/99703
* cet.m4 (GCC_CET_HOST_FLAGS): Check if host supports multi-byte
NOPs.
libiberty/
PR bootstrap/99703
* configure: Regenerated.
Diffstat (limited to 'config/cet.m4')
-rw-r--r-- | config/cet.m4 | 19 |
1 files changed, 16 insertions, 3 deletions
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 |