changeset 2382:8fa7f2649c4c

Remove unneeded hotspot/default placement of some patches. 2011-05-03 Andrew John Hughes <ahughes@redhat.com> * patches/hotspot/default/gcc-suffix.patch, * patches/hotspot/default/headers.patch, * patches/hotspot/default/memory-limits.patch, * patches/hotspot/default/params-cast-size_t.patch, * patches/hotspot/default/parisc-opt.patch, * patches/hotspot/default/sparc-ptracefix.patch, * patches/hotspot/default/sparc-trapsfix.patch, * patches/hotspot/default/text-relocations.patch, * patches/hotspot/default/use-idx_t.patch: Remove unneeded hotspot/default positioning. * Makefile.am: Remove $(HSBUILD) prefixing on patches. * patches/gcc-suffix.patch, * patches/headers.patch, * patches/memory-limits.patch, * patches/params-cast-size_t.patch, * patches/parisc-opt.patch, * patches/sparc-ptracefix.patch, * patches/sparc-trapsfix.patch, * patches/text-relocations.patch, * patches/use-idx_t.patch: Moved from hotspot/default or merged with existing patches.
author Andrew John Hughes <ahughes@redhat.com>
date Wed, 04 May 2011 08:46:05 +0100
parents 1d110524d034
children e019c260e5e5
files ChangeLog Makefile.am patches/gcc-suffix.patch patches/headers.patch patches/hotspot/default/gcc-suffix.patch patches/hotspot/default/headers.patch patches/hotspot/default/memory-limits.patch patches/hotspot/default/params-cast-size_t.patch patches/hotspot/default/parisc-opt.patch patches/hotspot/default/sparc-ptracefix.patch patches/hotspot/default/sparc-trapsfix.patch patches/hotspot/default/text-relocations.patch patches/hotspot/default/use-idx_t.patch patches/memory-limits.patch patches/params-cast-size_t.patch patches/parisc-opt.patch patches/sparc-ptracefix.patch patches/sparc-trapsfix.patch patches/text-relocations.patch patches/use-idx_t.patch
diffstat 20 files changed, 382 insertions(+), 387 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue May 03 22:38:46 2011 +0100
+++ b/ChangeLog	Wed May 04 08:46:05 2011 +0100
@@ -1,3 +1,29 @@
+2011-05-03  Andrew John Hughes  <ahughes@redhat.com>
+
+	* patches/hotspot/default/gcc-suffix.patch,
+	* patches/hotspot/default/headers.patch,
+	* patches/hotspot/default/memory-limits.patch,
+	* patches/hotspot/default/params-cast-size_t.patch,
+	* patches/hotspot/default/parisc-opt.patch,
+	* patches/hotspot/default/sparc-ptracefix.patch,
+	* patches/hotspot/default/sparc-trapsfix.patch,
+	* patches/hotspot/default/text-relocations.patch,
+	* patches/hotspot/default/use-idx_t.patch:
+	Remove unneeded hotspot/default positioning.
+	* Makefile.am: Remove $(HSBUILD) prefixing on
+	patches.
+	* patches/gcc-suffix.patch,
+	* patches/headers.patch,
+	* patches/memory-limits.patch,
+	* patches/params-cast-size_t.patch,
+	* patches/parisc-opt.patch,
+	* patches/sparc-ptracefix.patch,
+	* patches/sparc-trapsfix.patch,
+	* patches/text-relocations.patch,
+	* patches/use-idx_t.patch:
+	Moved from hotspot/default or merged with existing
+	patches.
+
 2011-05-03  Andrew John Hughes  <ahughes@redhat.com>
 
 	* patches/boot/icedtea-jaxp-dependency.patch,
--- a/Makefile.am	Tue May 03 22:38:46 2011 +0100
+++ b/Makefile.am	Wed May 04 08:46:05 2011 +0100
@@ -234,30 +234,27 @@
 # Patch list
 
 ICEDTEA_PATCHES = \
