# HG changeset patch # User Loganaden Velvindron # Date 1518795332 -14400 # Node ID 55120acb9994290386506fabdfc8ae06a6df454a # Parent bd0bc6b5a87c766f217dec29b9aad63286613b53 Add Spectre v2 mitigations for GCC (#54) diff -r bd0bc6b5a87c -r 55120acb9994 configure.ac --- a/configure.ac Fri Feb 16 23:33:46 2018 +0800 +++ b/configure.ac Fri Feb 16 19:35:32 2018 +0400 @@ -110,6 +110,11 @@ ) # 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