diff options
author | Sverker Eriksson <[email protected]> | 2016-10-04 21:46:53 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-10-14 14:29:17 +0200 |
commit | 6eee26d55f32113e3ea4575e5500f2fc3c312fff (patch) | |
tree | 500d8b908ce88858414852624c18dfd9d01628fb /erts/configure.in | |
parent | d347e91735cce9ace9c376ba4913fcf688da22f8 (diff) | |
download | otp-6eee26d55f32113e3ea4575e5500f2fc3c312fff.tar.gz otp-6eee26d55f32113e3ea4575e5500f2fc3c312fff.tar.bz2 otp-6eee26d55f32113e3ea4575e5500f2fc3c312fff.zip |
erts: Enable exec_alloc for all hipe architectures
For non-amd64 it's a "normal" allocator with a
wrapper around mseg_alloc to call mprotect(PROT_EXEC).
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/erts/configure.in b/erts/configure.in index dc85b2eafc..91358d9c36 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -2031,7 +2031,7 @@ AC_CHECK_FUNCS([getipnodebyname getipnodebyaddr gethostbyname2]) AC_CHECK_FUNCS([ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlopen \ pread pwrite memmove strerror strerror_r strncasecmp \ - gethrtime localtime_r gmtime_r inet_pton \ + gethrtime localtime_r gmtime_r inet_pton mprotect \ mmap mremap memcpy mallopt sbrk _sbrk __sbrk brk _brk __brk \ flockfile fstat strlcpy strlcat setsid posix2time time2posix \ setlocale nl_langinfo poll mlockall ppoll]) @@ -2750,6 +2750,18 @@ if test X${enable_hipe} != Xno && test X$ac_cv_sizeof_void_p != X4; then fi fi +dnl HiPE cannot run on 32-bit without mprotect() +if test X${enable_hipe} != Xno && test X$ac_cv_sizeof_void_p == X4; then + if test X$ac_cv_func_mprotect != Xyes; then + if test X${enable_hipe} = Xyes; then + AC_MSG_ERROR([HiPE on 32-bit needs mprotect()]) + else + enable_hipe=no + AC_MSG_WARN([Disable HiPE due to lack of mprotect()]) + fi + fi +fi + dnl check to auto-enable hipe here... if test "$cross_compiling" != "yes" && test X${enable_hipe} != Xno; then if test -z "$M4"; then @@ -3379,13 +3391,8 @@ if test X${enable_hipe} = Xyes; then AC_DEFINE(HIPE,[1],[Define to enable HiPE]) HIPE_HELPERS="xmerl syntax_tools edoc" ENABLE_ALLOC_TYPE_VARS="$ENABLE_ALLOC_TYPE_VARS hipe" - case "$ARCH" in - amd64) - # For now exec_alloc is only used for hipe on amd64 - AC_MSG_NOTICE([Enable exec_alloc for hipe code allocation]) - ENABLE_ALLOC_TYPE_VARS="$ENABLE_ALLOC_TYPE_VARS exec_alloc" - ;; - esac + AC_MSG_NOTICE([Enable exec_alloc for hipe code allocation]) + ENABLE_ALLOC_TYPE_VARS="$ENABLE_ALLOC_TYPE_VARS exec_alloc" fi fi AC_SUBST(HIPE_HELPERS) |