changeset 1740:093116b4e715

Reduce number of patches by moving non-version-specific HotSpot patches to top-level. 2009-10-21 Andrew John Hughes <ahughes@redhat.com> Move non-version-dependent HotSpot patches back to top-level. * patches/hotspot/default/icedtea-bytecodeInterpreter.patch, * patches/hotspot/default/icedtea-core-build.patch, * patches/hotspot/default/icedtea-gcc-stack-markings.patch, * patches/hotspot/default/icedtea-gcc-suffix.patch, * patches/hotspot/default/icedtea-headers.patch, * patches/hotspot/default/icedtea-memory-limits.patch, * patches/hotspot/default/icedtea-no-precompiled.patch, * patches/hotspot/default/icedtea-parisc-opt.patch, * patches/hotspot/default/icedtea-shark-build.patch, * patches/hotspot/default/icedtea-shark.patch, * patches/hotspot/default/icedtea-sparc-buildfixes.patch, * patches/hotspot/default/icedtea-sparc-ptracefix.patch, * patches/hotspot/default/icedtea-sparc-trapsfix.patch, * patches/hotspot/default/icedtea-sparc64-linux.patch, * patches/hotspot/default/icedtea-static-libstdc++.patch, * patches/hotspot/default/icedtea-text-relocations.patch, * patches/hotspot/default/icedtea-use-idx_t.patch, * patches/hotspot/default/icedtea-version.patch, * patches/hotspot/default/icedtea-zero-build.patch: Removed, duplicates of versions in hotspot/original. * patches/hotspot/original/icedtea-bytecodeInterpreter.patch, * patches/hotspot/original/icedtea-core-build.patch, * patches/hotspot/original/icedtea-gcc-stack-markings.patch, * patches/hotspot/original/icedtea-gcc-suffix.patch, * patches/hotspot/original/icedtea-headers.patch, * patches/hotspot/original/icedtea-memory-limits.patch, * patches/hotspot/original/icedtea-no-precompiled.patch, * patches/hotspot/original/icedtea-parisc-opt.patch, * patches/hotspot/original/icedtea-shark-build.patch, * patches/hotspot/original/icedtea-shark.patch, * patches/hotspot/original/icedtea-sparc-buildfixes.patch, * patches/hotspot/original/icedtea-sparc-ptracefix.patch, * patches/hotspot/original/icedtea-sparc-trapsfix.patch, * patches/hotspot/original/icedtea-sparc64-linux.patch, * patches/hotspot/original/icedtea-static-libstdc++.patch, * patches/hotspot/original/icedtea-text-relocations.patch, * patches/hotspot/original/icedtea-use-idx_t.patch, * patches/hotspot/original/icedtea-version.patch, * patches/hotspot/original/icedtea-zero-build.patch: Moved to top-level. * Makefile.am: Remove $(HSBUILD) in patches moved to the top. * patches/icedtea-bytecodeInterpreter.patch, * patches/icedtea-core-build-hotspot.patch, * patches/icedtea-gcc-stack-markings.patch, * patches/icedtea-gcc-suffix-hotspot.patch, * patches/icedtea-headers-hotspot.patch, * patches/icedtea-memory-limits.patch, * patches/icedtea-no-precompiled.patch, * patches/icedtea-parisc-opt.patch, * patches/icedtea-shark-build-hotspot.patch, * patches/icedtea-shark.patch, * patches/icedtea-sparc-buildfixes.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, * patches/icedtea-use-idx_t.patch, * patches/icedtea-version-hotspot.patch, * patches/icedtea-zero-build-hotspot.patch: Moved from hotspot/original.
author Andrew John Hughes <ahughes@redhat.com>
date Wed, 21 Oct 2009 16:37:47 +0100
parents 71a19c78147c
children 86a05a0cec75
files ChangeLog Makefile.am patches/hotspot/default/icedtea-bytecodeInterpreter.patch patches/hotspot/default/icedtea-core-build.patch patches/hotspot/default/icedtea-gcc-stack-markings.patch patches/hotspot/default/icedtea-gcc-suffix.patch patches/hotspot/default/icedtea-headers.patch patches/hotspot/default/icedtea-memory-limits.patch patches/hotspot/default/icedtea-no-precompiled.patch patches/hotspot/default/icedtea-parisc-opt.patch patches/hotspot/default/icedtea-shark-build.patch patches/hotspot/default/icedtea-shark.patch patches/hotspot/default/icedtea-sparc-buildfixes.patch patches/hotspot/default/icedtea-sparc-ptracefix.patch patches/hotspot/default/icedtea-sparc-trapsfix.patch patches/hotspot/default/icedtea-sparc64-linux.patch patches/hotspot/default/icedtea-static-libstdc++.patch patches/hotspot/default/icedtea-text-relocations.patch patches/hotspot/default/icedtea-use-idx_t.patch patches/hotspot/default/icedtea-version.patch patches/hotspot/default/icedtea-zero-build.patch patches/hotspot/original/icedtea-bytecodeInterpreter.patch patches/hotspot/original/icedtea-core-build.patch patches/hotspot/original/icedtea-gcc-stack-markings.patch patches/hotspot/original/icedtea-gcc-suffix.patch patches/hotspot/original/icedtea-headers.patch patches/hotspot/original/icedtea-memory-limits.patch patches/hotspot/original/icedtea-no-precompiled.patch patches/hotspot/original/icedtea-parisc-opt.patch patches/hotspot/original/icedtea-shark-build.patch patches/hotspot/original/icedtea-shark.patch patches/hotspot/original/icedtea-sparc-buildfixes.patch patches/hotspot/original/icedtea-sparc-ptracefix.patch patches/hotspot/original/icedtea-sparc-trapsfix.patch patches/hotspot/original/icedtea-sparc64-linux.patch patches/hotspot/original/icedtea-static-libstdc++.patch patches/hotspot/original/icedtea-text-relocations.patch patches/hotspot/original/icedtea-use-idx_t.patch patches/hotspot/original/icedtea-version.patch patches/hotspot/original/icedtea-zero-build.patch patches/icedtea-bytecodeInterpreter.patch patches/icedtea-core-build-hotspot.patch patches/icedtea-gcc-stack-markings.patch patches/icedtea-gcc-suffix-hotspot.patch patches/icedtea-headers-hotspot.patch patches/icedtea-memory-limits.patch patches/icedtea-no-precompiled.patch patches/icedtea-parisc-opt.patch patches/icedtea-shark-build-hotspot.patch patches/icedtea-shark.patch patches/icedtea-sparc-buildfixes.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 patches/icedtea-use-idx_t.patch patches/icedtea-version-hotspot.patch patches/icedtea-zero-build-hotspot.patch
diffstat 59 files changed, 1449 insertions(+), 2746 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 21 15:04:08 2009 +0100
+++ b/ChangeLog	Wed Oct 21 16:37:47 2009 +0100
@@ -1,3 +1,70 @@
+2009-10-21  Andrew John Hughes  <ahughes@redhat.com>
+
+	Move non-version-dependent HotSpot patches back
+	to top-level.
+	* patches/hotspot/default/icedtea-bytecodeInterpreter.patch,
+	* patches/hotspot/default/icedtea-core-build.patch,
+	* patches/hotspot/default/icedtea-gcc-stack-markings.patch,
+	* patches/hotspot/default/icedtea-gcc-suffix.patch,
+	* patches/hotspot/default/icedtea-headers.patch,
+	* patches/hotspot/default/icedtea-memory-limits.patch,
+	* patches/hotspot/default/icedtea-no-precompiled.patch,
+	* patches/hotspot/default/icedtea-parisc-opt.patch,
+	* patches/hotspot/default/icedtea-shark-build.patch,
+	* patches/hotspot/default/icedtea-shark.patch,
+	* patches/hotspot/default/icedtea-sparc-buildfixes.patch,
+	* patches/hotspot/default/icedtea-sparc-ptracefix.patch,
+	* patches/hotspot/default/icedtea-sparc-trapsfix.patch,
+	* patches/hotspot/default/icedtea-sparc64-linux.patch,
+	* patches/hotspot/default/icedtea-static-libstdc++.patch,
+	* patches/hotspot/default/icedtea-text-relocations.patch,
+	* patches/hotspot/default/icedtea-use-idx_t.patch,
+	* patches/hotspot/default/icedtea-version.patch,
+	* patches/hotspot/default/icedtea-zero-build.patch:
+	Removed, duplicates of versions in hotspot/original.
+	* patches/hotspot/original/icedtea-bytecodeInterpreter.patch,
+	* patches/hotspot/original/icedtea-core-build.patch,
+	* patches/hotspot/original/icedtea-gcc-stack-markings.patch,
+	* patches/hotspot/original/icedtea-gcc-suffix.patch,
+	* patches/hotspot/original/icedtea-headers.patch,
+	* patches/hotspot/original/icedtea-memory-limits.patch,
+	* patches/hotspot/original/icedtea-no-precompiled.patch,
+	* patches/hotspot/original/icedtea-parisc-opt.patch,
+	* patches/hotspot/original/icedtea-shark-build.patch,
+	* patches/hotspot/original/icedtea-shark.patch,
+	* patches/hotspot/original/icedtea-sparc-buildfixes.patch,
+	* patches/hotspot/original/icedtea-sparc-ptracefix.patch,
+	* patches/hotspot/original/icedtea-sparc-trapsfix.patch,
+	* patches/hotspot/original/icedtea-sparc64-linux.patch,
+	* patches/hotspot/original/icedtea-static-libstdc++.patch,
+	* patches/hotspot/original/icedtea-text-relocations.patch,
+	* patches/hotspot/original/icedtea-use-idx_t.patch,
+	* patches/hotspot/original/icedtea-version.patch,
+	* patches/hotspot/original/icedtea-zero-build.patch:
+	Moved to top-level.
+	* Makefile.am:
+	Remove $(HSBUILD) in patches moved to the top.
+	* patches/icedtea-bytecodeInterpreter.patch,
+	* patches/icedtea-core-build-hotspot.patch,
+	* patches/icedtea-gcc-stack-markings.patch,
+	* patches/icedtea-gcc-suffix-hotspot.patch,
+	* patches/icedtea-headers-hotspot.patch,
+	* patches/icedtea-memory-limits.patch,
+	* patches/icedtea-no-precompiled.patch,
+	* patches/icedtea-parisc-opt.patch,
+	* patches/icedtea-shark-build-hotspot.patch,
+	* patches/icedtea-shark.patch,
+	* patches/icedtea-sparc-buildfixes.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,
+	* patches/icedtea-use-idx_t.patch,
+	* patches/icedtea-version-hotspot.patch,
+	* patches/icedtea-zero-build-hotspot.patch:
+	Moved from hotspot/original.
+
 2009-10-21  Andrew John Hughes  <ahughes@redhat.com>
 
 	* patches/ecj/icedtea-hotspot-original.patch:
