summaryrefslogtreecommitdiff
path: root/libsanitizer/configure
diff options
context:
space:
mode:
Diffstat (limited to 'libsanitizer/configure')
-rwxr-xr-xlibsanitizer/configure17
1 files changed, 16 insertions, 1 deletions
diff --git a/libsanitizer/configure b/libsanitizer/configure
index a0104d8c2ab..3b61a1f7537 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -16539,18 +16539,28 @@ else
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5
+$as_echo_n "checking for CET support... " >&6; }
+
case "$host" in
i[34567]86-*-linux* | x86_64-*-linux*)
case "$enable_cet" in
default)
- # Check if assembler supports CET.
+ # Check if target supports multi-byte NOPs
+ # and if assembler supports CET insn.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
+
+#if !defined(__SSE2__)
+#error target does not support multi-byte NOPs
+#else
asm ("setssbsy");
+#endif
+
;
return 0;
}
@@ -16590,6 +16600,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
esac
if test x$enable_cet = xyes; then
CET_FLAGS="-fcf-protection -mcet"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
EXTRA_CFLAGS="$EXTRA_CFLAGS $CET_FLAGS"