diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-03-22 13:23:21 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-05-03 05:01:23 -0700 |
commit | 3f570621352970945db657455e0570208ea2d70e (patch) | |
tree | 090f4242816e089bc91039b07c856bc78e47ecd2 /libcpp/configure | |
parent | fd7eb4bc94cafa745eba75c64fa483a1689a5aad (diff) | |
download | gcc-3f570621352970945db657455e0570208ea2d70e.zip gcc-3f570621352970945db657455e0570208ea2d70e.tar.gz gcc-3f570621352970945db657455e0570208ea2d70e.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.
gcc/
PR bootstrap/99703
* configure: Regenerated.
libbacktrace/
PR bootstrap/99703
* configure: Regenerated.
libcc1/
PR bootstrap/99703
* configure: Regenerated.
libcpp/
PR bootstrap/99703
* configure: Regenerated.
libdecnumber/
PR bootstrap/99703
* configure: Regenerated.
lto-plugin/
PR bootstrap/99703
* configure: Regenerated.
Diffstat (limited to 'libcpp/configure')
-rwxr-xr-x | libcpp/configure | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libcpp/configure b/libcpp/configure index 7e28606..9674cd9 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -7668,6 +7668,34 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +int +main () +{ + asm ("endbr32"); + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + have_multi_byte_nop=yes +else + have_multi_byte_nop=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + have_cet=no + if test x$have_multi_byte_nop = xyes; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + static void foo (void) { @@ -7704,6 +7732,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi if test x$enable_cet = xno -a x$have_cet = xyes; then as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 fi |