--- a/Makefile.am	Wed Oct 21 15:04:08 2009 +0100
+++ b/Makefile.am	Wed Oct 21 16:37:47 2009 +0100
@@ -542,17 +542,17 @@
 
 ICEDTEA_PATCHES = \
 	patches/icedtea-notice-safepoints.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-bytecodeInterpreter.patch \
+	patches/icedtea-bytecodeInterpreter.patch \
 	patches/icedtea-signature-iterator.patch \
 	patches/icedtea-test-atomic-operations.patch \
 	patches/icedtea-zero.patch \
 	patches/icedtea-ia64-bugfix.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-parisc-opt.patch \
+	patches/icedtea-parisc-opt.patch \
 	patches/icedtea-lucene-crash.patch \
 	patches/icedtea-version.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-version.patch \
+	patches/icedtea-version-hotspot.patch \
 	patches/icedtea-copy-plugs.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-text-relocations.patch \
+	patches/icedtea-text-relocations.patch \
 	patches/icedtea-ssl.patch \
 	$(PLUGIN_PATCH) \
 	patches/icedtea-webstart.patch \
@@ -563,23 +563,23 @@
 	patches/icedtea-timezone-default-permission.patch \
 	patches/icedtea-use-system-tzdata.patch \
 	patches/icedtea-headers.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-headers.patch \
+	patches/icedtea-headers-hotspot.patch \
 	patches/icedtea-gcc-suffix.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-gcc-suffix.patch \
+	patches/icedtea-gcc-suffix-hotspot.patch \
 	patches/icedtea-bytebuffer-compact.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-memory-limits.patch \
+	patches/icedtea-memory-limits.patch \
 	patches/icedtea-sunsrc.patch \
 	patches/icedtea-libraries.patch \
 	patches/icedtea-javafiles.patch \
 	patches/icedtea-core-build.patch \
 	patches/icedtea-jvmtiEnv.patch \
 	patches/icedtea-lcms.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-core-build.patch \
+	patches/icedtea-core-build-hotspot.patch \
 	patches/icedtea-linker-options.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-static-libstdc++.patch \
+	patches/icedtea-static-libstdc++.patch \
 	patches/icedtea-timerqueue.patch \
 	patches/icedtea-zero-build.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-zero-build.patch \
+	patches/icedtea-zero-build-hotspot.patch \
 	patches/icedtea-print-lsb-release.patch \
 	patches/icedtea-jpegclasses.patch \
 	patches/icedtea-uname.patch \
@@ -587,17 +587,17 @@
 	patches/icedtea-freetypeversion.patch \
 	patches/icedtea-fonts.patch \
 	patches/icedtea-shark-build.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-shark-build.patch \
+	patches/icedtea-shark-build-hotspot.patch \
 	patches/icedtea-jdk-docs-target.patch \
 	patches/icedtea-nomotif-6706121.patch \
 	patches/icedtea-nomotif.patch \
 	patches/icedtea-alpha-fixes.patch \
 	patches/icedtea-alt-jar.patch \
 	patches/icedtea-jdk-use-ssize_t.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-use-idx_t.patch \
+	patches/icedtea-use-idx_t.patch \
 	patches/hotspot/$(HSBUILD)/icedtea-params-cast-size_t.patch \
 	patches/icedtea-clean-crypto.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-shark.patch \
+	patches/icedtea-shark.patch \
 	patches/icedtea-arch.patch \
 	patches/icedtea-lc_ctype.patch \
 	patches/icedtea-xjc.patch \
@@ -612,10 +612,10 @@
 	patches/icedtea-doc-headers.patch \
 	patches/openjdk/bidi-tests.patch \
 	patches/openjdk/annotation-tests.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-sparc-buildfixes.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-sparc64-linux.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-sparc-ptracefix.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-sparc-trapsfix.patch
+	patches/icedtea-sparc-buildfixes.patch \
+	patches/icedtea-sparc64-linux.patch \
+	patches/icedtea-sparc-ptracefix.patch \
+	patches/icedtea-sparc-trapsfix.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
@@ -685,7 +685,7 @@
 	patches/icedtea-disable-cc-incompatible-sanity-checks.patch \
 	patches/icedtea-explicit-target-arch.patch \
 	patches/openjdk/6432567-debugger-socket-overflow.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-gcc-stack-markings.patch \
+	patches/icedtea-gcc-stack-markings.patch \
 	patches/icedtea-s390-serialize.patch \
 	patches/openjdk/6879689-hotspot_warning_fix.patch \
 	$(DISTRIBUTION_PATCHES)
