Mercurial > hg > release > icedtea-1.9
changeset 1465:77c54978bab7
Allow build with latest HotSpot.
2008-12-01 Andrew John Hughes <gnu_andrew@member.fsf.org>
* patches/icedtea-hotspot-params-cast-size_t.patch,
* patches/icedtea-hotspot-use-idx_t.patch,
* patches/icedtea-memory-limits.patch,
* patches/icedtea-sparc-ptracefix.patch,
* patches/icedtea-sparc-trapsfix.patch,
* patches/icedtea-sparc64-linux.patch,
* patches/icedtea-static-libstdc++.patch,
* patches/icedtea-text-relocations.patch:
Removed; replaced by HotSpot-specific versions.
* Makefile.am:
Download a HotSpot version matching a given changeset
and use it in place of the copy of hs10.0b19 shipping
with OpenJDK6. Apply patches based on ${HSBUILD}.
* acinclude.m4: New macros for options --with-hotspot-build
and --with-hotspot-src-zip.
* configure.ac: Run new macros.
* hotspot.map: Map of HotSpot build numbers to changesets.
* patches/icedtea-core-build.patch,
* patches/icedtea-debuginfo.patch:
Remove HotSpot specific parts.
* patches/icedtea-ecj-hotspot-14.0b08.patch,
* patches/icedtea-ecj-hotspot-original.patch:
New HotSpot-specific patches built from IcedTea7
and 6 versions of icedtea-ecj respectively.
* patches/icedtea-ecj.patch,
* patches/icedtea-gcc-4.3.patch,
* patches/icedtea-gcc-suffix.patch,
* patches/icedtea-headers.patch:
Remove HotSpot-specific parts.
* patches/icedtea-hotspot-14.0b08-core-build.patch,
* patches/icedtea-hotspot-14.0b08-debuginfo.patch,
* patches/icedtea-hotspot-14.0b08-gcc-suffix.patch,
* patches/icedtea-hotspot-14.0b08-headers.patch,
* patches/icedtea-hotspot-14.0b08-memory-limits.patch,
* patches/icedtea-hotspot-14.0b08-params-cast-size_t.patch,
* patches/icedtea-hotspot-14.0b08-shark-build.patch,
* patches/icedtea-hotspot-14.0b08-sparc-ptracefix.patch,
* patches/icedtea-hotspot-14.0b08-sparc-trapsfix.patch,
* patches/icedtea-hotspot-14.0b08-sparc64-linux.patch,
* patches/icedtea-hotspot-14.0b08-static-libstdc++.patch,
* patches/icedtea-hotspot-14.0b08-text-relocations.patch,
* patches/icedtea-hotspot-14.0b08-use-idx_t.patch,
* patches/icedtea-hotspot-14.0b08-version.patch,
* patches/icedtea-hotspot-14.0b08-zero-build.patch,
* patches/icedtea-hotspot-original-core-build.patch,
* patches/icedtea-hotspot-original-debuginfo.patch,
* patches/icedtea-hotspot-original-gcc-4.3.patch,
* patches/icedtea-hotspot-original-gcc-suffix.patch,
* patches/icedtea-hotspot-original-headers.patch,
* patches/icedtea-hotspot-original-memory-limits.patch,
* patches/icedtea-hotspot-original-params-cast-size_t.patch,
* patches/icedtea-hotspot-original-shark-build.patch,
* patches/icedtea-hotspot-original-sparc-ptracefix.patch,
* patches/icedtea-hotspot-original-sparc-trapsfix.patch,
* patches/icedtea-hotspot-original-sparc64-linux.patch,
* patches/icedtea-hotspot-original-static-libstdc++.patch,
* patches/icedtea-hotspot-original-text-relocations.patch,
* patches/icedtea-hotspot-original-use-idx_t.patch,
* patches/icedtea-hotspot-original-version.patch,
* patches/icedtea-hotspot-original-zero-build.patch:
New HotSpot-specific patches built from IcedTea7
and 6 versions of the patch respectively.
* patches/icedtea-shark-build.patch,
* patches/icedtea-version.patch,
* patches/icedtea-zero-build.patch:
Remove HotSpot-specific parts.
line wrap: on
line diff
--- a/ChangeLog Mon Dec 01 00:34:53 2008 +0100 +++ b/ChangeLog Mon Dec 01 17:30:31 2008 +0000 @@ -1,3 +1,72 @@ +2008-12-01 Andrew John Hughes <gnu_andrew@member.fsf.org> + + * patches/icedtea-hotspot-params-cast-size_t.patch, + * patches/icedtea-hotspot-use-idx_t.patch, + * patches/icedtea-memory-limits.patch, + * patches/icedtea-sparc-ptracefix.patch, + * patches/icedtea-sparc-trapsfix.patch, + * patches/icedtea-sparc64-linux.patch, + * patches/icedtea-static-libstdc++.patch, + * patches/icedtea-text-relocations.patch: + Removed; replaced by HotSpot-specific versions. + * Makefile.am: + Download a HotSpot version matching a given changeset + and use it in place of the copy of hs10.0b19 shipping + with OpenJDK6. Apply patches based on ${HSBUILD}. + * acinclude.m4: New macros for options --with-hotspot-build + and --with-hotspot-src-zip. + * configure.ac: Run new macros. + * hotspot.map: Map of HotSpot build numbers to changesets. + * patches/icedtea-core-build.patch, + * patches/icedtea-debuginfo.patch: + Remove HotSpot specific parts. + * patches/icedtea-ecj-hotspot-14.0b08.patch, + * patches/icedtea-ecj-hotspot-original.patch: + New HotSpot-specific patches built from IcedTea7 + and 6 versions of icedtea-ecj respectively. + * patches/icedtea-ecj.patch, + * patches/icedtea-gcc-4.3.patch, + * patches/icedtea-gcc-suffix.patch, + * patches/icedtea-headers.patch: + Remove HotSpot-specific parts. + * patches/icedtea-hotspot-14.0b08-core-build.patch, + * patches/icedtea-hotspot-14.0b08-debuginfo.patch, + * patches/icedtea-hotspot-14.0b08-gcc-suffix.patch, + * patches/icedtea-hotspot-14.0b08-headers.patch, + * patches/icedtea-hotspot-14.0b08-memory-limits.patch, + * patches/icedtea-hotspot-14.0b08-params-cast-size_t.patch, + * patches/icedtea-hotspot-14.0b08-shark-build.patch, + * patches/icedtea-hotspot-14.0b08-sparc-ptracefix.patch, + * patches/icedtea-hotspot-14.0b08-sparc-trapsfix.patch, + * patches/icedtea-hotspot-14.0b08-sparc64-linux.patch, + * patches/icedtea-hotspot-14.0b08-static-libstdc++.patch, + * patches/icedtea-hotspot-14.0b08-text-relocations.patch, + * patches/icedtea-hotspot-14.0b08-use-idx_t.patch, + * patches/icedtea-hotspot-14.0b08-version.patch, + * patches/icedtea-hotspot-14.0b08-zero-build.patch, + * patches/icedtea-hotspot-original-core-build.patch, + * patches/icedtea-hotspot-original-debuginfo.patch, + * patches/icedtea-hotspot-original-gcc-4.3.patch, + * patches/icedtea-hotspot-original-gcc-suffix.patch, + * patches/icedtea-hotspot-original-headers.patch, + * patches/icedtea-hotspot-original-memory-limits.patch, + * patches/icedtea-hotspot-original-params-cast-size_t.patch, + * patches/icedtea-hotspot-original-shark-build.patch, + * patches/icedtea-hotspot-original-sparc-ptracefix.patch, + * patches/icedtea-hotspot-original-sparc-trapsfix.patch, + * patches/icedtea-hotspot-original-sparc64-linux.patch, + * patches/icedtea-hotspot-original-static-libstdc++.patch, + * patches/icedtea-hotspot-original-text-relocations.patch, + * patches/icedtea-hotspot-original-use-idx_t.patch, + * patches/icedtea-hotspot-original-version.patch, + * patches/icedtea-hotspot-original-zero-build.patch: + New HotSpot-specific patches built from IcedTea7 + and 6 versions of the patch respectively. + * patches/icedtea-shark-build.patch, + * patches/icedtea-version.patch, + * patches/icedtea-zero-build.patch: + Remove HotSpot-specific parts. + 2008-11-30 Mark Wielaard <mark@klomp.org> * patches/icedtea-xrender-001.patch: Remove !xrender bug fix.
--- a/Makefile.am Mon Dec 01 00:34:53 2008 +0100 +++ b/Makefile.am Mon Dec 01 17:30:31 2008 +0000 @@ -47,6 +47,12 @@ VISUALVM_PATCH = endif +if WITH_ALT_HSBUILD +HOTSPOT_MAKE_DIR = make +else +HOTSPOT_MAKE_DIR = build +endif + # Top-Level Targets # ================= @@ -281,6 +287,7 @@ # Download OpenJDK sources. OPENJDK_URL = http://download.java.net/openjdk/jdk6/promoted/$(OPENJDK_VERSION)/ +HOTSPOT_URL = http://hg.openjdk.java.net/jdk7/hotspot/hotspot/archive/ if USE_ALT_OPENJDK_SRC_ZIP OPENJDK_SRC_ZIP = $(ALT_OPENJDK_SRC_ZIP) @@ -288,6 +295,12 @@ OPENJDK_SRC_ZIP = openjdk-6-src-$(OPENJDK_VERSION)-$(OPENJDK_DATE).tar.gz endif +if USE_ALT_HOTSPOT_SRC_ZIP + HOTSPOT_SRC_ZIP = $(ALT_HOTSPOT_SRC_ZIP) +else + HOTSPOT_SRC_ZIP = hotspot.tar.gz +endif + CACAO_BASE_URL = http://www.complang.tuwien.ac.at CACAO_URL = $(CACAO_BASE_URL)/cacaojvm/download/cacao-$(CACAO_VERSION)/ @@ -334,6 +347,13 @@ $(WGET) $(OPENJDK_URL)$(OPENJDK_SRC_ZIP) -O $(OPENJDK_SRC_ZIP); \ fi endif +if WITH_ALT_HSBUILD +if USE_ALT_HOTSPOT_SRC_ZIP +else + changeset="`cat $(abs_top_srcdir)/hotspot.map|grep $(HSBUILD)|cut -f2`"; \ + $(WGET) $(HOTSPOT_URL)$${changeset}.tar.gz -O $(HOTSPOT_SRC_ZIP); +endif +endif if WITH_CACAO if !USE_SYSTEM_CACAO if USE_ALT_CACAO_SRC_ZIP @@ -407,13 +427,13 @@ # Link ports sources into tree stamps/ports.stamp: stamps/extract.stamp - for target in $(abs_top_srcdir)/ports/hotspot/build/*/makefiles/* \ + for target in $(abs_top_srcdir)/ports/hotspot/$(HOTSPOT_MAKE_DIR)/*/makefiles/* \ $(abs_top_srcdir)/ports/hotspot/src/*cpu/* \ $(abs_top_srcdir)/ports/hotspot/src/share/vm/*; do \ link=$$(dirname $$target | sed 's/^.*ports/openjdk/'); \ ln -sf $$target $$link; \ done - ln -sf $(abs_top_builddir)/platform_zero openjdk/hotspot/build/linux + ln -sf $(abs_top_builddir)/platform_zero openjdk/hotspot/$(HOTSPOT_MAKE_DIR)/linux if ! test "x$(ICEDTEA_CORE_BUILD)$(ICEDTEA_SHARK_BUILD)$(WITH_CACAO)" \ = "xno" ; then \ mkdir -p openjdk/jdk/src/solaris/bin/$(BUILD_ARCH_DIR) ; \ @@ -431,7 +451,8 @@ if GCC_OLD GCC_PATCH = else - GCC_PATCH = patches/icedtea-gcc-4.3.patch + GCC_PATCH = patches/icedtea-gcc-4.3.patch \ + patches/icedtea-hotspot-$(HSBUILD)-gcc-4.3.patch endif # If ZERO_BUILD is set then we are building zero and need @@ -458,8 +479,12 @@ if ZERO_BUILD ZERO_PATCHES_COND = $(ZERO_PATCHES) else +if WITH_ALT_HSBUILD + ZERO_PATCHES_COND = +else ZERO_PATCHES_COND = $(NON_ZERO_PATCHES) endif +endif # If Shark is required, apply shark patch if SHARK_BUILD @@ -472,12 +497,13 @@ ICEDTEA_PATCHES = \ $(ZERO_PATCHES_COND) \ - patches/icedtea-hotspot7-tests.patch \ + patches/icedtea-version.patch \ + patches/icedtea-hotspot-$(HSBUILD)-version.patch \ patches/icedtea-copy-plugs.patch \ - patches/icedtea-version.patch \ - patches/icedtea-text-relocations.patch \ + patches/icedtea-hotspot-$(HSBUILD)-text-relocations.patch \ patches/icedtea-graphics.patch \ patches/icedtea-debuginfo.patch \ + patches/icedtea-hotspot-$(HSBUILD)-debuginfo.patch \ patches/icedtea-ssl.patch \ $(PLUGIN_PATCH) \ patches/icedtea-webstart.patch \ @@ -487,32 +513,36 @@ patches/icedtea-demos.patch \ patches/icedtea-use-system-tzdata.patch \ patches/icedtea-headers.patch \ + patches/icedtea-hotspot-$(HSBUILD)-headers.patch \ patches/icedtea-ant.patch \ patches/icedtea-gcc-suffix.patch \ + patches/icedtea-hotspot-$(HSBUILD)-gcc-suffix.patch \ patches/icedtea-bytebuffer-compact.patch \ patches/icedtea-float-double-trailing-zeros.patch \ - patches/icedtea-memory-limits.patch \ + patches/icedtea-hotspot-$(HSBUILD)-memory-limits.patch \ patches/icedtea-sunsrc.patch \ patches/icedtea-libraries.patch \ patches/icedtea-javafiles.patch \ patches/icedtea-core-build.patch \ + patches/icedtea-hotspot-$(HSBUILD)-core-build.patch \ patches/icedtea-linker-options.patch \ - patches/icedtea-static-libstdc++.patch \ + patches/icedtea-hotspot-$(HSBUILD)-static-libstdc++.patch \ patches/icedtea-timerqueue.patch \ patches/icedtea-lib64.patch \ patches/icedtea-zero-build.patch \ + patches/icedtea-hotspot-$(HSBUILD)-zero-build.patch \ patches/icedtea-print-lsb-release.patch \ patches/icedtea-jpegclasses.patch \ patches/icedtea-uname.patch \ patches/icedtea-ia64-fdlibm.patch \ patches/icedtea-fonts.patch \ - patches/icedtea-sparc.patch \ - patches/icedtea-sparc64-linux.patch \ - patches/icedtea-sparc-ptracefix.patch \ - patches/icedtea-sparc-trapsfix.patch \ + patches/icedtea-hotspot-$(HSBUILD)-sparc64-linux.patch \ + patches/icedtea-hotspot-$(HSBUILD)-sparc-ptracefix.patch \ + patches/icedtea-hotspot-$(HSBUILD)-sparc-trapsfix.patch \ patches/icedtea-override-redirect-metacity.patch \ patches/icedtea-no-bcopy.patch \ patches/icedtea-shark-build.patch \ + patches/icedtea-hotspot-$(HSBUILD)-shark-build.patch \ patches/icedtea-toolkit.patch \ patches/icedtea-jdk-docs-target.patch \ patches/icedtea-nomotif-6706121.patch \ @@ -521,8 +551,8 @@ patches/icedtea-alt-jar.patch \ patches/icedtea-enum-bug-181.patch \ patches/icedtea-jdk-use-ssize_t.patch \ - patches/icedtea-hotspot-use-idx_t.patch \ - patches/icedtea-hotspot-params-cast-size_t.patch \ + patches/icedtea-hotspot-$(HSBUILD)-use-idx_t.patch \ + patches/icedtea-hotspot-$(HSBUILD)-params-cast-size_t.patch \ patches/icedtea-clean-crypto.patch \ $(SHARK_PATCH) \ $(GCC_PATCH) \ @@ -544,6 +574,12 @@ patches/icedtea-samejvm-safe.patch \ patches/icedtea-6728542-epoll.patch +if !WITH_ALT_HSBUILD +ICEDTEA_PATCHES += \ + patches/icedtea-hotspot7-tests.patch \ + patches/icedtea-sparc.patch +endif + if WITH_RHINO ICEDTEA_PATCHES += \ patches/icedtea-rhino.patch @@ -575,6 +611,13 @@ mkdir openjdk ; \ $(TAR) xf $(OPENJDK_SRC_ZIP) -C openjdk; \ chmod -R ug+w openjdk ; \ + if test -e ${HOTSPOT_SRC_ZIP} ; \ + then \ + rm -rf openjdk/hotspot ; \ + $(TAR) xf $(HOTSPOT_SRC_ZIP) ; \ + chmod -R ug+w hotspot-* ; \ + mv hotspot-* openjdk/hotspot ; \ + fi ; \ sh $(abs_top_srcdir)/fsg.sh ; \ fi if WITH_CACAO @@ -759,13 +802,13 @@ # Link ports sources into tree stamps/ports-ecj.stamp: stamps/extract-ecj.stamp - for target in $(abs_top_srcdir)/ports/hotspot/build/*/makefiles/* \ + for target in $(abs_top_srcdir)/ports/hotspot/$(HOTSPOT_MAKE_DIR)/*/makefiles/* \ $(abs_top_srcdir)/ports/hotspot/src/*cpu/* \ $(abs_top_srcdir)/ports/hotspot/src/share/vm/*; do \ link=$$(dirname $$target | sed 's/^.*ports/openjdk-ecj/'); \ ln -sf $$target $$link; \ done - ln -sf $(abs_top_builddir)/platform_zero openjdk-ecj/hotspot/build/linux + ln -sf $(abs_top_builddir)/platform_zero openjdk-ecj/hotspot/$(HOTSPOT_MAKE_DIR)/linux if ! test "x$(ICEDTEA_CORE_BUILD)$(ICEDTEA_SHARK_BUILD)$(WITH_CACAO)" \ = "xno"; then \ mkdir -p openjdk-ecj/jdk/src/solaris/bin/$(BUILD_ARCH_DIR); \ @@ -781,6 +824,7 @@ # Patch OpenJDK for plug replacements and ecj. ICEDTEA_ECJ_PATCHES = patches/icedtea-ecj.patch \ + patches/icedtea-ecj-hotspot-$(HSBUILD).patch \ patches/icedtea-ecj-spp.patch \ patches/icedtea-ecj-jopt.patch \ patches/icedtea-ecj-pr261.patch @@ -1207,6 +1251,11 @@ sun/awt/ \ javax/net/ssl +if WITH_ALT_HSBUILD +ICEDTEA_COPY_DIRS += \ + javax/script +endif + stamps/copy-source-files.stamp: stamps/patch.stamp for copy_dir in $(ICEDTEA_COPY_DIRS) ; \ do \
--- a/acinclude.m4 Mon Dec 01 00:34:53 2008 +0100 +++ b/acinclude.m4 Mon Dec 01 17:30:31 2008 +0000 @@ -923,3 +923,42 @@ fi AC_SUBST([GCJ]) ]) + +AC_DEFUN([AC_CHECK_WITH_HOTSPOT_BUILD], +[ + DEFAULT_BUILD="14.0b08" + AC_MSG_CHECKING([which HotSpot build to use]) + AC_ARG_WITH([hotspot-build], + [AS_HELP_STRING(--with-hotspot-build,the HotSpot build to use)], + [ + HSBUILD="${withval}" + ], + [ + HSBUILD="${DEFAULT_BUILD}" + ]) + if test "x${HSBUILD}" = xyes; then + HSBUILD="${DEFAULT_BUILD}" + elif test "x${HSBUILD}" = xno; then + HSBUILD="original" + fi + AC_MSG_RESULT([${HSBUILD}]) + AC_SUBST([HSBUILD]) + AM_CONDITIONAL(WITH_ALT_HSBUILD, test "x${HSBUILD}" != "xoriginal") +]) + +AC_DEFUN([WITH_HOTSPOT_SRC_ZIP], +[ + AC_MSG_CHECKING(for a HotSpot source zip) + AC_ARG_WITH([hotspot-src-zip], + [AS_HELP_STRING(--with-hotspot-src-zip,specify the location of the hotspot source zip)], + [ + ALT_HOTSPOT_SRC_ZIP=${withval} + AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test x = x) + ], + [ + ALT_HOTSPOT_SRC_ZIP="not specified" + AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test x != x) + ]) + AC_MSG_RESULT(${ALT_HOTSPOT_SRC_ZIP}) + AC_SUBST(ALT_HOTSPOT_SRC_ZIP) +])
--- a/configure.ac Mon Dec 01 00:34:53 2008 +0100 +++ b/configure.ac Mon Dec 01 17:30:31 2008 +0000 @@ -33,6 +33,7 @@ AC_SUBST([HG]) AC_PATH_TOOL([LSB_RELEASE],[lsb_release]) AC_CHECK_WITH_GCJ +AC_CHECK_WITH_HOTSPOT_BUILD AC_MSG_CHECKING([for a JDK home directory]) AC_ARG_WITH([gcj-home], @@ -300,6 +301,7 @@ fi FIND_RHINO_JAR WITH_OPENJDK_SRC_ZIP +WITH_HOTSPOT_SRC_ZIP WITH_OPENJDK_SRC_DIR WITH_VISUALVM_SRC_ZIP WITH_NETBEANS_PROFILER_SRC_ZIP
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot.map Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,1 @@ +14.0b08 f9d938ede196
--- a/patches/icedtea-core-build.patch Mon Dec 01 00:34:53 2008 +0100 +++ b/patches/icedtea-core-build.patch Mon Dec 01 17:30:31 2008 +0000 @@ -12,22 +12,6 @@ HOTSPOT_BUILD_ARGUMENTS += $(COMMON_BUILD_ARGUMENTS) HOTSPOT_BUILD_ARGUMENTS += ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR) HOTSPOT_BUILD_ARGUMENTS += ALT_EXPORT_PATH=$(HOTSPOT_EXPORT_PATH) -diff -u openjdk.orig/hotspot/build/linux/makefiles/defs.make openjdk/hotspot/build/linux/makefiles/defs.make ---- openjdk.orig/hotspot/build/linux/makefiles/defs.make 2008-01-31 14:19:00.000000000 +0000 -+++ openjdk/hotspot/build/linux/makefiles/defs.make 2008-02-01 15:57:40.000000000 +0000 -@@ -97,6 +97,7 @@ EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusa - EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so -+ifndef ICEDTEA_CORE_BUILD - ifeq ($(ARCH_DATA_MODEL), 32) - EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt -@@ -111,3 +112,4 @@ else - EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar - endif - endif -+endif diff -ru openjdk.orig/jdk/make/java/redist/Makefile openjdk/jdk/make/java/redist/Makefile --- openjdk.orig/jdk/make/java/redist/Makefile 2008-01-31 14:20:37.000000000 +0000 +++ openjdk/jdk/make/java/redist/Makefile 2008-02-04 10:11:04.000000000 +0000 @@ -94,100 +78,4 @@ JVMLIB = -L$(BOOTDIR)/jre/lib/$(LIBARCH)/$(VM_NAME) -ljvm JAVALIB = -L$(BOOTDIR)/jre/lib/$(LIBARCH) -ljava $(JVMLIB) -diff -r 79d639c8a75f openjdk/hotspot/make/Makefile ---- openjdk/hotspot/make/Makefile Wed Apr 16 08:42:01 2008 +0100 -+++ openjdk/hotspot/make/Makefile Wed Apr 16 08:49:31 2008 +0100 -@@ -90,6 +90,15 @@ all_debug: jvmg jvmg1 docs export_de - all_debug: jvmg jvmg1 docs export_debug - all_optimized: optimized optimized1 docs export_optimized - -+# Core (non-compiler) targets made available with this Makefile -+CORE_VM_TARGETS=productcore fastdebugcore optimizedcore jvmgcore -+ -+allcore: all_productcore all_fastdebugcore -+all_productcore: productcore docs export_product -+all_fastdebugcore: fastdebugcore docs export_fastdebug -+all_debugcore: jvmgcore docs export_debug -+all_optimizedcore: optimizedcore docs export_optimized -+ - # Do everything - world: all create_jdk - -@@ -111,6 +120,10 @@ endif - $(C2_VM_TARGETS): - $(CD) $(GAMMADIR)/make; \ - $(MAKE) VM_TARGET=$@ generic_build2 $(ALT_OUT) -+ -+$(CORE_VM_TARGETS): -+ $(CD) $(GAMMADIR)/make; \ -+ $(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT) - - # Build compiler1 (client) rule, different for platforms - generic_build1: -@@ -153,6 +166,12 @@ else - $(MAKE) -f $(ABS_OS_MAKEFILE) \ - $(MAKE_ARGS) $(VM_TARGET) - endif -+ -+generic_buildcore: -+ $(MKDIR) -p $(OUTPUTDIR) -+ $(CD) $(OUTPUTDIR); \ -+ $(MAKE) -f $(ABS_OS_MAKEFILE) \ -+ $(MAKE_ARGS) $(VM_TARGET) - - # Export file rule - generic_export: $(EXPORT_LIST) -@@ -182,11 +201,19 @@ XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt - XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt - DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs - C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 -+ifdef ICEDTEA_CORE_BUILD -+C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core -+else - C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 -+endif - C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) - C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) - - # Misc files and generated files need to come from C1 or C2 area -+ifdef ICEDTEA_CORE_BUILD -+ MISC_DIR=$(C2_DIR) -+ GEN_DIR=$(C2_BASE_DIR)/generated -+else - ifeq ($(ARCH_DATA_MODEL), 32) - MISC_DIR=$(C1_DIR) - GEN_DIR=$(C1_BASE_DIR)/generated -@@ -194,6 +221,7 @@ else - MISC_DIR=$(C2_DIR) - GEN_DIR=$(C2_BASE_DIR)/generated - endif -+endif - - # Bin files (windows) - ifeq ($(OSNAME),windows) -@@ -264,6 +292,7 @@ endif - - # Xusage file - $(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt: $(XUSAGE) -+$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE) - $(prep-target) - $(RM) $@.temp - $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp -diff -r 79d639c8a75f openjdk/hotspot/src/share/vm/runtime/vm_version.cpp ---- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2008-02-12 04:14:24.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2008-02-14 17:39:45.000000000 -0500 -@@ -89,8 +89,12 @@ - #ifdef TIERED - #define VMTYPE "Server" - #else -- #define VMTYPE COMPILER1_PRESENT("Client") \ -- COMPILER2_PRESENT("Server") -+#if defined(COMPILER1) || defined(COMPILER2) -+ #define VMTYPE COMPILER1_PRESENT("Client") \ -+ COMPILER2_PRESENT("Server") -+#else -+ #define VMTYPE "Core" -+#endif // COMPILER1 || COMPILER2 - #endif // TIERED - - #ifndef HOTSPOT_VM_DISTRO +
--- a/patches/icedtea-debuginfo.patch Mon Dec 01 00:34:53 2008 +0100 +++ b/patches/icedtea-debuginfo.patch Mon Dec 01 17:30:31 2008 +0000 @@ -1,17 +1,3 @@ -diff -urN openjdk.orig/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make ---- openjdk.orig/hotspot/build/linux/makefiles/gcc.make 2007-10-12 18:11:59.000000000 -0400 -+++ openjdk/hotspot/build/linux/makefiles/gcc.make 2007-10-12 18:12:22.000000000 -0400 -@@ -63,6 +63,10 @@ - CFLAGS += -D_REENTRANT - CFLAGS += -fcheck-new - -+# Always generate full debuginfo on Linux. It'll be in a separate -+# debuginfo package when building RPMs. -+CFLAGS += -g -+ - ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) - ARCHFLAG/i486 = -m32 -march=i586 - ARCHFLAG/amd64 = -m64 diff -urN openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk --- openjdk.orig/jdk/make/common/Defs-linux.gmk 2007-10-12 03:54:05.000000000 -0400 +++ openjdk/jdk/make/common/Defs-linux.gmk 2007-10-12 18:12:22.000000000 -0400
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-ecj-hotspot-14.0b08.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,48 @@ +diff -Nru openjdk-ecj.orig/hotspot/make/linux/Makefile openjdk-ecj/hotspot/make/linux/Makefile +--- openjdk-ecj.orig/hotspot/make/linux/Makefile 2008-10-24 10:16:06.000000000 +0100 ++++ openjdk-ecj/hotspot/make/linux/Makefile 2008-10-24 13:32:48.000000000 +0100 +@@ -263,28 +263,24 @@ + + $(TARGETS_C2): $(SUBDIRS_C2) + cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_TIERED): $(SUBDIRS_TIERED) + cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_C1): $(SUBDIRS_C1) + cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_CORE): $(SUBDIRS_CORE) + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install + endif +diff -Nru openjdk-ecj.orig/hotspot/make/linux/makefiles/sa.make openjdk-ecj/hotspot/make/linux/makefiles/sa.make +--- openjdk-ecj.orig/hotspot/make/linux/makefiles/sa.make 2008-10-24 10:16:06.000000000 +0100 ++++ openjdk-ecj/hotspot/make/linux/makefiles/sa.make 2008-10-24 13:32:48.000000000 +0100 +@@ -74,8 +74,8 @@ + mkdir -p $(SA_CLASSDIR); \ + fi + +- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES1) +- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES2) ++ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH):$(BOOT_JAVA_HOME)/jre/lib/rt.jar -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES1) ++ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH):$(BOOT_JAVA_HOME)/jre/lib/rt.jar -sourcepath $(AGENT_SRC_DIR) -g -d $(SA_CLASSDIR) $(AGENT_FILES2) + + $(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer + $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-ecj-hotspot-original.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,45 @@ +diff -Nru openjdk-ecj.orig/hotspot/build/linux/Makefile openjdk-ecj/hotspot/build/linux/Makefile +--- openjdk-ecj.orig/hotspot/build/linux/Makefile 2008-10-20 18:45:00.000000000 +0100 ++++ openjdk-ecj/hotspot/build/linux/Makefile 2008-10-20 18:50:20.000000000 +0100 +@@ -257,28 +257,24 @@ + + $(TARGETS_C2): $(SUBDIRS_C2) + cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_TIERED): $(SUBDIRS_TIERED) + cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_C1): $(SUBDIRS_C1) + cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install + endif + + $(TARGETS_CORE): $(SUBDIRS_CORE) + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) +- cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install + endif +diff -Nru openjdk-ecj.orig/hotspot/build/linux/makefiles/sa.make openjdk-ecj/hotspot/build/linux/makefiles/sa.make +--- openjdk-ecj.orig/hotspot/build/linux/makefiles/sa.make 2008-10-20 18:45:00.000000000 +0100 ++++ openjdk-ecj/hotspot/build/linux/makefiles/sa.make 2008-10-20 18:50:20.000000000 +0100 +@@ -72,7 +72,7 @@ + $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \ + mkdir -p $(SA_CLASSDIR); \ + fi +- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -g -d $(SA_CLASSDIR) $(AGENT_ALLFILES) ++ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH):$(BOOT_JAVA_HOME)/jre/lib/rt.jar -g -d $(SA_CLASSDIR) $(AGENT_ALLFILES) + $(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer + $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) + $(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ . +
--- a/patches/icedtea-ecj.patch Mon Dec 01 00:34:53 2008 +0100 +++ b/patches/icedtea-ecj.patch Mon Dec 01 17:30:31 2008 +0000 @@ -492,50 +492,6 @@ portableactivation.idl.compile: $(PORTABLEACTIVATIONFILES) -diff -Nru openjdk-ecj.orig/hotspot/build/linux/Makefile openjdk-ecj/hotspot/build/linux/Makefile ---- openjdk-ecj.orig/hotspot/build/linux/Makefile 2008-10-20 18:45:00.000000000 +0100 -+++ openjdk-ecj/hotspot/build/linux/Makefile 2008-10-20 18:50:20.000000000 +0100 -@@ -257,28 +257,24 @@ - - $(TARGETS_C2): $(SUBDIRS_C2) - cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) -- cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma - ifdef INSTALL - cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install - endif - - $(TARGETS_TIERED): $(SUBDIRS_TIERED) - cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) -- cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma - ifdef INSTALL - cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install - endif - - $(TARGETS_C1): $(SUBDIRS_C1) - cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) -- cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma - ifdef INSTALL - cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install - endif - - $(TARGETS_CORE): $(SUBDIRS_CORE) - cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) -- cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma - ifdef INSTALL - cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install - endif -diff -Nru openjdk-ecj.orig/hotspot/build/linux/makefiles/sa.make openjdk-ecj/hotspot/build/linux/makefiles/sa.make ---- openjdk-ecj.orig/hotspot/build/linux/makefiles/sa.make 2008-10-20 18:45:00.000000000 +0100 -+++ openjdk-ecj/hotspot/build/linux/makefiles/sa.make 2008-10-20 18:50:20.000000000 +0100 -@@ -72,7 +72,7 @@ - $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \ - mkdir -p $(SA_CLASSDIR); \ - fi -- $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -g -d $(SA_CLASSDIR) $(AGENT_ALLFILES) -+ $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH):$(BOOT_JAVA_HOME)/jre/lib/rt.jar -g -d $(SA_CLASSDIR) $(AGENT_ALLFILES) - $(QUIETLY) $(REMOTE) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer - $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) - $(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ . diff -Nru openjdk-ecj.orig/jaxp/make/build.xml openjdk-ecj/jaxp/make/build.xml --- openjdk-ecj.orig/jaxp/make/build.xml 2008-10-20 18:45:00.000000000 +0100 +++ openjdk-ecj/jaxp/make/build.xml 2008-10-20 18:50:52.000000000 +0100
--- a/patches/icedtea-gcc-4.3.patch Mon Dec 01 00:34:53 2008 +0100 +++ b/patches/icedtea-gcc-4.3.patch Mon Dec 01 17:30:31 2008 +0000 @@ -1,74 +1,3 @@ ---- openjdk/hotspot/src/share/vm/adlc/adlc.hpp.ark 2008-01-11 14:15:41.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/adlc/adlc.hpp 2008-01-11 14:16:14.000000000 +0000 -@@ -32,7 +32,7 @@ - // standard library constants - #include "stdio.h" - #include "stdlib.h" --#if _MSC_VER >= 1300 // Visual C++ 7.0 or later -+#if (defined(__GNUC__) && __GNUC__ >= 3) || (_MSC_VER >= 1300) // gcc 3.0 or later or Visual C++ 7.0 or later - #include <iostream> - #else - #include <iostream.h> ---- openjdk/hotspot/src/share/vm/adlc/filebuff.cpp.ark 2008-01-11 14:17:17.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/adlc/filebuff.cpp 2008-01-11 14:17:34.000000000 +0000 -@@ -28,6 +28,8 @@ - // FILEBUFF.CPP - Routines for handling a parser file buffer - #include "adlc.hpp" - -+using namespace std; -+ - //------------------------------FileBuff--------------------------------------- - // Create a new parsing buffer - FileBuff::FileBuff( BufferedFile *fptr, ArchDesc& archDesc) : _fp(fptr), _AD(archDesc) { ---- openjdk/hotspot/src/share/vm/adlc/filebuff.hpp.ark 2008-01-11 14:14:45.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/adlc/filebuff.hpp 2008-01-11 14:15:34.000000000 +0000 -@@ -27,7 +27,7 @@ - - // FILEBUFF.HPP - Definitions for parser file buffering routines - --#if _MSC_VER >= 1300 // Visual C++ 7.0 or later -+#if (defined(__GNUC__) && __GNUC__ >= 3) || (_MSC_VER >= 1300) // gcc 3.0 or later, or Visual C++ 7.0 or later - #include <iostream> - #else - #include <iostream.h> -@@ -99,8 +99,11 @@ - FileBuffRegion *copy(); // Deep copy - FileBuffRegion *merge(FileBuffRegion*); // Merge 2 regions; delete input - --// void print(std::ostream&); --// friend std::ostream& operator<< (std::ostream&, FileBuffRegion&); -+#if defined(__GNUC__) && __GNUC__ >= 3 -+ void print(std::ostream&); -+ friend std::ostream& operator<< (std::ostream&, FileBuffRegion&); -+#else - void print(ostream&); - friend ostream& operator<< (ostream&, FileBuffRegion&); -+#endif - }; ---- openjdk/hotspot/build/linux/makefiles/gcc.make.ark 2008-01-11 14:24:05.000000000 +0000 -+++ openjdk/hotspot/build/linux/makefiles/gcc.make 2008-01-11 14:24:27.000000000 +0000 -@@ -94,7 +94,8 @@ - endif - - # Compiler warnings are treated as errors --WARNINGS_ARE_ERRORS = -Werror -+# Commented out for now because of gcc 4.3 warnings OpenJDK isn't ready for -+#WARNINGS_ARE_ERRORS = -Werror - # Except for a few acceptable ones - ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare - CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) ---- openjdk/hotspot/build/solaris/makefiles/gcc.make.ark 2008-01-11 14:24:33.000000000 +0000 -+++ openjdk/hotspot/build/solaris/makefiles/gcc.make 2008-01-11 14:24:48.000000000 +0000 -@@ -109,7 +109,8 @@ - - - # Compiler warnings are treated as errors --WARNINGS_ARE_ERRORS = -Werror -+# Commented out for now because of gcc 4.3 warnings OpenJDK isn't ready for -+# WARNINGS_ARE_ERRORS = -Werror - # Enable these warnings. See 'info gcc' about details on these options - ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare - CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS) --- openjdk/jdk/make/common/Defs-linux.gmk.ark 2008-01-11 14:20:26.000000000 +0000 +++ openjdk/jdk/make/common/Defs-linux.gmk 2008-01-11 14:21:10.000000000 +0000 @@ -139,7 +139,9 @@
--- a/patches/icedtea-gcc-suffix.patch Mon Dec 01 00:34:53 2008 +0100 +++ b/patches/icedtea-gcc-suffix.patch Mon Dec 01 17:30:31 2008 +0000 @@ -1,27 +1,3 @@ ---- openjdk/hotspot/agent/src/os/linux/Makefile~ 2007-08-02 09:16:50.000000000 +0200 -+++ openjdk/hotspot/agent/src/os/linux/Makefile 2007-08-08 17:00:11.204338801 +0200 -@@ -23,7 +23,7 @@ - # - - ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi ) --GCC = gcc -+GCC = gcc$(GCC_SUFFIX) - - JAVAH = ${JAVA_HOME}/bin/javah - ---- openjdk/hotspot/build/linux/makefiles/gcc.make~ 2007-08-08 16:13:12.281815996 +0200 -+++ openjdk/hotspot/build/linux/makefiles/gcc.make 2007-08-08 16:36:52.573240769 +0200 -@@ -25,8 +25,8 @@ - #------------------------------------------------------------------------ - # CC, CPP & AS - --CPP = g++ --CC = gcc -+CPP = g++$(GCC_SUFFIX) -+CC = gcc$(GCC_SUFFIX) - AS = $(CC) -c - - # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only --- openjdk/jdk/make/common/shared/Compiler-gcc.gmk~ 2007-08-02 09:17:53.000000000 +0200 +++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2007-08-08 16:30:52.857814544 +0200 @@ -58,17 +58,17 @@
--- a/patches/icedtea-headers.patch Mon Dec 01 00:34:53 2008 +0100 +++ b/patches/icedtea-headers.patch Mon Dec 01 17:30:31 2008 +0000 @@ -1,14 +1,3 @@ ---- oldopenjdk/hotspot/build/linux/makefiles/jvmti.make 2008-02-12 04:14:13.000000000 -0500 -+++ openjdk/hotspot/build/linux/makefiles/jvmti.make 2008-02-26 11:34:28.000000000 -0500 -@@ -57,7 +57,7 @@ - - JvmtiGeneratedFiles = $(JvmtiGeneratedNames:%=$(JvmtiOutDir)/%) - --XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen -+XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) $(ENDORSED) -classpath $(JvmtiOutDir) jvmtiGen - - .PHONY: all jvmtidocs clean cleanall - --- openjdkold/jdk/make/tools/freetypecheck/Makefile 2008-01-04 18:20:30.000000000 -0500 +++ openjdk/jdk/make/tools/freetypecheck/Makefile 2008-02-26 11:21:34.000000000 -0500 @@ -61,7 +61,7 @@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-core-build.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,108 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make +--- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-05-27 22:28:29.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-06-22 03:10:05.000000000 +0100 +@@ -97,6 +97,7 @@ + EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so ++ifndef ICEDTEA_CORE_BUILD + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +@@ -111,3 +112,4 @@ + EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar + endif + endif ++endif +diff -Nru openjdk.orig/hotspot/make/Makefile openjdk/hotspot/make/Makefile +--- openjdk.orig/hotspot/make/Makefile 2008-05-27 22:28:29.000000000 +0100 ++++ openjdk/hotspot/make/Makefile 2008-06-22 03:10:05.000000000 +0100 +@@ -91,6 +91,15 @@ + all_debug: jvmg jvmg1 jvmgkernel docs export_debug + all_optimized: optimized optimized1 optimizedkernel docs export_optimized + ++# Core (non-compiler) targets made available with this Makefile ++CORE_VM_TARGETS=productcore fastdebugcore optimizedcore jvmgcore ++ ++allcore: all_productcore all_fastdebugcore ++all_productcore: productcore docs export_product ++all_fastdebugcore: fastdebugcore docs export_fastdebug ++all_debugcore: jvmgcore docs export_debug ++all_optimizedcore: optimizedcore docs export_optimized ++ + # Do everything + world: all create_jdk + +@@ -113,6 +122,10 @@ + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_build2 $(ALT_OUT) + ++$(CORE_VM_TARGETS): ++ $(CD) $(GAMMADIR)/make; \ ++ $(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT) ++ + $(KERNEL_VM_TARGETS): + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT) +@@ -159,6 +172,12 @@ + $(MAKE_ARGS) $(VM_TARGET) + endif + ++generic_buildcore: ++ $(MKDIR) -p $(OUTPUTDIR) ++ $(CD) $(OUTPUTDIR); \ ++ $(MAKE) -f $(ABS_OS_MAKEFILE) \ ++ $(MAKE_ARGS) $(VM_TARGET) ++ + generic_buildkernel: + $(MKDIR) -p $(OUTPUTDIR) + ifeq ($(OSNAME),windows) +@@ -205,13 +224,21 @@ + XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt + DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs + C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 ++ifdef ICEDTEA_CORE_BUILD ++C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core ++else + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 ++endif + KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel + C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) + C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) + KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) + + # Misc files and generated files need to come from C1 or C2 area ++ifdef ICEDTEA_CORE_BUILD ++ MISC_DIR=$(C2_DIR) ++ GEN_DIR=$(C2_BASE_DIR)/generated ++else + ifeq ($(ARCH_DATA_MODEL), 32) + MISC_DIR=$(C1_DIR) + GEN_DIR=$(C1_BASE_DIR)/generated +@@ -219,6 +246,7 @@ + MISC_DIR=$(C2_DIR) + GEN_DIR=$(C2_BASE_DIR)/generated + endif ++endif + + # Bin files (windows) + ifeq ($(OSNAME),windows) +diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp 2008-05-27 22:28:30.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2008-06-22 03:10:05.000000000 +0100 +@@ -94,8 +94,12 @@ + #ifdef TIERED + #define VMTYPE "Server" + #else +- #define VMTYPE COMPILER1_PRESENT("Client") \ +- COMPILER2_PRESENT("Server") ++#if defined(COMPILER1) || defined(COMPILER2) ++ #define VMTYPE COMPILER1_PRESENT("Client") \ ++ COMPILER2_PRESENT("Server") ++#else ++ #define VMTYPE "Core" ++#endif // COMPILER1 || COMPILER2 + #endif // TIERED + #endif // KERNEL + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-debuginfo.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,15 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-08-20 22:58:22.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-08-20 23:01:45.000000000 +0100 +@@ -62,6 +62,10 @@ + CFLAGS += -D_REENTRANT + CFLAGS += -fcheck-new + ++# Always generate full debuginfo on Linux. It'll be in a separate ++# debuginfo package when building RPMs. ++CFLAGS += -g ++ + ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) + ARCHFLAG/i486 = -m32 -march=i586 + ARCHFLAG/amd64 = -m64 +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-gcc-suffix.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,25 @@ +--- openjdk/hotspot/agent/src/os/linux/Makefile~ 2007-08-02 09:16:50.000000000 +0200 ++++ openjdk/hotspot/agent/src/os/linux/Makefile 2007-08-08 17:00:11.204338801 +0200 +@@ -23,7 +23,7 @@ + # + + ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi ) +-GCC = gcc ++GCC = gcc$(GCC_SUFFIX) + + JAVAH = ${JAVA_HOME}/bin/javah + +--- openjdk/hotspot/make/linux/makefiles/gcc.make~ 2007-08-08 16:13:12.281815996 +0200 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2007-08-08 16:36:52.573240769 +0200 +@@ -25,8 +25,8 @@ + #------------------------------------------------------------------------ + # CC, CPP & AS + +-CPP = g++ +-CC = gcc ++CPP = g++$(GCC_SUFFIX) ++CC = gcc$(GCC_SUFFIX) + AS = $(CC) -c + + # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-headers.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,13 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/jvmti.make openjdk/hotspot/make/linux/makefiles/jvmti.make +--- openjdk.orig/hotspot/make/linux/makefiles/jvmti.make 2008-05-23 20:51:14.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/jvmti.make 2008-05-23 20:54:13.000000000 +0100 +@@ -59,7 +59,7 @@ + + JvmtiGeneratedFiles = $(JvmtiGeneratedNames:%=$(JvmtiOutDir)/%) + +-XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen ++XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) $(ENDORSED) -classpath $(JvmtiOutDir) jvmtiGen + + .PHONY: all jvmtidocs clean cleanall + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-memory-limits.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,23 @@ +diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp +--- openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp 2008-05-23 22:30:44.000000000 +0100 ++++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp 2008-05-23 22:30:59.000000000 +0100 +@@ -98,7 +98,7 @@ + + // Heap related flags + define_pd_global(uintx, PermSize, ScaleForWordSize(16*M)); +-define_pd_global(uintx, MaxPermSize, ScaleForWordSize(64*M)); ++define_pd_global(uintx, MaxPermSize, ScaleForWordSize(128*M)); + + // Ergonomics related flags + define_pd_global(bool, NeverActAsServerClassMachine, false); +--- penjdk6/hotspot/src/share/vm/runtime/globals.hpp 2008-02-12 04:14:24.000000000 -0500 ++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2008-02-14 16:34:00.000000000 -0500 +@@ -2606,7 +2606,7 @@ + "an OS lock") \ + \ + /* gc parameters */ \ +- product(uintx, MaxHeapSize, ScaleForWordSize(64*M), \ ++ product(uintx, MaxHeapSize, ScaleForWordSize(512*M), \ + "Default maximum size for object heap (in bytes)") \ + \ + product_pd(uintx, NewSize, \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-params-cast-size_t.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,121 @@ +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-09-01 01:47:18.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-09-01 01:53:31.000000000 +0100 +@@ -938,7 +938,7 @@ + if (free_percentage < desired_free_percentage) { + size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); + assert(desired_capacity >= capacity(), "invalid expansion size"); +- expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes); ++ expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes); + } + if (expand_bytes > 0) { + if (PrintGCDetails && Verbose) { +@@ -6044,7 +6044,7 @@ + HeapWord* curAddr = _markBitMap.startWord(); + while (curAddr < _markBitMap.endWord()) { + size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr); +- MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining)); ++ MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining)); + _markBitMap.clear_large_range(chunk); + if (ConcurrentMarkSweepThread::should_yield() && + !foregroundGCIsActive() && +@@ -6332,7 +6332,7 @@ + return; + } + // Double capacity if possible +- size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax); ++ size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax); + // Do not give up existing stack until we have managed to + // get the double capacity that we desired. + ReservedSpace rs(ReservedSpace::allocation_align_size_up( +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2008-08-14 08:40:10.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2008-09-01 01:49:59.000000000 +0100 +@@ -904,8 +904,8 @@ + void PSParallelCompact::initialize_dead_wood_limiter() + { + const size_t max = 100; +- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0; +- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; ++ _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0; ++ _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; + _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev); + DEBUG_ONLY(_dwl_initialized = true;) + _dwl_adjustment = normal_distribution(1.0); +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2008-08-14 08:40:10.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2008-09-01 01:52:42.000000000 +0100 +@@ -63,7 +63,7 @@ + _last_used = current_live; + + // We have different alignment constraints than the rest of the heap. +- const size_t alignment = MAX2(MinPermHeapExpansion, ++ const size_t alignment = MAX2((size_t) MinPermHeapExpansion, + virtual_space()->alignment()); + + // Compute the desired size: +diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp 2008-08-14 08:40:10.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp 2008-09-01 02:58:03.000000000 +0100 +@@ -287,7 +287,7 @@ + // yield a size that is too small) and bound it by MaxNewSize above. + // Ergonomics plays here by previously calculating the desired + // NewSize and MaxNewSize. +- max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize); ++ max_new_size = MIN2(MAX2(max_new_size, (size_t) NewSize), (size_t) MaxNewSize); + } + assert(max_new_size > 0, "All paths should set max_new_size"); + +diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2008-08-14 08:40:11.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2008-09-01 01:49:59.000000000 +0100 +@@ -222,7 +222,7 @@ + size_t init_sz; + + if (TLABSize > 0) { +- init_sz = MIN2(TLABSize / HeapWordSize, max_size()); ++ init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size()); + } else if (global_stats() == NULL) { + // Startup issue - main thread initialized before heap initialized. + init_sz = min_size(); +diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp 2008-09-01 01:47:17.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2008-09-01 01:58:01.000000000 +0100 +@@ -1025,7 +1025,7 @@ + // for "short" pauses ~ 4M*ParallelGCThreads + if (FLAG_IS_DEFAULT(MaxNewSize)) { // MaxNewSize not set at command-line + if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line +- FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size)); ++ FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size)); + } else { + FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size); + } +@@ -1038,7 +1038,7 @@ + // Old to Young gen size so as to shift the collection load + // to the old generation concurrent collector + if (FLAG_IS_DEFAULT(NewRatio)) { +- FLAG_SET_ERGO(intx, NewRatio, MAX2(NewRatio, new_ratio)); ++ FLAG_SET_ERGO(intx, NewRatio, MAX2((intx) NewRatio, new_ratio)); + + size_t min_new = align_size_up(ScaleForWordSize(min_new_default), os::vm_page_size()); + size_t prev_initial_size = initial_heap_size(); +@@ -1067,8 +1067,8 @@ + // Unless explicitly requested otherwise, make young gen + // at least min_new, and at most preferred_max_new_size. + if (FLAG_IS_DEFAULT(NewSize)) { +- FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new)); +- FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize)); ++ FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new)); ++ FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize)); + if(PrintGCDetails && Verbose) { + // Too early to use gclog_or_tty + tty->print_cr("Ergo set NewSize: " SIZE_FORMAT, NewSize); +@@ -1079,7 +1079,7 @@ + // later NewRatio will decide how it grows; see above. + if (FLAG_IS_DEFAULT(OldSize)) { + if (max_heap > NewSize) { +- FLAG_SET_ERGO(uintx, OldSize, MIN2(3*NewSize, max_heap - NewSize)); ++ FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t) (3*NewSize), max_heap - (size_t) NewSize)); + if(PrintGCDetails && Verbose) { + // Too early to use gclog_or_tty + tty->print_cr("Ergo set OldSize: " SIZE_FORMAT, OldSize);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-shark-build.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,233 @@ +diff -Nru openjdk.orig/hotspot/make/linux/Makefile openjdk/hotspot/make/linux/Makefile +--- openjdk.orig/hotspot/make/linux/Makefile 2008-07-03 08:39:52.000000000 +0100 ++++ openjdk/hotspot/make/linux/Makefile 2008-07-13 00:59:03.000000000 +0100 +@@ -158,6 +158,13 @@ + # profiledcore core <os>_<arch>_core/profiled + # productcore core <os>_<arch>_core/product + # ++# debugshark shark <os>_<arch>_shark/debug ++# fastdebugshark shark <os>_<arch>_shark/fastdebug ++# jvmgshark shark <os>_<arch>_shark/jvmg ++# optimizedshark shark <os>_<arch>_shark/optimized ++# profiledshark shark <os>_<arch>_shark/profiled ++# productshark shark <os>_<arch>_shark/product ++# + # What you get with each target: + # + # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher +@@ -176,11 +183,13 @@ + SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS)) + SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS)) + SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) ++SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(BUILDARCH)_shark/,$(TARGETS)) + + TARGETS_C2 = $(TARGETS) + TARGETS_C1 = $(addsuffix 1,$(TARGETS)) + TARGETS_TIERED = $(addsuffix tiered,$(TARGETS)) + TARGETS_CORE = $(addsuffix core,$(TARGETS)) ++TARGETS_SHARK = $(addsuffix shark,$(TARGETS)) + + BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make + BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) +@@ -196,6 +205,7 @@ + @echo " $(TARGETS_C2)" + @echo " $(TARGETS_C1)" + @echo " $(TARGETS_CORE)" ++ @echo " $(TARGETS_SHARK)" + + checks: check_os_version check_j2se_version + +@@ -245,6 +255,10 @@ + $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks + $(BUILDTREE) VARIANT=core + ++$(SUBDIRS_SHARK): $(BUILDTREE_MAKE) ++ $(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks ++ $(BUILDTREE) VARIANT=shark ++ + # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME + + $(TARGETS_C2): $(SUBDIRS_C2) +@@ -275,6 +289,12 @@ + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install + endif + ++$(TARGETS_SHARK): $(SUBDIRS_SHARK) ++ cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) ++ifdef INSTALL ++ cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install ++endif ++ + # Just build the tree, and nothing else: + tree: $(SUBDIRS_C2) + tree1: $(SUBDIRS_C1) +@@ -305,7 +325,7 @@ + + #------------------------------------------------------------------------------- + +-.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) ++.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_SHARK) + .PHONY: tree tree1 treecore + .PHONY: all compiler1 compiler2 core + .PHONY: clean clean_compiler1 clean_compiler2 clean_core docs clean_docs +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make +--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make 2008-07-13 00:38:03.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/buildtree.make 2008-07-13 00:59:03.000000000 +0100 +@@ -215,8 +215,8 @@ + + ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm + @echo Creating directory list $@ +- $(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \ +- -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ ++ $(QUIETLY) find -L $(GAMMADIR)/src/share/vm/* -prune \ ++ -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find -L {} \ + \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@ + + Makefile: $(BUILDTREE_MAKE) +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make +--- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-07-13 00:38:03.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-07-13 00:59:03.000000000 +0100 +@@ -118,6 +118,7 @@ + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so + ifndef ICEDTEA_CORE_BUILD ++ifndef ICEDTEA_SHARK_BUILD + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +@@ -133,3 +134,4 @@ + endif + endif + endif ++endif +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-07-13 00:38:03.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-07-13 00:59:03.000000000 +0100 +@@ -64,6 +64,9 @@ + ifdef ICEDTEA_ZERO_BUILD + CFLAGS += $(LIBFFI_CFLAGS) + endif ++ifdef ICEDTEA_SHARK_BUILD ++CFLAGS += $(LLVM_CFLAGS) ++endif + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti + CFLAGS += -fno-exceptions +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/top.make openjdk/hotspot/make/linux/makefiles/top.make +--- openjdk.orig/hotspot/make/linux/makefiles/top.make 2008-07-03 08:39:53.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/top.make 2008-07-13 00:59:03.000000000 +0100 +@@ -73,6 +73,7 @@ + Include_DBs/COMPILER1 = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 + Include_DBs/COMPILER2 = $(Include_DBs/CORE) $(VM)/includeDB_compiler2 + Include_DBs/TIERED = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 $(VM)/includeDB_compiler2 ++Include_DBs/SHARK = $(Include_DBs/CORE) $(VM)/includeDB_shark + Include_DBs = $(Include_DBs/$(TYPE)) + + Cached_plat = $(GENERATED)/platform.current +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-07-13 00:38:03.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-07-13 00:59:03.000000000 +0100 +@@ -126,10 +126,14 @@ + + STATIC_CXX = true + +-ifeq ($(ZERO_LIBARCH), ppc64) ++ifdef ICEDTEA_SHARK_BUILD + STATIC_CXX = false + else +- STATIC_CXX = true ++ ifeq ($(ZERO_LIBARCH), ppc64) ++ STATIC_CXX = false ++ else ++ STATIC_CXX = true ++ endif + endif + + ifeq ($(LINK_INTO),AOUT) +@@ -157,6 +161,10 @@ + ifdef ICEDTEA_ZERO_BUILD + LIBS_VM += $(LIBFFI_LIBS) + endif ++ifdef ICEDTEA_SHARK_BUILD ++LFLAGS_VM += $(LLVM_LDFLAGS) ++LIBS_VM += $(LLVM_LIBS) ++endif + + LINK_VM = $(LINK_LIB.c) + +diff -Nru openjdk.orig/hotspot/make/Makefile openjdk/hotspot/make/Makefile +--- openjdk.orig/hotspot/make/Makefile 2008-07-13 00:38:02.000000000 +0100 ++++ openjdk/hotspot/make/Makefile 2008-07-13 00:59:03.000000000 +0100 +@@ -103,6 +103,15 @@ + all_debugcore: jvmgcore docs export_debug + all_optimizedcore: optimizedcore docs export_optimized + ++# Shark (C0) targets made available with this Makefile ++SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark ++ ++allshark: all_productshark all_fastdebugshark ++all_productshark: productshark docs export_product ++all_fastdebugshark: fastdebugshark docs export_fastdebug ++all_debugshark: jvmgshark docs export_debug ++all_optimizedshark: optimizedshark docs export_optimized ++ + # Do everything + world: all create_jdk + +@@ -129,6 +138,10 @@ + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT) + ++$(SHARK_VM_TARGETS): ++ $(CD) $(GAMMADIR)/make; \ ++ $(MAKE) VM_TARGET=$@ generic_buildshark $(ALT_OUT) ++ + $(KERNEL_VM_TARGETS): + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT) +@@ -181,6 +194,12 @@ + $(MAKE) -f $(ABS_OS_MAKEFILE) \ + $(MAKE_ARGS) $(VM_TARGET) + ++generic_buildshark: ++ $(MKDIR) -p $(OUTPUTDIR) ++ $(CD) $(OUTPUTDIR); \ ++ $(MAKE) -f $(ABS_OS_MAKEFILE) \ ++ $(MAKE_ARGS) $(VM_TARGET) ++ + generic_buildkernel: + $(MKDIR) -p $(OUTPUTDIR) + ifeq ($(OSNAME),windows) +@@ -230,8 +249,12 @@ + ifdef ICEDTEA_CORE_BUILD + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core + else ++ifdef ICEDTEA_SHARK_BUILD ++C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark ++else + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 + endif ++endif + KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel + C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) + C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) +@@ -242,6 +265,10 @@ + MISC_DIR=$(C2_DIR) + GEN_DIR=$(C2_BASE_DIR)/generated + else ++ifdef ICEDTEA_SHARK_BUILD ++ MISC_DIR=$(C2_DIR) ++ GEN_DIR=$(C2_BASE_DIR)/generated ++else + ifeq ($(ARCH_DATA_MODEL), 32) + MISC_DIR=$(C1_DIR) + GEN_DIR=$(C1_BASE_DIR)/generated +@@ -250,6 +277,7 @@ + GEN_DIR=$(C2_BASE_DIR)/generated + endif + endif ++endif + + # Bin files (windows) + ifeq ($(OSNAME),windows) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-sparc-ptracefix.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,34 @@ +diff -up openjdk/hotspot/agent/src/os/linux/libproc.h.BAD openjdk/hotspot/agent/src/os/linux/libproc.h +--- openjdk/hotspot/agent/src/os/linux/libproc.h.BAD 2008-05-29 19:03:34.000000000 -0400 ++++ openjdk/hotspot/agent/src/os/linux/libproc.h 2008-05-29 19:01:45.000000000 -0400 +@@ -34,14 +34,25 @@ + + #if defined(sparc) || defined(sparcv9) + /* +- If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64 +- otherwise it should be from /usr/include/asm-sparc +- These two files define pt_regs structure differently ++ Taken from asm-sparc/ptrace.h and asm-sparc64/ptrace.h + */ + #ifdef _LP64 +-#include "asm-sparc64/ptrace.h" ++struct pt_regs { ++ unsigned long u_regs[16]; /* globals and ins */ ++ unsigned long tstate; ++ unsigned long tpc; ++ unsigned long tnpc; ++ unsigned int y; ++ unsigned int fprs; ++}; + #else +-#include "asm-sparc/ptrace.h" ++struct pt_regs { ++ unsigned long psr; ++ unsigned long pc; ++ unsigned long npc; ++ unsigned long y; ++ unsigned long u_regs[16]; /* globals and ins */ ++}; + #endif + + #endif //sparc or sparcv9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-sparc-trapsfix.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,21 @@ +diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp +--- openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp 2008-08-04 08:40:18.000000000 +0100 ++++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp 2008-08-09 01:29:51.000000000 +0100 +@@ -25,7 +25,16 @@ + #include "incls/_precompiled.incl" + #include "incls/_assembler_linux_sparc.cpp.incl" + +-#include <asm-sparc/traps.h> ++/* Headers for 32bit sparc with a 32bit userland end up in asm/ ++ * Headers for 32bit sparc with a 64bit userland end up in asm-sparc/ ++ * There is no traps.h in asm-sparc64/ ++ */ ++ ++#if defined(__sparc__) && defined(__arch64__) ++# include <asm-sparc/traps.h> ++#else ++# include <asm/traps.h> ++#endif + + void MacroAssembler::read_ccr_trap(Register ccr_save) { + // No implementation
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-sparc64-linux.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,42 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make +--- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-06-22 22:28:06.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-06-22 22:35:27.000000000 +0100 +@@ -73,6 +73,14 @@ + HS_ARCH = sparc + endif + ++# sparc ++ifeq ($(ARCH), sparc) ++ ARCH_DATA_MODEL = 32 ++ PLATFORM = linux-sparc ++ VM_PLATFORM = linux_sparc ++ HS_ARCH = sparc ++endif ++ + # x86_64 + ifeq ($(ARCH), x86_64) + ifeq ($(ARCH_DATA_MODEL), 64) +diff -Nru openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp +--- openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp 2008-06-22 20:44:41.000000000 +0100 ++++ openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp 2008-06-22 22:35:27.000000000 +0100 +@@ -1112,20 +1112,12 @@ + + void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, + CodeEmitInfo* info) { +-#ifdef _LP64 +- __ store(value, address, info); +-#else + __ volatile_store_mem_reg(value, address, info); +-#endif + } + + void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, + CodeEmitInfo* info) { +-#ifdef _LP64 +- __ load(address, result, info); +-#else + __ volatile_load_mem_reg(address, result, info); +-#endif + } + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-static-libstdc++.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,16 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-05-16 22:13:31.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-05-23 23:25:47.000000000 +0100 +@@ -124,6 +124,12 @@ + + STATIC_CXX = true + ++ifeq ($(ZERO_LIBARCH), ppc64) ++ STATIC_CXX = false ++else ++ STATIC_CXX = true ++endif ++ + ifeq ($(LINK_INTO),AOUT) + LIBJVM.o = + LIBJVM_MAPFILE =
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-text-relocations.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,15 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-07-17 08:40:27.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-07-21 23:10:50.000000000 +0100 +@@ -46,7 +46,11 @@ + # Compiler flags + + # position-independent code ++ifneq ($(filter ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),) + PICFLAG = -fPIC ++else ++PICFLAG = -fpic ++endif + + VM_PICFLAG/LIBJVM = $(PICFLAG) + VM_PICFLAG/AOUT =
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-use-idx_t.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,45 @@ +diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp +--- openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp 2008-11-06 08:40:55.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp 2008-11-10 00:55:09.000000000 +0000 +@@ -567,15 +567,15 @@ + + + MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) : +- _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), + _last_bci(-1) { + _analyzer = analyzer; +@@ -992,7 +992,7 @@ + } + + MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) { +- MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()), ++ MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()), + _analyzer->bit_map_size_bits()); + answer.set_is_valid(); + +diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp openjdk/hotspot/src/share/vm/utilities/bitMap.hpp +--- openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp 2008-11-06 08:40:58.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp 2008-11-10 00:57:20.000000000 +0000 +@@ -73,7 +73,7 @@ + + // Set a word to a specified value or to all ones; clear a word. + void set_word (idx_t word, bm_word_t val) { _map[word] = val; } +- void set_word (idx_t word) { set_word(word, ~(uintptr_t)0); } ++ void set_word (idx_t word) { set_word(word, ~(idx_t)0); } + void clear_word(idx_t word) { _map[word] = 0; } + + // Utilities for ranges of bits. Ranges are half-open [beg, end).
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-version.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,38 @@ +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-11-06 08:40:50.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-11-19 12:15:54.000000000 +0000 +@@ -86,6 +86,10 @@ + ${JRE_VERSION} \ + ${VM_DISTRO} + ++ifdef DISTRIBUTION_ID ++CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\"" ++endif ++ + # CFLAGS_WARN holds compiler options to suppress/enable warnings. + CFLAGS += $(CFLAGS_WARN/BYFILE) + +diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp +--- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp 2008-11-06 08:40:58.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2008-11-19 12:15:54.000000000 +0000 +@@ -165,7 +165,8 @@ + + static void print_bug_submit_message(outputStream *out, Thread *thread) { + if (out == NULL) return; +- out->print_raw_cr("# If you would like to submit a bug report, please visit:"); ++ out->print_raw_cr("# If you would like to submit a bug report, please include"); ++ out->print_raw_cr("# instructions how to reproduce the bug and visit:"); + out->print_raw ("# "); + out->print_raw_cr(Arguments::java_vendor_url_bug()); + // If the crash is in native code, encourage user to submit a bug to the +@@ -339,6 +340,9 @@ + Abstract_VM_Version::vm_platform_string(), + UseCompressedOops ? "compressed oops" : "" + ); ++#ifdef DISTRIBUTION_ID ++ st->print_cr("# Distribution: %s", DISTRIBUTION_ID); ++#endif + + STEP(60, "(printing problematic frame)") + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-14.0b08-zero-build.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,129 @@ +diff -Nru openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make +--- openjdk.orig/hotspot/make/defs.make 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/make/defs.make 2008-11-29 02:14:15.000000000 +0000 +@@ -192,13 +192,14 @@ + + # Use uname output for SRCARCH, but deal with platform differences. If ARCH + # is not explicitly listed below, it is treated as x86. +- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64,$(ARCH))) ++ SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 zero,$(ARCH))) + ARCH/ = x86 + ARCH/sparc = sparc + ARCH/sparc64= sparc + ARCH/ia64 = ia64 + ARCH/amd64 = x86 + ARCH/x86_64 = x86 ++ ARCH/zero = zero + + # BUILDARCH is usually the same as SRCARCH, except for sparcv9 + BUILDARCH = $(SRCARCH) +@@ -222,8 +223,9 @@ + LIBARCH/sparc = sparc + LIBARCH/sparcv9 = sparcv9 + LIBARCH/ia64 = ia64 ++ LIBARCH/zero = $(ZERO_LIBARCH) + +- LP64_ARCH = sparcv9 amd64 ia64 ++ LP64_ARCH = sparcv9 amd64 ia64 zero + endif + + # Required make macro settings for all platforms +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make +--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/buildtree.make 2008-11-29 02:14:15.000000000 +0000 +@@ -321,6 +321,7 @@ + DATA_MODE/sparcv9 = 64 + DATA_MODE/amd64 = 64 + DATA_MODE/ia64 = 64 ++DATA_MODE/zero = $(ZERO_BITSPERWORD) + + JAVA_FLAG/32 = -d32 + JAVA_FLAG/64 = -d64 +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make +--- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-11-29 01:55:52.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-11-29 02:14:15.000000000 +0000 +@@ -37,6 +37,18 @@ + ARCH_DATA_MODEL ?= 32 + endif + ++# zero ++ifdef ICEDTEA_ZERO_BUILD ++ ARCH_DATA_MODEL = $(ZERO_BITSPERWORD) ++ ifeq ($(ARCH_DATA_MODEL), 64) ++ MAKE_ARGS += LP64=1 ++ endif ++ PLATFORM = linux-zero ++ VM_PLATFORM = linux_zero ++ HS_ARCH = zero ++ ARCH = zero ++endif ++ + # ia64 + ifeq ($(ARCH), ia64) + ARCH_DATA_MODEL = 64 +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-11-29 01:55:52.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-11-29 02:14:15.000000000 +0000 +@@ -56,6 +56,9 @@ + VM_PICFLAG/AOUT = + VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) + ++ifdef ICEDTEA_ZERO_BUILD ++CFLAGS += $(LIBFFI_CFLAGS) ++endif + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti + CFLAGS += -fno-exceptions +@@ -72,6 +75,7 @@ + ARCHFLAG/ia64 = + ARCHFLAG/sparc = -m32 -mcpu=v9 + ARCHFLAG/sparcv9 = -m64 -mcpu=v9 ++ARCHFLAG/zero = $(ZERO_ARCHFLAG) + + CFLAGS += $(ARCHFLAG) + AOUT_FLAGS += $(ARCHFLAG) +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/sa.make openjdk/hotspot/make/linux/makefiles/sa.make +--- openjdk.orig/hotspot/make/linux/makefiles/sa.make 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/sa.make 2008-11-29 02:14:15.000000000 +0000 +@@ -52,10 +52,10 @@ + SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties + + # if $(AGENT_DIR) does not exist, we don't build SA +-# also, we don't build SA on Itanium. ++# also, we don't build SA on Itanium or zero. + + all: +- if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ ++ if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ + $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \ + fi + +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make +--- openjdk.orig/hotspot/make/linux/makefiles/saproc.make 2008-11-22 00:11:18.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/saproc.make 2008-11-29 02:14:15.000000000 +0000 +@@ -44,10 +44,10 @@ + DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) + + # if $(AGENT_DIR) does not exist, we don't build SA +-# also, we don't build SA on Itanium. ++# also, we don't build SA on Itanium or zero. + + checkAndBuildSA: +- $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ ++ $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ + $(MAKE) -f vm.make $(LIBSAPROC); \ + fi + +diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-11-29 01:55:52.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-11-29 02:14:15.000000000 +0000 +@@ -158,6 +158,9 @@ + + LIBS_VM += $(LIBS) + endif ++ifdef ICEDTEA_ZERO_BUILD ++LIBS_VM += $(LIBFFI_LIBS) ++endif + + LINK_VM = $(LINK_LIB.c) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-core-build.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,113 @@ +diff -u openjdk.orig/hotspot/build/linux/makefiles/defs.make openjdk/hotspot/build/linux/makefiles/defs.make +--- openjdk.orig/hotspot/build/linux/makefiles/defs.make 2008-01-31 14:19:00.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/defs.make 2008-02-01 15:57:40.000000000 +0000 +@@ -97,6 +97,7 @@ EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusa + EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so ++ifndef ICEDTEA_CORE_BUILD + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +@@ -111,3 +112,4 @@ else + EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar + endif + endif ++endif +diff -r 79d639c8a75f openjdk/hotspot/make/Makefile +--- openjdk/hotspot/make/Makefile Wed Apr 16 08:42:01 2008 +0100 ++++ openjdk/hotspot/make/Makefile Wed Apr 16 08:49:31 2008 +0100 +@@ -90,6 +90,15 @@ all_debug: jvmg jvmg1 docs export_de + all_debug: jvmg jvmg1 docs export_debug + all_optimized: optimized optimized1 docs export_optimized + ++# Core (non-compiler) targets made available with this Makefile ++CORE_VM_TARGETS=productcore fastdebugcore optimizedcore jvmgcore ++ ++allcore: all_productcore all_fastdebugcore ++all_productcore: productcore docs export_product ++all_fastdebugcore: fastdebugcore docs export_fastdebug ++all_debugcore: jvmgcore docs export_debug ++all_optimizedcore: optimizedcore docs export_optimized ++ + # Do everything + world: all create_jdk + +@@ -111,6 +120,10 @@ endif + $(C2_VM_TARGETS): + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_build2 $(ALT_OUT) ++ ++$(CORE_VM_TARGETS): ++ $(CD) $(GAMMADIR)/make; \ ++ $(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT) + + # Build compiler1 (client) rule, different for platforms + generic_build1: +@@ -153,6 +166,12 @@ else + $(MAKE) -f $(ABS_OS_MAKEFILE) \ + $(MAKE_ARGS) $(VM_TARGET) + endif ++ ++generic_buildcore: ++ $(MKDIR) -p $(OUTPUTDIR) ++ $(CD) $(OUTPUTDIR); \ ++ $(MAKE) -f $(ABS_OS_MAKEFILE) \ ++ $(MAKE_ARGS) $(VM_TARGET) + + # Export file rule + generic_export: $(EXPORT_LIST) +@@ -182,11 +201,19 @@ XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt + XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt + DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs + C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 ++ifdef ICEDTEA_CORE_BUILD ++C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core ++else + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 ++endif + C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) + C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) + + # Misc files and generated files need to come from C1 or C2 area ++ifdef ICEDTEA_CORE_BUILD ++ MISC_DIR=$(C2_DIR) ++ GEN_DIR=$(C2_BASE_DIR)/generated ++else + ifeq ($(ARCH_DATA_MODEL), 32) + MISC_DIR=$(C1_DIR) + GEN_DIR=$(C1_BASE_DIR)/generated +@@ -194,6 +221,7 @@ else + MISC_DIR=$(C2_DIR) + GEN_DIR=$(C2_BASE_DIR)/generated + endif ++endif + + # Bin files (windows) + ifeq ($(OSNAME),windows) +@@ -264,6 +292,7 @@ endif + + # Xusage file + $(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt: $(XUSAGE) ++$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE) + $(prep-target) + $(RM) $@.temp + $(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp +diff -r 79d639c8a75f openjdk/hotspot/src/share/vm/runtime/vm_version.cpp +--- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2008-02-12 04:14:24.000000000 -0500 ++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2008-02-14 17:39:45.000000000 -0500 +@@ -89,8 +89,12 @@ + #ifdef TIERED + #define VMTYPE "Server" + #else +- #define VMTYPE COMPILER1_PRESENT("Client") \ +- COMPILER2_PRESENT("Server") ++#if defined(COMPILER1) || defined(COMPILER2) ++ #define VMTYPE COMPILER1_PRESENT("Client") \ ++ COMPILER2_PRESENT("Server") ++#else ++ #define VMTYPE "Core" ++#endif // COMPILER1 || COMPILER2 + #endif // TIERED + + #ifndef HOTSPOT_VM_DISTRO
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-debuginfo.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,15 @@ +diff -urN openjdk.orig/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/build/linux/makefiles/gcc.make 2007-10-12 18:11:59.000000000 -0400 ++++ openjdk/hotspot/build/linux/makefiles/gcc.make 2007-10-12 18:12:22.000000000 -0400 +@@ -63,6 +63,10 @@ + CFLAGS += -D_REENTRANT + CFLAGS += -fcheck-new + ++# Always generate full debuginfo on Linux. It'll be in a separate ++# debuginfo package when building RPMs. ++CFLAGS += -g ++ + ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) + ARCHFLAG/i486 = -m32 -march=i586 + ARCHFLAG/amd64 = -m64 +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-gcc-4.3.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,72 @@ +--- openjdk/hotspot/src/share/vm/adlc/adlc.hpp.ark 2008-01-11 14:15:41.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/adlc/adlc.hpp 2008-01-11 14:16:14.000000000 +0000 +@@ -32,7 +32,7 @@ + // standard library constants + #include "stdio.h" + #include "stdlib.h" +-#if _MSC_VER >= 1300 // Visual C++ 7.0 or later ++#if (defined(__GNUC__) && __GNUC__ >= 3) || (_MSC_VER >= 1300) // gcc 3.0 or later or Visual C++ 7.0 or later + #include <iostream> + #else + #include <iostream.h> +--- openjdk/hotspot/src/share/vm/adlc/filebuff.cpp.ark 2008-01-11 14:17:17.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/adlc/filebuff.cpp 2008-01-11 14:17:34.000000000 +0000 +@@ -28,6 +28,8 @@ + // FILEBUFF.CPP - Routines for handling a parser file buffer + #include "adlc.hpp" + ++using namespace std; ++ + //------------------------------FileBuff--------------------------------------- + // Create a new parsing buffer + FileBuff::FileBuff( BufferedFile *fptr, ArchDesc& archDesc) : _fp(fptr), _AD(archDesc) { +--- openjdk/hotspot/src/share/vm/adlc/filebuff.hpp.ark 2008-01-11 14:14:45.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/adlc/filebuff.hpp 2008-01-11 14:15:34.000000000 +0000 +@@ -27,7 +27,7 @@ + + // FILEBUFF.HPP - Definitions for parser file buffering routines + +-#if _MSC_VER >= 1300 // Visual C++ 7.0 or later ++#if (defined(__GNUC__) && __GNUC__ >= 3) || (_MSC_VER >= 1300) // gcc 3.0 or later, or Visual C++ 7.0 or later + #include <iostream> + #else + #include <iostream.h> +@@ -99,8 +99,11 @@ + FileBuffRegion *copy(); // Deep copy + FileBuffRegion *merge(FileBuffRegion*); // Merge 2 regions; delete input + +-// void print(std::ostream&); +-// friend std::ostream& operator<< (std::ostream&, FileBuffRegion&); ++#if defined(__GNUC__) && __GNUC__ >= 3 ++ void print(std::ostream&); ++ friend std::ostream& operator<< (std::ostream&, FileBuffRegion&); ++#else + void print(ostream&); + friend ostream& operator<< (ostream&, FileBuffRegion&); ++#endif + }; +--- openjdk/hotspot/build/linux/makefiles/gcc.make.ark 2008-01-11 14:24:05.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/gcc.make 2008-01-11 14:24:27.000000000 +0000 +@@ -94,7 +94,8 @@ + endif + + # Compiler warnings are treated as errors +-WARNINGS_ARE_ERRORS = -Werror ++# Commented out for now because of gcc 4.3 warnings OpenJDK isn't ready for ++#WARNINGS_ARE_ERRORS = -Werror + # Except for a few acceptable ones + ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare + CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) +--- openjdk/hotspot/build/solaris/makefiles/gcc.make.ark 2008-01-11 14:24:33.000000000 +0000 ++++ openjdk/hotspot/build/solaris/makefiles/gcc.make 2008-01-11 14:24:48.000000000 +0000 +@@ -109,7 +109,8 @@ + + + # Compiler warnings are treated as errors +-WARNINGS_ARE_ERRORS = -Werror ++# Commented out for now because of gcc 4.3 warnings OpenJDK isn't ready for ++# WARNINGS_ARE_ERRORS = -Werror + # Enable these warnings. See 'info gcc' about details on these options + ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare + CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-gcc-suffix.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,25 @@ +--- openjdk/hotspot/agent/src/os/linux/Makefile~ 2007-08-02 09:16:50.000000000 +0200 ++++ openjdk/hotspot/agent/src/os/linux/Makefile 2007-08-08 17:00:11.204338801 +0200 +@@ -23,7 +23,7 @@ + # + + ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi ) +-GCC = gcc ++GCC = gcc$(GCC_SUFFIX) + + JAVAH = ${JAVA_HOME}/bin/javah + +--- openjdk/hotspot/build/linux/makefiles/gcc.make~ 2007-08-08 16:13:12.281815996 +0200 ++++ openjdk/hotspot/build/linux/makefiles/gcc.make 2007-08-08 16:36:52.573240769 +0200 +@@ -25,8 +25,8 @@ + #------------------------------------------------------------------------ + # CC, CPP & AS + +-CPP = g++ +-CC = gcc ++CPP = g++$(GCC_SUFFIX) ++CC = gcc$(GCC_SUFFIX) + AS = $(CC) -c + + # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-headers.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,12 @@ +--- oldopenjdk/hotspot/build/linux/makefiles/jvmti.make 2008-02-12 04:14:13.000000000 -0500 ++++ openjdk/hotspot/build/linux/makefiles/jvmti.make 2008-02-26 11:34:28.000000000 -0500 +@@ -57,7 +57,7 @@ + + JvmtiGeneratedFiles = $(JvmtiGeneratedNames:%=$(JvmtiOutDir)/%) + +-XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen ++XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) $(ENDORSED) -classpath $(JvmtiOutDir) jvmtiGen + + .PHONY: all jvmtidocs clean cleanall + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-memory-limits.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,21 @@ +--- penjdk6/hotspot/src/cpu/i486/vm/c2_globals_i486.hpp 2008-02-12 04:14:17.000000000 -0500 ++++ openjdk/hotspot/src/cpu/i486/vm/c2_globals_i486.hpp 2008-02-14 16:32:33.000000000 -0500 +@@ -79,6 +79,6 @@ + define_pd_global(uintx,CodeCacheMinBlockLength, 4); + + define_pd_global(uintx, PermSize, ScaleForWordSize(16*M)); +-define_pd_global(uintx, MaxPermSize, ScaleForWordSize(64*M)); ++define_pd_global(uintx, MaxPermSize, ScaleForWordSize(128*M)); + + define_pd_global(bool, NeverActAsServerClassMachine, false); +--- penjdk6/hotspot/src/share/vm/runtime/globals.hpp 2008-02-12 04:14:24.000000000 -0500 ++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2008-02-14 16:34:00.000000000 -0500 +@@ -2606,7 +2606,7 @@ + "an OS lock") \ + \ + /* gc parameters */ \ +- product(uintx, MaxHeapSize, ScaleForWordSize(64*M), \ ++ product(uintx, MaxHeapSize, ScaleForWordSize(512*M), \ + "Default maximum size for object heap (in bytes)") \ + \ + product_pd(uintx, NewSize, \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-params-cast-size_t.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,121 @@ +--- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp.old 2008-08-03 13:12:01.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2008-08-03 14:58:48.000000000 +0200 +@@ -63,7 +63,7 @@ + _last_used = current_live; + + // We have different alignment constraints than the rest of the heap. +- const size_t alignment = MAX2(MinPermHeapExpansion, ++ const size_t alignment = MAX2((size_t) MinPermHeapExpansion, + virtual_space()->alignment()); + + // Compute the desired size: +--- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.old 2008-08-03 13:12:01.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2008-08-03 14:58:15.000000000 +0200 +@@ -925,8 +925,8 @@ + void PSParallelCompact::initialize_dead_wood_limiter() + { + const size_t max = 100; +- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0; +- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; ++ _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0; ++ _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; + _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev); + DEBUG_ONLY(_dwl_initialized = true;) + _dwl_adjustment = normal_distribution(1.0); +--- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.old 2008-08-03 13:12:01.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-08-03 14:39:46.000000000 +0200 +@@ -926,7 +926,7 @@ + if (free_percentage < desired_free_percentage) { + size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); + assert(desired_capacity >= capacity(), "invalid expansion size"); +- expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes); ++ expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes); + } + if (expand_bytes > 0) { + if (PrintGCDetails && Verbose) { +@@ -5963,7 +5963,7 @@ + HeapWord* curAddr = _markBitMap.startWord(); + while (curAddr < _markBitMap.endWord()) { + size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr); +- MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining)); ++ MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining)); + _markBitMap.clear_large_range(chunk); + if (ConcurrentMarkSweepThread::should_yield() && + !foregroundGCIsActive() && +@@ -6251,7 +6251,7 @@ + return; + } + // Double capacity if possible +- size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax); ++ size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax); + // Do not give up existing stack until we have managed to + // get the double capacity that we desired. + ReservedSpace rs(ReservedSpace::allocation_align_size_up( +--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp.old 2008-08-03 13:49:24.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2008-08-03 14:04:48.000000000 +0200 +@@ -1038,7 +1038,7 @@ + // for "short" pauses ~ 4M*ParallelGCThreads + if (FLAG_IS_DEFAULT(MaxNewSize)) { // MaxNewSize not set at command-line + if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line +- FLAG_SET_DEFAULT(MaxNewSize, MAX2(NewSize, preferred_max_new_size)); ++ FLAG_SET_DEFAULT(MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size)); + } else { + FLAG_SET_DEFAULT(MaxNewSize, preferred_max_new_size); + } +@@ -1047,7 +1047,7 @@ + // Old to Young gen size so as to shift the collection load + // to the old generation concurrent collector + if (FLAG_IS_DEFAULT(NewRatio)) { +- FLAG_SET_DEFAULT(NewRatio, MAX2(NewRatio, new_ratio)); ++ FLAG_SET_DEFAULT(NewRatio, MAX2((intx) NewRatio, new_ratio)); + + size_t min_new = align_size_up(ScaleForWordSize(min_new_default), os::vm_page_size()); + size_t prev_initial_size = initial_heap_size(); +@@ -1069,15 +1069,15 @@ + // Unless explicitly requested otherwise, make young gen + // at least min_new, and at most preferred_max_new_size. + if (FLAG_IS_DEFAULT(NewSize)) { +- FLAG_SET_DEFAULT(NewSize, MAX2(NewSize, min_new)); +- FLAG_SET_DEFAULT(NewSize, MIN2(preferred_max_new_size, NewSize)); ++ FLAG_SET_DEFAULT(NewSize, MAX2((size_t) NewSize, min_new)); ++ FLAG_SET_DEFAULT(NewSize, MIN2(preferred_max_new_size, (size_t) NewSize)); + } + // Unless explicitly requested otherwise, size old gen + // so that it's at least 3X of NewSize to begin with; + // later NewRatio will decide how it grows; see above. + if (FLAG_IS_DEFAULT(OldSize)) { + if (max_heap > NewSize) { +- FLAG_SET_DEFAULT(OldSize, MIN2(3*NewSize, max_heap - NewSize)); ++ FLAG_SET_DEFAULT(OldSize, MIN2((size_t) (3*NewSize), max_heap - (size_t) NewSize)); + } + } + } +--- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp.old 2008-08-03 13:12:01.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp 2008-08-03 14:21:27.000000000 +0200 +@@ -233,13 +233,13 @@ + // as a lower bound as with + // _min_gen0_size = MIN2(_min_gen0_size, MaxNewSize); + // and 640k seemed too small a young generation. +- _min_gen0_size = MIN2(MAX2(_min_gen0_size, NewSize), MaxNewSize); ++ _min_gen0_size = MIN2(MAX2(_min_gen0_size, (size_t) NewSize), (size_t) MaxNewSize); + } + + // Parameters are valid, compute area sizes. + size_t max_new_size = align_size_down(_max_heap_byte_size / (NewRatio+1), + min_alignment()); +- max_new_size = MIN2(MAX2(max_new_size, _min_gen0_size), MaxNewSize); ++ max_new_size = MIN2(MAX2(max_new_size, _min_gen0_size), (size_t) MaxNewSize); + + // desired_new_size is used to set the initial size. The + // initial size must be greater than the minimum size. +--- openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.old 2008-08-03 13:12:02.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2008-08-03 15:02:15.000000000 +0200 +@@ -222,7 +222,7 @@ + size_t init_sz; + + if (TLABSize > 0) { +- init_sz = MIN2(TLABSize / HeapWordSize, max_size()); ++ init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size()); + } else if (global_stats() == NULL) { + // Startup issue - main thread initialized before heap initialized. + init_sz = min_size();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-shark-build.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,232 @@ +diff -r 8e41d25d7665 openjdk/hotspot/build/linux/Makefile +--- openjdk/hotspot/build/linux/Makefile Fri Jun 20 13:26:10 2008 +0100 ++++ openjdk/hotspot/build/linux/Makefile Fri Jun 20 13:26:20 2008 +0100 +@@ -152,6 +152,13 @@ endif + # profiledcore core <os>_<arch>_core/profiled + # productcore core <os>_<arch>_core/product + # ++# debugshark shark <os>_<arch>_shark/debug ++# fastdebugshark shark <os>_<arch>_shark/fastdebug ++# jvmgshark shark <os>_<arch>_shark/jvmg ++# optimizedshark shark <os>_<arch>_shark/optimized ++# profiledshark shark <os>_<arch>_shark/profiled ++# productshark shark <os>_<arch>_shark/product ++# + # What you get with each target: + # + # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher +@@ -172,11 +179,13 @@ SUBDIRS_C2 = $(addprefix $(OSNAME + SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS)) + SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS)) + SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) ++SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(BUILDARCH)_shark/,$(TARGETS)) + + TARGETS_C2 = $(TARGETS) + TARGETS_C1 = $(addsuffix 1,$(TARGETS)) + TARGETS_TIERED = $(addsuffix tiered,$(TARGETS)) + TARGETS_CORE = $(addsuffix core,$(TARGETS)) ++TARGETS_SHARK = $(addsuffix shark,$(TARGETS)) + + BUILDTREE_MAKE = $(GAMMADIR)/build/$(OSNAME)/makefiles/buildtree.make + BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) +@@ -190,6 +199,7 @@ all: + @echo " $(TARGETS_C2)" + @echo " $(TARGETS_C1)" + @echo " $(TARGETS_CORE)" ++ @echo " $(TARGETS_SHARK)" + + checks: check_os_version check_j2se_version + +@@ -239,6 +249,10 @@ endif + $(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks + $(BUILDTREE) VARIANT=core + ++$(SUBDIRS_SHARK): $(BUILDTREE_MAKE) ++ $(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks ++ $(BUILDTREE) VARIANT=shark ++ + # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME + + $(TARGETS_C2): $(SUBDIRS_C2) +@@ -267,6 +281,12 @@ endif + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma + ifdef INSTALL + cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install ++endif ++ ++$(TARGETS_SHARK): $(SUBDIRS_SHARK) ++ cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) ++ifdef INSTALL ++ cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install + endif + + # Just build the tree, and nothing else: +@@ -299,7 +319,7 @@ include $(GAMMADIR)/build/$(OSNAME)/make + + #------------------------------------------------------------------------------- + +-.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) ++.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_SHARK) + .PHONY: tree tree1 treecore + .PHONY: all compiler1 compiler2 core + .PHONY: clean clean_compiler1 clean_compiler2 clean_core docs clean_docs +diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/buildtree.make +--- openjdk/hotspot/build/linux/makefiles/buildtree.make Fri Jun 20 13:26:10 2008 +0100 ++++ openjdk/hotspot/build/linux/makefiles/buildtree.make Fri Jun 20 13:26:20 2008 +0100 +@@ -171,8 +171,8 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shar + + ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm + @echo Creating directory list $@ +- $(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \ +- -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ ++ $(QUIETLY) find -L $(GAMMADIR)/src/share/vm/* -prune \ ++ -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find -L {} \ + \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@ + + Makefile: $(BUILDTREE_MAKE) +diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/defs.make +--- openjdk/hotspot/build/linux/makefiles/defs.make Fri Jun 20 13:26:10 2008 +0100 ++++ openjdk/hotspot/build/linux/makefiles/defs.make Fri Jun 20 13:26:39 2008 +0100 +@@ -118,6 +118,7 @@ EXPORT_LIST += $(EXPORT_SERVER_DIR)/libj + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so + ifndef ICEDTEA_CORE_BUILD ++ifndef ICEDTEA_SHARK_BUILD + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +@@ -133,3 +134,4 @@ else + endif + endif + endif ++endif +diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/gcc.make +--- openjdk/hotspot/build/linux/makefiles/gcc.make Fri Jun 20 13:26:10 2008 +0100 ++++ openjdk/hotspot/build/linux/makefiles/gcc.make Fri Jun 20 13:26:20 2008 +0100 +@@ -63,6 +63,9 @@ VM_PICFLAG = $(VM_PICFLAG/$(LINK_ + + ifdef ICEDTEA_ZERO_BUILD + CFLAGS += $(LIBFFI_CFLAGS) ++endif ++ifdef ICEDTEA_SHARK_BUILD ++CFLAGS += $(LLVM_CFLAGS) + endif + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti +diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/top.make +--- openjdk/hotspot/build/linux/makefiles/top.make Fri Jun 20 13:26:10 2008 +0100 ++++ openjdk/hotspot/build/linux/makefiles/top.make Fri Jun 20 13:26:20 2008 +0100 +@@ -71,6 +71,7 @@ Include_DBs/COMPILER1 = $(Include_DBs/ + Include_DBs/COMPILER1 = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 + Include_DBs/COMPILER2 = $(Include_DBs/CORE) $(VM)/includeDB_compiler2 + Include_DBs/TIERED = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 $(VM)/includeDB_compiler2 ++Include_DBs/SHARK = $(Include_DBs/CORE) $(VM)/includeDB_shark + Include_DBs = $(Include_DBs/$(TYPE)) + + Cached_plat = $(GENERATED)/platform.current +diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/vm.make +--- openjdk/hotspot/build/linux/makefiles/vm.make Fri Jun 20 13:26:10 2008 +0100 ++++ openjdk/hotspot/build/linux/makefiles/vm.make Fri Jun 20 13:26:20 2008 +0100 +@@ -149,10 +149,14 @@ mapfile_reorder : mapfile $(REORDERFILE) + rm -f $@ + cat $^ > $@ + +-ifeq ($(ZERO_LIBARCH), ppc64) ++ifdef ICEDTEA_SHARK_BUILD + STATIC_CXX = false + else +- STATIC_CXX = true ++ ifeq ($(ZERO_LIBARCH), ppc64) ++ STATIC_CXX = false ++ else ++ STATIC_CXX = true ++ endif + endif + + ifeq ($(LINK_INTO),AOUT) +@@ -179,6 +183,10 @@ endif + endif + ifdef ICEDTEA_ZERO_BUILD + LIBS_VM += $(LIBFFI_LIBS) ++endif ++ifdef ICEDTEA_SHARK_BUILD ++LFLAGS_VM += $(LLVM_LDFLAGS) ++LIBS_VM += $(LLVM_LIBS) + endif + + LINK_VM = $(LINK_LIB.c) +diff -r 8e41d25d7665 openjdk/hotspot/make/Makefile +--- openjdk/hotspot/make/Makefile Fri Jun 20 13:26:10 2008 +0100 ++++ openjdk/hotspot/make/Makefile Fri Jun 20 13:30:28 2008 +0100 +@@ -99,6 +99,15 @@ all_debugcore: jvmgcore docs export_ + all_debugcore: jvmgcore docs export_debug + all_optimizedcore: optimizedcore docs export_optimized + ++# Shark (C0) targets made available with this Makefile ++SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark ++ ++allshark: all_productshark all_fastdebugshark ++all_productshark: productshark docs export_product ++all_fastdebugshark: fastdebugshark docs export_fastdebug ++all_debugshark: jvmgshark docs export_debug ++all_optimizedshark: optimizedshark docs export_optimized ++ + # Do everything + world: all create_jdk + +@@ -124,6 +133,10 @@ endif + $(CORE_VM_TARGETS): + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT) ++ ++$(SHARK_VM_TARGETS): ++ $(CD) $(GAMMADIR)/make; \ ++ $(MAKE) VM_TARGET=$@ generic_buildshark $(ALT_OUT) + + # Build compiler1 (client) rule, different for platforms + generic_build1: +@@ -172,6 +185,12 @@ generic_buildcore: + $(CD) $(OUTPUTDIR); \ + $(MAKE) -f $(ABS_OS_MAKEFILE) \ + $(MAKE_ARGS) $(VM_TARGET) ++ ++generic_buildshark: ++ $(MKDIR) -p $(OUTPUTDIR) ++ $(CD) $(OUTPUTDIR); \ ++ $(MAKE) -f $(ABS_OS_MAKEFILE) \ ++ $(MAKE_ARGS) $(VM_TARGET) + + # Export file rule + generic_export: $(EXPORT_LIST) +@@ -204,7 +223,11 @@ ifdef ICEDTEA_CORE_BUILD + ifdef ICEDTEA_CORE_BUILD + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core + else ++ifdef ICEDTEA_SHARK_BUILD ++C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark ++else + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 ++endif + endif + C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) + C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) +@@ -214,6 +237,10 @@ ifdef ICEDTEA_CORE_BUILD + MISC_DIR=$(C2_DIR) + GEN_DIR=$(C2_BASE_DIR)/generated + else ++ifdef ICEDTEA_SHARK_BUILD ++ MISC_DIR=$(C2_DIR) ++ GEN_DIR=$(C2_BASE_DIR)/generated ++else + ifeq ($(ARCH_DATA_MODEL), 32) + MISC_DIR=$(C1_DIR) + GEN_DIR=$(C1_BASE_DIR)/generated +@@ -222,6 +249,7 @@ else + GEN_DIR=$(C2_BASE_DIR)/generated + endif + endif ++endif + + # Bin files (windows) + ifeq ($(OSNAME),windows) +d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-sparc-ptracefix.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,34 @@ +diff -up openjdk/hotspot/agent/src/os/linux/libproc.h.BAD openjdk/hotspot/agent/src/os/linux/libproc.h +--- openjdk/hotspot/agent/src/os/linux/libproc.h.BAD 2008-05-29 19:03:34.000000000 -0400 ++++ openjdk/hotspot/agent/src/os/linux/libproc.h 2008-05-29 19:01:45.000000000 -0400 +@@ -34,14 +34,25 @@ + + #if defined(sparc) || defined(sparcv9) + /* +- If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64 +- otherwise it should be from /usr/include/asm-sparc +- These two files define pt_regs structure differently ++ Taken from asm-sparc/ptrace.h and asm-sparc64/ptrace.h + */ + #ifdef _LP64 +-#include "asm-sparc64/ptrace.h" ++struct pt_regs { ++ unsigned long u_regs[16]; /* globals and ins */ ++ unsigned long tstate; ++ unsigned long tpc; ++ unsigned long tnpc; ++ unsigned int y; ++ unsigned int fprs; ++}; + #else +-#include "asm-sparc/ptrace.h" ++struct pt_regs { ++ unsigned long psr; ++ unsigned long pc; ++ unsigned long npc; ++ unsigned long y; ++ unsigned long u_regs[16]; /* globals and ins */ ++}; + #endif + + #endif //sparc or sparcv9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-sparc-trapsfix.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,21 @@ +diff -up openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp.BAD openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp +--- openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp.BAD 2008-05-28 11:49:06.000000000 -0500 ++++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp 2008-05-28 11:51:56.000000000 -0500 +@@ -25,7 +25,16 @@ + #include "incls/_precompiled.incl" + #include "incls/_assembler_linux_sparc.cpp.incl" + +-#include <asm-sparc/traps.h> ++/* Headers for 32bit sparc with a 32bit userland end up in asm/ ++ * Headers for 32bit sparc with a 64bit userland end up in asm-sparc/ ++ * There is no traps.h in asm-sparc64/ ++ */ ++ ++#if defined(__sparc__) && defined(__arch64__) ++# include <asm-sparc/traps.h> ++#else ++# include <asm/traps.h> ++#endif + + bool MacroAssembler::needs_explicit_null_check(intptr_t offset) { + // Since the linux kernel resides at the low end of
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-sparc64-linux.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,93 @@ +diff -up openjdk/hotspot/build/linux/makefiles/sparcv9.make.BAD openjdk/hotspot/build/linux/makefiles/sparcv9.make +--- openjdk/hotspot/build/linux/makefiles/sparcv9.make.BAD 2008-05-29 15:48:44.000000000 -0400 ++++ openjdk/hotspot/build/linux/makefiles/sparcv9.make 2008-05-29 15:48:39.000000000 -0400 +@@ -0,0 +1,27 @@ ++# ++# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This code is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License version 2 only, as ++# published by the Free Software Foundation. ++# ++# This code is distributed in the hope that it will be useful, but WITHOUT ++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# version 2 for more details (a copy is included in the LICENSE file that ++# accompanied this code). ++# ++# You should have received a copy of the GNU General Public License version ++# 2 along with this work; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++# ++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, ++# CA 95054 USA or visit www.sun.com if you need additional information or ++# have any questions. ++# ++# ++ ++# TLS helper, assembled from .s file ++# Not included in includeDB because it has no dependencies ++Obj_Files += linux_sparc.o +diff -up openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp.BAD openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp +--- openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp.BAD 2008-05-29 16:25:10.000000000 -0400 ++++ openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp 2008-05-29 16:32:11.000000000 -0400 +@@ -225,7 +225,7 @@ LIR_Address* LIRGenerator::emit_array_ad + + void LIRGenerator::increment_counter(address counter, int step) { + LIR_Opr pointer = new_register(T_INT); +- __ move(LIR_OprFact::intConst((int)counter), pointer); ++ __ move(LIR_OprFact::intConst((int)*counter), pointer); + LIR_Address* addr = new LIR_Address(pointer, 0, T_INT); + increment_counter(addr, step); + } +@@ -1106,20 +1106,12 @@ void LIRGenerator::trace_block_entry(Blo + + void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, + CodeEmitInfo* info) { +-#ifdef _LP64 +- __ store_mem_reg(value, address, info); +-#else + __ volatile_store_mem_reg(value, address, info); +-#endif + } + + void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, + CodeEmitInfo* info) { +-#ifdef _LP64 +- __ load_mem_reg(address, result, info); +-#else + __ volatile_load_mem_reg(address, result, info); +-#endif + } + + +diff -up openjdk/hotspot/build/linux/makefiles/defs.make.BAD openjdk/hotspot/build/linux/makefiles/defs.make +--- openjdk/hotspot/build/linux/makefiles/defs.make.BAD 2008-05-30 07:03:37.000000000 -0400 ++++ openjdk/hotspot/build/linux/makefiles/defs.make 2008-05-30 07:03:45.000000000 -0400 +@@ -58,8 +58,8 @@ ifeq ($(ARCH), ia64) + HS_ARCH = ia64 + endif + +-# sparc +-ifneq (,$(filter $(ARCH), sparc sparc64)) ++# sparc64 ++ifeq ($(ARCH), sparc64) + ifeq ($(ARCH_DATA_MODEL), 64) + ARCH_DATA_MODEL = 64 + MAKE_ARGS += LP64=1 +@@ -73,6 +73,14 @@ ifneq (,$(filter $(ARCH), sparc sparc64) + HS_ARCH = sparc + endif + ++# sparc ++ifeq ($(ARCH), sparc) ++ ARCH_DATA_MODEL = 32 ++ PLATFORM = linux-sparc ++ VM_PLATFORM = linux_sparc ++ HS_ARCH = sparc ++endif ++ + # x86_64 + ifeq ($(ARCH), x86_64) + ifeq ($(ARCH_DATA_MODEL), 64)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-static-libstdc++.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,33 @@ +diff -r e95eb2395f60 openjdk-ecj/hotspot/build/linux/makefiles/vm.make +--- openjdk/hotspot/build/linux/makefiles/vm.make Fri Nov 09 16:35:08 2007 +0000 ++++ openjdk/hotspot/build/linux/makefiles/vm.make Mon Nov 12 09:09:28 2007 +0000 +@@ -149,6 +149,12 @@ + rm -f $@ + cat $^ > $@ + ++ifeq ($(ZERO_LIBARCH), ppc64) ++ STATIC_CXX = false ++else ++ STATIC_CXX = true ++endif ++ + ifeq ($(LINK_INTO),AOUT) + LIBJVM.o = + LIBJVM_MAPFILE = +@@ -162,8 +168,14 @@ + # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to + # get around library dependency and compatibility issues. Must use gcc not + # g++ to link. +- LFLAGS_VM += $(STATIC_LIBGCC) +- LIBS_VM += $(STATIC_STDCXX) $(LIBS) ++ ifeq ($(STATIC_CXX), true) ++ LFLAGS_VM += $(STATIC_LIBGCC) ++ LIBS_VM += $(STATIC_STDCXX) ++ else ++ LIBS_VM += -lstdc++ ++ endif ++ ++ LIBS_VM += $(LIBS) + endif + + LINK_VM = $(LINK_LIB.c)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-text-relocations.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,25 @@ +--- openjdk/hotspot/build/linux/makefiles/gcc.make.orig 2007-06-17 16:46:45.000000000 -0400 ++++ openjdk/hotspot/build/linux/makefiles/gcc.make 2007-06-17 16:47:12.000000000 -0400 +@@ -46,18 +46,16 @@ + # Compiler flags + + # position-independent code ++ifneq ($(filter ppc ppc64 s390 s390x sparc sparc64,$(ZERO_LIBARCH)),) + PICFLAG = -fPIC ++else ++PICFLAG = -fpic ++endif + + VM_PICFLAG/LIBJVM = $(PICFLAG) + VM_PICFLAG/AOUT = + +-ifneq ($(BUILDARCH), i486) + VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) +-else +-# PIC has significant overhead on x86, build nonpic VM for now. +-# Link JVM at a "good" base location to avoid unnecessary .text patching. +-JVM_BASE_ADDR = 0x06000000 +-endif + + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-use-idx_t.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,282 @@ +--- openjdk/hotspot/src/share/vm/oops/generateOopMap.hpp.orig 2008-07-10 22:04:33.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/oops/generateOopMap.hpp 2008-08-14 23:08:36.000000000 +0200 +@@ -341,7 +341,7 @@ + BasicBlock * _basic_blocks; // Array of basicblock info + int _gc_points; + int _bb_count; +- uintptr_t * _bb_hdr_bits; ++ size_t * _bb_hdr_bits; + + // Basicblocks methods + void initialize_bb (); +--- openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp.orig 2008-08-14 22:58:36.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp 2008-08-14 23:03:33.000000000 +0200 +@@ -374,19 +374,19 @@ + _gc_points = 0; + _bb_count = 0; + int size = binsToHold(method()->code_size()); +- _bb_hdr_bits = NEW_RESOURCE_ARRAY(uintptr_t,size); +- memset(_bb_hdr_bits, 0, size*sizeof(uintptr_t)); ++ _bb_hdr_bits = NEW_RESOURCE_ARRAY(size_t,size); ++ memset(_bb_hdr_bits, 0, size*sizeof(size_t)); + } + + void GenerateOopMap ::set_bbmark_bit(int bci) { + int idx = bci >> LogBitsPerWord; +- uintptr_t bit = (uintptr_t)1 << (bci & (BitsPerWord-1)); ++ size_t bit = (size_t)1 << (bci & (BitsPerWord-1)); + _bb_hdr_bits[idx] |= bit; + } + + void GenerateOopMap ::clear_bbmark_bit(int bci) { + int idx = bci >> LogBitsPerWord; +- uintptr_t bit = (uintptr_t)1 << (bci & (BitsPerWord-1)); ++ size_t bit = (size_t)1 << (bci & (BitsPerWord-1)); + _bb_hdr_bits[idx] &= (~bit); + } + +@@ -1027,7 +1027,7 @@ + "new method size is too small"); + int newWords = binsToHold(new_method_size); + +- uintptr_t * new_bb_hdr_bits = NEW_RESOURCE_ARRAY(uintptr_t, newWords); ++ size_t * new_bb_hdr_bits = NEW_RESOURCE_ARRAY(size_t, newWords); + + BitMap bb_bits(new_bb_hdr_bits, new_method_size); + bb_bits.clear(); +--- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.orig 2008-07-10 22:04:31.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-08-14 22:59:30.000000000 +0200 +@@ -6162,7 +6162,7 @@ + } + assert(_virtual_space.committed_size() == brs.size(), + "didn't reserve backing store for all of CMS bit map?"); +- _bm.set_map((uintptr_t*)_virtual_space.low()); ++ _bm.set_map((size_t*)_virtual_space.low()); + assert(_virtual_space.committed_size() << (_shifter + LogBitsPerByte) >= + _bmWordSize, "inconsistency in bit map sizing"); + _bm.set_size(_bmWordSize >> _shifter); +--- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.orig 2008-07-10 22:04:30.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp 2008-08-14 22:59:30.000000000 +0200 +@@ -569,15 +569,15 @@ + + + MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) : +- _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), +- _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), ++ _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), + analyzer->bit_map_size_bits()), + _last_bci(-1) { + _analyzer = analyzer; +@@ -994,7 +994,7 @@ + } + + MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) { +- MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()), ++ MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()), + _analyzer->bit_map_size_bits()); + answer.set_is_valid(); + +--- openjdk/hotspot/src/share/vm/compiler/methodLiveness.hpp.orig 2008-07-10 22:04:30.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.hpp 2008-08-14 22:59:30.000000000 +0200 +@@ -32,7 +32,7 @@ + bool _is_valid; + + public: +- MethodLivenessResult(uintptr_t* map, idx_t size_in_bits) ++ MethodLivenessResult(idx_t* map, idx_t size_in_bits) + : BitMap(map, size_in_bits) + , _is_valid(false) + {} +--- openjdk/hotspot/src/share/vm/utilities/bitMap.cpp.orig 2008-07-10 22:04:37.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.cpp 2008-08-14 23:06:51.000000000 +0200 +@@ -46,7 +46,7 @@ + void BitMap::resize(idx_t size_in_bits) { + assert(size_in_bits >= 0, "just checking"); + size_t old_size_in_words = size_in_words(); +- uintptr_t* old_map = map(); ++ idx_t* old_map = map(); + _size = size_in_bits; + size_t new_size_in_words = size_in_words(); + _map = NEW_RESOURCE_ARRAY(idx_t, new_size_in_words); +@@ -109,11 +109,11 @@ + } + + inline void BitMap::set_large_range_of_words(idx_t beg, idx_t end) { +- memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(uintptr_t)); ++ memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(idx_t)); + } + + inline void BitMap::clear_large_range_of_words(idx_t beg, idx_t end) { +- memset(_map + beg, 0, (end - beg) * sizeof(uintptr_t)); ++ memset(_map + beg, 0, (end - beg) * sizeof(idx_t)); + } + + inline BitMap::idx_t BitMap::word_index_round_up(idx_t bit) const { +@@ -285,11 +285,11 @@ + + bool BitMap::contains(const BitMap other) const { + assert(size() == other.size(), "must have same size"); +- uintptr_t* dest_map = map(); +- uintptr_t* other_map = other.map(); ++ idx_t* dest_map = map(); ++ idx_t* other_map = other.map(); + idx_t size = size_in_words(); + for (idx_t index = 0; index < size_in_words(); index++) { +- uintptr_t word_union = dest_map[index] | other_map[index]; ++ idx_t word_union = dest_map[index] | other_map[index]; + // If this has more bits set than dest_map[index], then other is not a + // subset. + if (word_union != dest_map[index]) return false; +@@ -299,8 +299,8 @@ + + bool BitMap::intersects(const BitMap other) const { + assert(size() == other.size(), "must have same size"); +- uintptr_t* dest_map = map(); +- uintptr_t* other_map = other.map(); ++ idx_t* dest_map = map(); ++ idx_t* other_map = other.map(); + idx_t size = size_in_words(); + for (idx_t index = 0; index < size_in_words(); index++) { + if ((dest_map[index] & other_map[index]) != 0) return true; +@@ -411,24 +411,24 @@ + } + + bool BitMap::is_full() const { +- uintptr_t* word = map(); ++ idx_t* word = map(); + idx_t rest = size(); + for (; rest >= (idx_t) BitsPerWord; rest -= BitsPerWord) { +- if (*word != (uintptr_t) AllBits) return false; ++ if (*word != (idx_t) AllBits) return false; + word++; + } +- return rest == 0 || (*word | ~right_n_bits((int)rest)) == (uintptr_t) AllBits; ++ return rest == 0 || (*word | ~right_n_bits((int)rest)) == (idx_t) AllBits; + } + + + bool BitMap::is_empty() const { +- uintptr_t* word = map(); ++ idx_t* word = map(); + idx_t rest = size(); + for (; rest >= (idx_t) BitsPerWord; rest -= BitsPerWord) { +- if (*word != (uintptr_t) NoBits) return false; ++ if (*word != (idx_t) NoBits) return false; + word++; + } +- return rest == 0 || (*word & right_n_bits((int)rest)) == (uintptr_t) NoBits; ++ return rest == 0 || (*word & right_n_bits((int)rest)) == (idx_t) NoBits; + } + + void BitMap::clear_large() { +@@ -448,7 +448,7 @@ + offset < rightOffset && index < endIndex; + offset = (++index) << LogBitsPerWord) { + idx_t rest = map(index) >> (offset & (BitsPerWord - 1)); +- for (; offset < rightOffset && rest != (uintptr_t)NoBits; offset++) { ++ for (; offset < rightOffset && rest != (idx_t)NoBits; offset++) { + if (rest & 1) { + blk->do_bit(offset); + // resample at each closure application +@@ -481,7 +481,7 @@ + // check bits including and to the _left_ of offset's position + idx_t pos = bit_in_word(res_offset); + idx_t res = map(index) >> pos; +- if (res != (uintptr_t)NoBits) { ++ if (res != (idx_t)NoBits) { + // find the position of the 1-bit + for (; !(res & 1); res_offset++) { + res = res >> 1; +@@ -492,7 +492,7 @@ + // skip over all word length 0-bit runs + for (index++; index < r_index; index++) { + res = map(index); +- if (res != (uintptr_t)NoBits) { ++ if (res != (idx_t)NoBits) { + // found a 1, return the offset + for (res_offset = index << LogBitsPerWord; !(res & 1); + res_offset++) { +@@ -523,7 +523,7 @@ + idx_t pos = res_offset & (BitsPerWord - 1); + idx_t res = (map(index) >> pos) | left_n_bits((int)pos); + +- if (res != (uintptr_t)AllBits) { ++ if (res != (idx_t)AllBits) { + // find the position of the 0-bit + for (; res & 1; res_offset++) { + res = res >> 1; +@@ -534,7 +534,7 @@ + // skip over all word length 1-bit runs + for (index++; index < r_index; index++) { + res = map(index); +- if (res != (uintptr_t)AllBits) { ++ if (res != (idx_t)AllBits) { + // found a 0, return the offset + for (res_offset = index << LogBitsPerWord; res & 1; + res_offset++) { +@@ -561,7 +561,7 @@ + #endif + + +-BitMap2D::BitMap2D(uintptr_t* map, idx_t size_in_slots, idx_t bits_per_slot) ++BitMap2D::BitMap2D(idx_t* map, idx_t size_in_slots, idx_t bits_per_slot) + : _bits_per_slot(bits_per_slot) + , _map(map, size_in_slots * bits_per_slot) + { +--- openjdk/hotspot/src/share/vm/utilities/bitMap.hpp.orig 2008-07-10 22:04:37.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp 2008-08-14 23:08:18.000000000 +0200 +@@ -35,7 +35,7 @@ + + + // Operations for bitmaps represented as arrays of unsigned 32- or 64-bit +-// integers (uintptr_t). ++// integers (size_t). + // + // Bit offsets are numbered from 0 to size-1 + +@@ -82,7 +82,7 @@ + + // Set a word to a specified value or to all ones; clear a word. + void set_word (idx_t word, idx_t val) { _map[word] = val; } +- void set_word (idx_t word) { set_word(word, ~(uintptr_t)0); } ++ void set_word (idx_t word) { set_word(word, ~(idx_t)0); } + void clear_word(idx_t word) { _map[word] = 0; } + + // Utilities for ranges of bits. Ranges are half-open [beg, end). +@@ -313,7 +313,7 @@ + + public: + // Construction. bits_per_slot must be greater than 0. +- BitMap2D(uintptr_t* map, idx_t size_in_slots, idx_t bits_per_slot); ++ BitMap2D(idx_t* map, idx_t size_in_slots, idx_t bits_per_slot); + + // Allocates necessary data structure in resource area. bits_per_slot must be greater than 0. + BitMap2D(idx_t size_in_slots, idx_t bits_per_slot); +@@ -366,13 +366,13 @@ + + + inline void BitMap::set_range_of_words(idx_t beg, idx_t end) { +- uintptr_t* map = _map; +- for (idx_t i = beg; i < end; ++i) map[i] = ~(uintptr_t)0; ++ idx_t* map = _map; ++ for (idx_t i = beg; i < end; ++i) map[i] = ~(idx_t)0; + } + + + inline void BitMap::clear_range_of_words(idx_t beg, idx_t end) { +- uintptr_t* map = _map; ++ idx_t* map = _map; + for (idx_t i = beg; i < end; ++i) map[i] = 0; + } +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-version.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,36 @@ +--- openjdk/hotspot/src/share/vm/utilities/vmError.cpp~ 2008-08-28 10:23:18.000000000 +0200 ++++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2008-10-21 14:05:12.000000000 +0200 +@@ -168,7 +168,8 @@ + + static void print_bug_submit_message(outputStream *out, Thread *thread) { + if (out == NULL) return; +- out->print_raw_cr("# If you would like to submit a bug report, please visit:"); ++ out->print_raw_cr("# If you would like to submit a bug report, please include"); ++ out->print_raw_cr("# instructions how to reproduce the bug and visit:"); + out->print_raw ("# "); + out->print_raw_cr(Arguments::java_vendor_url_bug()); + // If the crash is in native code, encourage user to submit a bug to the +@@ -340,6 +341,9 @@ + Abstract_VM_Version::vm_info_string(), + Abstract_VM_Version::vm_platform_string() + ); ++#ifdef DISTRIBUTION_ID ++ st->print_cr("# Distribution: %s", DISTRIBUTION_ID); ++#endif + + STEP(60, "(printing problematic frame)") + +--- openjdk/hotspot/build/linux/makefiles/vm.make~ 2008-08-28 10:22:55.000000000 +0200 ++++ openjdk/hotspot/build/linux/makefiles/vm.make 2008-10-21 14:03:36.000000000 +0200 +@@ -111,6 +111,10 @@ + ${JRE_VERSION} \ + ${VM_DISTRO} + ++ifdef DISTRIBUTION_ID ++CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\"" ++endif ++ + # CFLAGS_WARN holds compiler options to suppress/enable warnings. + CFLAGS += $(CFLAGS_WARN/BYFILE) + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-hotspot-original-zero-build.patch Mon Dec 01 17:30:31 2008 +0000 @@ -0,0 +1,133 @@ +diff -ru openjdk/hotspot/build/linux/makefiles/defs.make openjdk/hotspot/build/linux/makefiles/defs.make +--- openjdk/hotspot/build/linux/makefiles/defs.make 2008-03-13 13:57:48.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/defs.make 2008-03-13 13:37:14.000000000 +0000 +@@ -37,6 +37,18 @@ + ARCH_DATA_MODEL ?= 32 + endif + ++# zero ++ifdef ICEDTEA_ZERO_BUILD ++ ARCH_DATA_MODEL = $(ZERO_BITSPERWORD) ++ ifeq ($(ARCH_DATA_MODEL), 64) ++ MAKE_ARGS += LP64=1 ++ endif ++ PLATFORM = linux-zero ++ VM_PLATFORM = linux_zero ++ HS_ARCH = zero ++ ARCH = zero ++endif ++ + # ia64 + ifeq ($(ARCH), ia64) + ARCH_DATA_MODEL = 64 +diff -ru openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make +--- openjdk/hotspot/make/defs.make 2008-02-28 10:02:25.000000000 +0000 ++++ openjdk/hotspot/make/defs.make 2008-03-13 13:37:14.000000000 +0000 +@@ -199,13 +199,14 @@ + # Use uname output for SRCARCH, but deal with platform differences. If ARCH + # is not explicitly listed below, it is treated as i486. Also note amd64 is + # a separate src arch, so LP64 && i486 ==> amd64. +- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64,$(ARCH))) ++ SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 zero,$(ARCH))) + ARCH/ = i486 + ARCH/sparc = sparc + ARCH/sparc64= sparc + ARCH/ia64 = ia64 + ARCH/amd64 = amd64 + ARCH/x86_64 = amd64 ++ ARCH/zero = zero + ifdef LP64 + ifeq ($(SRCARCH), i486) + SRCARCH = amd64 +@@ -227,8 +228,9 @@ + LIBARCH/sparc = sparc + LIBARCH/sparcv9 = sparcv9 + LIBARCH/ia64 = ia64 ++ LIBARCH/zero = $(ZERO_LIBARCH) + +- LP64_ARCH = sparcv9 amd64 ia64 ++ LP64_ARCH = sparcv9 amd64 ia64 zero + endif + + # Required make macro settings for all platforms +diff -ru openjdk/hotspot/build/linux/makefiles/buildtree.make openjdk/hotspot/build/linux/makefiles/buildtree.make +--- openjdk/hotspot/build/linux/makefiles/buildtree.make 2008-02-28 10:02:19.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/buildtree.make 2008-03-13 13:37:14.000000000 +0000 +@@ -277,6 +277,7 @@ + DATA_MODE/sparcv9 = 64 + DATA_MODE/amd64 = 64 + DATA_MODE/ia64 = 64 ++DATA_MODE/zero = $(ZERO_BITSPERWORD) + + JAVA_FLAG/32 = -d32 + JAVA_FLAG/64 = -d64 +diff -ru openjdk/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make +--- openjdk/hotspot/build/linux/makefiles/gcc.make 2008-03-13 13:57:48.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/gcc.make 2008-03-13 13:37:20.000000000 +0000 +@@ -73,6 +76,7 @@ + ARCHFLAG/ia64 = + ARCHFLAG/sparc = -m32 -mcpu=v9 + ARCHFLAG/sparcv9 = -m64 -mcpu=v9 ++ARCHFLAG/zero = $(ZERO_ARCHFLAG) + + CFLAGS += $(ARCHFLAG) + AOUT_FLAGS += $(ARCHFLAG) +diff -ru openjdk/hotspot/build/linux/makefiles/sa.make openjdk/hotspot/build/linux/makefiles/sa.make +--- openjdk/hotspot/build/linux/makefiles/sa.make 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/sa.make 2007-11-08 11:36:15.000000000 +0000 +@@ -51,10 +51,10 @@ + SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties + + # if $(AGENT_DIR) does not exist, we don't build SA +-# also, we don't build SA on Itanium. ++# also, we don't build SA on Itanium or zero. + + all: +- if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ ++ if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ + $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \ + fi + +diff -ru openjdk/hotspot/build/linux/makefiles/saproc.make openjdk/hotspot/build/linux/makefiles/saproc.make +--- openjdk/hotspot/build/linux/makefiles/saproc.make 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/saproc.make 2007-11-08 11:36:15.000000000 +0000 +@@ -44,10 +44,10 @@ + DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) + + # if $(AGENT_DIR) does not exist, we don't build SA +-# also, we don't build SA on Itanium. ++# also, we don't build SA on Itanium or zero. + + checkAndBuildSA: +- $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ ++ $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ + $(MAKE) -f vm.make $(LIBSAPROC); \ + fi + +diff -ru openjdk/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make +--- openjdk/hotspot/build/linux/makefiles/gcc.make 2008-02-17 15:37:26.000000000 -0500 ++++ openjdk/hotspot/build/linux/makefiles/gcc.make 2008-02-17 15:37:58.000000000 -0500 +@@ -57,6 +57,9 @@ + + VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) + ++ifdef ICEDTEA_ZERO_BUILD ++CFLAGS += $(LIBFFI_CFLAGS) ++endif + CFLAGS += $(VM_PICFLAG) + CFLAGS += -fno-rtti + CFLAGS += -fno-exceptions +diff -ru openjdk-ecj/hotspot/build/linux/makefiles/vm.make openjdk-ecj.new/hotspot/build/linux/makefiles/vm.make +--- openjdk/hotspot/build/linux/makefiles/vm.make 2008-02-29 09:46:55.000000000 -0500 ++++ openjdk/hotspot/build/linux/makefiles/vm.make 2008-02-29 09:47:30.000000000 -0500 +@@ -177,6 +177,9 @@ + + LIBS_VM += $(LIBS) + endif ++ifdef ICEDTEA_ZERO_BUILD ++LIBS_VM += $(LIBFFI_LIBS) ++endif + + LINK_VM = $(LINK_LIB.c) + +
--- a/patches/icedtea-hotspot-params-cast-size_t.patch Mon Dec 01 00:34:53 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ ---- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp.old 2008-08-03 13:12:01.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp 2008-08-03 14:58:48.000000000 +0200 -@@ -63,7 +63,7 @@ - _last_used = current_live; - - // We have different alignment constraints than the rest of the heap. -- const size_t alignment = MAX2(MinPermHeapExpansion, -+ const size_t alignment = MAX2((size_t) MinPermHeapExpansion, - virtual_space()->alignment()); - - // Compute the desired size: ---- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.old 2008-08-03 13:12:01.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2008-08-03 14:58:15.000000000 +0200 -@@ -925,8 +925,8 @@ - void PSParallelCompact::initialize_dead_wood_limiter() - { - const size_t max = 100; -- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0; -- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; -+ _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0; -+ _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0; - _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev); - DEBUG_ONLY(_dwl_initialized = true;) - _dwl_adjustment = normal_distribution(1.0); ---- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.old 2008-08-03 13:12:01.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-08-03 14:39:46.000000000 +0200 -@@ -926,7 +926,7 @@ - if (free_percentage < desired_free_percentage) { - size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); - assert(desired_capacity >= capacity(), "invalid expansion size"); -- expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes); -+ expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes); - } - if (expand_bytes > 0) { - if (PrintGCDetails && Verbose) { -@@ -5963,7 +5963,7 @@ - HeapWord* curAddr = _markBitMap.startWord(); - while (curAddr < _markBitMap.endWord()) { - size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr); -- MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining)); -+ MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining)); - _markBitMap.clear_large_range(chunk); - if (ConcurrentMarkSweepThread::should_yield() && - !foregroundGCIsActive() && -@@ -6251,7 +6251,7 @@ - return; - } - // Double capacity if possible -- size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax); -+ size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax); - // Do not give up existing stack until we have managed to - // get the double capacity that we desired. - ReservedSpace rs(ReservedSpace::allocation_align_size_up( ---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp.old 2008-08-03 13:49:24.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2008-08-03 14:04:48.000000000 +0200 -@@ -1038,7 +1038,7 @@ - // for "short" pauses ~ 4M*ParallelGCThreads - if (FLAG_IS_DEFAULT(MaxNewSize)) { // MaxNewSize not set at command-line - if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line -- FLAG_SET_DEFAULT(MaxNewSize, MAX2(NewSize, preferred_max_new_size)); -+ FLAG_SET_DEFAULT(MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size)); - } else { - FLAG_SET_DEFAULT(MaxNewSize, preferred_max_new_size); - } -@@ -1047,7 +1047,7 @@ - // Old to Young gen size so as to shift the collection load - // to the old generation concurrent collector - if (FLAG_IS_DEFAULT(NewRatio)) { -- FLAG_SET_DEFAULT(NewRatio, MAX2(NewRatio, new_ratio)); -+ FLAG_SET_DEFAULT(NewRatio, MAX2((intx) NewRatio, new_ratio)); - - size_t min_new = align_size_up(ScaleForWordSize(min_new_default), os::vm_page_size()); - size_t prev_initial_size = initial_heap_size(); -@@ -1069,15 +1069,15 @@ - // Unless explicitly requested otherwise, make young gen - // at least min_new, and at most preferred_max_new_size. - if (FLAG_IS_DEFAULT(NewSize)) { -- FLAG_SET_DEFAULT(NewSize, MAX2(NewSize, min_new)); -- FLAG_SET_DEFAULT(NewSize, MIN2(preferred_max_new_size, NewSize)); -+ FLAG_SET_DEFAULT(NewSize, MAX2((size_t) NewSize, min_new)); -+ FLAG_SET_DEFAULT(NewSize, MIN2(preferred_max_new_size, (size_t) NewSize)); - } - // Unless explicitly requested otherwise, size old gen - // so that it's at least 3X of NewSize to begin with; - // later NewRatio will decide how it grows; see above. - if (FLAG_IS_DEFAULT(OldSize)) { - if (max_heap > NewSize) { -- FLAG_SET_DEFAULT(OldSize, MIN2(3*NewSize, max_heap - NewSize)); -+ FLAG_SET_DEFAULT(OldSize, MIN2((size_t) (3*NewSize), max_heap - (size_t) NewSize)); - } - } - } ---- openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp.old 2008-08-03 13:12:01.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp 2008-08-03 14:21:27.000000000 +0200 -@@ -233,13 +233,13 @@ - // as a lower bound as with - // _min_gen0_size = MIN2(_min_gen0_size, MaxNewSize); - // and 640k seemed too small a young generation. -- _min_gen0_size = MIN2(MAX2(_min_gen0_size, NewSize), MaxNewSize); -+ _min_gen0_size = MIN2(MAX2(_min_gen0_size, (size_t) NewSize), (size_t) MaxNewSize); - } - - // Parameters are valid, compute area sizes. - size_t max_new_size = align_size_down(_max_heap_byte_size / (NewRatio+1), - min_alignment()); -- max_new_size = MIN2(MAX2(max_new_size, _min_gen0_size), MaxNewSize); -+ max_new_size = MIN2(MAX2(max_new_size, _min_gen0_size), (size_t) MaxNewSize); - - // desired_new_size is used to set the initial size. The - // initial size must be greater than the minimum size. ---- openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.old 2008-08-03 13:12:02.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2008-08-03 15:02:15.000000000 +0200 -@@ -222,7 +222,7 @@ - size_t init_sz; - - if (TLABSize > 0) { -- init_sz = MIN2(TLABSize / HeapWordSize, max_size()); -+ init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size()); - } else if (global_stats() == NULL) { - // Startup issue - main thread initialized before heap initialized. - init_sz = min_size();
--- a/patches/icedtea-hotspot-use-idx_t.patch Mon Dec 01 00:34:53 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,282 +0,0 @@ ---- openjdk/hotspot/src/share/vm/oops/generateOopMap.hpp.orig 2008-07-10 22:04:33.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/oops/generateOopMap.hpp 2008-08-14 23:08:36.000000000 +0200 -@@ -341,7 +341,7 @@ - BasicBlock * _basic_blocks; // Array of basicblock info - int _gc_points; - int _bb_count; -- uintptr_t * _bb_hdr_bits; -+ size_t * _bb_hdr_bits; - - // Basicblocks methods - void initialize_bb (); ---- openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp.orig 2008-08-14 22:58:36.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp 2008-08-14 23:03:33.000000000 +0200 -@@ -374,19 +374,19 @@ - _gc_points = 0; - _bb_count = 0; - int size = binsToHold(method()->code_size()); -- _bb_hdr_bits = NEW_RESOURCE_ARRAY(uintptr_t,size); -- memset(_bb_hdr_bits, 0, size*sizeof(uintptr_t)); -+ _bb_hdr_bits = NEW_RESOURCE_ARRAY(size_t,size); -+ memset(_bb_hdr_bits, 0, size*sizeof(size_t)); - } - - void GenerateOopMap ::set_bbmark_bit(int bci) { - int idx = bci >> LogBitsPerWord; -- uintptr_t bit = (uintptr_t)1 << (bci & (BitsPerWord-1)); -+ size_t bit = (size_t)1 << (bci & (BitsPerWord-1)); - _bb_hdr_bits[idx] |= bit; - } - - void GenerateOopMap ::clear_bbmark_bit(int bci) { - int idx = bci >> LogBitsPerWord; -- uintptr_t bit = (uintptr_t)1 << (bci & (BitsPerWord-1)); -+ size_t bit = (size_t)1 << (bci & (BitsPerWord-1)); - _bb_hdr_bits[idx] &= (~bit); - } - -@@ -1027,7 +1027,7 @@ - "new method size is too small"); - int newWords = binsToHold(new_method_size); - -- uintptr_t * new_bb_hdr_bits = NEW_RESOURCE_ARRAY(uintptr_t, newWords); -+ size_t * new_bb_hdr_bits = NEW_RESOURCE_ARRAY(size_t, newWords); - - BitMap bb_bits(new_bb_hdr_bits, new_method_size); - bb_bits.clear(); ---- openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.orig 2008-07-10 22:04:31.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2008-08-14 22:59:30.000000000 +0200 -@@ -6162,7 +6162,7 @@ - } - assert(_virtual_space.committed_size() == brs.size(), - "didn't reserve backing store for all of CMS bit map?"); -- _bm.set_map((uintptr_t*)_virtual_space.low()); -+ _bm.set_map((size_t*)_virtual_space.low()); - assert(_virtual_space.committed_size() << (_shifter + LogBitsPerByte) >= - _bmWordSize, "inconsistency in bit map sizing"); - _bm.set_size(_bmWordSize >> _shifter); ---- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.orig 2008-07-10 22:04:30.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp 2008-08-14 22:59:30.000000000 +0200 -@@ -569,15 +569,15 @@ - - - MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) : -- _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), -- _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), -- _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), -- _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), -- _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), -+ _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()), - analyzer->bit_map_size_bits()), - _last_bci(-1) { - _analyzer = analyzer; -@@ -994,7 +994,7 @@ - } - - MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) { -- MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()), -+ MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()), - _analyzer->bit_map_size_bits()); - answer.set_is_valid(); - ---- openjdk/hotspot/src/share/vm/compiler/methodLiveness.hpp.orig 2008-07-10 22:04:30.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.hpp 2008-08-14 22:59:30.000000000 +0200 -@@ -32,7 +32,7 @@ - bool _is_valid; - - public: -- MethodLivenessResult(uintptr_t* map, idx_t size_in_bits) -+ MethodLivenessResult(idx_t* map, idx_t size_in_bits) - : BitMap(map, size_in_bits) - , _is_valid(false) - {} ---- openjdk/hotspot/src/share/vm/utilities/bitMap.cpp.orig 2008-07-10 22:04:37.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/utilities/bitMap.cpp 2008-08-14 23:06:51.000000000 +0200 -@@ -46,7 +46,7 @@ - void BitMap::resize(idx_t size_in_bits) { - assert(size_in_bits >= 0, "just checking"); - size_t old_size_in_words = size_in_words(); -- uintptr_t* old_map = map(); -+ idx_t* old_map = map(); - _size = size_in_bits; - size_t new_size_in_words = size_in_words(); - _map = NEW_RESOURCE_ARRAY(idx_t, new_size_in_words); -@@ -109,11 +109,11 @@ - } - - inline void BitMap::set_large_range_of_words(idx_t beg, idx_t end) { -- memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(uintptr_t)); -+ memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(idx_t)); - } - - inline void BitMap::clear_large_range_of_words(idx_t beg, idx_t end) { -- memset(_map + beg, 0, (end - beg) * sizeof(uintptr_t)); -+ memset(_map + beg, 0, (end - beg) * sizeof(idx_t)); - } - - inline BitMap::idx_t BitMap::word_index_round_up(idx_t bit) const { -@@ -285,11 +285,11 @@ - - bool BitMap::contains(const BitMap other) const { - assert(size() == other.size(), "must have same size"); -- uintptr_t* dest_map = map(); -- uintptr_t* other_map = other.map(); -+ idx_t* dest_map = map(); -+ idx_t* other_map = other.map(); - idx_t size = size_in_words(); - for (idx_t index = 0; index < size_in_words(); index++) { -- uintptr_t word_union = dest_map[index] | other_map[index]; -+ idx_t word_union = dest_map[index] | other_map[index]; - // If this has more bits set than dest_map[index], then other is not a - // subset. - if (word_union != dest_map[index]) return false; -@@ -299,8 +299,8 @@ - - bool BitMap::intersects(const BitMap other) const { - assert(size() == other.size(), "must have same size"); -- uintptr_t* dest_map = map(); -- uintptr_t* other_map = other.map(); -+ idx_t* dest_map = map(); -+ idx_t* other_map = other.map(); - idx_t size = size_in_words(); - for (idx_t index = 0; index < size_in_words(); index++) { - if ((dest_map[index] & other_map[index]) != 0) return true; -@@ -411,24 +411,24 @@ - } - - bool BitMap::is_full() const { -- uintptr_t* word = map(); -+ idx_t* word = map(); - idx_t rest = size(); - for (; rest >= (idx_t) BitsPerWord; rest -= BitsPerWord) { -- if (*word != (uintptr_t) AllBits) return false; -+ if (*word != (idx_t) AllBits) return false; - word++; - } -- return rest == 0 || (*word | ~right_n_bits((int)rest)) == (uintptr_t) AllBits; -+ return rest == 0 || (*word | ~right_n_bits((int)rest)) == (idx_t) AllBits; - } - - - bool BitMap::is_empty() const { -- uintptr_t* word = map(); -+ idx_t* word = map(); - idx_t rest = size(); - for (; rest >= (idx_t) BitsPerWord; rest -= BitsPerWord) { -- if (*word != (uintptr_t) NoBits) return false; -+ if (*word != (idx_t) NoBits) return false; - word++; - } -- return rest == 0 || (*word & right_n_bits((int)rest)) == (uintptr_t) NoBits; -+ return rest == 0 || (*word & right_n_bits((int)rest)) == (idx_t) NoBits; - } - - void BitMap::clear_large() { -@@ -448,7 +448,7 @@ - offset < rightOffset && index < endIndex; - offset = (++index) << LogBitsPerWord) { - idx_t rest = map(index) >> (offset & (BitsPerWord - 1)); -- for (; offset < rightOffset && rest != (uintptr_t)NoBits; offset++) { -+ for (; offset < rightOffset && rest != (idx_t)NoBits; offset++) { - if (rest & 1) { - blk->do_bit(offset); - // resample at each closure application -@@ -481,7 +481,7 @@ - // check bits including and to the _left_ of offset's position - idx_t pos = bit_in_word(res_offset); - idx_t res = map(index) >> pos; -- if (res != (uintptr_t)NoBits) { -+ if (res != (idx_t)NoBits) { - // find the position of the 1-bit - for (; !(res & 1); res_offset++) { - res = res >> 1; -@@ -492,7 +492,7 @@ - // skip over all word length 0-bit runs - for (index++; index < r_index; index++) { - res = map(index); -- if (res != (uintptr_t)NoBits) { -+ if (res != (idx_t)NoBits) { - // found a 1, return the offset - for (res_offset = index << LogBitsPerWord; !(res & 1); - res_offset++) { -@@ -523,7 +523,7 @@ - idx_t pos = res_offset & (BitsPerWord - 1); - idx_t res = (map(index) >> pos) | left_n_bits((int)pos); - -- if (res != (uintptr_t)AllBits) { -+ if (res != (idx_t)AllBits) { - // find the position of the 0-bit - for (; res & 1; res_offset++) { - res = res >> 1; -@@ -534,7 +534,7 @@ - // skip over all word length 1-bit runs - for (index++; index < r_index; index++) { - res = map(index); -- if (res != (uintptr_t)AllBits) { -+ if (res != (idx_t)AllBits) { - // found a 0, return the offset - for (res_offset = index << LogBitsPerWord; res & 1; - res_offset++) { -@@ -561,7 +561,7 @@ - #endif - - --BitMap2D::BitMap2D(uintptr_t* map, idx_t size_in_slots, idx_t bits_per_slot) -+BitMap2D::BitMap2D(idx_t* map, idx_t size_in_slots, idx_t bits_per_slot) - : _bits_per_slot(bits_per_slot) - , _map(map, size_in_slots * bits_per_slot) - { ---- openjdk/hotspot/src/share/vm/utilities/bitMap.hpp.orig 2008-07-10 22:04:37.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp 2008-08-14 23:08:18.000000000 +0200 -@@ -35,7 +35,7 @@ - - - // Operations for bitmaps represented as arrays of unsigned 32- or 64-bit --// integers (uintptr_t). -+// integers (size_t). - // - // Bit offsets are numbered from 0 to size-1 - -@@ -82,7 +82,7 @@ - - // Set a word to a specified value or to all ones; clear a word. - void set_word (idx_t word, idx_t val) { _map[word] = val; } -- void set_word (idx_t word) { set_word(word, ~(uintptr_t)0); } -+ void set_word (idx_t word) { set_word(word, ~(idx_t)0); } - void clear_word(idx_t word) { _map[word] = 0; } - - // Utilities for ranges of bits. Ranges are half-open [beg, end). -@@ -313,7 +313,7 @@ - - public: - // Construction. bits_per_slot must be greater than 0. -- BitMap2D(uintptr_t* map, idx_t size_in_slots, idx_t bits_per_slot); -+ BitMap2D(idx_t* map, idx_t size_in_slots, idx_t bits_per_slot); - - // Allocates necessary data structure in resource area. bits_per_slot must be greater than 0. - BitMap2D(idx_t size_in_slots, idx_t bits_per_slot); -@@ -366,13 +366,13 @@ - - - inline void BitMap::set_range_of_words(idx_t beg, idx_t end) { -- uintptr_t* map = _map; -- for (idx_t i = beg; i < end; ++i) map[i] = ~(uintptr_t)0; -+ idx_t* map = _map; -+ for (idx_t i = beg; i < end; ++i) map[i] = ~(idx_t)0; - } - - - inline void BitMap::clear_range_of_words(idx_t beg, idx_t end) { -- uintptr_t* map = _map; -+ idx_t* map = _map; - for (idx_t i = beg; i < end; ++i) map[i] = 0; - } -
--- a/patches/icedtea-memory-limits.patch Mon Dec 01 00:34:53 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ ---- penjdk6/hotspot/src/cpu/i486/vm/c2_globals_i486.hpp 2008-02-12 04:14:17.000000000 -0500 -+++ openjdk/hotspot/src/cpu/i486/vm/c2_globals_i486.hpp 2008-02-14 16:32:33.000000000 -0500 -@@ -79,6 +79,6 @@ - define_pd_global(uintx,CodeCacheMinBlockLength, 4); - - define_pd_global(uintx, PermSize, ScaleForWordSize(16*M)); --define_pd_global(uintx, MaxPermSize, ScaleForWordSize(64*M)); -+define_pd_global(uintx, MaxPermSize, ScaleForWordSize(128*M)); - - define_pd_global(bool, NeverActAsServerClassMachine, false); ---- penjdk6/hotspot/src/share/vm/runtime/globals.hpp 2008-02-12 04:14:24.000000000 -0500 -+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp 2008-02-14 16:34:00.000000000 -0500 -@@ -2606,7 +2606,7 @@ - "an OS lock") \ - \ - /* gc parameters */ \ -- product(uintx, MaxHeapSize, ScaleForWordSize(64*M), \ -+ product(uintx, MaxHeapSize, ScaleForWordSize(512*M), \ - "Default maximum size for object heap (in bytes)") \ - \ - product_pd(uintx, NewSize, \
--- a/patches/icedtea-shark-build.patch Mon Dec 01 00:34:53 2008 +0100 +++ b/patches/icedtea-shark-build.patch Mon Dec 01 17:30:31 2008 +0000 @@ -11,238 +11,7 @@ HOTSPOT_BUILD_ARGUMENTS += $(COMMON_BUILD_ARGUMENTS) HOTSPOT_BUILD_ARGUMENTS += ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR) -diff -r 8e41d25d7665 openjdk/hotspot/build/linux/Makefile ---- openjdk/hotspot/build/linux/Makefile Fri Jun 20 13:26:10 2008 +0100 -+++ openjdk/hotspot/build/linux/Makefile Fri Jun 20 13:26:20 2008 +0100 -@@ -152,6 +152,13 @@ endif - # profiledcore core <os>_<arch>_core/profiled - # productcore core <os>_<arch>_core/product - # -+# debugshark shark <os>_<arch>_shark/debug -+# fastdebugshark shark <os>_<arch>_shark/fastdebug -+# jvmgshark shark <os>_<arch>_shark/jvmg -+# optimizedshark shark <os>_<arch>_shark/optimized -+# profiledshark shark <os>_<arch>_shark/profiled -+# productshark shark <os>_<arch>_shark/product -+# - # What you get with each target: - # - # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher -@@ -172,11 +179,13 @@ SUBDIRS_C2 = $(addprefix $(OSNAME - SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS)) - SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS)) - SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) -+SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(BUILDARCH)_shark/,$(TARGETS)) - - TARGETS_C2 = $(TARGETS) - TARGETS_C1 = $(addsuffix 1,$(TARGETS)) - TARGETS_TIERED = $(addsuffix tiered,$(TARGETS)) - TARGETS_CORE = $(addsuffix core,$(TARGETS)) -+TARGETS_SHARK = $(addsuffix shark,$(TARGETS)) - - BUILDTREE_MAKE = $(GAMMADIR)/build/$(OSNAME)/makefiles/buildtree.make - BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) -@@ -190,6 +199,7 @@ all: - @echo " $(TARGETS_C2)" - @echo " $(TARGETS_C1)" - @echo " $(TARGETS_CORE)" -+ @echo " $(TARGETS_SHARK)" - - checks: check_os_version check_j2se_version - -@@ -239,6 +249,10 @@ endif - $(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks - $(BUILDTREE) VARIANT=core - -+$(SUBDIRS_SHARK): $(BUILDTREE_MAKE) -+ $(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks -+ $(BUILDTREE) VARIANT=shark -+ - # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME - - $(TARGETS_C2): $(SUBDIRS_C2) -@@ -267,6 +281,12 @@ endif - cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma - ifdef INSTALL - cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install -+endif -+ -+$(TARGETS_SHARK): $(SUBDIRS_SHARK) -+ cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) -+ifdef INSTALL -+ cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install - endif - - # Just build the tree, and nothing else: -@@ -299,7 +319,7 @@ include $(GAMMADIR)/build/$(OSNAME)/make - - #------------------------------------------------------------------------------- - --.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) -+.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_SHARK) - .PHONY: tree tree1 treecore - .PHONY: all compiler1 compiler2 core - .PHONY: clean clean_compiler1 clean_compiler2 clean_core docs clean_docs -diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/buildtree.make ---- openjdk/hotspot/build/linux/makefiles/buildtree.make Fri Jun 20 13:26:10 2008 +0100 -+++ openjdk/hotspot/build/linux/makefiles/buildtree.make Fri Jun 20 13:26:20 2008 +0100 -@@ -171,8 +171,8 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shar - - ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm - @echo Creating directory list $@ -- $(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \ -- -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \ -+ $(QUIETLY) find -L $(GAMMADIR)/src/share/vm/* -prune \ -+ -type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find -L {} \ - \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@ - - Makefile: $(BUILDTREE_MAKE) -diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/defs.make ---- openjdk/hotspot/build/linux/makefiles/defs.make Fri Jun 20 13:26:10 2008 +0100 -+++ openjdk/hotspot/build/linux/makefiles/defs.make Fri Jun 20 13:26:39 2008 +0100 -@@ -118,6 +118,7 @@ EXPORT_LIST += $(EXPORT_SERVER_DIR)/libj - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so - ifndef ICEDTEA_CORE_BUILD -+ifndef ICEDTEA_SHARK_BUILD - ifeq ($(ARCH_DATA_MODEL), 32) - EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt -@@ -133,3 +134,4 @@ else - endif - endif - endif -+endif -diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/gcc.make ---- openjdk/hotspot/build/linux/makefiles/gcc.make Fri Jun 20 13:26:10 2008 +0100 -+++ openjdk/hotspot/build/linux/makefiles/gcc.make Fri Jun 20 13:26:20 2008 +0100 -@@ -63,6 +63,9 @@ VM_PICFLAG = $(VM_PICFLAG/$(LINK_ - - ifdef ICEDTEA_ZERO_BUILD - CFLAGS += $(LIBFFI_CFLAGS) -+endif -+ifdef ICEDTEA_SHARK_BUILD -+CFLAGS += $(LLVM_CFLAGS) - endif - CFLAGS += $(VM_PICFLAG) - CFLAGS += -fno-rtti -diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/top.make ---- openjdk/hotspot/build/linux/makefiles/top.make Fri Jun 20 13:26:10 2008 +0100 -+++ openjdk/hotspot/build/linux/makefiles/top.make Fri Jun 20 13:26:20 2008 +0100 -@@ -71,6 +71,7 @@ Include_DBs/COMPILER1 = $(Include_DBs/ - Include_DBs/COMPILER1 = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 - Include_DBs/COMPILER2 = $(Include_DBs/CORE) $(VM)/includeDB_compiler2 - Include_DBs/TIERED = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 $(VM)/includeDB_compiler2 -+Include_DBs/SHARK = $(Include_DBs/CORE) $(VM)/includeDB_shark - Include_DBs = $(Include_DBs/$(TYPE)) - - Cached_plat = $(GENERATED)/platform.current -diff -r 8e41d25d7665 openjdk/hotspot/build/linux/makefiles/vm.make ---- openjdk/hotspot/build/linux/makefiles/vm.make Fri Jun 20 13:26:10 2008 +0100 -+++ openjdk/hotspot/build/linux/makefiles/vm.make Fri Jun 20 13:26:20 2008 +0100 -@@ -149,10 +149,14 @@ mapfile_reorder : mapfile $(REORDERFILE) - rm -f $@ - cat $^ > $@ - --ifeq ($(ZERO_LIBARCH), ppc64) -+ifdef ICEDTEA_SHARK_BUILD - STATIC_CXX = false - else -- STATIC_CXX = true -+ ifeq ($(ZERO_LIBARCH), ppc64) -+ STATIC_CXX = false -+ else -+ STATIC_CXX = true -+ endif - endif - - ifeq ($(LINK_INTO),AOUT) -@@ -179,6 +183,10 @@ endif - endif - ifdef ICEDTEA_ZERO_BUILD - LIBS_VM += $(LIBFFI_LIBS) -+endif -+ifdef ICEDTEA_SHARK_BUILD -+LFLAGS_VM += $(LLVM_LDFLAGS) -+LIBS_VM += $(LLVM_LIBS) - endif - - LINK_VM = $(LINK_LIB.c) -diff -r 8e41d25d7665 openjdk/hotspot/make/Makefile ---- openjdk/hotspot/make/Makefile Fri Jun 20 13:26:10 2008 +0100 -+++ openjdk/hotspot/make/Makefile Fri Jun 20 13:30:28 2008 +0100 -@@ -99,6 +99,15 @@ all_debugcore: jvmgcore docs export_ - all_debugcore: jvmgcore docs export_debug - all_optimizedcore: optimizedcore docs export_optimized - -+# Shark (C0) targets made available with this Makefile -+SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark -+ -+allshark: all_productshark all_fastdebugshark -+all_productshark: productshark docs export_product -+all_fastdebugshark: fastdebugshark docs export_fastdebug -+all_debugshark: jvmgshark docs export_debug -+all_optimizedshark: optimizedshark docs export_optimized -+ - # Do everything - world: all create_jdk - -@@ -124,6 +133,10 @@ endif - $(CORE_VM_TARGETS): - $(CD) $(GAMMADIR)/make; \ - $(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT) -+ -+$(SHARK_VM_TARGETS): -+ $(CD) $(GAMMADIR)/make; \ -+ $(MAKE) VM_TARGET=$@ generic_buildshark $(ALT_OUT) - - # Build compiler1 (client) rule, different for platforms - generic_build1: -@@ -172,6 +185,12 @@ generic_buildcore: - $(CD) $(OUTPUTDIR); \ - $(MAKE) -f $(ABS_OS_MAKEFILE) \ - $(MAKE_ARGS) $(VM_TARGET) -+ -+generic_buildshark: -+ $(MKDIR) -p $(OUTPUTDIR) -+ $(CD) $(OUTPUTDIR); \ -+ $(MAKE) -f $(ABS_OS_MAKEFILE) \ -+ $(MAKE_ARGS) $(VM_TARGET) - - # Export file rule - generic_export: $(EXPORT_LIST) -@@ -204,7 +223,11 @@ ifdef ICEDTEA_CORE_BUILD - ifdef ICEDTEA_CORE_BUILD - C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core - else -+ifdef ICEDTEA_SHARK_BUILD -+C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark -+else - C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 -+endif - endif - C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) - C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) -@@ -214,6 +237,10 @@ ifdef ICEDTEA_CORE_BUILD - MISC_DIR=$(C2_DIR) - GEN_DIR=$(C2_BASE_DIR)/generated - else -+ifdef ICEDTEA_SHARK_BUILD -+ MISC_DIR=$(C2_DIR) -+ GEN_DIR=$(C2_BASE_DIR)/generated -+else - ifeq ($(ARCH_DATA_MODEL), 32) - MISC_DIR=$(C1_DIR) - GEN_DIR=$(C1_BASE_DIR)/generated -@@ -222,6 +249,7 @@ else - GEN_DIR=$(C2_BASE_DIR)/generated - endif - endif -+endif - - # Bin files (windows) - ifeq ($(OSNAME),windows) -diff -r 8e41d25d7665 openjdk/jdk/make/java/redist/Makefile +iff -r 8e41d25d7665 openjdk/jdk/make/java/redist/Makefile --- openjdk/jdk/make/java/redist/Makefile Fri Jun 20 13:26:10 2008 +0100 +++ openjdk/jdk/make/java/redist/Makefile Fri Jun 20 13:28:19 2008 +0100 @@ -96,9 +96,11 @@ endif # INCLUDE_SA
--- a/patches/icedtea-sparc-ptracefix.patch Mon Dec 01 00:34:53 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -diff -up openjdk/hotspot/agent/src/os/linux/libproc.h.BAD openjdk/hotspot/agent/src/os/linux/libproc.h ---- openjdk/hotspot/agent/src/os/linux/libproc.h.BAD 2008-05-29 19:03:34.000000000 -0400 -+++ openjdk/hotspot/agent/src/os/linux/libproc.h 2008-05-29 19:01:45.000000000 -0400 -@@ -34,14 +34,25 @@ - - #if defined(sparc) || defined(sparcv9) - /* -- If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64 -- otherwise it should be from /usr/include/asm-sparc -- These two files define pt_regs structure differently -+ Taken from asm-sparc/ptrace.h and asm-sparc64/ptrace.h - */ - #ifdef _LP64 --#include "asm-sparc64/ptrace.h" -+struct pt_regs { -+ unsigned long u_regs[16]; /* globals and ins */ -+ unsigned long tstate; -+ unsigned long tpc; -+ unsigned long tnpc; -+ unsigned int y; -+ unsigned int fprs; -+}; - #else --#include "asm-sparc/ptrace.h" -+struct pt_regs { -+ unsigned long psr; -+ unsigned long pc; -+ unsigned long npc; -+ unsigned long y; -+ unsigned long u_regs[16]; /* globals and ins */ -+}; - #endif - - #endif //sparc or sparcv9
--- a/patches/icedtea-sparc-trapsfix.patch Mon Dec 01 00:34:53 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -diff -up openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp.BAD openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp ---- openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp.BAD 2008-05-28 11:49:06.000000000 -0500 -+++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp 2008-05-28 11:51:56.000000000 -0500 -@@ -25,7 +25,16 @@ - #include "incls/_precompiled.incl" - #include "incls/_assembler_linux_sparc.cpp.incl" - --#include <asm-sparc/traps.h> -+/* Headers for 32bit sparc with a 32bit userland end up in asm/ -+ * Headers for 32bit sparc with a 64bit userland end up in asm-sparc/ -+ * There is no traps.h in asm-sparc64/ -+ */ -+ -+#if defined(__sparc__) && defined(__arch64__) -+# include <asm-sparc/traps.h> -+#else -+# include <asm/traps.h> -+#endif - - bool MacroAssembler::needs_explicit_null_check(intptr_t offset) { - // Since the linux kernel resides at the low end of
--- a/patches/icedtea-sparc64-linux.patch Mon Dec 01 00:34:53 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -diff -up openjdk/hotspot/build/linux/makefiles/sparcv9.make.BAD openjdk/hotspot/build/linux/makefiles/sparcv9.make ---- openjdk/hotspot/build/linux/makefiles/sparcv9.make.BAD 2008-05-29 15:48:44.000000000 -0400 -+++ openjdk/hotspot/build/linux/makefiles/sparcv9.make 2008-05-29 15:48:39.000000000 -0400 -@@ -0,0 +1,27 @@ -+# -+# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. -+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+# -+# This code is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License version 2 only, as -+# published by the Free Software Foundation. -+# -+# This code is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+# version 2 for more details (a copy is included in the LICENSE file that -+# accompanied this code). -+# -+# You should have received a copy of the GNU General Public License version -+# 2 along with this work; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+# -+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+# CA 95054 USA or visit www.sun.com if you need additional information or -+# have any questions. -+# -+# -+ -+# TLS helper, assembled from .s file -+# Not included in includeDB because it has no dependencies -+Obj_Files += linux_sparc.o -diff -up openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp.BAD openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp ---- openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp.BAD 2008-05-29 16:25:10.000000000 -0400 -+++ openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp 2008-05-29 16:32:11.000000000 -0400 -@@ -225,7 +225,7 @@ LIR_Address* LIRGenerator::emit_array_ad - - void LIRGenerator::increment_counter(address counter, int step) { - LIR_Opr pointer = new_register(T_INT); -- __ move(LIR_OprFact::intConst((int)counter), pointer); -+ __ move(LIR_OprFact::intConst((int)*counter), pointer); - LIR_Address* addr = new LIR_Address(pointer, 0, T_INT); - increment_counter(addr, step); - } -@@ -1106,20 +1106,12 @@ void LIRGenerator::trace_block_entry(Blo - - void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address, - CodeEmitInfo* info) { --#ifdef _LP64 -- __ store_mem_reg(value, address, info); --#else - __ volatile_store_mem_reg(value, address, info); --#endif - } - - void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result, - CodeEmitInfo* info) { --#ifdef _LP64 -- __ load_mem_reg(address, result, info); --#else - __ volatile_load_mem_reg(address, result, info); --#endif - } - - -diff -up openjdk/hotspot/build/linux/makefiles/defs.make.BAD openjdk/hotspot/build/linux/makefiles/defs.make ---- openjdk/hotspot/build/linux/makefiles/defs.make.BAD 2008-05-30 07:03:37.000000000 -0400 -+++ openjdk/hotspot/build/linux/makefiles/defs.make 2008-05-30 07:03:45.000000000 -0400 -@@ -58,8 +58,8 @@ ifeq ($(ARCH), ia64) - HS_ARCH = ia64 - endif - --# sparc --ifneq (,$(filter $(ARCH), sparc sparc64)) -+# sparc64 -+ifeq ($(ARCH), sparc64) - ifeq ($(ARCH_DATA_MODEL), 64) - ARCH_DATA_MODEL = 64 - MAKE_ARGS += LP64=1 -@@ -73,6 +73,14 @@ ifneq (,$(filter $(ARCH), sparc sparc64) - HS_ARCH = sparc - endif - -+# sparc -+ifeq ($(ARCH), sparc) -+ ARCH_DATA_MODEL = 32 -+ PLATFORM = linux-sparc -+ VM_PLATFORM = linux_sparc -+ HS_ARCH = sparc -+endif -+ - # x86_64 - ifeq ($(ARCH), x86_64) - ifeq ($(ARCH_DATA_MODEL), 64)
--- a/patches/icedtea-static-libstdc++.patch Mon Dec 01 00:34:53 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -diff -r e95eb2395f60 openjdk-ecj/hotspot/build/linux/makefiles/vm.make ---- openjdk/hotspot/build/linux/makefiles/vm.make Fri Nov 09 16:35:08 2007 +0000 -+++ openjdk/hotspot/build/linux/makefiles/vm.make Mon Nov 12 09:09:28 2007 +0000 -@@ -149,6 +149,12 @@ - rm -f $@ - cat $^ > $@ - -+ifeq ($(ZERO_LIBARCH), ppc64) -+ STATIC_CXX = false -+else -+ STATIC_CXX = true -+endif -+ - ifeq ($(LINK_INTO),AOUT) - LIBJVM.o = - LIBJVM_MAPFILE = -@@ -162,8 +168,14 @@ - # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to - # get around library dependency and compatibility issues. Must use gcc not - # g++ to link. -- LFLAGS_VM += $(STATIC_LIBGCC) -- LIBS_VM += $(STATIC_STDCXX) $(LIBS) -+ ifeq ($(STATIC_CXX), true) -+ LFLAGS_VM += $(STATIC_LIBGCC) -+ LIBS_VM += $(STATIC_STDCXX) -+ else -+ LIBS_VM += -lstdc++ -+ endif -+ -+ LIBS_VM += $(LIBS) - endif - - LINK_VM = $(LINK_LIB.c)
--- a/patches/icedtea-text-relocations.patch Mon Dec 01 00:34:53 2008 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ ---- openjdk/hotspot/build/linux/makefiles/gcc.make.orig 2007-06-17 16:46:45.000000000 -0400 -+++ openjdk/hotspot/build/linux/makefiles/gcc.make 2007-06-17 16:47:12.000000000 -0400 -@@ -46,18 +46,16 @@ - # Compiler flags - - # position-independent code -+ifneq ($(filter ppc ppc64 s390 s390x sparc sparc64,$(ZERO_LIBARCH)),) - PICFLAG = -fPIC -+else -+PICFLAG = -fpic -+endif - - VM_PICFLAG/LIBJVM = $(PICFLAG) - VM_PICFLAG/AOUT = - --ifneq ($(BUILDARCH), i486) - VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) --else --# PIC has significant overhead on x86, build nonpic VM for now. --# Link JVM at a "good" base location to avoid unnecessary .text patching. --JVM_BASE_ADDR = 0x06000000 --endif - - CFLAGS += $(VM_PICFLAG) - CFLAGS += -fno-rtti
--- a/patches/icedtea-version.patch Mon Dec 01 00:34:53 2008 +0100 +++ b/patches/icedtea-version.patch Mon Dec 01 17:30:31 2008 +0000 @@ -12,41 +12,6 @@ PRODUCT_SUFFIX = Runtime Environment JDK_RC_PLATFORM_NAME = Platform COMPANY_NAME = N/A ---- openjdk/hotspot/src/share/vm/utilities/vmError.cpp~ 2008-08-28 10:23:18.000000000 +0200 -+++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2008-10-21 14:05:12.000000000 +0200 -@@ -168,7 +168,8 @@ - - static void print_bug_submit_message(outputStream *out, Thread *thread) { - if (out == NULL) return; -- out->print_raw_cr("# If you would like to submit a bug report, please visit:"); -+ out->print_raw_cr("# If you would like to submit a bug report, please include"); -+ out->print_raw_cr("# instructions how to reproduce the bug and visit:"); - out->print_raw ("# "); - out->print_raw_cr(Arguments::java_vendor_url_bug()); - // If the crash is in native code, encourage user to submit a bug to the -@@ -340,6 +341,9 @@ - Abstract_VM_Version::vm_info_string(), - Abstract_VM_Version::vm_platform_string() - ); -+#ifdef DISTRIBUTION_ID -+ st->print_cr("# Distribution: %s", DISTRIBUTION_ID); -+#endif - - STEP(60, "(printing problematic frame)") - ---- openjdk/hotspot/build/linux/makefiles/vm.make~ 2008-08-28 10:22:55.000000000 +0200 -+++ openjdk/hotspot/build/linux/makefiles/vm.make 2008-10-21 14:03:36.000000000 +0200 -@@ -111,6 +111,10 @@ - ${JRE_VERSION} \ - ${VM_DISTRO} - -+ifdef DISTRIBUTION_ID -+CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\"" -+endif -+ - # CFLAGS_WARN holds compiler options to suppress/enable warnings. - CFLAGS += $(CFLAGS_WARN/BYFILE) - --- openjdk/langtools/make/Makefile.orig +++ openjdk/langtools/make/Makefile @@ -82,7 +82,11 @@
--- a/patches/icedtea-zero-build.patch Mon Dec 01 00:34:53 2008 +0100 +++ b/patches/icedtea-zero-build.patch Mon Dec 01 17:30:31 2008 +0000 @@ -1,135 +1,3 @@ -diff -ru openjdk/hotspot/build/linux/makefiles/defs.make openjdk/hotspot/build/linux/makefiles/defs.make ---- openjdk/hotspot/build/linux/makefiles/defs.make 2008-03-13 13:57:48.000000000 +0000 -+++ openjdk/hotspot/build/linux/makefiles/defs.make 2008-03-13 13:37:14.000000000 +0000 -@@ -37,6 +37,18 @@ - ARCH_DATA_MODEL ?= 32 - endif - -+# zero -+ifdef ICEDTEA_ZERO_BUILD -+ ARCH_DATA_MODEL = $(ZERO_BITSPERWORD) -+ ifeq ($(ARCH_DATA_MODEL), 64) -+ MAKE_ARGS += LP64=1 -+ endif -+ PLATFORM = linux-zero -+ VM_PLATFORM = linux_zero -+ HS_ARCH = zero -+ ARCH = zero -+endif -+ - # ia64 - ifeq ($(ARCH), ia64) - ARCH_DATA_MODEL = 64 -diff -ru openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make ---- openjdk/hotspot/make/defs.make 2008-02-28 10:02:25.000000000 +0000 -+++ openjdk/hotspot/make/defs.make 2008-03-13 13:37:14.000000000 +0000 -@@ -199,13 +199,14 @@ - # Use uname output for SRCARCH, but deal with platform differences. If ARCH - # is not explicitly listed below, it is treated as i486. Also note amd64 is - # a separate src arch, so LP64 && i486 ==> amd64. -- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64,$(ARCH))) -+ SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 zero,$(ARCH))) - ARCH/ = i486 - ARCH/sparc = sparc - ARCH/sparc64= sparc - ARCH/ia64 = ia64 - ARCH/amd64 = amd64 - ARCH/x86_64 = amd64 -+ ARCH/zero = zero - ifdef LP64 - ifeq ($(SRCARCH), i486) - SRCARCH = amd64 -@@ -227,8 +228,9 @@ - LIBARCH/sparc = sparc - LIBARCH/sparcv9 = sparcv9 - LIBARCH/ia64 = ia64 -+ LIBARCH/zero = $(ZERO_LIBARCH) - -- LP64_ARCH = sparcv9 amd64 ia64 -+ LP64_ARCH = sparcv9 amd64 ia64 zero - endif - - # Required make macro settings for all platforms -diff -ru openjdk/hotspot/build/linux/makefiles/buildtree.make openjdk/hotspot/build/linux/makefiles/buildtree.make ---- openjdk/hotspot/build/linux/makefiles/buildtree.make 2008-02-28 10:02:19.000000000 +0000 -+++ openjdk/hotspot/build/linux/makefiles/buildtree.make 2008-03-13 13:37:14.000000000 +0000 -@@ -277,6 +277,7 @@ - DATA_MODE/sparcv9 = 64 - DATA_MODE/amd64 = 64 - DATA_MODE/ia64 = 64 -+DATA_MODE/zero = $(ZERO_BITSPERWORD) - - JAVA_FLAG/32 = -d32 - JAVA_FLAG/64 = -d64 -diff -ru openjdk/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make ---- openjdk/hotspot/build/linux/makefiles/gcc.make 2008-03-13 13:57:48.000000000 +0000 -+++ openjdk/hotspot/build/linux/makefiles/gcc.make 2008-03-13 13:37:20.000000000 +0000 -@@ -73,6 +76,7 @@ - ARCHFLAG/ia64 = - ARCHFLAG/sparc = -m32 -mcpu=v9 - ARCHFLAG/sparcv9 = -m64 -mcpu=v9 -+ARCHFLAG/zero = $(ZERO_ARCHFLAG) - - CFLAGS += $(ARCHFLAG) - AOUT_FLAGS += $(ARCHFLAG) -diff -ru openjdk/hotspot/build/linux/makefiles/sa.make openjdk/hotspot/build/linux/makefiles/sa.make ---- openjdk/hotspot/build/linux/makefiles/sa.make 2007-11-08 11:34:54.000000000 +0000 -+++ openjdk/hotspot/build/linux/makefiles/sa.make 2007-11-08 11:36:15.000000000 +0000 -@@ -51,10 +51,10 @@ - SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties - - # if $(AGENT_DIR) does not exist, we don't build SA --# also, we don't build SA on Itanium. -+# also, we don't build SA on Itanium or zero. - - all: -- if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ -+ if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ - $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \ - fi - -diff -ru openjdk/hotspot/build/linux/makefiles/saproc.make openjdk/hotspot/build/linux/makefiles/saproc.make ---- openjdk/hotspot/build/linux/makefiles/saproc.make 2007-11-08 11:34:54.000000000 +0000 -+++ openjdk/hotspot/build/linux/makefiles/saproc.make 2007-11-08 11:36:15.000000000 +0000 -@@ -44,10 +44,10 @@ - DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) - - # if $(AGENT_DIR) does not exist, we don't build SA --# also, we don't build SA on Itanium. -+# also, we don't build SA on Itanium or zero. - - checkAndBuildSA: -- $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ -+ $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ - $(MAKE) -f vm.make $(LIBSAPROC); \ - fi - -diff -ru openjdk/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make ---- openjdk/hotspot/build/linux/makefiles/gcc.make 2008-02-17 15:37:26.000000000 -0500 -+++ openjdk/hotspot/build/linux/makefiles/gcc.make 2008-02-17 15:37:58.000000000 -0500 -@@ -57,6 +57,9 @@ - - VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) - -+ifdef ICEDTEA_ZERO_BUILD -+CFLAGS += $(LIBFFI_CFLAGS) -+endif - CFLAGS += $(VM_PICFLAG) - CFLAGS += -fno-rtti - CFLAGS += -fno-exceptions -diff -ru openjdk-ecj/hotspot/build/linux/makefiles/vm.make openjdk-ecj.new/hotspot/build/linux/makefiles/vm.make ---- openjdk/hotspot/build/linux/makefiles/vm.make 2008-02-29 09:46:55.000000000 -0500 -+++ openjdk/hotspot/build/linux/makefiles/vm.make 2008-02-29 09:47:30.000000000 -0500 -@@ -177,6 +177,9 @@ - - LIBS_VM += $(LIBS) - endif -+ifdef ICEDTEA_ZERO_BUILD -+LIBS_VM += $(LIBFFI_LIBS) -+endif - - LINK_VM = $(LINK_LIB.c) - diff -r c9fa8e3d5aa2 openjdk/jdk/make/common/Defs-linux.gmk --- openjdk/jdk/make/common/Defs-linux.gmk Thu Mar 20 13:42:48 2008 +0000 +++ openjdk/jdk/make/common/Defs-linux.gmk Thu Mar 20 13:45:05 2008 +0000