Use only -mindirect-branch=thunk / -mretpoline for now

Move the application of these flags up
This commit is contained in:
Frank Denis 2018-02-21 01:59:15 +01:00
parent 1655dede9f
commit 28e62a6c86

View File

@ -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"])
])