diff options
author | Ole André Vadla Ravnås <oleavr@gmail.com> | 2020-03-10 02:05:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 21:05:42 -0400 |
commit | 4c7bde32ea3af479babdf527d94f241282951cb9 (patch) | |
tree | e3e69f65c1bc15d5673954de929a12dd7b34c3ff /configure.ac | |
parent | 211e929df4388a6724b0dba4df4e3a1283dc49e9 (diff) | |
download | libffi-4c7bde32ea3af479babdf527d94f241282951cb9.tar.gz |
Port to iOS/arm64e (#548)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b764368..bf96297 100644 --- a/configure.ac +++ b/configure.ac @@ -176,6 +176,28 @@ case "$TARGET" in ;; esac +AC_CACHE_CHECK([whether compiler supports pointer authentication], + libffi_cv_as_ptrauth, [ + libffi_cv_as_ptrauth=unknown + AC_TRY_COMPILE(,[ +#ifdef __clang__ +# if __has_feature(ptrauth_calls) +# define HAVE_PTRAUTH 1 +# endif +#endif + +#ifndef HAVE_PTRAUTH +# error Pointer authentication not supported +#endif + ], + [libffi_cv_as_ptrauth=yes], + [libffi_cv_as_ptrauth=no]) +]) +if test "x$libffi_cv_as_ptrauth" = xyes; then + AC_DEFINE(HAVE_PTRAUTH, 1, + [Define if your compiler supports pointer authentication.]) +fi + # On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC. AC_ARG_ENABLE(pax_emutramp, [ --enable-pax_emutramp enable pax emulated trampolines, for we can't use PROT_EXEC], |