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 /libcc1 | |
parent | fd7eb4bc94cafa745eba75c64fa483a1689a5aad (diff) | |
download | gcc-3f570621352970945db657455e0570208ea2d70e.tar.gz |
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 'libcc1')
-rwxr-xr-x | libcc1/configure | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/libcc1/configure b/libcc1/configure index 021ec265526..b198b0b9074 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -10777,7 +10777,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10790 "configure" +#line 10780 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10883,7 +10883,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10896 "configure" +#line 10886 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14028,16 +14028,6 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - haiku*) version_type=linux need_lib_prefix=no @@ -14159,7 +14149,7 @@ linux*oldld* | linux*aout* | linux*coff*) # project, but have not yet been accepted: they are GCC-local changes # for the time being. (See # https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html) -linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi) version_type=linux need_lib_prefix=no need_version=no @@ -14663,6 +14653,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) { @@ -14699,6 +14717,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 |