--- erts/emulator/Makefile.in.orig	2009-09-18 07:06:45.000000000 -0700
+++ erts/emulator/Makefile.in	2009-10-03 20:09:16.000000000 -0700
@@ -36,7 +36,12 @@
 M4FLAGS=
 CREATE_DIRS=
 
-LDFLAGS=@LDFLAGS@
+# On x86_64, the default pagezero_size is 4GB, thus making it
+# impossible to allocate an mmap between 0.5GB and 2GB, which
+# is required by hipe.
+# On i386, the default pagezero_size is 4KB which is what we'll
+# set here.
+LDFLAGS=@LDFLAGS@ -pagezero_size 0x400000
 
 ifeq ($(TYPE),debug)
 PURIFY =
@@ -110,7 +115,7 @@
 override TYPE=opt
 PURIFY =
 TYPEMARKER =
-TYPE_FLAGS = @CFLAGS@
+TYPE_FLAGS = -Ipcre @CFLAGS@
 endif
 endif
 endif
