changeset 1902:9fa9a9ddc6f8

Merge
author Andrew John Hughes <ahughes@redhat.com>
date Tue, 12 Jan 2010 01:23:12 +0000
parents 2c1898b9904e (current diff) 8577904b8e6f (diff)
children fafd64b4a0a4
files ChangeLog Makefile.am
diffstat 9 files changed, 271 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Jan 09 02:04:05 2010 +0000
+++ b/ChangeLog	Tue Jan 12 01:23:12 2010 +0000
@@ -1,3 +1,37 @@
+2010-01-11 Andrew John Hughes  <ahughes@redhat.com>
+
+	* patches/icedtea-libraries.patch:
+	Decide which libjpeg library to load
+	at compile-time not runtime using
+	JPEG_LIB_VERSION.
+	(See http://bugs.debian.org/563999)
+
+2010-01-11 Andrew John Hughes  <ahughes@redhat.com>
+
+	Fix issues with the CACAO build.
+	* Makefile.am:
+	Add new CACAO nio2 patch.
+	* patches/cacao/nio2.patch:
+	Implement different functions in sun.misc.Unsafe
+	(copyMemory backported from OpenJDK7).
+	* patches/cacao/no-strict-aliasing.patch:
+	Always append -fno-strict-aliasing, even if CFLAGS
+	are specified.  Otherwise, a broken CACAO results.
+
+2010-01-11  Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+	    Matthias Klose  <doko@ubuntu.com>
+	
+	* patches/icedtea-sh4-support.patch: Add zero support for Hitachi SH.
+	* Makefile.am (ICEDTEA_PATCHES): Apply the above.
+	* NEWS: Mention SH support.
+
+2010-01-11  Gary Benson  <gbenson@redhat.com>
+
+	* patches/zero/6914622.patch: New file, imports changeset
+	for Sun	bug 6914622 from jdk7/hotspot-comp.
+	* Makefile.am (ICEDTEA_PATCHES): Added the above.
+	* contrib/checkopts/checkopts: Updated for the above.
+
 2010-01-08  Andrew John Hughes  <ahughes@redhat.com>
 
 	* Makefile.am:
@@ -21,7 +55,7 @@
 	Dropped, refined version applied upstream.
 	* Makefile.am:
 	Remove above patch.
-	
+
 2010-01-06  Deepak Bhole <dbhole@redhat.com>
 
 	* plugin/icedteanp/IcedTeaNPPlugin.h: Remove debug specific line from 
--- a/Makefile.am	Sat Jan 09 02:04:05 2010 +0000
+++ b/Makefile.am	Tue Jan 12 01:23:12 2010 +0000
@@ -213,6 +213,7 @@
 	patches/zero/6903453.patch \
 	patches/zero/6909153.patch \
 	patches/zero/6913869.patch \
+	patches/zero/6914622.patch \
 	patches/icedtea-notice-safepoints.patch \
 	patches/icedtea-parisc-opt.patch \
 	patches/icedtea-lucene-crash.patch \
@@ -291,7 +292,8 @@
 	patches/icedtea-no-precompiled.patch \
 	patches/icedtea-6897844-xshm.patch \
 	patches/icedtea-linux-separate-debuginfo.patch \
-	patches/icedtea-parisc.patch
+	patches/icedtea-parisc.patch \
+	patches/icedtea-sh4-support.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
@@ -304,6 +306,9 @@
 	patches/icedtea-cacao-no-mmap-first-page.patch \
 	patches/cacao/no-strict-aliasing.patch \
 	patches/cacao/arm-arch-defines.patch
+if ENABLE_NIO2
+ICEDTEA_PATCHES += patches/cacao/nio2.patch
+endif
 endif
 if WITH_CACAO
 ICEDTEA_PATCHES += \
--- a/NEWS	Sat Jan 09 02:04:05 2010 +0000
+++ b/NEWS	Tue Jan 12 01:23:12 2010 +0000
@@ -1,3 +1,6 @@
+New in release 1.8 (XXXX-XX-XX):
+
+
 New in release 1.7 (XXXX-XX-XX):
 
 - Updated to OpenJDK6 b17.
@@ -24,6 +27,7 @@
   - (CVE-2009-3869) JRE AWT setDifflCM stack overflow (6872357)
   - (CVE-2009-3874) ImageI/O JPEG heap overflow (6874643
   - (CVE-2009-3871) JRE AWT setBytePixels heap overflow (6872358)
+- Add support for zero build on Hitachi SH.
 
 New in release 1.6 (2009-09-10):
 
--- a/contrib/checkopts/checkopts	Sat Jan 09 02:04:05 2010 +0000
+++ b/contrib/checkopts/checkopts	Tue Jan 12 01:23:12 2010 +0000
@@ -23,6 +23,7 @@
     def test_values(self):
         if self.type == "bool":
             if self.name in (
+                "PrintFlagsInitial",    # already done :)
                 "ExtendedDTraceProbes", # Solaris only
                 "RequireSharedSpaces",  # Not set up
                 "PauseAtStartup"):      # Just don't...
@@ -62,7 +63,9 @@
 
     def read_flags(self):
         out, err = subprocess.Popen(
-            [self.java, "-XX:+UnlockDiagnosticVMOptions", "-Xprintflags"],
+            [self.java,
+             "-XX:+UnlockDiagnosticVMOptions",
+             "-XX:+PrintFlagsInitial"],
             stdout = subprocess.PIPE,
             stderr = subprocess.PIPE).communicate()
         if err:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cacao/nio2.patch	Tue Jan 12 01:23:12 2010 +0000
@@ -0,0 +1,41 @@
+--- cacao/cacao/src/native/vm/sun_misc_Unsafe.c.orig	2010-01-11 16:20:51.000000000 +0000
++++ cacao/cacao/src/native/vm/sun_misc_Unsafe.c	2010-01-11 16:22:15.000000000 +0000
+@@ -107,9 +107,10 @@
+ #if 0
+ 	/* OpenJDK 7 */
+ 	{ "setMemory",              "(Ljava/lang/Object;JJB)V",                                   (void *) (intptr_t) &Java_sun_misc_Unsafe_setMemory                      },
++#endif
+ 	{ "copyMemory",             "(Ljava/lang/Object;JLjava/lang/Object;JJ)V",                 (void *) (intptr_t) &Java_sun_misc_Unsafe_copyMemory                     },
+-#else
+ 	{ "setMemory",              "(JJB)V",                                                     (void *) (intptr_t) &Java_sun_misc_Unsafe_setMemory                      },
++#if 0
+ 	{ "copyMemory",             "(JJJ)V",                                                     (void *) (intptr_t) &Java_sun_misc_Unsafe_copyMemory                     },
+ #endif
+ 	{ "freeMemory",             "(J)V",                                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_freeMemory                     },
+@@ -786,7 +787,7 @@
+ 
+ 	system_memset(p, value, length);
+ }
+-
++#endif
+ 
+ /*
+  * Class:     sun/misc/Unsafe
+@@ -816,7 +817,7 @@
+ 
+ 	system_memcpy(dest, src, length);
+ }
+-#else
++
+ /*
+  * Class:     sun/misc/Unsafe
+  * Method:    setMemory
+@@ -841,7 +842,7 @@
+ 	system_memset(p, value, length);
+ }
+ 
+-
++#if 0
+ /*
+  * Class:     sun/misc/Unsafe
+  * Method:    copyMemory
--- a/patches/cacao/no-strict-aliasing.patch	Sat Jan 09 02:04:05 2010 +0000
+++ b/patches/cacao/no-strict-aliasing.patch	Tue Jan 12 01:23:12 2010 +0000
@@ -1,23 +1,22 @@
---- cacao/cacao/configure.ac~	2009-03-16 12:42:56.000000000 +0100
-+++ cacao/cacao/configure.ac	2009-06-23 16:19:20.000000000 +0200
-@@ -37,7 +37,7 @@
- 
- dnl set optimization and debugging for all architectures and systems
- if test x"$CFLAGS" = "x"; then
--    OPT_CFLAGS="-g -O2"
-+    OPT_CFLAGS="-g -O2 -fno-strict-aliasing"
+diff -Nru cacao/cacao.orig/configure cacao/cacao/configure
+--- cacao/cacao.orig/configure	2009-03-16 11:44:25.000000000 +0000
++++ cacao/cacao/configure	2010-01-09 00:10:59.000000000 +0000
+@@ -2829,6 +2829,7 @@
  else
      OPT_CFLAGS=$CFLAGS
  fi
-diff -ur cacao-0.99.4.orig/configure cacao-0.99.4/configure
---- cacao/cacao/configure	2009-03-16 12:42:56.000000000 +0100
-+++ cacao/cacao/configure	2009-06-23 16:19:21.000000000 +0200
-@@ -2825,7 +2825,7 @@
++OPT_CFLAGS="$OPT_CFLAGS -fno-strict-aliasing"
  
- 
- if test x"$CFLAGS" = "x"; then
--    OPT_CFLAGS="-g -O2"
-+    OPT_CFLAGS="-g -O2 -fno-strict-aliasing"
+ case "$host_cpu" in
+ alpha | alphaev56 | alphapca56 )
+diff -Nru cacao/cacao.orig/configure.ac cacao/cacao/configure.ac
+--- cacao/cacao.orig/configure.ac	2009-03-16 11:42:56.000000000 +0000
++++ cacao/cacao/configure.ac	2010-01-09 00:11:06.000000000 +0000
+@@ -41,6 +41,7 @@
  else
      OPT_CFLAGS=$CFLAGS
  fi
++OPT_CFLAGS="$OPT_CFLAGS -fno-strict-aliasing"
+ 
+ dnl system type
+ case "$host_cpu" in
--- a/patches/icedtea-libraries.patch	Sat Jan 09 02:04:05 2010 +0000
+++ b/patches/icedtea-libraries.patch	Tue Jan 12 01:23:12 2010 +0000
@@ -25045,17 +25045,18 @@
  }
  
  
-@@ -2317,6 +2377,145 @@
+@@ -2317,6 +2377,146 @@
  
  /********************** end of destination manager ************/
  
 +METHODDEF(void)
 +initIDs()
 +{
++#if JPEG_LIB_VERSION >= 70
 +    void *handle = dlopen("libjpeg.so.7", RTLD_LAZY | RTLD_GLOBAL);
-+    if (handle == NULL) {
-+       handle = dlopen("libjpeg.so.62", RTLD_LAZY | RTLD_GLOBAL);
-+    }
++#else
++    void *handle = dlopen("libjpeg.so.62", RTLD_LAZY | RTLD_GLOBAL);
++#endif
 +    
 +    jpegstderror = (fn_jpegstderror)dlsym(handle, "jpeg_std_error");
 +    if (jpegstderror == NULL) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-sh4-support.patch	Tue Jan 12 01:23:12 2010 +0000
@@ -0,0 +1,63 @@
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2009-12-24 14:56:12.000000000 +0900
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2009-12-24 15:02:51.000000000 +0900
+@@ -1753,7 +1753,8 @@
+     {EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"},
+     {EM_MIPS,        EM_MIPS,    ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"},
+     {EM_PARISC,      EM_PARISC,  ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"},
+-    {EM_68K,         EM_68K,     ELFCLASS32, ELFDATA2MSB, (char*)"M68k"}
++    {EM_68K,         EM_68K,     ELFCLASS32, ELFDATA2MSB, (char*)"M68k"},
++    {EM_SH,          EM_SH,      ELFCLASS32, ELFDATA2LSB, (char*)"SH"} /* Support little endian only*/
+   };
+ 
+   #if  (defined IA32)
+@@ -1784,9 +1785,11 @@
+     static  Elf32_Half running_arch_code=EM_MIPS;
+   #elif  (defined M68K)
+     static  Elf32_Half running_arch_code=EM_68K;
++  #elif  (defined SH)
++    static  Elf32_Half running_arch_code=EM_SH;
+   #else
+     #error Method os::dll_load requires that one of following is defined:\
+-         IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K
++         IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, SH
+   #endif
+ 
+   // Identify compatability class for VM's architecture and library's architecture
+--- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h	2009-12-24 14:56:10.000000000 +0900
++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h	2009-12-24 15:05:27.000000000 +0900
+@@ -47,7 +47,8 @@
+ #define X_S390X         12
+ #define X_SPARC         13
+ #define X_SPARCV9       14
+-#define X_ZERO          15
++#define X_SH            15
++#define X_ZERO          16
+ 
+ // **********************************
+ // Make sure you set X_PLATFORM and X_ARCH defines correctly.
+--- openjdk/jdk/make/common/shared/Compiler-gcc.gmk	2009-12-24 15:11:52.000000000 +0900
++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk	2009-12-24 15:12:17.000000000 +0900
+@@ -121,6 +121,11 @@
+     REQUIRED_CC_VER = 4.0
+     REQUIRED_GCC_VER = 4.0.*
+   endif
++  ifneq ("$(findstring sh,$(ARCH))", "")
++    # sh4*, sh3*
++    REQUIRED_CC_VER = 4.0
++    REQUIRED_GCC_VER = 4.0.*
++  endif
+   # Option used to create a shared library
+   SHARED_LIBRARY_FLAG = -shared -mimpure-text
+   SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
+--- openjdk/corba/make/common/shared/Platform.gmk	2009-12-24 21:30:38.000000000 +0900
++++ openjdk/corba/make/common/shared/Platform.gmk	2009-12-25 10:17:14.000000000 +0900
+@@ -263,6 +263,9 @@
+       ifeq ($(ARCH), s390x)
+         ARCH_DATA_MODEL=64
+       endif
++      ifeq ($(ARCH), sh)
++        ARCH_DATA_MODEL=32
++      endif
+     endif
+   endif
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/zero/6914622.patch	Tue Jan 12 01:23:12 2010 +0000
@@ -0,0 +1,98 @@
+diff -r 9b9c1ee9b3f6 -r f62a22282a47 src/share/vm/runtime/arguments.cpp
+--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Wed Jan 06 22:21:39 2010 -0800
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Thu Jan 07 16:24:17 2010 -0800
+@@ -2633,6 +2633,10 @@
+     if (match_option(option, "-XX:-IgnoreUnrecognizedVMOptions", &tail)) {
+       IgnoreUnrecognizedVMOptions = false;
+     }
++    if (match_option(option, "-XX:+PrintFlagsInitial", &tail)) {
++      CommandLineFlags::printFlags();
++      vm_exit(0);
++    }
+   }
+ 
+   if (IgnoreUnrecognizedVMOptions) {
+@@ -2795,11 +2799,9 @@
+     CommandLineFlags::printSetFlags();
+   }
+ 
+-#ifdef ASSERT
+   if (PrintFlagsFinal) {
+     CommandLineFlags::printFlags();
+   }
+-#endif
+ 
+   return JNI_OK;
+ }
+diff -r 9b9c1ee9b3f6 -r f62a22282a47 src/share/vm/runtime/globals.cpp
+--- openjdk/hotspot/src/share/vm/runtime/globals.cpp	Wed Jan 06 22:21:39 2010 -0800
++++ openjdk/hotspot/src/share/vm/runtime/globals.cpp	Thu Jan 07 16:24:17 2010 -0800
+@@ -468,6 +468,8 @@
+   assert(Arguments::check_vm_args_consistency(), "Some flag settings conflict");
+ }
+ 
++#endif // PRODUCT
++
+ void CommandLineFlags::printFlags() {
+   // Print the flags sorted by name
+   // note: this method is called before the thread structure is in place
+@@ -493,5 +495,3 @@
+   }
+   FREE_C_HEAP_ARRAY(Flag*, array);
+ }
+-
+-#endif
+diff -r 9b9c1ee9b3f6 -r f62a22282a47 src/share/vm/runtime/globals.hpp
+--- openjdk/hotspot/src/share/vm/runtime/globals.hpp	Wed Jan 06 22:21:39 2010 -0800
++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	Thu Jan 07 16:24:17 2010 -0800
+@@ -211,7 +211,7 @@
+   static bool wasSetOnCmdline(const char* name, bool* value);
+   static void printSetFlags();
+ 
+-  static void printFlags() PRODUCT_RETURN;
++  static void printFlags();
+ 
+   static void verify() PRODUCT_RETURN;
+ };
+@@ -327,9 +327,6 @@
+   product(bool, UseMembar, false,                                           \
+           "(Unstable) Issues membars on thread state transitions")          \
+                                                                             \
+-  product(bool, PrintCommandLineFlags, false,                               \
+-          "Prints flags that appeared on the command line")                 \
+-                                                                            \
+   diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug,                  \
+           "Enable normal processing of flags relating to field diagnostics")\
+                                                                             \
+@@ -1967,9 +1964,6 @@
+           "number of times a GC thread (minus the coordinator) "            \
+           "will sleep while yielding before giving up and resuming GC")     \
+                                                                             \
+-  notproduct(bool, PrintFlagsFinal, false,                                  \
+-          "Print all command line flags after argument processing")         \
+-                                                                            \
+   /* gc tracing */                                                          \
+   manageable(bool, PrintGC, false,                                          \
+           "Print message at garbage collect")                               \
+@@ -2269,11 +2263,20 @@
+          "If false, restricts profiled locations to the root method only")  \
+                                                                             \
+   product(bool, PrintVMOptions, trueInDebug,                                \
+-         "print VM flag settings")                                          \
++         "Print flags that appeared on the command line")                   \
+                                                                             \
+   product(bool, IgnoreUnrecognizedVMOptions, false,                         \
+          "Ignore unrecognized VM options")                                  \
+                                                                             \
++  product(bool, PrintCommandLineFlags, false,                               \
++         "Print flags specified on command line or set by ergonomics")      \
++                                                                            \
++  product(bool, PrintFlagsInitial, false,                                   \
++         "Print all VM flags before argument processing and exit VM")       \
++                                                                            \
++  product(bool, PrintFlagsFinal, false,                                     \
++         "Print all VM flags after argument and ergonomic processing")      \
++                                                                            \
+   diagnostic(bool, SerializeVMOutput, true,                                 \
+          "Use a mutex to serialize output to tty and hotspot.log")          \
+                                                                             \