Add retpoline support for clang

Assembly implementations don't seem to be using any indirect calls
This commit is contained in:
Frank Denis 2018-02-21 01:48:14 +01:00
parent 03f5e93e64
commit 1655dede9f

View File

@ -203,7 +203,10 @@ 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"])
[CFLAGS="$CFLAGS -mfunction-return=thunk -mindirect-branch=thunk"],
[
AX_CHECK_COMPILE_FLAG([-mretpoline], [CFLAGS="$CFLAGS -mretpoline"])
])
AS_CASE([$host_os], [cygwin*|mingw*|msys|pw32*|cegcc*], [ ], [
AX_CHECK_COMPILE_FLAG([-fPIC], [CFLAGS="$CFLAGS -fPIC"])