aboutsummaryrefslogtreecommitdiff
path: root/libdecnumber/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-05-12 09:19:14 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-05-12 09:19:28 -0700
commitb3d16040feb2df017eb5a18ca641b06cc1ff6947 (patch)
tree1d9827a6bda4c3826dde7d9aedab97f5c5baa546 /libdecnumber/configure.ac
parent051da74259d5ebbfaa5b363dd09dbe16a955d8a1 (diff)
libdecnumber: Enable Intel CET on Intel CET enabled host for jit
Since on Intel CET enabled host, dlopen in Intel CET enabled applications fails on shared libraries which aren't Intel CET enabled, compile with -fcf-protection on Intel CET enabled host when jit is enabled to enable Intel CET on libgccjit. * Makefile.in (CET_HOST_FLAGS): New. (COMPILER): Add $(CET_HOST_FLAGS). * configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and AC_SUBST(CET_HOST_FLAGS). Clear CET_HOST_FLAGS if jit isn't enabled. * aclocal.m4: Regenerated. * configure: Likewise.
Diffstat (limited to 'libdecnumber/configure.ac')
-rw-r--r--libdecnumber/configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/libdecnumber/configure.ac b/libdecnumber/configure.ac
index 45449cd7144..de7e0088ceb 100644
--- a/libdecnumber/configure.ac
+++ b/libdecnumber/configure.ac
@@ -103,6 +103,18 @@ AC_ARG_ENABLE(host-shared,
[PICFLAG=-fPIC], [PICFLAG=])
AC_SUBST(PICFLAG)
+# Enable Intel CET on Intel CET enabled host if jit is enabled.
+GCC_CET_HOST_FLAGS(CET_HOST_FLAGS)
+case x$enable_languages in
+*jit*)
+ ;;
+*)
+ CET_HOST_FLAGS=
+ ;;
+esac
+AC_SUBST(CET_HOST_FLAGS)
+
+
# Output.
AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])