summaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorLoganaden Velvindron <logan@hackers.mu>2018-02-16 19:35:32 +0400
committerMatt Johnston <matt@ucc.asn.au>2018-02-16 23:35:32 +0800
commit017e2f07a772998c4a5564f81b834390ad681570 (patch)
tree7822e47ea689f23502562a22d5cce14eafdf74ad /configure.ac
parent3a923b72a4547bd75a4f88e4ecea521c40911f1a (diff)
Add Spectre v2 mitigations for GCC (#54)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0e71ffd..f8d1b17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,11 @@ if test "$hardenbuild" -eq 1; then
)
# FORTIFY_SOURCE
DB_TRYADDCFLAGS([-D_FORTIFY_SOURCE=2])
+
+ # Spectre v2 mitigations
+ DB_TRYADDCFLAGS([-mfunction-return=thunk])
+ DB_TRYADDCFLAGS([-mindirect-branch=thunk])
+
fi
# large file support is useful for scp