-	patches/hotspot/$(HSBUILD)/text-relocations.patch \
+	patches/text-relocations.patch \
 	patches/rmi_amd64.patch \
 	patches/demos.patch \
 	patches/headers.patch \
-	patches/hotspot/$(HSBUILD)/headers.patch \
 	patches/gcc-suffix.patch \
-	patches/hotspot/$(HSBUILD)/gcc-suffix.patch \
-	patches/hotspot/$(HSBUILD)/memory-limits.patch \
+	patches/memory-limits.patch \
 	patches/sunsrc.patch \
 	patches/libraries.patch \
 	patches/print-lsb-release.patch \
 	patches/jpegclasses.patch \
 	patches/debian/uname.patch \
-	patches/hotspot/$(HSBUILD)/sparc-ptracefix.patch \
-	patches/hotspot/$(HSBUILD)/sparc-trapsfix.patch \
+	patches/sparc-ptracefix.patch \
+	patches/sparc-trapsfix.patch \
 	patches/override-redirect-metacity.patch \
 	patches/security-updates.patch \
 	patches/hotspot-gcc-pr36917.patch \
 	patches/alpha-fixes.patch \
 	patches/alt-jar.patch \
-	patches/hotspot/$(HSBUILD)/use-idx_t.patch \
-	patches/hotspot/$(HSBUILD)/params-cast-size_t.patch \
+	patches/use-idx_t.patch \
+	patches/params-cast-size_t.patch \
 	patches/clean-crypto.patch \
-	$(GCC_PATCH) \
 	patches/cacao/arch.patch \
 	patches/signed-types.patch \
 	patches/lc_ctype.patch \
@@ -266,7 +263,7 @@
 	patches/testenv.patch \
 	patches/samejvm-safe.patch \
 	patches/pr261.patch \
-	patches/hotspot/$(HSBUILD)/parisc-opt.patch \
+	patches/parisc-opt.patch \
         patches/security/6592792.patch \
         patches/security/6733959.patch \
         patches/security/6755943.patch \
--- a/patches/gcc-suffix.patch	Tue May 03 22:38:46 2011 +0100
+++ b/patches/gcc-suffix.patch	Wed May 04 08:46:05 2011 +0100
@@ -24,3 +24,38 @@
    endif
    # Option used to create a shared library
    SHARED_LIBRARY_FLAG = -shared -mimpure-text
+diff -Nru openjdk.orig/hotspot/agent/src/os/linux/Makefile openjdk/hotspot/agent/src/os/linux/Makefile
+--- openjdk.orig/hotspot/agent/src/os/linux/Makefile	2010-07-29 21:54:38.000000000 +0100
++++ openjdk/hotspot/agent/src/os/linux/Makefile	2011-04-21 00:04:10.990086029 +0100
+@@ -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
+ 
+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	2011-04-20 12:06:06.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2011-04-21 01:00:54.300899166 +0100
+@@ -28,13 +28,13 @@
+ # When cross-compiling the ALT_COMPILER_PATH points
+ # to the cross-compilation toolset
+ ifdef CROSS_COMPILE_ARCH
+-CPP = $(ALT_COMPILER_PATH)/g++
+-CC  = $(ALT_COMPILER_PATH)/gcc
+-HOSTCPP = g++
+-HOSTCC  = gcc
++CPP = $(ALT_COMPILER_PATH)/g++$(GCC_SUFFIX)
++CC  = $(ALT_COMPILER_PATH)/gcc$(GCC_SUFFIX)
++HOSTCPP = g++$(GCC_SUFFIX)
++HOSTCC  = gcc$(GCC_SUFFIX)
+ else
+-CPP = g++
+-CC  = gcc
++CPP = g++$(GCC_SUFFIX)
++CC  = gcc$(GCC_SUFFIX)
+ HOSTCPP = $(CPP)
+ HOSTCC  = $(CC)
+ endif
--- a/patches/headers.patch	Tue May 03 22:38:46 2011 +0100
+++ b/patches/headers.patch	Wed May 04 08:46:05 2011 +0100
@@ -37,3 +37,16 @@
    endif
  endif
  FT_OPTIONS += -I$(FREETYPE_HEADERS_PATH)
