From ef3e5aadc75d5cbc1ed05c6de0ef8a3f26a45e97 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 30 Dec 2018 13:45:09 +0100 Subject: [PATCH] Don't try to enable retpolines on Emscripten & pnacl --- configure.ac | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 93d2b5f4..d4078d71 100644 --- a/configure.ac +++ b/configure.ac @@ -197,11 +197,12 @@ AC_CHECK_DEFINE([_FORTIFY_SOURCE], [], [ [CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"]) ]) -AX_CHECK_COMPILE_FLAG([-mindirect-branch=thunk], - [CFLAGS="$CFLAGS -mindirect-branch=thunk"], - [ - AX_CHECK_COMPILE_FLAG([-mretpoline], [CFLAGS="$CFLAGS -mretpoline"]) - ]) +AS_IF([test "x$EMSCRIPTEN" = "x" -a "$host_os" != "pnacl"], [ + 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"])