]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libgcj/19823 (java fails with non-executable memory)
authorBryce McKinlay <mckinlay@redhat.com>
Tue, 22 Feb 2005 19:00:38 +0000 (19:00 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Tue, 22 Feb 2005 19:00:38 +0000 (19:00 +0000)
2005-02-22  Bryce McKinlay  <mckinlay@redhat.com>

        PR libgcj/19823
        * configure.host: Set gc_use_mmap on *-linux*.
        * configure.in: Define USE_MMAP if gc_use_mmap is set.
        * configure: Rebuilt.

From-SVN: r95407

boehm-gc/ChangeLog
boehm-gc/configure
boehm-gc/configure.host
boehm-gc/configure.in

index f441bf6f527b8b2d451f4bbfe6b77d3dd94bffeb..2a2f8d228b724835f4dfcd56ee37a92f2b267228 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-22  Bryce McKinlay  <mckinlay@redhat.com>
+
+        PR libgcj/19823
+        * configure.host: Set gc_use_mmap on *-linux*.
+        * configure.in: Define USE_MMAP if gc_use_mmap is set.
+        * configure: Rebuilt.
+
 2004-11-04  Release Manager
 
        * GCC 3.4.3 released.
index 20b334af74fe4e2e3d752c667a2fddc6d1f57024..3ff5861be767640c4148c5102c6df899eb51cec4 100755 (executable)
@@ -3076,7 +3076,7 @@ esac
 #
 # We don't set NO_EXECUTE_PERMISSION by default because gcj (and
 # anything else that creates trampolines in gc-allocated memory)
-# always needs exec permission.  The exception to this is IA-64 and
+# always needs exec permission.  The exceptions to this are IA-64 and
 # some variations of Power PC, where trampolines don't contain
 # executable code.
 #
@@ -3453,6 +3453,13 @@ EOF
 fi
 
 
+if test "${gc_use_mmap}" = "yes"; then
+  cat >> confdefs.h <<\EOF
+#define USE_MMAP 1
+EOF
+
+fi
+
 if test -n "$with_cross_host" &&
    test x"$with_cross_host" != x"no"; then
   toolexecdir='$(exec_prefix)/$(target_alias)'
index a98a0a7cb30cc48a0035ac6b2fa4954b6542cf31..97f4dacb6deef195b42e58e165ccac5d447a9d28 100644 (file)
 
 # 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 @@ else
     esac
 fi
 
+case "${host}" in
+  *-linux*)
+    gc_use_mmap=yes
+    ;;
+esac
+
 case "${target_optspace}:${host}" in
   yes:*)
     gc_cflags="${gc_cflags} -Os"
index f109c9003edce1c794bfd1aaa85e484df07c1f13..69c50ae6a4f39de43bc8f9516e55c30045d23111 100644 (file)
@@ -419,6 +419,10 @@ AC_ARG_ENABLE(full-debug,
     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_alias)'