aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-01-07 17:14:04 +0100
committerSverker Eriksson <[email protected]>2016-01-07 17:14:04 +0100
commit03b00985c181f90a927b9af5316d27a534398c24 (patch)
tree83a1c04330720410b79c832eb29aaafe0024834d
parentb171caedbf3ebdab8ad144f015287ca2cc30d5da (diff)
downloadotp-03b00985c181f90a927b9af5316d27a534398c24.tar.gz
otp-03b00985c181f90a927b9af5316d27a534398c24.tar.bz2
otp-03b00985c181f90a927b9af5316d27a534398c24.zip
erts: Add config test for MAP_NORESERVE for hipe on 64-bit
to get a nicer error on FreeBSD and others that does not support MAP_NORESERVE for mmap. Q: How to support this? A: Implement the "literal tag" in hipe or another way to reserve virtual address space in erl_mmap.c
-rw-r--r--erts/configure.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 20075b08c9..2f19c0f760 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -2765,6 +2765,21 @@ LM_SYS_IPV6
LM_SYS_MULTICAST
ERL_TIME_CORRECTION
AC_CHECK_PROG(M4, m4, m4)
+
+
+dnl HiPE cannot run on 64-bit without MAP_FIXED and MAP_NORESERVE
+if test X${enable_hipe} != Xno && test X$ac_cv_sizeof_void_p != X4; then
+ AC_CHECK_DECLS([MAP_FIXED, MAP_NORESERVE], [], [], [#include <sys/mman.h>])
+ if test X$ac_cv_have_decl_MAP_FIXED != Xyes || test X$ac_cv_have_decl_MAP_NORESERVE != Xyes; then
+ if test X${enable_hipe} = Xyes; then
+ AC_MSG_ERROR([HiPE on 64-bit needs MAP_FIXED and MAP_NORESERVE flags for mmap()])
+ else
+ enable_hipe=no
+ AC_MSG_WARN([Disable HiPE due to lack of MAP_FIXED and MAP_NORESERVE flags for mmap()])
+ 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