diff options
author | netblue30 <netblue30@yahoo.com> | 2018-03-30 08:19:33 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2018-03-30 08:19:33 -0400 |
commit | 4a99c8aa2c7225a595d328e58c6fea178cb92bb7 (patch) | |
tree | 52d448a62d9a6fd2cddab3b9f26a9d7d84263806 /configure.ac | |
parent | gnome-calculator fixup (diff) | |
download | firejail-4a99c8aa2c7225a595d328e58c6fea178cb92bb7.tar.gz firejail-4a99c8aa2c7225a595d328e58c6fea178cb92bb7.tar.zst firejail-4a99c8aa2c7225a595d328e58c6fea178cb92bb7.zip |
spectre support for clang compiler
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
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 | |||
9 | AC_PROG_RANLIB | 9 | AC_PROG_RANLIB |
10 | 10 | ||
11 | HAVE_SPECTRE="no" | 11 | HAVE_SPECTRE="no" |
12 | AC_MSG_CHECKING(for Spectre mitigation support in gcc compiler) | 12 | AC_MSG_CHECKING(for Spectre mitigation support in gcc or clang compiler) |
13 | AS_IF([test "$CC" = "gcc"], [ | 13 | AS_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 | ]) | ||
19 | AS_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 | ]) |
18 | AS_IF([test "$HAVE_SPECTRE" = "yes"], [ | 25 | AS_IF([test "$HAVE_SPECTRE" = "yes"], [ |
19 | AC_MSG_RESULT(yes) | 26 | AC_MSG_RESULT(yes) |
20 | EXTRA_CFLAGS+=" -mindirect-branch=thunk " | ||
21 | ]) | 27 | ]) |
22 | AS_IF([test "$HAVE_SPECTRE" = "no"], [ | 28 | AS_IF([test "$HAVE_SPECTRE" = "no"], [ |
23 | AC_MSG_RESULT(... not available) | 29 | AC_MSG_RESULT(... not available) |