From 1655dede9fe159f04eae1f6a73360960569bd5a6 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 21 Feb 2018 01:48:14 +0100 Subject: [PATCH] Add retpoline support for clang Assembly implementations don't seem to be using any indirect calls --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index dc7afb28..f5bc0336 100644 --- a/configure.ac +++ b/configure.ac @@ -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"])