From 1203d721ce137abe78d9d412652a7670a62afc6f Mon Sep 17 00:00:00 2001 From: Loganaden Velvindron Date: Sun, 18 Feb 2018 18:58:24 +0400 Subject: [PATCH] Add spectre v2 migitations for GCC --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index fb579f4f..dc7afb28 100644 --- a/configure.ac +++ b/configure.ac @@ -202,6 +202,9 @@ AC_CHECK_DEFINE([_FORTIFY_SOURCE], [], [ AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CFLAGS="$CFLAGS -fvisibility=hidden"]) +AX_CHECK_COMPILE_FLAG([-mfunction-return=thunk -mindirect-branch=thunk], + [CFLAGS="$CFLAGS -mfunction-return=thunk -mindirect-branch=thunk"]) + AS_CASE([$host_os], [cygwin*|mingw*|msys|pw32*|cegcc*], [ ], [ AX_CHECK_COMPILE_FLAG([-fPIC], [CFLAGS="$CFLAGS -fPIC"]) ])