aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-03-18 07:54:15 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-03-18 08:02:46 -0700
commit538c15fc2a29ff142f2ec71d253d4027946ece09 (patch)
treef2001e5ebfe80d2d2ac6a98eebb0e879f473cba3 /libiberty
parent835f2fae11e41956523df3839cd50471b708e97d (diff)
downloadgdb-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 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rwxr-xr-xlibiberty/configure29
2 files changed, 34 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 8e5f5dc..70d7209 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2021-03-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/27397
+ * configure: Regenerated.
+
2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
PR ld/27173
diff --git a/libiberty/configure b/libiberty/configure
index 160b8c9..29a690d 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5539,6 +5539,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)
{
@@ -5575,6 +5603,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