diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 7553fc1646..d896c8bf48 100644 --- a/configure.ac +++ b/configure.ac @@ -136,8 +136,8 @@ if test "$WithGhc" = "" then AC_MSG_ERROR([GHC is required.]) fi -FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[7.6], - [AC_MSG_ERROR([GHC version 7.6 or later is required to compile GHC.])]) +FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[7.8], + [AC_MSG_ERROR([GHC version 7.8 or later is required to compile GHC.])]) if test `expr $GhcMinVersion % 2` = "1" then @@ -968,6 +968,42 @@ else fi AC_SUBST(HavePapi) +dnl large address space support (see includes/rts/storage/MBlock.h) +dnl +dnl Darwin has vm_allocate/vm_protect +dnl Linux has mmap(MAP_NORESERVE)/madv(MADV_DONTNEED) +dnl FreeBSD, Solaris and maybe other have MAP_NORESERVE/MADV_FREE +dnl (They also have MADV_DONTNEED, but it means something else!) +dnl +dnl Windows has VirtualAlloc MEM_RESERVE/MEM_COMMIT, however +dnl it counts page-table space as committed memory, and so quickly +dnl runs out of paging file when we have multiple processes reserving +dnl 1TB of address space, we get the following error: +dnl VirtualAlloc MEM_RESERVE 1099512676352 bytes failed: The paging file is too small for this operation to complete. +dnl +use_large_address_space=no +if test "$ac_cv_sizeof_void_p" -eq 8 ; then + if test "$ghc_host_os" = "darwin" ; then + use_large_address_space=yes + else + AC_CHECK_DECLS([MAP_NORESERVE, MADV_FREE, MADV_DONTNEED],[],[], +[ +#include <unistd.h> +#include <sys/types.h> +#include <sys/mman.h> +#include <fcntl.h> +]) + if test "$ac_cv_have_decl_MAP_NORESERVE" = "yes" && + test "$ac_cv_have_decl_MADV_FREE" = "yes" || + test "$ac_cv_have_decl_MADV_DONTNEED" = "yes" ; then + use_large_address_space=yes + fi + fi +fi +if test "$use_large_address_space" = "yes" ; then + AC_DEFINE([USE_LARGE_ADDRESS_SPACE], [1], [Enable single heap address space support]) +fi + if test "$HAVE_DOCBOOK_XSL" = "NO" || test "$XsltprocCmd" = "" then |