This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: Fix PR 19823
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: Java Patches <java-patches at gcc dot gnu dot org>
- Date: Tue, 15 Feb 2005 23:08:45 -0500
- Subject: Patch: Fix PR 19823
This patch implements Hans' suggested fix for PR 19823 by having the
configury defining USE_MMAP on Linux platforms. Note that on IA64,
configure.ac also sets NO_EXECUTE_PERMISSION, so we won't map memory
with PROT_EXEC on that platform. Hopefully, this will fix the gij crash
that some have been seeing with FC3 + rawhide.
Tested x86-64 linux with now regressions. I'm checking this in.
Bryce
2005-02-15 Bryce McKinlay <mckinlay@redhat.com>
PR libgcj/19823
* configure.host: Set gc_use_mmap on *-linux*.
* configure.ac: Define USE_MMAP if gc_use_mmap is set.
* include/private/gc_priv.h: Include gc_config.h.
* configure, include/gc_config.h.in: Rebuilt.
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/configure.ac,v
retrieving revision 1.11
diff -u -r1.11 configure.ac
--- configure.ac 2 Jan 2005 03:35:56 -0000 1.11
+++ configure.ac 16 Feb 2005 03:53:08 -0000
@@ -446,6 +446,10 @@
esac
fi])
+if test "${gc_use_mmap}" = "yes"; then
+ AC_DEFINE(USE_MMAP, 1, [use MMAP instead of sbrk to get new memory])
+fi
+
if test -n "$with_cross_host" &&
test x"$with_cross_host" != x"no"; then
toolexecdir='$(exec_prefix)/$(target_noncanonical)'
Index: configure.host
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/configure.host,v
retrieving revision 1.7
diff -u -r1.7 configure.host
--- configure.host 28 Jul 2003 04:18:20 -0000 1.7
+++ configure.host 16 Feb 2005 03:53:08 -0000
@@ -18,8 +18,11 @@
# It sets the following shell variables:
# gc_cflags Special CFLAGS to use when building
+# gc_use_mmap Set to "yes" on platforms where mmap should be used instead
+# of sbrk. This will define USE_MMAP.
gc_cflags=""
+gc_use_mmap=
# We should set -fexceptions if we are using gcc and might be used
# inside something like gcj. This is the zeroth approximation:
@@ -37,6 +40,12 @@
esac
fi
+case "${host}" in
+ *-linux*)
+ gc_use_mmap=yes
+ ;;
+esac
+
case "${target_optspace}:${host}" in
yes:*)
gc_cflags="${gc_cflags} -Os"