From 28e62a6c86429e9cc19194ebd74e3d98123a1fc4 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 21 Feb 2018 01:59:15 +0100 Subject: [PATCH] Use only -mindirect-branch=thunk / -mretpoline for now Move the application of these flags up --- configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index f5bc0336..e03fb57e 100644 --- a/configure.ac +++ b/configure.ac @@ -199,15 +199,15 @@ AC_CHECK_DEFINE([_FORTIFY_SOURCE], [], [ [CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"]) ]) -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"], +AX_CHECK_COMPILE_FLAG([-mindirect-branch=thunk], + [CFLAGS="$CFLAGS -mindirect-branch=thunk"], [ AX_CHECK_COMPILE_FLAG([-mretpoline], [CFLAGS="$CFLAGS -mretpoline"]) ]) +AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], + [CFLAGS="$CFLAGS -fvisibility=hidden"]) + AS_CASE([$host_os], [cygwin*|mingw*|msys|pw32*|cegcc*], [ ], [ AX_CHECK_COMPILE_FLAG([-fPIC], [CFLAGS="$CFLAGS -fPIC"]) ])