summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2018-03-30 08:19:33 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2018-03-30 08:19:33 -0400
commit4a99c8aa2c7225a595d328e58c6fea178cb92bb7 (patch)
tree52d448a62d9a6fd2cddab3b9f26a9d7d84263806 /configure.ac
parentgnome-calculator fixup (diff)
downloadfirejail-4a99c8aa2c7225a595d328e58c6fea178cb92bb7.tar.gz
firejail-4a99c8aa2c7225a595d328e58c6fea178cb92bb7.tar.zst
firejail-4a99c8aa2c7225a595d328e58c6fea178cb92bb7.zip
spectre support for clang compiler
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 9a7a9d65e..1f573d50f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,15 +9,21 @@ AC_PROG_INSTALL
9AC_PROG_RANLIB 9AC_PROG_RANLIB
10 10
11HAVE_SPECTRE="no" 11HAVE_SPECTRE="no"
12AC_MSG_CHECKING(for Spectre mitigation support in gcc compiler) 12AC_MSG_CHECKING(for Spectre mitigation support in gcc or clang compiler)
13AS_IF([test "$CC" = "gcc"], [ 13AS_IF([test "$CC" = "gcc"], [
14 HAVE_SPECTRE="yes" 14 HAVE_SPECTRE="yes"
15 $CC -mindirect-branch=thunk -c dummy.c || HAVE_SPECTRE="no" 15 $CC -mindirect-branch=thunk -c dummy.c || HAVE_SPECTRE="no"
16 rm -f dummy.o 16 rm -f dummy.o
17 EXTRA_CFLAGS+=" -mindirect-branch=thunk "
18])
19AS_IF([test "$CC" = "clang"], [
20 HAVE_SPECTRE="yes"
21 $CC -mretpoline -c dummy.c || HAVE_SPECTRE="no"
22 rm -f dummy.o
23 EXTRA_CFLAGS+=" -mretpoline "
17]) 24])
18AS_IF([test "$HAVE_SPECTRE" = "yes"], [ 25AS_IF([test "$HAVE_SPECTRE" = "yes"], [
19 AC_MSG_RESULT(yes) 26 AC_MSG_RESULT(yes)
20 EXTRA_CFLAGS+=" -mindirect-branch=thunk "
21]) 27])
22AS_IF([test "$HAVE_SPECTRE" = "no"], [ 28AS_IF([test "$HAVE_SPECTRE" = "no"], [
23 AC_MSG_RESULT(... not available) 29 AC_MSG_RESULT(... not available)