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