changeset 2547:1c77e4c99219

PR2331: Allow CACAO builds of IcedTea to be able to build IcedTea without bootstrap. 2012-06-12 Andrew John Hughes <gnu_andrew@member.fsf.org> PR2331: IcedTea8 fails to build with IcedTea7 CACAO due to to low max heap size * Makefile.am: (ICEDTEA_PATCHES): Add memory patch when building using CACAO as well, even if the result is not a CACAO build. * NEWS: Updated. * acinclude.m4: (IT_USING_CACAO): New macro; detects use of CACAO as the build VM so memory limits can be raised accordingly. * configure.ac: Call IT_USING_CACAO. * patches/cacao/launcher.patch: Move memory increase to memory.patch. * patches/cacao/memory.patch: Extend with additional cases in HotSpot and the JDK.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Wed, 06 May 2015 06:12:27 +0100
parents 0ba138b78b5f
children d1b536142970
files ChangeLog Makefile.am NEWS acinclude.m4 configure.ac patches/cacao/launcher.patch patches/cacao/memory.patch
diffstat 7 files changed, 121 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed May 06 06:04:57 2015 +0100
+++ b/ChangeLog	Wed May 06 06:12:27 2015 +0100
@@ -1,3 +1,23 @@
+2012-06-12  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	PR2331: IcedTea8 fails to build with IcedTea7
+	CACAO due to to low max heap size
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add memory patch when
+	building using CACAO as well, even if the
+	result is not a CACAO build.
+	* NEWS: Updated.
+	* acinclude.m4:
+	(IT_USING_CACAO): New macro; detects use of
+	CACAO as the build VM so memory limits can
+	be raised accordingly.
+	* configure.ac: Call IT_USING_CACAO.
+	* patches/cacao/launcher.patch:
+	Move memory increase to memory.patch.
+	* patches/cacao/memory.patch:
+	Extend with additional cases in HotSpot and
+	the JDK.
+
 2013-01-23  Andrew John Hughes  <gnu.andrew@redhat.com>
 
 	CA172, PR2330, G453612: Add ARM hardfloat support
--- a/Makefile.am	Wed May 06 06:04:57 2015 +0100
+++ b/Makefile.am	Wed May 06 06:12:27 2015 +0100
@@ -225,6 +225,11 @@
 	patches/cacao/launcher.patch \
 	patches/cacao/memory.patch \
 	patches/cacao/armhf.patch
+else
+if USING_CACAO
+ICEDTEA_PATCHES += \
+	patches/cacao/memory.patch
+endif
 endif
 
 if ENABLE_CACAO
--- a/NEWS	Wed May 06 06:04:57 2015 +0100
+++ b/NEWS	Wed May 06 06:12:27 2015 +0100
@@ -93,6 +93,7 @@
   - PR1277: Synchronise CACAO rules between IcedTea6/7/8 where possible
   - PR1279: Synchronise CACAO versions between IcedTea6/7/8 where possible
   - CA172, PR2330, G453612: Add ARM hardfloat support to CACAO on Gentoo
+  - PR2331: IcedTea8 fails to build with IcedTea7 CACAO due to low max heap size
 
 New in release 2.0 (2011-XX-XX):
 
--- a/acinclude.m4	Wed May 06 06:04:57 2015 +0100
+++ b/acinclude.m4	Wed May 06 06:12:27 2015 +0100
@@ -1998,6 +1998,21 @@
   AC_SUBST(PAX_COMMAND_ARGS)
 ])
 
