diff -Nru icedtea-2.1.1.orig/acinclude.m4 icedtea-2.1.1/acinclude.m4 --- icedtea-2.1.1.orig/acinclude.m4 2012-06-13 02:56:54.455836680 +0100 +++ icedtea-2.1.1/acinclude.m4 2012-06-13 02:57:31.660476528 +0100 @@ -2258,3 +2258,18 @@ AC_SUBST(PAX_COMMAND) 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 +]) diff -Nru icedtea-2.1.1.orig/configure.ac icedtea-2.1.1/configure.ac --- icedtea-2.1.1.orig/configure.ac 2012-06-13 02:56:54.459836748 +0100 +++ icedtea-2.1.1/configure.ac 2012-06-13 02:57:31.660476528 +0100 @@ -101,6 +101,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]) diff -Nru icedtea-2.1.1.orig/Makefile.am icedtea-2.1.1/Makefile.am --- icedtea-2.1.1.orig/Makefile.am 2012-06-13 02:56:54.403835785 +0100 +++ icedtea-2.1.1/Makefile.am 2012-06-13 02:57:31.648476322 +0100 @@ -249,6 +249,11 @@ patches/cacao/launcher.patch \ patches/cacao/jsig.patch \ patches/cacao/memory.patch +else +if USING_CACAO +ICEDTEA_PATCHES += \ + patches/cacao/memory.patch +endif endif if ENABLE_CACAO diff -Nru icedtea-2.1.1.orig/patches/cacao/launcher.patch icedtea-2.1.1/patches/cacao/launcher.patch --- icedtea-2.1.1.orig/patches/cacao/launcher.patch 2012-06-13 02:28:23.950879620 +0100 +++ icedtea-2.1.1/patches/cacao/launcher.patch 2012-06-13 02:59:50.858865063 +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 @@ diff -Nru icedtea-2.1.1.orig/patches/cacao/memory.patch icedtea-2.1.1/patches/cacao/memory.patch --- icedtea-2.1.1.orig/patches/cacao/memory.patch 2012-06-13 02:28:23.954879676 +0100 +++ icedtea-2.1.1/patches/cacao/memory.patch 2012-06-13 03:01:11.156239098 +0100 @@ -1,6 +1,70 @@ ---- 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/linux/makefiles/rules.make openjdk/hotspot/make/linux/makefiles/rules.make +--- openjdk.orig/hotspot/make/linux/makefiles/rules.make 2012-06-07 19:21:17.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/rules.make 2012-06-13 03:36:26.364575315 +0100 +@@ -141,7 +141,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-07 19:21:17.000000000 +0100 ++++ openjdk/hotspot/make/solaris/makefiles/rules.make 2012-06-13 03:36:26.364575315 +0100 +@@ -133,7 +133,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-07 19:21:17.000000000 +0100 ++++ openjdk/hotspot/make/windows/makefiles/rules.make 2012-06-13 03:36:26.364575315 +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 14:12:38.000000000 +0100 ++++ openjdk/jdk/make/common/shared/Platform.gmk 2012-06-13 03:36:26.380575614 +0100 +@@ -447,7 +447,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 14:12:38.000000000 +0100 ++++ openjdk/jdk/make/docs/Makefile 2012-06-13 03:36:26.380575614 +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 = 1024 ++ MAX_VM_MEMORY = 1792 + else +- MAX_VM_MEMORY = 512 ++ MAX_VM_MEMORY = 768 + endif + + # List of all possible directories for javadoc to look for sources +diff -Nru openjdk.orig/langtools/make/build.xml openjdk/langtools/make/build.xml +--- openjdk.orig/langtools/make/build.xml 2012-02-15 08:26:56.000000000 +0000 ++++ openjdk/langtools/make/build.xml 2012-06-13 03:36:26.380575614 +0100 +@@ -796,6 +796,7 @@