+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/gcc-suffix.patch	Tue May 03 22:38:46 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-diff -Nru openjdk.orig/hotspot/agent/src/os/linux/Makefile openjdk/hotspot/agent/src/os/linux/Makefile
---- openjdk.orig/hotspot/agent/src/os/linux/Makefile	2010-07-29 21:54:38.000000000 +0100
-+++ openjdk/hotspot/agent/src/os/linux/Makefile	2011-04-21 00:04:10.990086029 +0100
-@@ -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
- 
-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	2011-04-20 12:06:06.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2011-04-21 01:00:54.300899166 +0100
-@@ -28,13 +28,13 @@
- # When cross-compiling the ALT_COMPILER_PATH points
- # to the cross-compilation toolset
- ifdef CROSS_COMPILE_ARCH
--CPP = $(ALT_COMPILER_PATH)/g++
--CC  = $(ALT_COMPILER_PATH)/gcc
--HOSTCPP = g++
--HOSTCC  = gcc
-+CPP = $(ALT_COMPILER_PATH)/g++$(GCC_SUFFIX)
-+CC  = $(ALT_COMPILER_PATH)/gcc$(GCC_SUFFIX)
-+HOSTCPP = g++$(GCC_SUFFIX)
-+HOSTCC  = gcc$(GCC_SUFFIX)
- else
--CPP = g++
--CC  = gcc
-+CPP = g++$(GCC_SUFFIX)
-+CC  = gcc$(GCC_SUFFIX)
- HOSTCPP = $(CPP)
- HOSTCC  = $(CC)
- endif
--- a/patches/hotspot/default/headers.patch	Tue May 03 22:38:46 2011 +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/memory-limits.patch	Tue May 03 22:38:46 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +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	2010-01-15 17:37:38.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp	2010-02-22 12:46:31.000000000 +0000
-@@ -95,7 +95,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);
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp
---- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp	2010-02-19 17:14:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2010-02-22 12:46:54.000000000 +0000
-@@ -2919,7 +2919,7 @@
-   product(uintx, InitialHeapSize, 0,                                        \
-           "Initial heap size (in bytes); zero means OldSize + NewSize")     \
-                                                                             \
--  product(uintx, MaxHeapSize, ScaleForWordSize(96*M),                       \
-+  product(uintx, MaxHeapSize, ScaleForWordSize(512*M),                      \
-           "Maximum heap size (in bytes)")                                   \
-                                                                             \
-   product(uintx, OldSize, ScaleForWordSize(4*M),                            \
--- a/patches/hotspot/default/params-cast-size_t.patch	Tue May 03 22:38:46 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2011-04-20 04:39:42.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2011-04-21 10:52:34.766273674 +0100
-@@ -957,7 +957,7 @@
-   if (free_percentage < desired_free_percentage) {
-     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
-     assert(desired_capacity >= capacity(), "invalid expansion size");
--    expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
-+    expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes);
-   }
-   if (expand_bytes > 0) {
-     if (PrintGCDetails && Verbose) {
-@@ -6253,7 +6253,7 @@
-     HeapWord* curAddr = _markBitMap.startWord();
-     while (curAddr < _markBitMap.endWord()) {
-       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
--      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
-+      MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining));
-       _markBitMap.clear_large_range(chunk);
-       if (ConcurrentMarkSweepThread::should_yield() &&
-           !foregroundGCIsActive() &&
-@@ -6546,7 +6546,7 @@
-     return;
-   }
-   // Double capacity if possible
--  size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
-+  size_t new_capacity = MIN2((size_t) _capacity*2, (size_t) MarkStackSizeMax);
-   // Do not give up existing stack until we have managed to
-   // get the double capacity that we desired.
-   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2011-04-20 04:39:42.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2011-04-21 10:52:34.766273674 +0100
-@@ -897,8 +897,8 @@
- void PSParallelCompact::initialize_dead_wood_limiter()
- {
-   const size_t max = 100;
--  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
--  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-+  _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0;
-+  _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
-   DEBUG_ONLY(_dwl_initialized = true;)
-   _dwl_adjustment = normal_distribution(1.0);
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2011-03-14 22:09:03.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2011-04-21 10:52:34.770273739 +0100
-@@ -69,7 +69,7 @@
-   _last_used = current_live;
- 
-   // We have different alignment constraints than the rest of the heap.
--  const size_t alignment = MAX2(MinPermHeapExpansion,
-+  const size_t alignment = MAX2((size_t) MinPermHeapExpansion,
-                                 virtual_space()->alignment());
- 
-   // Compute the desired size:
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2011-04-20 04:39:42.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2011-04-21 10:52:34.770273739 +0100
-@@ -329,7 +329,7 @@
-     // yield a size that is too small) and bound it by MaxNewSize above.
-     // Ergonomics plays here by previously calculating the desired
-     // NewSize and MaxNewSize.
--    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
-+    max_new_size = MIN2(MAX2(max_new_size, (size_t) NewSize), (size_t) MaxNewSize);
-   }
-   assert(max_new_size > 0, "All paths should set max_new_size");
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2011-04-11 12:33:06.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2011-04-21 10:52:34.770273739 +0100
-@@ -240,7 +240,7 @@
-   size_t init_sz;
- 
-   if (TLABSize > 0) {
--    init_sz = MIN2(TLABSize / HeapWordSize, max_size());
-+    init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size());
-   } else if (global_stats() == NULL) {
-     // Startup issue - main thread initialized before heap initialized.
-     init_sz = min_size();
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2011-04-20 04:39:42.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2011-04-21 10:52:34.770273739 +0100
-@@ -1130,7 +1130,7 @@
-     // NewSize was set on the command line and it is larger than
-     // preferred_max_new_size.
-     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
--      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
-+      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size));
-     } else {
-       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
-     }
-@@ -1159,8 +1159,8 @@
-       // Unless explicitly requested otherwise, make young gen
-       // at least min_new, and at most preferred_max_new_size.
-       if (FLAG_IS_DEFAULT(NewSize)) {
--        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
--        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
-+        FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new));
-+        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize));
-         if (PrintGCDetails && Verbose) {
-           // Too early to use gclog_or_tty
-           tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
--- a/patches/hotspot/default/parisc-opt.patch	Tue May 03 22:38:46 2011 +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/sparc-ptracefix.patch	Tue May 03 22:38:46 2011 +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/sparc-trapsfix.patch	Tue May 03 22:38:46 2011 +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	2011-03-14 22:09:02.000000000 +0000
-+++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2011-03-15 23:02:33.883758538 +0000
-@@ -28,7 +28,16 @@
- #include "runtime/os.hpp"
- #include "runtime/threadLocalStorage.hpp"
- 
--#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/text-relocations.patch	Tue May 03 22:38:46 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +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	2011-04-11 12:33:06.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2011-04-11 13:31:35.116973986 +0100
-@@ -58,7 +58,11 @@
- # Compiler flags
- 
- # position-independent code
-+ifneq ($(filter parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
- PICFLAG = -fPIC
-+else
-+PICFLAG = -fpic
-+endif
- 
- VM_PICFLAG/LIBJVM = $(PICFLAG)
- VM_PICFLAG/AOUT   =
-diff -Nru openjdk.orig/hotspot/make/linux/makefiles/rules.make openjdk/hotspot/make/linux/makefiles/rules.make
---- openjdk.orig/hotspot/make/linux/makefiles/rules.make	2011-04-11 12:33:06.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/rules.make	2011-04-11 13:31:35.128974182 +0100
-@@ -148,20 +148,10 @@
- 
- include $(GAMMADIR)/make/altsrc.make
- 
--# The non-PIC object files are only generated for 32 bit platforms.
--ifdef LP64
- %.o: %.cpp
- 	@echo Compiling $<
- 	$(QUIETLY) $(REMOVE_TARGET)
- 	$(QUIETLY) $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
--else
--%.o: %.cpp
--	@echo Compiling $<
--	$(QUIETLY) $(REMOVE_TARGET)
--	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
--	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
--	   $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE))
--endif
- 
- %.o: %.s
- 	@echo Assembling $<
-diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/rules.make openjdk/hotspot/make/solaris/makefiles/rules.make
---- openjdk.orig/hotspot/make/solaris/makefiles/rules.make	2011-04-11 12:33:06.000000000 +0100
-+++ openjdk/hotspot/make/solaris/makefiles/rules.make	2011-04-11 13:31:35.128974182 +0100
-@@ -148,20 +148,10 @@
- 
- include $(GAMMADIR)/make/altsrc.make
- 
--# 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) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
--else
--%.o: %.cpp
--	@echo Compiling $<
--	$(QUIETLY) $(REMOVE_TARGET)
--	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
--	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
--	   $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE))
--endif
- 
- %.o: %.s
- 	@echo Assembling $<
--- a/patches/hotspot/default/use-idx_t.patch	Tue May 03 22:38:46 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp
---- openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-06 08:40:55.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-10 00:55:09.000000000 +0000
-@@ -567,15 +567,15 @@
- 
- 
- MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) :
--         _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
-          _last_bci(-1) {
-   _analyzer = analyzer;
-@@ -992,7 +992,7 @@
- }
- 
- MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) {
--  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()),
-+  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()),
-                 _analyzer->bit_map_size_bits());
-   answer.set_is_valid();
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp openjdk/hotspot/src/share/vm/utilities/bitMap.hpp
---- openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-06 08:40:58.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-10 00:57:20.000000000 +0000
-@@ -73,7 +73,7 @@
- 
-   // Set a word to a specified value or to all ones; clear a word.
-   void set_word  (idx_t word, bm_word_t val) { _map[word] = val; }
--  void set_word  (idx_t word)            { set_word(word, ~(uintptr_t)0); }
-+  void set_word  (idx_t word)            { set_word(word, ~(idx_t)0); }
-   void clear_word(idx_t word)            { _map[word] = 0; }
- 
-   // Utilities for ranges of bits.  Ranges are half-open [beg, end).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/memory-limits.patch	Wed May 04 08:46:05 2011 +0100
@@ -0,0 +1,24 @@
+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	2010-01-15 17:37:38.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp	2010-02-22 12:46:31.000000000 +0000
+@@ -95,7 +95,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);
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp	2010-02-19 17:14:39.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2010-02-22 12:46:54.000000000 +0000
+@@ -2919,7 +2919,7 @@
+   product(uintx, InitialHeapSize, 0,                                        \
+           "Initial heap size (in bytes); zero means OldSize + NewSize")     \
+                                                                             \
+-  product(uintx, MaxHeapSize, ScaleForWordSize(96*M),                       \
++  product(uintx, MaxHeapSize, ScaleForWordSize(512*M),                      \
+           "Maximum heap size (in bytes)")                                   \
+                                                                             \
+   product(uintx, OldSize, ScaleForWordSize(4*M),                            \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/params-cast-size_t.patch	Wed May 04 08:46:05 2011 +0100
@@ -0,0 +1,103 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2011-04-20 04:39:42.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2011-04-21 10:52:34.766273674 +0100
+@@ -957,7 +957,7 @@
+   if (free_percentage < desired_free_percentage) {
+     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
+     assert(desired_capacity >= capacity(), "invalid expansion size");
+-    expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
++    expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes);
+   }
+   if (expand_bytes > 0) {
+     if (PrintGCDetails && Verbose) {
+@@ -6253,7 +6253,7 @@
+     HeapWord* curAddr = _markBitMap.startWord();
+     while (curAddr < _markBitMap.endWord()) {
+       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
+-      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
++      MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining));
+       _markBitMap.clear_large_range(chunk);
+       if (ConcurrentMarkSweepThread::should_yield() &&
+           !foregroundGCIsActive() &&
+@@ -6546,7 +6546,7 @@
+     return;
+   }
+   // Double capacity if possible
+-  size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
++  size_t new_capacity = MIN2((size_t) _capacity*2, (size_t) MarkStackSizeMax);
+   // Do not give up existing stack until we have managed to
+   // get the double capacity that we desired.
+   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2011-04-20 04:39:42.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2011-04-21 10:52:34.766273674 +0100
+@@ -897,8 +897,8 @@
+ void PSParallelCompact::initialize_dead_wood_limiter()
+ {
+   const size_t max = 100;
+-  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
+-  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
++  _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0;
++  _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
+   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
+   DEBUG_ONLY(_dwl_initialized = true;)
+   _dwl_adjustment = normal_distribution(1.0);
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2011-03-14 22:09:03.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2011-04-21 10:52:34.770273739 +0100
+@@ -69,7 +69,7 @@
+   _last_used = current_live;
+ 
+   // We have different alignment constraints than the rest of the heap.
+-  const size_t alignment = MAX2(MinPermHeapExpansion,
++  const size_t alignment = MAX2((size_t) MinPermHeapExpansion,
+                                 virtual_space()->alignment());
+ 
+   // Compute the desired size:
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
+--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2011-04-20 04:39:42.000000000 +0100
++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2011-04-21 10:52:34.770273739 +0100
+@@ -329,7 +329,7 @@
+     // yield a size that is too small) and bound it by MaxNewSize above.
+     // Ergonomics plays here by previously calculating the desired
+     // NewSize and MaxNewSize.
+-    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
++    max_new_size = MIN2(MAX2(max_new_size, (size_t) NewSize), (size_t) MaxNewSize);
+   }
+   assert(max_new_size > 0, "All paths should set max_new_size");
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
+--- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2011-04-11 12:33:06.000000000 +0100
++++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2011-04-21 10:52:34.770273739 +0100
+@@ -240,7 +240,7 @@
+   size_t init_sz;
+ 
+   if (TLABSize > 0) {
+-    init_sz = MIN2(TLABSize / HeapWordSize, max_size());
++    init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size());
+   } else if (global_stats() == NULL) {
+     // Startup issue - main thread initialized before heap initialized.
+     init_sz = min_size();
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2011-04-20 04:39:42.000000000 +0100
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2011-04-21 10:52:34.770273739 +0100
+@@ -1130,7 +1130,7 @@
+     // NewSize was set on the command line and it is larger than
+     // preferred_max_new_size.
+     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
+-      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
++      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size));
+     } else {
+       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
+     }
+@@ -1159,8 +1159,8 @@
+       // Unless explicitly requested otherwise, make young gen
+       // at least min_new, and at most preferred_max_new_size.
+       if (FLAG_IS_DEFAULT(NewSize)) {
+-        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
+-        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
++        FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new));
++        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize));
+         if (PrintGCDetails && Verbose) {
+           // Too early to use gclog_or_tty
+           tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/parisc-opt.patch	Wed May 04 08:46:05 2011 +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/sparc-ptracefix.patch	Wed May 04 08:46:05 2011 +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
--- a/patches/sparc-trapsfix.patch	Tue May 03 22:38:46 2011 +0100
+++ b/patches/sparc-trapsfix.patch	Wed May 04 08:46:05 2011 +0100
@@ -1,12 +1,20 @@
---- openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp.orig	2010-01-16 23:19:45.703450297 +0000
-+++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2010-01-16 23:21:23.942337146 +0000
-@@ -25,7 +25,8 @@
- #include "incls/_precompiled.incl"
- #include "incls/_assembler_linux_sparc.cpp.incl"
+--- openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2011-03-14 22:09:02.000000000 +0000
++++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2011-03-15 23:02:33.883758538 +0000
+@@ -28,7 +28,16 @@
+ #include "runtime/os.hpp"
+ #include "runtime/threadLocalStorage.hpp"
  
 -#include <asm-sparc/traps.h>
-+// always found in asm/ with merged sparc/sparc64 headers
-+#include <asm/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/text-relocations.patch	Tue May 03 22:38:46 2011 +0100
+++ b/patches/text-relocations.patch	Wed May 04 08:46:05 2011 +0100
@@ -1,11 +1,11 @@
 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 @@
+--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2011-04-11 12:33:06.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2011-04-11 13:31:35.116973986 +0100
+@@ -58,7 +58,11 @@
  # Compiler flags
  
  # position-independent code
-+ifneq ($(filter ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
++ifneq ($(filter parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
  PICFLAG = -fPIC
 +else
 +PICFLAG = -fpic
@@ -13,3 +13,51 @@
  
  VM_PICFLAG/LIBJVM = $(PICFLAG)
  VM_PICFLAG/AOUT   =
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/rules.make openjdk/hotspot/make/linux/makefiles/rules.make
+--- openjdk.orig/hotspot/make/linux/makefiles/rules.make	2011-04-11 12:33:06.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/rules.make	2011-04-11 13:31:35.128974182 +0100
+@@ -148,20 +148,10 @@
+ 
+ include $(GAMMADIR)/make/altsrc.make
+ 
+-# The non-PIC object files are only generated for 32 bit platforms.
+-ifdef LP64
+ %.o: %.cpp
+ 	@echo Compiling $<
+ 	$(QUIETLY) $(REMOVE_TARGET)
+ 	$(QUIETLY) $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
+-else
+-%.o: %.cpp
+-	@echo Compiling $<
+-	$(QUIETLY) $(REMOVE_TARGET)
+-	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
+-	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
+-	   $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE))
+-endif
+ 
+ %.o: %.s
+ 	@echo Assembling $<
+diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/rules.make openjdk/hotspot/make/solaris/makefiles/rules.make
+--- openjdk.orig/hotspot/make/solaris/makefiles/rules.make	2011-04-11 12:33:06.000000000 +0100
++++ openjdk/hotspot/make/solaris/makefiles/rules.make	2011-04-11 13:31:35.128974182 +0100
+@@ -148,20 +148,10 @@
+ 
+ include $(GAMMADIR)/make/altsrc.make
+ 
+-# 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) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)
+-else
+-%.o: %.cpp
+-	@echo Compiling $<
+-	$(QUIETLY) $(REMOVE_TARGET)
+-	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
+-	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \
+-	   $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE))
+-endif
+ 
+ %.o: %.s
+ 	@echo Assembling $<
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/use-idx_t.patch	Wed May 04 08:46:05 2011 +0100
@@ -0,0 +1,45 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp
+--- openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-06 08:40:55.000000000 +0000
++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-10 00:55:09.000000000 +0000
+@@ -567,15 +567,15 @@
+ 
+ 
+ MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) :
+-         _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+-         _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+-         _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+-         _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+-         _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+          _last_bci(-1) {
+   _analyzer = analyzer;
+@@ -992,7 +992,7 @@
+ }
+ 
+ MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) {
+-  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()),
++  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()),
+                 _analyzer->bit_map_size_bits());
+   answer.set_is_valid();
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp openjdk/hotspot/src/share/vm/utilities/bitMap.hpp
+--- openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-06 08:40:58.000000000 +0000
++++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-10 00:57:20.000000000 +0000
+@@ -73,7 +73,7 @@
+ 
+   // Set a word to a specified value or to all ones; clear a word.
+   void set_word  (idx_t word, bm_word_t val) { _map[word] = val; }
+-  void set_word  (idx_t word)            { set_word(word, ~(uintptr_t)0); }
++  void set_word  (idx_t word)            { set_word(word, ~(idx_t)0); }
+   void clear_word(idx_t word)            { _map[word] = 0; }
+ 
+   // Utilities for ranges of bits.  Ranges are half-open [beg, end).