summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2018-03-30 08:34:49 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2018-03-30 08:34:49 -0400
commite84e941746e1baec13b4bcde981caebccb64e3f6 (patch)
tree6bd54984d58905b176f232a6a3dff374b71dc8a0 /configure
parentspectre support for clang compiler (diff)
downloadfirejail-e84e941746e1baec13b4bcde981caebccb64e3f6.tar.gz
firejail-e84e941746e1baec13b4bcde981caebccb64e3f6.tar.zst
firejail-e84e941746e1baec13b4bcde981caebccb64e3f6.zip
spectre clang support
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 19 insertions, 3 deletions
diff --git a/configure b/configure
index 0ccaad051..9a7d91111 100755
--- a/configure
+++ b/configure
@@ -3106,20 +3106,36 @@ fi
3106 3106
3107 3107
3108HAVE_SPECTRE="no" 3108HAVE_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; }
3111if test "$CC" = "gcc"; then : 3111if 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
3120fi
3121
3122fi
3123if 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
3132fi
3116 3133
3117fi 3134fi
3118if test "$HAVE_SPECTRE" = "yes"; then : 3135if 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
3124fi 3140fi
3125if test "$HAVE_SPECTRE" = "no"; then : 3141if test "$HAVE_SPECTRE" = "no"; then :