diff options
| author | H.J. Lu <hjl.tools@gmail.com> | 2020-05-12 09:17:34 -0700 |
|---|---|---|
| committer | H.J. Lu <hjl.tools@gmail.com> | 2020-05-12 09:17:45 -0700 |
| commit | 051da74259d5ebbfaa5b363dd09dbe16a955d8a1 (patch) | |
| tree | a94dd898309fea2bc4cab17cc7e7b5e5f5de2813 /libcpp/configure.ac | |
| parent | 7e9c5bb0fd22fb4573d270de241d9b56de17f7f5 (diff) | |
libcpp: 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 'libcpp/configure.ac')
| -rw-r--r-- | libcpp/configure.ac | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libcpp/configure.ac b/libcpp/configure.ac index 1779562a3a7..540efeb4629 100644 --- a/libcpp/configure.ac +++ b/libcpp/configure.ac @@ -206,6 +206,17 @@ 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) + AC_ARG_ENABLE(valgrind-annotations, [AS_HELP_STRING([--enable-valgrind-annotations], [enable valgrind runtime interaction])], [], |