--- a/patches/hotspot/default/icedtea-bytecodeInterpreter.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp
---- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-23 08:41:04.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-30 15:48:48.000000000 +0000
-@@ -60,7 +60,6 @@
- };
- 
- class BytecodeInterpreter : StackObj {
--friend class SharedRuntime;
- friend class AbstractInterpreterGenerator;
- friend class CppInterpreterGenerator;
- friend class InterpreterGenerator;
--- a/patches/hotspot/default/icedtea-core-build.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-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
- 
-
--- a/patches/hotspot/default/icedtea-gcc-stack-markings.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
---- openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s~	2009-08-06 01:08:57.000000000 -0700
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s	2009-08-06 01:09:27.000000000 -0700
-@@ -650,3 +650,4 @@ _Atomic_cmpxchg_long:
-         popl     %ebx
-         ret
- 
-+.section        .note.GNU-stack, "", @progbits
---- openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_64.s~	2009-08-06 01:08:57.000000000 -0700
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_64.s	2009-08-06 01:09:27.000000000 -0700
-@@ -400,3 +400,4 @@ _Atomic_cmpxchg_long:
-         addq     $4,%rdx
-         jg       4b
-         ret
-+.section        .note.GNU-stack, "", @progbits
--- a/patches/hotspot/default/icedtea-gcc-suffix.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
---- 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
-
--- a/patches/hotspot/default/icedtea-headers.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-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
- 
-
--- a/patches/hotspot/default/icedtea-memory-limits.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-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, 						    \
--- a/patches/hotspot/default/icedtea-no-precompiled.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2009-01-04 13:51:38.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2009-01-04 13:53:34.000000000 +0000
-@@ -34,13 +34,6 @@
- CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
- CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
- 
--# check for precompiled headers support
--ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
--USE_PRECOMPILED_HEADER=1
--PRECOMPILED_HEADER_DIR=.
--PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
--endif
--
- 
- #------------------------------------------------------------------------
- # Compiler flags
---- openjdk/hotspot/make/solaris/makefiles/gcc.make.orig	2009-01-04 14:44:12.000000000 +0000
-+++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2009-01-04 17:06:50.000000000 +0000
-@@ -45,13 +45,6 @@
- $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
- 
- 
--# check for precompiled headers support
--ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
--USE_PRECOMPILED_HEADER=1
--PRECOMPILED_HEADER_DIR=.
--PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
--endif
--
- 
- #------------------------------------------------------------------------
- # Compiler flags
--- a/patches/hotspot/default/icedtea-parisc-opt.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/product.make.orig	2008-12-10 19:02:31.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/product.make	2008-12-10 19:24:53.000000000 +0100
-@@ -25,6 +25,11 @@
- # Sets make macros for making optimized version of Gamma VM
- # (This is the "product", not the "release" version.)
- 
-+# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
-+ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
-+  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
-+endif
-+
- # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
- OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
- OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
---- openjdk/hotspot/make/linux/makefiles/optimized.make.orig	2008-12-10 19:02:22.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/optimized.make	2008-12-10 19:24:24.000000000 +0100
-@@ -25,6 +25,11 @@
- # Sets make macros for making optimized version of Gamma VM
- # (This is the "product", not the "release" version.)
- 
-+# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
-+ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
-+  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
-+endif
-+
- # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
- OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
- OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
--- a/patches/hotspot/default/icedtea-shark-build.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,233 +0,0 @@
-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)/make/$(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)
-
--- a/patches/hotspot/default/icedtea-shark.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,390 +0,0 @@
---- openjdk/hotspot/src/share/vm/oops/methodOop.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -727,10 +727,14 @@
-   }
- 
-   OrderAccess::storestore();
-+#ifdef SHARK
-+  mh->_from_interpreted_entry = code->instructions_begin();
-+#else
-   mh->_from_compiled_entry = code->verified_entry_point();
-   OrderAccess::storestore();
-   // Instantly compiled code can execute.
-   mh->_from_interpreted_entry = mh->get_i2c_entry();
-+#endif // SHARK
- 
- }
- 
---- openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -44,6 +44,7 @@
-   friend class VMStructs;
-   friend class CardTableRS;
-   friend class CheckForUnmarkedOops; // Needs access to raw card bytes.
-+  friend class SharkBuilder;
- #ifndef PRODUCT
-   // For debugging.
-   friend class GuaranteeNotModClosure;
---- openjdk/hotspot/src/share/vm/runtime/globals.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/globals.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -176,6 +176,18 @@
-   #define C2_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{C2 notproduct}", DEFAULT },
- #endif
- 
-+#define SHARK_PRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark product}", DEFAULT },
-+#define SHARK_PD_PRODUCT_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd product}", DEFAULT },
-+#define SHARK_DIAGNOSTIC_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark diagnostic}", DEFAULT },
-+#ifdef PRODUCT
-+  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) /* flag is constant */
-+  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     /* flag is constant */
-+  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc)
-+#else
-+  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark}", DEFAULT },
-+  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd}", DEFAULT },
-+  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark notproduct}", DEFAULT },
-+#endif
- 
- static Flag flagTable[] = {
-  RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT, RUNTIME_LP64_PRODUCT_FLAG_STRUCT)
-@@ -189,6 +201,9 @@
- #ifdef COMPILER2
-  C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT)
- #endif
-+#ifdef SHARK
-+ SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT)
-+#endif
-  {0, NULL, NULL}
- };
- 
---- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp.orig	2008-12-03 14:23:37.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -94,6 +94,9 @@
- #ifdef TIERED
-   #define VMTYPE "Server"
- #else
-+#ifdef SHARK
-+  #define VMTYPE "Shark"
-+#else
- #if defined(COMPILER1) || defined(COMPILER2)
-    #define VMTYPE COMPILER1_PRESENT("Client")   \
-                   COMPILER2_PRESENT("Server")
-@@ -104,6 +107,7 @@
-   #define VMTYPE "Core"
- #endif // ZERO
- #endif // COMPILER1 || COMPILER2
-+#endif // SHARK
- #endif // TIERED
- #endif // KERNEL
- 
---- openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -229,6 +229,7 @@
- 
-   }
- 
-+#ifndef SHARK
-   // Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info.
-   CodeBlob* cb = stub_frame.cb();
-   // Verify we have the right vframeArray
-@@ -239,6 +240,10 @@
-   assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking");
-   Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp);
- #endif
-+#else
-+  intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp();
-+#endif // !SHARK
-+  
-   // This is a guarantee instead of an assert because if vframe doesn't match
-   // we will unpack the wrong deoptimized frame and wind up in strange places
-   // where it will be very difficult to figure out what went wrong. Better
-@@ -349,7 +354,9 @@
- 
-   frame_pcs[0] = deopt_sender.raw_pc();
- 
-+#ifndef SHARK
-   assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc");
-+#endif // SHARK
- 
-   UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord,
-                                       caller_adjustment * BytesPerWord,
-@@ -890,7 +897,20 @@
-   // stuff a C2I adapter we can properly fill in the callee-save
-   // register locations.
-   frame caller = fr.sender(reg_map);
-+#ifdef ZERO
-+  int frame_size;
-+  {
-+    // In zero, frame::sp() is the *end* of the frame, so
-+    // caller.sp() - fr.sp() is the size of the *caller*.
-+    RegisterMap dummy_map(thread, false);
-+    frame frame_1 = thread->last_frame();
-+    frame frame_2 = frame_1.sender(&dummy_map);
-+    assert(frame_2.sp() == fr.sp(), "should be");
-+    frame_size = frame_2.sp() - frame_1.sp();
-+  }
-+#else
-   int frame_size = caller.sp() - fr.sp();
-+#endif // ZERO
- 
-   frame sender = caller;
- 
-@@ -1057,7 +1077,7 @@
- JRT_END
- 
- 
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
- void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) {
-   // in case of an unresolved klass entry, load the class.
-   if (constant_pool->tag_at(index).is_unresolved_klass()) {
-@@ -1808,7 +1828,7 @@
-     if (xtty != NULL)  xtty->tail("statistics");
-   }
- }
--#else // COMPILER2
-+#else // COMPILER2 || SHARK
- 
- 
- // Stubs for C1 only system.
-@@ -1844,4 +1864,4 @@
-   return buf;
- }
- 
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
---- openjdk/hotspot/src/share/vm/runtime/globals.hpp.orig	2008-12-03 14:22:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -22,7 +22,7 @@
-  *
-  */
- 
--#if !defined(COMPILER1) && !defined(COMPILER2)
-+#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
- define_pd_global(bool, BackgroundCompilation,        false);
- define_pd_global(bool, UseTLAB,                      false);
- define_pd_global(bool, CICompileOSR,                 false);
---- openjdk/hotspot/src/share/vm/code/nmethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/code/nmethod.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -318,6 +318,7 @@
- 
-   bool is_compiled_by_c1() const;
-   bool is_compiled_by_c2() const;
-+  bool is_compiled_by_shark() const;
- 
-   // boundaries for different parts
-   address code_begin         () const             { return _entry_point; }
---- openjdk/hotspot/src/share/vm/code/nmethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -65,6 +65,11 @@
-   assert(compiler() != NULL, "must be");
-   return compiler()->is_c2();
- }
-+bool nmethod::is_compiled_by_shark() const {
-+  if (is_native_method()) return false;
-+  assert(compiler() != NULL, "must be");
-+  return compiler()->is_shark();
-+}
- 
- 
- 
-@@ -1567,6 +1572,7 @@
- // Method that knows how to preserve outgoing arguments at call. This method must be
- // called with a frame corresponding to a Java invoke
- void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
-+#ifndef SHARK
-   if (!method()->is_native()) {
-     SimpleScopeDesc ssd(this, fr.pc());
-     Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci());
-@@ -1574,6 +1580,7 @@
-     symbolOop signature = call->signature();
-     fr.oops_compiled_arguments_do(signature, is_static, reg_map, f);
-   }
-+#endif // !SHARK
- }
- 
- 
-@@ -2003,6 +2010,8 @@
-     tty->print("(c1) ");
-   } else if (is_compiled_by_c2()) {
-     tty->print("(c2) ");
-+  } else if (is_compiled_by_shark()) {
-+    tty->print("(shark) ");
-   } else {
-     tty->print("(nm) ");
-   }
---- openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -554,6 +554,14 @@
- #endif
- #endif // COMPILER2
- 
-+#ifdef SHARK
-+#if defined(COMPILER1) || defined(COMPILER2)
-+#error "Can't use COMPILER1 or COMPILER2 with shark"
-+#endif
-+  _compilers[0] = new SharkCompiler();
-+  _compilers[1] = _compilers[0];  
-+#endif
-+  
-   // Initialize the CompileTask free list
-   _task_free_list = NULL;
- 
---- openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -45,18 +45,26 @@
-   // Missing feature tests
-   virtual bool supports_native()                 { return true; }
-   virtual bool supports_osr   ()                 { return true; }
--#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2))
-+#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK))
-   virtual bool is_c1   ()                        { return false; }
-   virtual bool is_c2   ()                        { return false; }
-+  virtual bool is_shark()                        { return false; }
- #else
- #ifdef COMPILER1
-   bool is_c1   ()                                { return true; }
-   bool is_c2   ()                                { return false; }
-+  bool is_shark()                                { return false; }
- #endif // COMPILER1
- #ifdef COMPILER2
-   bool is_c1   ()                                { return false; }
-   bool is_c2   ()                                { return true; }
-+  bool is_shark()                                { return false; }
- #endif // COMPILER2
-+#ifdef SHARK
-+  bool is_c1   ()                                { return false; }
-+  bool is_c2   ()                                { return false; }
-+  bool is_shark()                                { return true; }
-+#endif // SHARK  
- #endif // TIERED
- 
-   // Customization
---- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -69,7 +69,7 @@
- 
-   // Optional liveness analyzer.
-   MethodLiveness* _liveness;
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   ciTypeFlow*     _flow;
- #endif
- 
---- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -56,9 +56,9 @@
-   _liveness           = NULL;
-   _bcea = NULL;
-   _method_blocks = NULL;
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   _flow               = NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- 
-   if (JvmtiExport::can_hotswap_or_post_breakpoint() && _is_compilable) {
-     // 6328518 check hotswap conditions under the right lock.
-@@ -124,9 +124,9 @@
-   _bcea = NULL;
-   _method_blocks = NULL;
-   _method_data = NULL;
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   _flow = NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- }
- 
- 
-@@ -294,34 +294,34 @@
- // ------------------------------------------------------------------
- // ciMethod::get_flow_analysis
- ciTypeFlow* ciMethod::get_flow_analysis() {
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   if (_flow == NULL) {
-     ciEnv* env = CURRENT_ENV;
-     _flow = new (env->arena()) ciTypeFlow(env, this);
-     _flow->do_flow();
-   }
-   return _flow;
--#else // COMPILER2
-+#else // COMPILER2 || SHARK
-   ShouldNotReachHere();
-   return NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- }
- 
- 
- // ------------------------------------------------------------------
- // ciMethod::get_osr_flow_analysis
- ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   // OSR entry points are always place after a call bytecode of some sort
-   assert(osr_bci >= 0, "must supply valid OSR entry point");
-   ciEnv* env = CURRENT_ENV;
-   ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
-   flow->do_flow();
-   return flow;
--#else // COMPILER2
-+#else // COMPILER2 || SHARK
-   ShouldNotReachHere();
-   return NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- }
- 
- // ------------------------------------------------------------------
-diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.cpp
---- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	Tue Jun 09 09:17:11 2009 +0100
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	Tue Jun 09 10:04:02 2009 +0100
-@@ -229,6 +229,20 @@
- }
- 
- 
-+#ifdef SHARK
-+// ------------------------------------------------------------------
-+// ciMethod::itable_index
-+//
-+// Get the position of this method's entry in the itable, if any.
-+int ciMethod::itable_index() {
-+  check_is_loaded();
-+  assert(holder()->is_linked(), "must be linked");
-+  VM_ENTRY_MARK;
-+  return klassItable::compute_itable_index(get_methodOop());
-+}
-+#endif // SHARK
-+
-+
- // ------------------------------------------------------------------
- // ciMethod::native_entry
- //
-diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.hpp
---- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	Tue Jun 09 09:17:11 2009 +0100
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	Tue Jun 09 10:04:02 2009 +0100
-@@ -139,6 +139,9 @@
- 
-   // Runtime information.
-   int           vtable_index();
-+#ifdef SHARK
-+  int           itable_index();
-+#endif // SHARK
-   address       native_entry();
-   address       interpreter_entry();
- 
-diff -r 0d80af392e67 openjdk/hotspot/src/share/vm/code/nmethod.cpp
---- openjdk/hotspot/src/share/vm/code/nmethod.cpp	Thu Jul 30 10:00:04 2009 +0100
-+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	Fri Jul 31 15:39:43 2009 +0100
-@@ -1296,6 +1296,10 @@
-     ec = next;
-   }
- 
-+#ifdef SHARK
-+  ((SharkCompiler *) compiler())->free_compiled_method(instructions_begin());
-+#endif // SHARK
-+  
-   ((CodeBlob*)(this))->flush();
- 
-   CodeCache::free(this);
--- a/patches/hotspot/default/icedtea-sparc-buildfixes.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2008-12-04 20:29:08.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-12-04 20:32:54.000000000 +0000
-@@ -52,6 +52,10 @@
- PICFLAG = -fpic
- endif
- 
-+ifneq ($(filter sparc sparcv9,$(BUILDARCH)),)
-+PICFLAG = -fPIC
-+endif
-+
- VM_PICFLAG/LIBJVM = $(PICFLAG)
- VM_PICFLAG/AOUT   =
- VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
---- openjdk/hotspot/make/linux/makefiles/defs.make.orig	2008-12-04 20:29:04.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/defs.make	2008-12-04 20:32:54.000000000 +0000
-@@ -59,7 +59,7 @@
- endif
- 
- # sparc
--ifeq ($(ARCH), sparc64)
-+ifneq (,$(filter $(ARCH), sparc sparc64))
-   ifeq ($(ARCH_DATA_MODEL), 64)
-     ARCH_DATA_MODEL  = 64
-     MAKE_ARGS        += LP64=1
---- openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp.orig	2008-12-04 20:32:19.000000000 +0000
-+++ openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	2008-12-04 20:32:54.000000000 +0000
-@@ -264,7 +264,7 @@
- 
-  private:
- 
--  constantPoolCacheOop* frame::interpreter_frame_cpoolcache_addr() const;
-+  constantPoolCacheOop* interpreter_frame_cpoolcache_addr() const;
- 
- #ifndef CC_INTERP
- 
--- a/patches/hotspot/default/icedtea-sparc-ptracefix.patch	Wed Oct 21 15:04:08 2009 +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/hotspot/default/icedtea-sparc-trapsfix.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-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
--- a/patches/hotspot/default/icedtea-sparc64-linux.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-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
- }
- 
- 
--- a/patches/hotspot/default/icedtea-static-libstdc++.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-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           =
--- a/patches/hotspot/default/icedtea-text-relocations.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-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 alpha parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
- PICFLAG = -fPIC
-+else
-+PICFLAG = -fpic
-+endif
- 
- VM_PICFLAG/LIBJVM = $(PICFLAG)
- VM_PICFLAG/AOUT   =
---- rules.make.orig	2008-12-12 11:23:31.000000000 -0500
-+++ openjdk/hotspot/make/linux/makefiles/rules.make	2008-12-12 11:32:26.000000000 -0500
-@@ -138,20 +138,10 @@
- include $(GAMMADIR)/make/pic.make
- endif
- 
--# The non-PIC object files are only generated for 32 bit platforms.
--ifdef LP64
- %.o: %.cpp
- 	@echo Compiling $<
- 	$(QUIETLY) $(REMOVE_TARGET)
- 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
--else
--%.o: %.cpp
--	@echo Compiling $<
--	$(QUIETLY) $(REMOVE_TARGET)
--	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
--	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
--	   $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
--endif
- 
- %.o: %.s
- 	@echo Assembling $<
---- rules.make.orig	2008-12-12 11:42:55.000000000 -0500
-+++ openjdk/hotspot/make/solaris/makefiles/rules.make	2008-12-12 11:44:01.000000000 -0500
-@@ -138,20 +138,10 @@
- include $(GAMMADIR)/make/pic.make
- endif
- 
--# Sun compiler for 64 bit Solaris does not support building non-PIC object files.
--ifdef LP64
- %.o: %.cpp
- 	@echo Compiling $<
- 	$(QUIETLY) $(REMOVE_TARGET)
- 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
--else
--%.o: %.cpp
--	@echo Compiling $<
--	$(QUIETLY) $(REMOVE_TARGET)
--	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
--         $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
--         $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
--endif
- 
- %.o: %.s
- 	@echo Assembling $<
--- a/patches/hotspot/default/icedtea-use-idx_t.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
---- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp	2009-03-11 21:49:08.000000000 +0100
-@@ -468,7 +468,7 @@
-     bci = 0;
-   }
- 
--  MethodLivenessResult answer((uintptr_t*)NULL,0);
-+  MethodLivenessResult answer((size_t*)NULL,0);
- 
-   if (_block_count > 0) {
-     if (TimeLivenessAnalysis) _time_total.start();
-@@ -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();
- 
---- openjdk/hotspot/src/share/vm/utilities/bitMap.hpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp	2009-03-11 21:48:18.000000000 +0100
-@@ -33,7 +33,7 @@
- 
-  public:
-   typedef size_t idx_t;         // Type used for bit and word indices.
--  typedef uintptr_t bm_word_t;  // Element type of array that represents
-+  typedef size_t bm_word_t;     // Element type of array that represents
-                                 // the bitmap.
- 
-   // Hints for range sizes.
-@@ -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).
---- openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp	2009-03-11 21:48:18.000000000 +0100
-@@ -35,7 +35,7 @@
- 
- inline bool BitMap::par_set_bit(idx_t bit) {
-   verify_index(bit);
--  volatile idx_t* const addr = word_addr(bit);
-+  volatile idx_t* const addr = (idx_t *) word_addr(bit);
-   const idx_t mask = bit_mask(bit);
-   idx_t old_val = *addr;
- 
-@@ -56,7 +56,7 @@
- 
- inline bool BitMap::par_clear_bit(idx_t bit) {
-   verify_index(bit);
--  volatile idx_t* const addr = word_addr(bit);
-+  volatile idx_t* const addr = (idx_t *) word_addr(bit);
-   const idx_t mask = ~bit_mask(bit);
-   idx_t old_val = *addr;
- 
---- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2009-03-11 21:48:47.000000000 +0100
-@@ -29,7 +29,7 @@
- // CMS Bit Map Wrapper
- 
- CMBitMapRO::CMBitMapRO(ReservedSpace rs, int shifter):
--  _bm((uintptr_t*)NULL,0),
-+  _bm((size_t*)NULL,0),
-   _shifter(shifter) {
-   _bmStartWord = (HeapWord*)(rs.base());
-   _bmWordSize  = rs.size()/HeapWordSize;    // rs.size() is in bytes
-@@ -43,7 +43,7 @@
-             "couldn't reseve backing store for CMS bit map");
-   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);
--- a/patches/hotspot/default/icedtea-version.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-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)")
- 
---- arguments.cpp       2008-12-15 12:25:14.000000000 -0500
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp  2008-12-15 12:25:32.000000000 -0500
-@@ -25,7 +25,7 @@
- #include "incls/_precompiled.incl"
- #include "incls/_arguments.cpp.incl"
-
--#define DEFAULT_VENDOR_URL_BUG "http://java.sun.com/webapps/bugreport/crash.jsp"
-+#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla"
- #define DEFAULT_JAVA_LAUNCHER  "generic"
-
- char**  Arguments::_jvm_flags_array             = NULL;
--- a/patches/hotspot/default/icedtea-zero-build.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-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)
- 
--- a/patches/hotspot/original/icedtea-bytecodeInterpreter.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp
---- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-23 08:41:04.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-30 15:48:48.000000000 +0000
-@@ -60,7 +60,6 @@
- };
- 
- class BytecodeInterpreter : StackObj {
--friend class SharedRuntime;
- friend class AbstractInterpreterGenerator;
- friend class CppInterpreterGenerator;
- friend class InterpreterGenerator;
--- a/patches/hotspot/original/icedtea-core-build.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-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
- 
-
--- a/patches/hotspot/original/icedtea-gcc-stack-markings.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
---- openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s~	2009-08-06 01:08:57.000000000 -0700
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s	2009-08-06 01:09:27.000000000 -0700
-@@ -650,3 +650,4 @@ _Atomic_cmpxchg_long:
-         popl     %ebx
-         ret
- 
-+.section        .note.GNU-stack, "", @progbits
---- openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_64.s~	2009-08-06 01:08:57.000000000 -0700
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_64.s	2009-08-06 01:09:27.000000000 -0700
-@@ -400,3 +400,4 @@ _Atomic_cmpxchg_long:
-         addq     $4,%rdx
-         jg       4b
-         ret
-+.section        .note.GNU-stack, "", @progbits
--- a/patches/hotspot/original/icedtea-gcc-suffix.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
---- 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
-
--- a/patches/hotspot/original/icedtea-headers.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-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
- 
-
--- a/patches/hotspot/original/icedtea-memory-limits.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-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, 						    \
--- a/patches/hotspot/original/icedtea-no-precompiled.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2009-01-04 13:51:38.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2009-01-04 13:53:34.000000000 +0000
-@@ -34,13 +34,6 @@
- CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
- CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
- 
--# check for precompiled headers support
--ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
--USE_PRECOMPILED_HEADER=1
--PRECOMPILED_HEADER_DIR=.
--PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
--endif
--
- 
- #------------------------------------------------------------------------
- # Compiler flags
---- openjdk/hotspot/make/solaris/makefiles/gcc.make.orig	2009-01-04 14:44:12.000000000 +0000
-+++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2009-01-04 17:06:50.000000000 +0000
-@@ -45,13 +45,6 @@
- $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
- 
- 
--# check for precompiled headers support
--ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
--USE_PRECOMPILED_HEADER=1
--PRECOMPILED_HEADER_DIR=.
--PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
--endif
--
- 
- #------------------------------------------------------------------------
- # Compiler flags
--- a/patches/hotspot/original/icedtea-parisc-opt.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/product.make.orig	2008-12-10 19:02:31.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/product.make	2008-12-10 19:24:53.000000000 +0100
-@@ -25,6 +25,11 @@
- # Sets make macros for making optimized version of Gamma VM
- # (This is the "product", not the "release" version.)
- 
-+# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
-+ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
-+  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
-+endif
-+
- # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
- OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
- OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
---- openjdk/hotspot/make/linux/makefiles/optimized.make.orig	2008-12-10 19:02:22.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/optimized.make	2008-12-10 19:24:24.000000000 +0100
-@@ -25,6 +25,11 @@
- # Sets make macros for making optimized version of Gamma VM
- # (This is the "product", not the "release" version.)
- 
-+# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
-+ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
-+  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
-+endif
-+
- # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
- OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
- OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
--- a/patches/hotspot/original/icedtea-shark-build.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,233 +0,0 @@
-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)/make/$(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)
-
--- a/patches/hotspot/original/icedtea-shark.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,390 +0,0 @@
---- openjdk/hotspot/src/share/vm/oops/methodOop.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -727,10 +727,14 @@
-   }
- 
-   OrderAccess::storestore();
-+#ifdef SHARK
-+  mh->_from_interpreted_entry = code->instructions_begin();
-+#else
-   mh->_from_compiled_entry = code->verified_entry_point();
-   OrderAccess::storestore();
-   // Instantly compiled code can execute.
-   mh->_from_interpreted_entry = mh->get_i2c_entry();
-+#endif // SHARK
- 
- }
- 
---- openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -44,6 +44,7 @@
-   friend class VMStructs;
-   friend class CardTableRS;
-   friend class CheckForUnmarkedOops; // Needs access to raw card bytes.
-+  friend class SharkBuilder;
- #ifndef PRODUCT
-   // For debugging.
-   friend class GuaranteeNotModClosure;
---- openjdk/hotspot/src/share/vm/runtime/globals.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/globals.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -176,6 +176,18 @@
-   #define C2_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{C2 notproduct}", DEFAULT },
- #endif
- 
-+#define SHARK_PRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark product}", DEFAULT },
-+#define SHARK_PD_PRODUCT_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd product}", DEFAULT },
-+#define SHARK_DIAGNOSTIC_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark diagnostic}", DEFAULT },
-+#ifdef PRODUCT
-+  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) /* flag is constant */
-+  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     /* flag is constant */
-+  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc)
-+#else
-+  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark}", DEFAULT },
-+  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd}", DEFAULT },
-+  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark notproduct}", DEFAULT },
-+#endif
- 
- static Flag flagTable[] = {
-  RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT, RUNTIME_LP64_PRODUCT_FLAG_STRUCT)
-@@ -189,6 +201,9 @@
- #ifdef COMPILER2
-  C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT)
- #endif
-+#ifdef SHARK
-+ SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT)
-+#endif
-  {0, NULL, NULL}
- };
- 
---- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp.orig	2008-12-03 14:23:37.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -94,6 +94,9 @@
- #ifdef TIERED
-   #define VMTYPE "Server"
- #else
-+#ifdef SHARK
-+  #define VMTYPE "Shark"
-+#else
- #if defined(COMPILER1) || defined(COMPILER2)
-    #define VMTYPE COMPILER1_PRESENT("Client")   \
-                   COMPILER2_PRESENT("Server")
-@@ -104,6 +107,7 @@
-   #define VMTYPE "Core"
- #endif // ZERO
- #endif // COMPILER1 || COMPILER2
-+#endif // SHARK
- #endif // TIERED
- #endif // KERNEL
- 
---- openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -229,6 +229,7 @@
- 
-   }
- 
-+#ifndef SHARK
-   // Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info.
-   CodeBlob* cb = stub_frame.cb();
-   // Verify we have the right vframeArray
-@@ -239,6 +240,10 @@
-   assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking");
-   Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp);
- #endif
-+#else
-+  intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp();
-+#endif // !SHARK
-+  
-   // This is a guarantee instead of an assert because if vframe doesn't match
-   // we will unpack the wrong deoptimized frame and wind up in strange places
-   // where it will be very difficult to figure out what went wrong. Better
-@@ -349,7 +354,9 @@
- 
-   frame_pcs[0] = deopt_sender.raw_pc();
- 
-+#ifndef SHARK
-   assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc");
-+#endif // SHARK
- 
-   UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord,
-                                       caller_adjustment * BytesPerWord,
-@@ -890,7 +897,20 @@
-   // stuff a C2I adapter we can properly fill in the callee-save
-   // register locations.
-   frame caller = fr.sender(reg_map);
-+#ifdef ZERO
-+  int frame_size;
-+  {
-+    // In zero, frame::sp() is the *end* of the frame, so
-+    // caller.sp() - fr.sp() is the size of the *caller*.
-+    RegisterMap dummy_map(thread, false);
-+    frame frame_1 = thread->last_frame();
-+    frame frame_2 = frame_1.sender(&dummy_map);
-+    assert(frame_2.sp() == fr.sp(), "should be");
-+    frame_size = frame_2.sp() - frame_1.sp();
-+  }
-+#else
-   int frame_size = caller.sp() - fr.sp();
-+#endif // ZERO
- 
-   frame sender = caller;
- 
-@@ -1057,7 +1077,7 @@
- JRT_END
- 
- 
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
- void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) {
-   // in case of an unresolved klass entry, load the class.
-   if (constant_pool->tag_at(index).is_unresolved_klass()) {
-@@ -1808,7 +1828,7 @@
-     if (xtty != NULL)  xtty->tail("statistics");
-   }
- }
--#else // COMPILER2
-+#else // COMPILER2 || SHARK
- 
- 
- // Stubs for C1 only system.
-@@ -1844,4 +1864,4 @@
-   return buf;
- }
- 
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
---- openjdk/hotspot/src/share/vm/runtime/globals.hpp.orig	2008-12-03 14:22:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -22,7 +22,7 @@
-  *
-  */
- 
--#if !defined(COMPILER1) && !defined(COMPILER2)
-+#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
- define_pd_global(bool, BackgroundCompilation,        false);
- define_pd_global(bool, UseTLAB,                      false);
- define_pd_global(bool, CICompileOSR,                 false);
---- openjdk/hotspot/src/share/vm/code/nmethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/code/nmethod.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -318,6 +318,7 @@
- 
-   bool is_compiled_by_c1() const;
-   bool is_compiled_by_c2() const;
-+  bool is_compiled_by_shark() const;
- 
-   // boundaries for different parts
-   address code_begin         () const             { return _entry_point; }
---- openjdk/hotspot/src/share/vm/code/nmethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -65,6 +65,11 @@
-   assert(compiler() != NULL, "must be");
-   return compiler()->is_c2();
- }
-+bool nmethod::is_compiled_by_shark() const {
-+  if (is_native_method()) return false;
-+  assert(compiler() != NULL, "must be");
-+  return compiler()->is_shark();
-+}
- 
- 
- 
-@@ -1567,6 +1572,7 @@
- // Method that knows how to preserve outgoing arguments at call. This method must be
- // called with a frame corresponding to a Java invoke
- void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
-+#ifndef SHARK
-   if (!method()->is_native()) {
-     SimpleScopeDesc ssd(this, fr.pc());
-     Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci());
-@@ -1574,6 +1580,7 @@
-     symbolOop signature = call->signature();
-     fr.oops_compiled_arguments_do(signature, is_static, reg_map, f);
-   }
-+#endif // !SHARK
- }
- 
- 
-@@ -2003,6 +2010,8 @@
-     tty->print("(c1) ");
-   } else if (is_compiled_by_c2()) {
-     tty->print("(c2) ");
-+  } else if (is_compiled_by_shark()) {
-+    tty->print("(shark) ");
-   } else {
-     tty->print("(nm) ");
-   }
---- openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -554,6 +554,14 @@
- #endif
- #endif // COMPILER2
- 
-+#ifdef SHARK
-+#if defined(COMPILER1) || defined(COMPILER2)
-+#error "Can't use COMPILER1 or COMPILER2 with shark"
-+#endif
-+  _compilers[0] = new SharkCompiler();
-+  _compilers[1] = _compilers[0];  
-+#endif
-+  
-   // Initialize the CompileTask free list
-   _task_free_list = NULL;
- 
---- openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -45,18 +45,26 @@
-   // Missing feature tests
-   virtual bool supports_native()                 { return true; }
-   virtual bool supports_osr   ()                 { return true; }
--#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2))
-+#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK))
-   virtual bool is_c1   ()                        { return false; }
-   virtual bool is_c2   ()                        { return false; }
-+  virtual bool is_shark()                        { return false; }
- #else
- #ifdef COMPILER1
-   bool is_c1   ()                                { return true; }
-   bool is_c2   ()                                { return false; }
-+  bool is_shark()                                { return false; }
- #endif // COMPILER1
- #ifdef COMPILER2
-   bool is_c1   ()                                { return false; }
-   bool is_c2   ()                                { return true; }
-+  bool is_shark()                                { return false; }
- #endif // COMPILER2
-+#ifdef SHARK
-+  bool is_c1   ()                                { return false; }
-+  bool is_c2   ()                                { return false; }
-+  bool is_shark()                                { return true; }
-+#endif // SHARK  
- #endif // TIERED
- 
-   // Customization
---- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -69,7 +69,7 @@
- 
-   // Optional liveness analyzer.
-   MethodLiveness* _liveness;
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   ciTypeFlow*     _flow;
- #endif
- 
---- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -56,9 +56,9 @@
-   _liveness           = NULL;
-   _bcea = NULL;
-   _method_blocks = NULL;
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   _flow               = NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- 
-   if (JvmtiExport::can_hotswap_or_post_breakpoint() && _is_compilable) {
-     // 6328518 check hotswap conditions under the right lock.
-@@ -124,9 +124,9 @@
-   _bcea = NULL;
-   _method_blocks = NULL;
-   _method_data = NULL;
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   _flow = NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- }
- 
- 
-@@ -294,34 +294,34 @@
- // ------------------------------------------------------------------
- // ciMethod::get_flow_analysis
- ciTypeFlow* ciMethod::get_flow_analysis() {
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   if (_flow == NULL) {
-     ciEnv* env = CURRENT_ENV;
-     _flow = new (env->arena()) ciTypeFlow(env, this);
-     _flow->do_flow();
-   }
-   return _flow;
--#else // COMPILER2
-+#else // COMPILER2 || SHARK
-   ShouldNotReachHere();
-   return NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- }
- 
- 
- // ------------------------------------------------------------------
- // ciMethod::get_osr_flow_analysis
- ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   // OSR entry points are always place after a call bytecode of some sort
-   assert(osr_bci >= 0, "must supply valid OSR entry point");
-   ciEnv* env = CURRENT_ENV;
-   ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
-   flow->do_flow();
-   return flow;
--#else // COMPILER2
-+#else // COMPILER2 || SHARK
-   ShouldNotReachHere();
-   return NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- }
- 
- // ------------------------------------------------------------------
-diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.cpp
---- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	Tue Jun 09 09:17:11 2009 +0100
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	Tue Jun 09 10:04:02 2009 +0100
-@@ -229,6 +229,20 @@
- }
- 
- 
-+#ifdef SHARK
-+// ------------------------------------------------------------------
-+// ciMethod::itable_index
-+//
-+// Get the position of this method's entry in the itable, if any.
-+int ciMethod::itable_index() {
-+  check_is_loaded();
-+  assert(holder()->is_linked(), "must be linked");
-+  VM_ENTRY_MARK;
-+  return klassItable::compute_itable_index(get_methodOop());
-+}
-+#endif // SHARK
-+
-+
- // ------------------------------------------------------------------
- // ciMethod::native_entry
- //
-diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.hpp
---- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	Tue Jun 09 09:17:11 2009 +0100
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	Tue Jun 09 10:04:02 2009 +0100
-@@ -139,6 +139,9 @@
- 
-   // Runtime information.
-   int           vtable_index();
-+#ifdef SHARK
-+  int           itable_index();
-+#endif // SHARK
-   address       native_entry();
-   address       interpreter_entry();
- 
-diff -r 0d80af392e67 openjdk/hotspot/src/share/vm/code/nmethod.cpp
---- openjdk/hotspot/src/share/vm/code/nmethod.cpp	Thu Jul 30 10:00:04 2009 +0100
-+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	Fri Jul 31 15:39:43 2009 +0100
-@@ -1296,6 +1296,10 @@
-     ec = next;
-   }
- 
-+#ifdef SHARK
-+  ((SharkCompiler *) compiler())->free_compiled_method(instructions_begin());
-+#endif // SHARK
-+  
-   ((CodeBlob*)(this))->flush();
- 
-   CodeCache::free(this);
--- a/patches/hotspot/original/icedtea-sparc-buildfixes.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2008-12-04 20:29:08.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-12-04 20:32:54.000000000 +0000
-@@ -52,6 +52,10 @@
- PICFLAG = -fpic
- endif
- 
-+ifneq ($(filter sparc sparcv9,$(BUILDARCH)),)
-+PICFLAG = -fPIC
-+endif
-+
- VM_PICFLAG/LIBJVM = $(PICFLAG)
- VM_PICFLAG/AOUT   =
- VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
---- openjdk/hotspot/make/linux/makefiles/defs.make.orig	2008-12-04 20:29:04.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/defs.make	2008-12-04 20:32:54.000000000 +0000
-@@ -59,7 +59,7 @@
- endif
- 
- # sparc
--ifeq ($(ARCH), sparc64)
-+ifneq (,$(filter $(ARCH), sparc sparc64))
-   ifeq ($(ARCH_DATA_MODEL), 64)
-     ARCH_DATA_MODEL  = 64
-     MAKE_ARGS        += LP64=1
---- openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp.orig	2008-12-04 20:32:19.000000000 +0000
-+++ openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	2008-12-04 20:32:54.000000000 +0000
-@@ -264,7 +264,7 @@
- 
-  private:
- 
--  constantPoolCacheOop* frame::interpreter_frame_cpoolcache_addr() const;
-+  constantPoolCacheOop* interpreter_frame_cpoolcache_addr() const;
- 
- #ifndef CC_INTERP
- 
--- a/patches/hotspot/original/icedtea-sparc-ptracefix.patch	Wed Oct 21 15:04:08 2009 +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/hotspot/original/icedtea-sparc-trapsfix.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-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
--- a/patches/hotspot/original/icedtea-sparc64-linux.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-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
- }
- 
- 
--- a/patches/hotspot/original/icedtea-static-libstdc++.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-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           =
--- a/patches/hotspot/original/icedtea-text-relocations.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-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 alpha parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
- PICFLAG = -fPIC
-+else
-+PICFLAG = -fpic
-+endif
- 
- VM_PICFLAG/LIBJVM = $(PICFLAG)
- VM_PICFLAG/AOUT   =
---- rules.make.orig	2008-12-12 11:23:31.000000000 -0500
-+++ openjdk/hotspot/make/linux/makefiles/rules.make	2008-12-12 11:32:26.000000000 -0500
-@@ -138,20 +138,10 @@
- include $(GAMMADIR)/make/pic.make
- endif
- 
--# The non-PIC object files are only generated for 32 bit platforms.
--ifdef LP64
- %.o: %.cpp
- 	@echo Compiling $<
- 	$(QUIETLY) $(REMOVE_TARGET)
- 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
--else
--%.o: %.cpp
--	@echo Compiling $<
--	$(QUIETLY) $(REMOVE_TARGET)
--	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
--	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
--	   $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
--endif
- 
- %.o: %.s
- 	@echo Assembling $<
---- rules.make.orig	2008-12-12 11:42:55.000000000 -0500
-+++ openjdk/hotspot/make/solaris/makefiles/rules.make	2008-12-12 11:44:01.000000000 -0500
-@@ -138,20 +138,10 @@
- include $(GAMMADIR)/make/pic.make
- endif
- 
--# Sun compiler for 64 bit Solaris does not support building non-PIC object files.
--ifdef LP64
- %.o: %.cpp
- 	@echo Compiling $<
- 	$(QUIETLY) $(REMOVE_TARGET)
- 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
--else
--%.o: %.cpp
--	@echo Compiling $<
--	$(QUIETLY) $(REMOVE_TARGET)
--	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
--         $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
--         $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
--endif
- 
- %.o: %.s
- 	@echo Assembling $<
--- a/patches/hotspot/original/icedtea-use-idx_t.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
---- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp	2009-03-11 21:49:08.000000000 +0100
-@@ -468,7 +468,7 @@
-     bci = 0;
-   }
- 
--  MethodLivenessResult answer((uintptr_t*)NULL,0);
-+  MethodLivenessResult answer((size_t*)NULL,0);
- 
-   if (_block_count > 0) {
-     if (TimeLivenessAnalysis) _time_total.start();
-@@ -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();
- 
---- openjdk/hotspot/src/share/vm/utilities/bitMap.hpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp	2009-03-11 21:48:18.000000000 +0100
-@@ -33,7 +33,7 @@
- 
-  public:
-   typedef size_t idx_t;         // Type used for bit and word indices.
--  typedef uintptr_t bm_word_t;  // Element type of array that represents
-+  typedef size_t bm_word_t;     // Element type of array that represents
-                                 // the bitmap.
- 
-   // Hints for range sizes.
-@@ -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).
---- openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp	2009-03-11 21:48:18.000000000 +0100
-@@ -35,7 +35,7 @@
- 
- inline bool BitMap::par_set_bit(idx_t bit) {
-   verify_index(bit);
--  volatile idx_t* const addr = word_addr(bit);
-+  volatile idx_t* const addr = (idx_t *) word_addr(bit);
-   const idx_t mask = bit_mask(bit);
-   idx_t old_val = *addr;
- 
-@@ -56,7 +56,7 @@
- 
- inline bool BitMap::par_clear_bit(idx_t bit) {
-   verify_index(bit);
--  volatile idx_t* const addr = word_addr(bit);
-+  volatile idx_t* const addr = (idx_t *) word_addr(bit);
-   const idx_t mask = ~bit_mask(bit);
-   idx_t old_val = *addr;
- 
---- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.orig	2008-12-20 18:59:01.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2009-03-11 21:48:47.000000000 +0100
-@@ -29,7 +29,7 @@
- // CMS Bit Map Wrapper
- 
- CMBitMapRO::CMBitMapRO(ReservedSpace rs, int shifter):
--  _bm((uintptr_t*)NULL,0),
-+  _bm((size_t*)NULL,0),
-   _shifter(shifter) {
-   _bmStartWord = (HeapWord*)(rs.base());
-   _bmWordSize  = rs.size()/HeapWordSize;    // rs.size() is in bytes
-@@ -43,7 +43,7 @@
-             "couldn't reseve backing store for CMS bit map");
-   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);
--- a/patches/hotspot/original/icedtea-version.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-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)")
- 
---- arguments.cpp       2008-12-15 12:25:14.000000000 -0500
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp  2008-12-15 12:25:32.000000000 -0500
-@@ -25,7 +25,7 @@
- #include "incls/_precompiled.incl"
- #include "incls/_arguments.cpp.incl"
-
--#define DEFAULT_VENDOR_URL_BUG "http://java.sun.com/webapps/bugreport/crash.jsp"
-+#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla"
- #define DEFAULT_JAVA_LAUNCHER  "generic"
-
- char**  Arguments::_jvm_flags_array             = NULL;
--- a/patches/hotspot/original/icedtea-zero-build.patch	Wed Oct 21 15:04:08 2009 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-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-bytecodeInterpreter.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -0,0 +1,11 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp
+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-23 08:41:04.000000000 +0100
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-30 15:48:48.000000000 +0000
+@@ -60,7 +60,6 @@
+ };
+ 
+ class BytecodeInterpreter : StackObj {
+-friend class SharedRuntime;
+ friend class AbstractInterpreterGenerator;
+ friend class CppInterpreterGenerator;
+ friend class InterpreterGenerator;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-core-build-hotspot.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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-gcc-stack-markings.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -0,0 +1,14 @@
+--- openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s~	2009-08-06 01:08:57.000000000 -0700
++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_32.s	2009-08-06 01:09:27.000000000 -0700
+@@ -650,3 +650,4 @@ _Atomic_cmpxchg_long:
+         popl     %ebx
+         ret
+ 
++.section        .note.GNU-stack, "", @progbits
+--- openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_64.s~	2009-08-06 01:08:57.000000000 -0700
++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/linux_x86_64.s	2009-08-06 01:09:27.000000000 -0700
+@@ -400,3 +400,4 @@ _Atomic_cmpxchg_long:
+         addq     $4,%rdx
+         jg       4b
+         ret
++.section        .note.GNU-stack, "", @progbits
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-gcc-suffix-hotspot.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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-headers-hotspot.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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-memory-limits.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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-no-precompiled.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -0,0 +1,32 @@
+--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2009-01-04 13:51:38.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2009-01-04 13:53:34.000000000 +0000
+@@ -34,13 +34,6 @@
+ CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
+ CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
+ 
+-# check for precompiled headers support
+-ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
+-USE_PRECOMPILED_HEADER=1
+-PRECOMPILED_HEADER_DIR=.
+-PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
+-endif
+-
+ 
+ #------------------------------------------------------------------------
+ # Compiler flags
+--- openjdk/hotspot/make/solaris/makefiles/gcc.make.orig	2009-01-04 14:44:12.000000000 +0000
++++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2009-01-04 17:06:50.000000000 +0000
+@@ -45,13 +45,6 @@
+ $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
+ 
+ 
+-# check for precompiled headers support
+-ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
+-USE_PRECOMPILED_HEADER=1
+-PRECOMPILED_HEADER_DIR=.
+-PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
+-endif
+-
+ 
+ #------------------------------------------------------------------------
+ # Compiler flags
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-parisc-opt.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -0,0 +1,28 @@
+--- openjdk/hotspot/make/linux/makefiles/product.make.orig	2008-12-10 19:02:31.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/product.make	2008-12-10 19:24:53.000000000 +0100
+@@ -25,6 +25,11 @@
+ # Sets make macros for making optimized version of Gamma VM
+ # (This is the "product", not the "release" version.)
+ 
++# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
++ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
++  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
++endif
++
+ # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
+ OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
+ OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
+--- openjdk/hotspot/make/linux/makefiles/optimized.make.orig	2008-12-10 19:02:22.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/optimized.make	2008-12-10 19:24:24.000000000 +0100
+@@ -25,6 +25,11 @@
+ # Sets make macros for making optimized version of Gamma VM
+ # (This is the "product", not the "release" version.)
+ 
++# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
++ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
++  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
++endif
++
+ # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
+ OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
+ OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-shark-build-hotspot.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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)/make/$(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-shark.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -0,0 +1,390 @@
+--- openjdk/hotspot/src/share/vm/oops/methodOop.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -727,10 +727,14 @@
+   }
+ 
+   OrderAccess::storestore();
++#ifdef SHARK
++  mh->_from_interpreted_entry = code->instructions_begin();
++#else
+   mh->_from_compiled_entry = code->verified_entry_point();
+   OrderAccess::storestore();
+   // Instantly compiled code can execute.
+   mh->_from_interpreted_entry = mh->get_i2c_entry();
++#endif // SHARK
+ 
+ }
+ 
+--- openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -44,6 +44,7 @@
+   friend class VMStructs;
+   friend class CardTableRS;
+   friend class CheckForUnmarkedOops; // Needs access to raw card bytes.
++  friend class SharkBuilder;
+ #ifndef PRODUCT
+   // For debugging.
+   friend class GuaranteeNotModClosure;
+--- openjdk/hotspot/src/share/vm/runtime/globals.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/globals.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -176,6 +176,18 @@
+   #define C2_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{C2 notproduct}", DEFAULT },
+ #endif
+ 
++#define SHARK_PRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark product}", DEFAULT },
++#define SHARK_PD_PRODUCT_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd product}", DEFAULT },
++#define SHARK_DIAGNOSTIC_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark diagnostic}", DEFAULT },
++#ifdef PRODUCT
++  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) /* flag is constant */
++  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     /* flag is constant */
++  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc)
++#else
++  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark}", DEFAULT },
++  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd}", DEFAULT },
++  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark notproduct}", DEFAULT },
++#endif
+ 
+ static Flag flagTable[] = {
+  RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT, RUNTIME_LP64_PRODUCT_FLAG_STRUCT)
+@@ -189,6 +201,9 @@
+ #ifdef COMPILER2
+  C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT)
+ #endif
++#ifdef SHARK
++ SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT)
++#endif
+  {0, NULL, NULL}
+ };
+ 
+--- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp.orig	2008-12-03 14:23:37.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -94,6 +94,9 @@
+ #ifdef TIERED
+   #define VMTYPE "Server"
+ #else
++#ifdef SHARK
++  #define VMTYPE "Shark"
++#else
+ #if defined(COMPILER1) || defined(COMPILER2)
+    #define VMTYPE COMPILER1_PRESENT("Client")   \
+                   COMPILER2_PRESENT("Server")
+@@ -104,6 +107,7 @@
+   #define VMTYPE "Core"
+ #endif // ZERO
+ #endif // COMPILER1 || COMPILER2
++#endif // SHARK
+ #endif // TIERED
+ #endif // KERNEL
+ 
+--- openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -229,6 +229,7 @@
+ 
+   }
+ 
++#ifndef SHARK
+   // Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info.
+   CodeBlob* cb = stub_frame.cb();
+   // Verify we have the right vframeArray
+@@ -239,6 +240,10 @@
+   assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking");
+   Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp);
+ #endif
++#else
++  intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp();
++#endif // !SHARK
++  
+   // This is a guarantee instead of an assert because if vframe doesn't match
+   // we will unpack the wrong deoptimized frame and wind up in strange places
+   // where it will be very difficult to figure out what went wrong. Better
+@@ -349,7 +354,9 @@
+ 
+   frame_pcs[0] = deopt_sender.raw_pc();
+ 
++#ifndef SHARK
+   assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc");
++#endif // SHARK
+ 
+   UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord,
+                                       caller_adjustment * BytesPerWord,
+@@ -890,7 +897,20 @@
+   // stuff a C2I adapter we can properly fill in the callee-save
+   // register locations.
+   frame caller = fr.sender(reg_map);
++#ifdef ZERO
++  int frame_size;
++  {
++    // In zero, frame::sp() is the *end* of the frame, so
++    // caller.sp() - fr.sp() is the size of the *caller*.
++    RegisterMap dummy_map(thread, false);
++    frame frame_1 = thread->last_frame();
++    frame frame_2 = frame_1.sender(&dummy_map);
++    assert(frame_2.sp() == fr.sp(), "should be");
++    frame_size = frame_2.sp() - frame_1.sp();
++  }
++#else
+   int frame_size = caller.sp() - fr.sp();
++#endif // ZERO
+ 
+   frame sender = caller;
+ 
+@@ -1057,7 +1077,7 @@
+ JRT_END
+ 
+ 
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+ void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) {
+   // in case of an unresolved klass entry, load the class.
+   if (constant_pool->tag_at(index).is_unresolved_klass()) {
+@@ -1808,7 +1828,7 @@
+     if (xtty != NULL)  xtty->tail("statistics");
+   }
+ }
+-#else // COMPILER2
++#else // COMPILER2 || SHARK
+ 
+ 
+ // Stubs for C1 only system.
+@@ -1844,4 +1864,4 @@
+   return buf;
+ }
+ 
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+--- openjdk/hotspot/src/share/vm/runtime/globals.hpp.orig	2008-12-03 14:22:17.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -22,7 +22,7 @@
+  *
+  */
+ 
+-#if !defined(COMPILER1) && !defined(COMPILER2)
++#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
+ define_pd_global(bool, BackgroundCompilation,        false);
+ define_pd_global(bool, UseTLAB,                      false);
+ define_pd_global(bool, CICompileOSR,                 false);
+--- openjdk/hotspot/src/share/vm/code/nmethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/code/nmethod.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -318,6 +318,7 @@
+ 
+   bool is_compiled_by_c1() const;
+   bool is_compiled_by_c2() const;
++  bool is_compiled_by_shark() const;
+ 
+   // boundaries for different parts
+   address code_begin         () const             { return _entry_point; }
+--- openjdk/hotspot/src/share/vm/code/nmethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -65,6 +65,11 @@
+   assert(compiler() != NULL, "must be");
+   return compiler()->is_c2();
+ }
++bool nmethod::is_compiled_by_shark() const {
++  if (is_native_method()) return false;
++  assert(compiler() != NULL, "must be");
++  return compiler()->is_shark();
++}
+ 
+ 
+ 
+@@ -1567,6 +1572,7 @@
+ // Method that knows how to preserve outgoing arguments at call. This method must be
+ // called with a frame corresponding to a Java invoke
+ void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
++#ifndef SHARK
+   if (!method()->is_native()) {
+     SimpleScopeDesc ssd(this, fr.pc());
+     Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci());
+@@ -1574,6 +1580,7 @@
+     symbolOop signature = call->signature();
+     fr.oops_compiled_arguments_do(signature, is_static, reg_map, f);
+   }
++#endif // !SHARK
+ }
+ 
+ 
+@@ -2003,6 +2010,8 @@
+     tty->print("(c1) ");
+   } else if (is_compiled_by_c2()) {
+     tty->print("(c2) ");
++  } else if (is_compiled_by_shark()) {
++    tty->print("(shark) ");
+   } else {
+     tty->print("(nm) ");
+   }
+--- openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -554,6 +554,14 @@
+ #endif
+ #endif // COMPILER2
+ 
++#ifdef SHARK
++#if defined(COMPILER1) || defined(COMPILER2)
++#error "Can't use COMPILER1 or COMPILER2 with shark"
++#endif
++  _compilers[0] = new SharkCompiler();
++  _compilers[1] = _compilers[0];  
++#endif
++  
+   // Initialize the CompileTask free list
+   _task_free_list = NULL;
+ 
+--- openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -45,18 +45,26 @@
+   // Missing feature tests
+   virtual bool supports_native()                 { return true; }
+   virtual bool supports_osr   ()                 { return true; }
+-#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2))
++#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK))
+   virtual bool is_c1   ()                        { return false; }
+   virtual bool is_c2   ()                        { return false; }
++  virtual bool is_shark()                        { return false; }
+ #else
+ #ifdef COMPILER1
+   bool is_c1   ()                                { return true; }
+   bool is_c2   ()                                { return false; }
++  bool is_shark()                                { return false; }
+ #endif // COMPILER1
+ #ifdef COMPILER2
+   bool is_c1   ()                                { return false; }
+   bool is_c2   ()                                { return true; }
++  bool is_shark()                                { return false; }
+ #endif // COMPILER2
++#ifdef SHARK
++  bool is_c1   ()                                { return false; }
++  bool is_c2   ()                                { return false; }
++  bool is_shark()                                { return true; }
++#endif // SHARK  
+ #endif // TIERED
+ 
+   // Customization
+--- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -69,7 +69,7 @@
+ 
+   // Optional liveness analyzer.
+   MethodLiveness* _liveness;
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   ciTypeFlow*     _flow;
+ #endif
+ 
+--- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -56,9 +56,9 @@
+   _liveness           = NULL;
+   _bcea = NULL;
+   _method_blocks = NULL;
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   _flow               = NULL;
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+ 
+   if (JvmtiExport::can_hotswap_or_post_breakpoint() && _is_compilable) {
+     // 6328518 check hotswap conditions under the right lock.
+@@ -124,9 +124,9 @@
+   _bcea = NULL;
+   _method_blocks = NULL;
+   _method_data = NULL;
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   _flow = NULL;
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+ }
+ 
+ 
+@@ -294,34 +294,34 @@
+ // ------------------------------------------------------------------
+ // ciMethod::get_flow_analysis
+ ciTypeFlow* ciMethod::get_flow_analysis() {
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   if (_flow == NULL) {
+     ciEnv* env = CURRENT_ENV;
+     _flow = new (env->arena()) ciTypeFlow(env, this);
+     _flow->do_flow();
+   }
+   return _flow;
+-#else // COMPILER2
++#else // COMPILER2 || SHARK
+   ShouldNotReachHere();
+   return NULL;
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+ }
+ 
+ 
+ // ------------------------------------------------------------------
+ // ciMethod::get_osr_flow_analysis
+ ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   // OSR entry points are always place after a call bytecode of some sort
+   assert(osr_bci >= 0, "must supply valid OSR entry point");
+   ciEnv* env = CURRENT_ENV;
+   ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
+   flow->do_flow();
+   return flow;
+-#else // COMPILER2
++#else // COMPILER2 || SHARK
+   ShouldNotReachHere();
+   return NULL;
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+ }
+ 
+ // ------------------------------------------------------------------
+diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.cpp
+--- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	Tue Jun 09 09:17:11 2009 +0100
++++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	Tue Jun 09 10:04:02 2009 +0100
+@@ -229,6 +229,20 @@
+ }
+ 
+ 
++#ifdef SHARK
++// ------------------------------------------------------------------
++// ciMethod::itable_index
++//
++// Get the position of this method's entry in the itable, if any.
++int ciMethod::itable_index() {
++  check_is_loaded();
++  assert(holder()->is_linked(), "must be linked");
++  VM_ENTRY_MARK;
++  return klassItable::compute_itable_index(get_methodOop());
++}
++#endif // SHARK
++
++
+ // ------------------------------------------------------------------
+ // ciMethod::native_entry
+ //
+diff -r 12c97e7e55eb -r e6fef2ef2fea openjdk/hotspot/src/share/vm/ci/ciMethod.hpp
+--- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	Tue Jun 09 09:17:11 2009 +0100
++++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	Tue Jun 09 10:04:02 2009 +0100
+@@ -139,6 +139,9 @@
+ 
+   // Runtime information.
+   int           vtable_index();
++#ifdef SHARK
++  int           itable_index();
++#endif // SHARK
+   address       native_entry();
+   address       interpreter_entry();
+ 
+diff -r 0d80af392e67 openjdk/hotspot/src/share/vm/code/nmethod.cpp
+--- openjdk/hotspot/src/share/vm/code/nmethod.cpp	Thu Jul 30 10:00:04 2009 +0100
++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	Fri Jul 31 15:39:43 2009 +0100
+@@ -1296,6 +1296,10 @@
+     ec = next;
+   }
+ 
++#ifdef SHARK
++  ((SharkCompiler *) compiler())->free_compiled_method(instructions_begin());
++#endif // SHARK
++  
+   ((CodeBlob*)(this))->flush();
+ 
+   CodeCache::free(this);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-sparc-buildfixes.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -0,0 +1,35 @@
+--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2008-12-04 20:29:08.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-12-04 20:32:54.000000000 +0000
+@@ -52,6 +52,10 @@
+ PICFLAG = -fpic
+ endif
+ 
++ifneq ($(filter sparc sparcv9,$(BUILDARCH)),)
++PICFLAG = -fPIC
++endif
++
+ VM_PICFLAG/LIBJVM = $(PICFLAG)
+ VM_PICFLAG/AOUT   =
+ VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
+--- openjdk/hotspot/make/linux/makefiles/defs.make.orig	2008-12-04 20:29:04.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/defs.make	2008-12-04 20:32:54.000000000 +0000
+@@ -59,7 +59,7 @@
+ endif
+ 
+ # sparc
+-ifeq ($(ARCH), sparc64)
++ifneq (,$(filter $(ARCH), sparc sparc64))
+   ifeq ($(ARCH_DATA_MODEL), 64)
+     ARCH_DATA_MODEL  = 64
+     MAKE_ARGS        += LP64=1
+--- openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp.orig	2008-12-04 20:32:19.000000000 +0000
++++ openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	2008-12-04 20:32:54.000000000 +0000
+@@ -264,7 +264,7 @@
+ 
+  private:
+ 
+-  constantPoolCacheOop* frame::interpreter_frame_cpoolcache_addr() const;
++  constantPoolCacheOop* interpreter_frame_cpoolcache_addr() const;
+ 
+ #ifndef CC_INTERP
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-sparc-ptracefix.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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-sparc-trapsfix.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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-sparc64-linux.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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-static-libstdc++.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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-text-relocations.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -0,0 +1,61 @@
+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 alpha parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
+ PICFLAG = -fPIC
++else
++PICFLAG = -fpic
++endif
+ 
+ VM_PICFLAG/LIBJVM = $(PICFLAG)
+ VM_PICFLAG/AOUT   =
+--- rules.make.orig	2008-12-12 11:23:31.000000000 -0500
++++ openjdk/hotspot/make/linux/makefiles/rules.make	2008-12-12 11:32:26.000000000 -0500
+@@ -138,20 +138,10 @@
+ include $(GAMMADIR)/make/pic.make
+ endif
+ 
+-# The non-PIC object files are only generated for 32 bit platforms.
+-ifdef LP64
+ %.o: %.cpp
+ 	@echo Compiling $<
+ 	$(QUIETLY) $(REMOVE_TARGET)
+ 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+-else
+-%.o: %.cpp
+-	@echo Compiling $<
+-	$(QUIETLY) $(REMOVE_TARGET)
+-	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
+-	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
+-	   $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
+-endif
+ 
+ %.o: %.s
+ 	@echo Assembling $<
+--- rules.make.orig	2008-12-12 11:42:55.000000000 -0500
++++ openjdk/hotspot/make/solaris/makefiles/rules.make	2008-12-12 11:44:01.000000000 -0500
+@@ -138,20 +138,10 @@
+ include $(GAMMADIR)/make/pic.make
+ endif
+ 
+-# Sun compiler for 64 bit Solaris does not support building non-PIC object files.
+-ifdef LP64
+ %.o: %.cpp
+ 	@echo Compiling $<
+ 	$(QUIETLY) $(REMOVE_TARGET)
+ 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+-else
+-%.o: %.cpp
+-	@echo Compiling $<
+-	$(QUIETLY) $(REMOVE_TARGET)
+-	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
+-         $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
+-         $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
+-endif
+ 
+ %.o: %.s
+ 	@echo Assembling $<
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-use-idx_t.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -0,0 +1,101 @@
+--- openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp.orig	2008-12-20 18:59:01.000000000 +0100
++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp	2009-03-11 21:49:08.000000000 +0100
+@@ -468,7 +468,7 @@
+     bci = 0;
+   }
+ 
+-  MethodLivenessResult answer((uintptr_t*)NULL,0);
++  MethodLivenessResult answer((size_t*)NULL,0);
+ 
+   if (_block_count > 0) {
+     if (TimeLivenessAnalysis) _time_total.start();
+@@ -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();
+ 
+--- openjdk/hotspot/src/share/vm/utilities/bitMap.hpp.orig	2008-12-20 18:59:01.000000000 +0100
++++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp	2009-03-11 21:48:18.000000000 +0100
+@@ -33,7 +33,7 @@
+ 
+  public:
+   typedef size_t idx_t;         // Type used for bit and word indices.
+-  typedef uintptr_t bm_word_t;  // Element type of array that represents
++  typedef size_t bm_word_t;     // Element type of array that represents
+                                 // the bitmap.
+ 
+   // Hints for range sizes.
+@@ -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).
+--- openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp.orig	2008-12-20 18:59:01.000000000 +0100
++++ openjdk/hotspot/src/share/vm/utilities/bitMap.inline.hpp	2009-03-11 21:48:18.000000000 +0100
+@@ -35,7 +35,7 @@
+ 
+ inline bool BitMap::par_set_bit(idx_t bit) {
+   verify_index(bit);
+-  volatile idx_t* const addr = word_addr(bit);
++  volatile idx_t* const addr = (idx_t *) word_addr(bit);
+   const idx_t mask = bit_mask(bit);
+   idx_t old_val = *addr;
+ 
+@@ -56,7 +56,7 @@
+ 
+ inline bool BitMap::par_clear_bit(idx_t bit) {
+   verify_index(bit);
+-  volatile idx_t* const addr = word_addr(bit);
++  volatile idx_t* const addr = (idx_t *) word_addr(bit);
+   const idx_t mask = ~bit_mask(bit);
+   idx_t old_val = *addr;
+ 
+--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.orig	2008-12-20 18:59:01.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2009-03-11 21:48:47.000000000 +0100
+@@ -29,7 +29,7 @@
+ // CMS Bit Map Wrapper
+ 
+ CMBitMapRO::CMBitMapRO(ReservedSpace rs, int shifter):
+-  _bm((uintptr_t*)NULL,0),
++  _bm((size_t*)NULL,0),
+   _shifter(shifter) {
+   _bmStartWord = (HeapWord*)(rs.base());
+   _bmWordSize  = rs.size()/HeapWordSize;    // rs.size() is in bytes
+@@ -43,7 +43,7 @@
+             "couldn't reseve backing store for CMS bit map");
+   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);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-version-hotspot.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -0,0 +1,48 @@
+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)")
+ 
+--- arguments.cpp       2008-12-15 12:25:14.000000000 -0500
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp  2008-12-15 12:25:32.000000000 -0500
+@@ -25,7 +25,7 @@
+ #include "incls/_precompiled.incl"
+ #include "incls/_arguments.cpp.incl"
+
+-#define DEFAULT_VENDOR_URL_BUG "http://java.sun.com/webapps/bugreport/crash.jsp"
++#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla"
+ #define DEFAULT_JAVA_LAUNCHER  "generic"
+
+ char**  Arguments::_jvm_flags_array             = NULL;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-zero-build-hotspot.patch	Wed Oct 21 16:37:47 2009 +0100
@@ -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)
+