diff options
author | netblue30 <netblue30@yahoo.com> | 2018-03-30 08:34:49 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2018-03-30 08:34:49 -0400 |
commit | e84e941746e1baec13b4bcde981caebccb64e3f6 (patch) | |
tree | 6bd54984d58905b176f232a6a3dff374b71dc8a0 /configure | |
parent | spectre support for clang compiler (diff) | |
download | firejail-e84e941746e1baec13b4bcde981caebccb64e3f6.tar.gz firejail-e84e941746e1baec13b4bcde981caebccb64e3f6.tar.zst firejail-e84e941746e1baec13b4bcde981caebccb64e3f6.zip |
spectre clang support
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -3106,20 +3106,36 @@ fi | |||
3106 | 3106 | ||
3107 | 3107 | ||
3108 | HAVE_SPECTRE="no" | 3108 | HAVE_SPECTRE="no" |
3109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Spectre mitigation support in gcc compiler" >&5 | 3109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Spectre mitigation support in gcc or clang compiler" >&5 |
3110 | $as_echo_n "checking for Spectre mitigation support in gcc compiler... " >&6; } | 3110 | $as_echo_n "checking for Spectre mitigation support in gcc or clang compiler... " >&6; } |
3111 | if test "$CC" = "gcc"; then : | 3111 | if test "$CC" = "gcc"; then : |
3112 | 3112 | ||
3113 | HAVE_SPECTRE="yes" | 3113 | HAVE_SPECTRE="yes" |
3114 | $CC -mindirect-branch=thunk -c dummy.c || HAVE_SPECTRE="no" | 3114 | $CC -mindirect-branch=thunk -c dummy.c || HAVE_SPECTRE="no" |
3115 | rm -f dummy.o | 3115 | rm -f dummy.o |
3116 | if test "$HAVE_SPECTRE" = "yes"; then : | ||
3117 | |||
3118 | EXTRA_CFLAGS+=" -mindirect-branch=thunk " | ||
3119 | |||
3120 | fi | ||
3121 | |||
3122 | fi | ||
3123 | if test "$CC" = "clang"; then : | ||
3124 | |||
3125 | HAVE_SPECTRE="yes" | ||
3126 | $CC -mretpoline -c dummy.c || HAVE_SPECTRE="no" | ||
3127 | rm -f dummy.o | ||
3128 | if test "$HAVE_SPECTRE" = "yes"; then : | ||
3129 | |||
3130 | EXTRA_CFLAGS+=" -mretpoline " | ||
3131 | |||
3132 | fi | ||
3116 | 3133 | ||
3117 | fi | 3134 | fi |
3118 | if test "$HAVE_SPECTRE" = "yes"; then : | 3135 | if test "$HAVE_SPECTRE" = "yes"; then : |
3119 | 3136 | ||
3120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | 3137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3121 | $as_echo "yes" >&6; } | 3138 | $as_echo "yes" >&6; } |
3122 | EXTRA_CFLAGS+=" -mindirect-branch=thunk " | ||
3123 | 3139 | ||
3124 | fi | 3140 | fi |
3125 | if test "$HAVE_SPECTRE" = "no"; then : | 3141 | if test "$HAVE_SPECTRE" = "no"; then : |