+AC_DEFUN([IT_USING_CACAO],[
+  AC_REQUIRE([IT_FIND_JAVA])
+  AC_CACHE_CHECK([if we are using CACAO as the build VM], it_cv_cacao, [
+  if $JAVA -version 2>&1| grep '^CACAO' >&AS_MESSAGE_LOG_FD ; then
+    it_cv_cacao=yes;
+  else
+    it_cv_cacao=no;
+  fi
+  ])
+  USING_CACAO=$it_cv_cacao
+  AC_SUBST(USING_CACAO)
+  AM_CONDITIONAL(USING_CACAO, test "x${USING_CACAO}" = "xyes")
+  AC_PROVIDE([$0])dnl
+])
+
 AC_DEFUN([IT_ENABLE_JAR_COMPRESSION],
 [
   AC_MSG_CHECKING([whether to enable JAR compression])
--- a/configure.ac	Wed May 06 06:04:57 2015 +0100
+++ b/configure.ac	Wed May 06 06:12:27 2015 +0100
@@ -102,6 +102,7 @@
 IT_FIND_JAR
 IT_FIND_RMIC
 IT_FIND_NATIVE2ASCII
+IT_USING_CACAO
 if test "x$enable_bootstrap" = "xyes"; then
   IT_FIND_ECJ_JAR
   IT_FIND_TOOL([XSLTPROC], [xsltproc])
--- a/patches/cacao/launcher.patch	Wed May 06 06:04:57 2015 +0100
+++ b/patches/cacao/launcher.patch	Wed May 06 06:12:27 2015 +0100
@@ -1,14 +1,3 @@
---- openjdk/jdk/make/docs/Makefile.orig	2010-08-27 20:01:53.000000000 +0200
-+++ openjdk/jdk/make/docs/Makefile	2010-09-07 12:56:00.309691118 +0200
-@@ -70,7 +70,7 @@
- ifeq ($(ARCH_DATA_MODEL),64)
-   MAX_VM_MEMORY = 1024
- else
--  MAX_VM_MEMORY = 512
-+  MAX_VM_MEMORY = 768
- endif
- 
- # List of all possible directories for javadoc to look for sources
 --- openjdk/jdk/src/share/bin/java.c.orig	2010-09-07 05:24:49.307192201 +0200
 +++ openjdk/jdk/src/share/bin/java.c	2010-09-07 12:56:00.309691118 +0200
 @@ -174,6 +174,8 @@
--- a/patches/cacao/memory.patch	Wed May 06 06:04:57 2015 +0100
+++ b/patches/cacao/memory.patch	Wed May 06 06:12:27 2015 +0100
@@ -1,6 +1,82 @@
---- openjdk.orig/langtools/make/build.xml	2010-06-01 11:25:40.145287816 +0100
-+++ openjdk/langtools/make/build.xml	2010-06-21 21:48:41.000000000 +0100
-@@ -554,6 +554,7 @@
+diff -Nru openjdk.orig/hotspot/make/bsd/makefiles/rules.make openjdk/hotspot/make/bsd/makefiles/rules.make
+--- openjdk.orig/hotspot/make/bsd/makefiles/rules.make	2012-06-08 17:13:09.000000000 +0100
++++ openjdk/hotspot/make/bsd/makefiles/rules.make	2012-06-12 10:50:20.974290246 +0100
+@@ -128,7 +128,7 @@
+ # Settings for javac
+ BOOT_SOURCE_LANGUAGE_VERSION = 6
+ BOOT_TARGET_CLASS_VERSION = 6
+-JAVAC_FLAGS = -g -encoding ascii
++JAVAC_FLAGS = -g -encoding ascii -J-Xmx256m
+ BOOTSTRAP_JAVAC_FLAGS = $(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
+ 
+ # With parallel makes, print a message at the end of compilation.
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/rules.make openjdk/hotspot/make/linux/makefiles/rules.make
+--- openjdk.orig/hotspot/make/linux/makefiles/rules.make	2012-06-08 17:13:09.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/rules.make	2012-06-12 10:50:20.982290377 +0100
+@@ -128,7 +128,7 @@
+ # Settings for javac
+ BOOT_SOURCE_LANGUAGE_VERSION = 6
+ BOOT_TARGET_CLASS_VERSION = 6
+-JAVAC_FLAGS = -g -encoding ascii
++JAVAC_FLAGS = -g -encoding ascii -J-Xmx256m
+ BOOTSTRAP_JAVAC_FLAGS = $(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
+ 
+ # With parallel makes, print a message at the end of compilation.
+diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/rules.make openjdk/hotspot/make/solaris/makefiles/rules.make
+--- openjdk.orig/hotspot/make/solaris/makefiles/rules.make	2012-06-08 17:13:09.000000000 +0100
++++ openjdk/hotspot/make/solaris/makefiles/rules.make	2012-06-12 10:50:20.982290377 +0100
+@@ -120,7 +120,7 @@
+ # Settings for javac
+ BOOT_SOURCE_LANGUAGE_VERSION = 6
+ BOOT_TARGET_CLASS_VERSION = 6
+-JAVAC_FLAGS = -g -encoding ascii
++JAVAC_FLAGS = -g -encoding ascii -J-Xmx256m
+ BOOTSTRAP_JAVAC_FLAGS = $(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
+ 
+ # With parallel makes, print a message at the end of compilation.
+diff -Nru openjdk.orig/hotspot/make/windows/makefiles/rules.make openjdk/hotspot/make/windows/makefiles/rules.make
+--- openjdk.orig/hotspot/make/windows/makefiles/rules.make	2012-06-08 17:13:09.000000000 +0100
++++ openjdk/hotspot/make/windows/makefiles/rules.make	2012-06-12 10:50:20.982290377 +0100
+@@ -45,7 +45,7 @@
+ # Settings for javac
+ BOOT_SOURCE_LANGUAGE_VERSION=6
+ BOOT_TARGET_CLASS_VERSION=6
+-JAVAC_FLAGS=-g -encoding ascii
++JAVAC_FLAGS=-g -encoding ascii -J-Xmx256m
+ BOOTSTRAP_JAVAC_FLAGS=$(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
+ 
+ ProjectFile=jvm.vcproj
+diff -Nru openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk
+--- openjdk.orig/jdk/make/common/shared/Platform.gmk	2012-06-08 17:12:17.000000000 +0100
++++ openjdk/jdk/make/common/shared/Platform.gmk	2012-06-12 10:50:20.982290377 +0100
+@@ -537,7 +537,7 @@
+       else \
+         echo "false"; \
+       fi)
+-    MAX_VM_MEMORY := 512
++    MAX_VM_MEMORY := 1536
+     MIN_VM_MEMORY := $(MAX_VM_MEMORY)
+   else
+     MB_OF_MEMORY       := unknown
+diff -Nru openjdk.orig/jdk/make/docs/Makefile openjdk/jdk/make/docs/Makefile
+--- openjdk.orig/jdk/make/docs/Makefile	2012-06-08 17:12:17.000000000 +0100
++++ openjdk/jdk/make/docs/Makefile	2012-06-12 11:09:31.616702981 +0100
+@@ -69,9 +69,9 @@
+ #    NOTE: javadoc will not complete without these larger settings.
+ #    WARNING: This could cause thrashing on low memory machines.
+ ifeq ($(ARCH_DATA_MODEL),64)
+-  MAX_VM_MEMORY = 1536
++  MAX_VM_MEMORY = 1792
+ else ifeq ($(ARCH),universal)
+-  MAX_VM_MEMORY = 1536
++  MAX_VM_MEMORY = 1792
+ else
+   MAX_VM_MEMORY = 768
+ endif
+diff -Nru openjdk.orig/langtools/make/build.xml openjdk/langtools/make/build.xml
+--- openjdk.orig/langtools/make/build.xml	2012-06-08 17:12:36.000000000 +0100
++++ openjdk/langtools/make/build.xml	2012-06-12 10:50:20.974290246 +0100
+@@ -796,6 +796,7 @@
                      <compilerarg value="-implicit:none"/>
                      <compilerarg value="-Xprefer:source"/>
                      <compilerarg value="-J-Xbootclasspath/p:@{javac.bootclasspath}"/>