Index: npl/java/openjdk/patches/icedtea_zero_buildfix.patch
===================================================================
--- npl/java/openjdk/patches/icedtea_zero_buildfix.patch	(revision 981dbbc6c900fb75ec9e5eaf6305054362a41911)
+++ npl/java/openjdk/patches/icedtea_zero_buildfix.patch	(revision 981dbbc6c900fb75ec9e5eaf6305054362a41911)
@@ -0,0 +1,349 @@
+
+# HG changeset patch
+# User Andrew John Hughes <gnu_andrew@member.fsf.org>
+# Date 1358298469 0
+# Node ID 5fc3319dea01730bb3fdc1cd1b156f37e153553f
+# Parent  fa200daee35457cb507ab8bf4b55cd3b3535e0b8
+Fix application of 6924259 to Zero's HotSpot, which was broken by addition of 7158800 in 2.1.3.
+
+2013-01-16  Andrew John Hughes  <gnu.andrew@member.fsf.org>
+
+	* patches/hotspot/zero/6924259-string_offset.patch:
+	Fix patch to apply against HotSpot from 2.1.3.
+
+diff -r fa200daee354 -r 5fc3319dea01 ChangeLog
+--- a/ChangeLog	Tue Jan 15 09:43:14 2013 +0000
++++ b/ChangeLog	Wed Jan 16 01:07:49 2013 +0000
+@@ -1,3 +1,8 @@
++2013-01-16  Andrew John Hughes  <gnu.andrew@member.fsf.org>
++
++	* patches/hotspot/zero/6924259-string_offset.patch:
++	Fix patch to apply against HotSpot from 2.1.3.
++
+ 2013-01-15  Andrew John Hughes  <gnu.andrew@member.fsf.org>
+ 
+ 	* NEWS: Mention PaX bug fix from Gentoo,
+diff -r fa200daee354 -r 5fc3319dea01 patches/hotspot/zero/6924259-string_offset.patch
+--- a/patches/hotspot/zero/6924259-string_offset.patch	Tue Jan 15 09:43:14 2013 +0000
++++ b/patches/hotspot/zero/6924259-string_offset.patch	Wed Jan 16 01:07:49 2013 +0000
+@@ -1,15 +1,6 @@
+-# HG changeset patch
+-# User kvn
+-# Date 1337013360 25200
+-# Node ID 3facbb14e873f14af743e05139e6e48b5890ffcc
+-# Parent  ea3152ff2a498749bf5d889b247902f5d02915be
+-6924259: Remove String.count/String.offset
+-Summary: Allow a version of String class that doesn't have count and offset fields.
+-Reviewed-by: never, coleenp
+-
+-diff --git a/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp b/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
+---- openjdk/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
+-+++ openjdk/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
++diff -Nru openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp openjdk/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
++--- openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp	2013-01-16 00:42:59.059088003 +0000
+ @@ -1,5 +1,5 @@
+  /*
+ - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+@@ -99,9 +90,9 @@
+  
+      __ lduh(base0, limit, chr0);
+      __ bind(Lloop);
+-diff --git a/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp b/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
+---- openjdk/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
+-+++ openjdk/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
++diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp openjdk/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
++--- openjdk.orig/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	2013-01-16 00:41:43.257866830 +0000
+++++ openjdk/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp	2013-01-16 00:42:59.059088003 +0000
+ @@ -1,5 +1,5 @@
+  /*
+ - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+@@ -109,7 +100,7 @@
+   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+   *
+   * This code is free software; you can redistribute it and/or modify it
+-@@ -505,19 +505,28 @@
++@@ -506,19 +506,28 @@
+  
+    // Get addresses of first characters from both Strings
+    __ load_heap_oop(rsi, Address(rax, java_lang_String::value_offset_in_bytes()));
+@@ -145,9 +136,9 @@
+    __ mov   (rcx, rbx);
+    __ subptr(rbx, rax); // subtract lengths
+    __ push  (rbx);      // result
+-diff --git a/src/share/vm/classfile/javaClasses.cpp b/src/share/vm/classfile/javaClasses.cpp
+---- openjdk/hotspot/src/share/vm/classfile/javaClasses.cpp
+-+++ openjdk/hotspot/src/share/vm/classfile/javaClasses.cpp
++diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/javaClasses.cpp openjdk/hotspot/src/share/vm/classfile/javaClasses.cpp
++--- openjdk.orig/hotspot/src/share/vm/classfile/javaClasses.cpp	2013-01-16 00:41:43.273867087 +0000
+++++ openjdk/hotspot/src/share/vm/classfile/javaClasses.cpp	2013-01-16 00:42:59.071088195 +0000
+ @@ -1,5 +1,5 @@
+  /*
+ - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+@@ -155,7 +146,7 @@
+   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+   *
+   * This code is free software; you can redistribute it and/or modify it
+-@@ -143,7 +143,27 @@
++@@ -144,7 +144,27 @@
+  }
+  
+  
+@@ -224,9 +215,9 @@
+  
+    // java.lang.Class
+  
+-diff --git a/src/share/vm/classfile/javaClasses.hpp b/src/share/vm/classfile/javaClasses.hpp
+---- openjdk/hotspot/src/share/vm/classfile/javaClasses.hpp
+-+++ openjdk/hotspot/src/share/vm/classfile/javaClasses.hpp
++diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/javaClasses.hpp openjdk/hotspot/src/share/vm/classfile/javaClasses.hpp
++--- openjdk.orig/hotspot/src/share/vm/classfile/javaClasses.hpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/share/vm/classfile/javaClasses.hpp	2013-01-16 00:42:59.071088195 +0000
+ @@ -1,5 +1,5 @@
+  /*
+ - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+@@ -349,10 +340,10 @@
+    }
+    static int utf8_length(oop java_string);
+  
+-diff --git a/src/share/vm/classfile/systemDictionary.cpp b/src/share/vm/classfile/systemDictionary.cpp
+---- openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp
+-+++ openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp
+-@@ -1971,6 +1971,9 @@
++diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp
++--- openjdk.orig/hotspot/src/share/vm/classfile/systemDictionary.cpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/share/vm/classfile/systemDictionary.cpp	2013-01-16 00:42:59.075088258 +0000
++@@ -1953,6 +1953,9 @@
+    // first do Object, String, Class
+    initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
+  
+@@ -362,10 +353,10 @@
+    java_lang_Class::compute_offsets();
+  
+    // Fixup mirrors for classes loaded before java.lang.Class.
+-diff --git a/src/share/vm/classfile/vmSymbols.hpp b/src/share/vm/classfile/vmSymbols.hpp
+---- openjdk/hotspot/src/share/vm/classfile/vmSymbols.hpp
+-+++ openjdk/hotspot/src/share/vm/classfile/vmSymbols.hpp
+-@@ -339,6 +339,9 @@
++diff -Nru openjdk.orig/hotspot/src/share/vm/classfile/vmSymbols.hpp openjdk/hotspot/src/share/vm/classfile/vmSymbols.hpp
++--- openjdk.orig/hotspot/src/share/vm/classfile/vmSymbols.hpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/share/vm/classfile/vmSymbols.hpp	2013-01-16 00:42:59.083088388 +0000
++@@ -337,6 +337,9 @@
+    template(park_event_name,                           "nativeParkEventPointer")                   \
+    template(cache_field_name,                          "cache")                                    \
+    template(value_name,                                "value")                                    \
+@@ -375,9 +366,9 @@
+    template(frontCacheEnabled_name,                    "frontCacheEnabled")                        \
+    template(stringCacheEnabled_name,                   "stringCacheEnabled")                       \
+    template(numberOfLeadingZeros_name,                 "numberOfLeadingZeros")                     \
+-diff --git a/src/share/vm/memory/dump.cpp b/src/share/vm/memory/dump.cpp
+---- openjdk/hotspot/src/share/vm/memory/dump.cpp
+-+++ openjdk/hotspot/src/share/vm/memory/dump.cpp
++diff -Nru openjdk.orig/hotspot/src/share/vm/memory/dump.cpp openjdk/hotspot/src/share/vm/memory/dump.cpp
++--- openjdk.orig/hotspot/src/share/vm/memory/dump.cpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/share/vm/memory/dump.cpp	2013-01-16 00:43:46.135846474 +0000
+ @@ -78,8 +78,8 @@
+    void do_oop(oop* p) {
+      if (p != NULL) {
+@@ -386,12 +377,12 @@
+ -
+ +      if (obj->klass() == SystemDictionary::String_klass() &&
+ +          java_lang_String::has_hash_field()) {
+-         int hash = java_lang_String::hash_string(obj);
++         int hash = java_lang_String::to_hash(obj);
+          obj->int_field_put(hash_offset, hash);
+        }
+-diff --git a/src/share/vm/opto/graphKit.cpp b/src/share/vm/opto/graphKit.cpp
+---- openjdk/hotspot/src/share/vm/opto/graphKit.cpp
+-+++ openjdk/hotspot/src/share/vm/opto/graphKit.cpp
++diff -Nru openjdk.orig/hotspot/src/share/vm/opto/graphKit.cpp openjdk/hotspot/src/share/vm/opto/graphKit.cpp
++--- openjdk.orig/hotspot/src/share/vm/opto/graphKit.cpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/share/vm/opto/graphKit.cpp	2013-01-16 00:42:59.091088517 +0000
+ @@ -1,5 +1,5 @@
+  /*
+ - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+@@ -399,7 +390,7 @@
+   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+   *
+   * This code is free software; you can redistribute it and/or modify it
+-@@ -3748,3 +3748,81 @@
++@@ -3730,3 +3730,81 @@
+    final_sync(ideal);
+  }
+  #undef __
+@@ -481,9 +472,9 @@
+ +  store_to_memory(ctrl, basic_plus_adr(str, count_offset),
+ +                  value, T_INT, count_field_idx);
+ +}
+-diff --git a/src/share/vm/opto/graphKit.hpp b/src/share/vm/opto/graphKit.hpp
+---- openjdk/hotspot/src/share/vm/opto/graphKit.hpp
+-+++ openjdk/hotspot/src/share/vm/opto/graphKit.hpp
++diff -Nru openjdk.orig/hotspot/src/share/vm/opto/graphKit.hpp openjdk/hotspot/src/share/vm/opto/graphKit.hpp
++--- openjdk.orig/hotspot/src/share/vm/opto/graphKit.hpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/share/vm/opto/graphKit.hpp	2013-01-16 00:42:59.095088581 +0000
+ @@ -1,5 +1,5 @@
+  /*
+ - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+@@ -506,9 +497,9 @@
+    // Handy for making control flow
+    IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) {
+      IfNode* iff = new (C, 2) IfNode(ctrl, tst, prob, cnt);// New IfNode's
+-diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call.cpp
+---- openjdk/hotspot/src/share/vm/opto/library_call.cpp
+-+++ openjdk/hotspot/src/share/vm/opto/library_call.cpp
++diff -Nru openjdk.orig/hotspot/src/share/vm/opto/library_call.cpp openjdk/hotspot/src/share/vm/opto/library_call.cpp
++--- openjdk.orig/hotspot/src/share/vm/opto/library_call.cpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/share/vm/opto/library_call.cpp	2013-01-16 00:42:59.095088581 +0000
+ @@ -147,7 +147,8 @@
+      return generate_method_call(method_id, true, false);
+    }
+@@ -519,7 +510,7 @@
+    bool inline_string_compareTo();
+    bool inline_string_indexOf();
+    Node* string_indexOf(Node* string_object, ciTypeArray* target_array, jint offset, jint cache_i, jint md2_i);
+-@@ -844,48 +845,45 @@
++@@ -844,48 +845,76 @@
+  
+  
+  //------------------------------make_string_method_node------------------------
+@@ -588,13 +579,18 @@
+      result = new (C, 5) StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
+ -                                      str1_start, str2_start, cnt1);
+ +                               str1_start, str2_start, str1_len);
+-     break;
+-   default:
+-     ShouldNotReachHere();
+-@@ -898,15 +896,42 @@
+-   return _gvn.transform(result);
+- }
+- 
+++    break;
+++  default:
+++    ShouldNotReachHere();
+++    return NULL;
+++  }
+++
+++  // All these intrinsics have checks.
+++  C->set_has_split_ifs(true); // Has chance for split-if optimization
+++
+++  return _gvn.transform(result);
+++}
+++
+ +// Helper method for String intrinsic functions. This version is called
+ +// with str1 and str2 pointing to char[] nodes, with cnt1 and cnt2 pointing
+ +// to Int nodes containing the lenghts of str1 and str2.
+@@ -614,20 +610,10 @@
+ +  case Op_StrEquals:
+ +    result = new (C, 5) StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
+ +                                 str1_start, str2_start, cnt1);
+-+    break;
+-+  default:
+-+    ShouldNotReachHere();
+-+    return NULL;
+-+  }
+-+
+-+  // All these intrinsics have checks.
+-+  C->set_has_split_ifs(true); // Has chance for split-if optimization
+-+
+-+  return _gvn.transform(result);
+-+}
+-+
+- //------------------------------inline_string_compareTo------------------------
+- bool LibraryCallKit::inline_string_compareTo() {
++     break;
++   default:
++     ShouldNotReachHere();
++@@ -903,10 +932,6 @@
+  
+    if (!Matcher::has_match_rule(Op_StrComp)) return false;
+  
+@@ -690,9 +676,6 @@
+ -    // Get counts for string and argument
+ -    Node* receiver_cnta = basic_plus_adr(receiver, receiver, count_offset);
+ -    receiver_cnt  = make_load(no_ctrl, receiver_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+--
+--    Node* argument_cnta = basic_plus_adr(argument, argument, count_offset);
+--    argument_cnt  = make_load(no_ctrl, argument_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+ +    Node* no_ctrl = NULL;
+ +
+ +    // Get start addr of receiver
+@@ -707,7 +690,9 @@
+ +    Node* argument_val   = load_String_value(no_ctrl, argument);
+ +    Node* argument_offset = load_String_offset(no_ctrl, argument);
+ +    Node* argument_start = array_element_address(argument_val, argument_offset, T_CHAR);
+-+
++ 
++-    Node* argument_cnta = basic_plus_adr(argument, argument, count_offset);
++-    argument_cnt  = make_load(no_ctrl, argument_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+ +    // Get length of argument
+ +    Node* argument_cnt  = load_String_length(no_ctrl, argument);
+  
+@@ -718,16 +703,14 @@
+        region->init_req(4, if_ne);
+      }
+ -  }
+--
++ 
+ -  // Check for count == 0 is done by mach node StrEquals.
+--
+++    // Check for count == 0 is done by assembler code for StrEquals.
++ 
+ -  if (!stopped()) {
+ -    Node* equals = make_string_method_node(Op_StrEquals, receiver, receiver_cnt, argument, argument_cnt);
+ -    phi->init_req(1, equals);
+ -    region->init_req(1, control());
+-+
+-+    // Check for count == 0 is done by assembler code for StrEquals.
+-+
+ +    if (!stopped()) {
+ +      Node* equals = make_string_method_node(Op_StrEquals, receiver_start, receiver_cnt, argument_start, argument_cnt);
+ +      phi->init_req(1, equals);
+@@ -778,9 +761,6 @@
+ -    // Get counts for string and substr
+ -    Node* source_cnta = basic_plus_adr(receiver, receiver, count_offset);
+ -    Node* source_cnt  = make_load(no_ctrl, source_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+--
+--    Node* substr_cnta = basic_plus_adr(argument, argument, count_offset);
+--    Node* substr_cnt  = make_load(no_ctrl, substr_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+ +    // Get start addr of source string
+ +    Node* source = load_String_value(no_ctrl, receiver);
+ +    Node* source_offset = load_String_offset(no_ctrl, receiver);
+@@ -793,7 +773,9 @@
+ +    Node* substr = load_String_value(no_ctrl, argument);
+ +    Node* substr_offset = load_String_offset(no_ctrl, argument);
+ +    Node* substr_start = array_element_address(substr, substr_offset, T_CHAR);
+-+
++ 
++-    Node* substr_cnta = basic_plus_adr(argument, argument, count_offset);
++-    Node* substr_cnt  = make_load(no_ctrl, substr_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
+ +    // Get length of source string
+ +    Node* substr_cnt  = load_String_length(no_ctrl, argument);
+  
+@@ -831,9 +813,9 @@
+      // constant strings have no offset and count == length which
+      // simplifies the resulting code somewhat so lets optimize for that.
+      if (o != 0 || c != pat->length()) {
+-diff --git a/src/share/vm/opto/stringopts.cpp b/src/share/vm/opto/stringopts.cpp
+---- openjdk/hotspot/src/share/vm/opto/stringopts.cpp
+-+++ openjdk/hotspot/src/share/vm/opto/stringopts.cpp
++diff -Nru openjdk.orig/hotspot/src/share/vm/opto/stringopts.cpp openjdk/hotspot/src/share/vm/opto/stringopts.cpp
++--- openjdk.orig/hotspot/src/share/vm/opto/stringopts.cpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/share/vm/opto/stringopts.cpp	2013-01-16 00:42:59.099088646 +0000
+ @@ -1,5 +1,5 @@
+  /*
+ - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+@@ -912,9 +894,9 @@
+  
+    // hook up the outgoing control and result
+    kit.replace_call(sc->end(), result);
+-diff --git a/src/share/vm/opto/stringopts.hpp b/src/share/vm/opto/stringopts.hpp
+---- openjdk/hotspot/src/share/vm/opto/stringopts.hpp
+-+++ openjdk/hotspot/src/share/vm/opto/stringopts.hpp
++diff -Nru openjdk.orig/hotspot/src/share/vm/opto/stringopts.hpp openjdk/hotspot/src/share/vm/opto/stringopts.hpp
++--- openjdk.orig/hotspot/src/share/vm/opto/stringopts.hpp	2012-10-17 08:52:30.000000000 +0100
+++++ openjdk/hotspot/src/share/vm/opto/stringopts.hpp	2013-01-16 00:42:59.103088711 +0000
+ @@ -1,5 +1,5 @@
+  /*
+ - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+
+
Index: npl/java/openjdk/patches/icedtea_zero_debuginfo.patch
===================================================================
--- npl/java/openjdk/patches/icedtea_zero_debuginfo.patch	(revision 981dbbc6c900fb75ec9e5eaf6305054362a41911)
+++ npl/java/openjdk/patches/icedtea_zero_debuginfo.patch	(revision 981dbbc6c900fb75ec9e5eaf6305054362a41911)
@@ -0,0 +1,53 @@
+--- openjdk/hotspot/make/linux/makefiles/defs.make.orig	2012-02-15 09:26:53.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/defs.make	2012-03-18 23:22:09.000000000 +0100
+@@ -132,7 +132,7 @@
+   # Full Debug Symbols is supported on JDK7 or newer
+ 
+   # Default OBJCOPY comes from GNU Binutils on Linux:
+-  DEF_OBJCOPY=/usr/bin/objcopy
++  DEF_OBJCOPY=feck
+   ifdef CROSS_COMPILE_ARCH
+     # don't try to generate .debuginfo files when cross compiling
+     _JUNK_ := $(shell \
+@@ -215,10 +215,10 @@
+                         $(EXPORT_LIB_DIR)/sa-jdi.jar 
+ ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
+                         $(EXPORT_LIB_DIR)/sa-jdi.jar 
+-ifneq ($(OBJCOPY),)
+-  ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+-  ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+-endif
++#ifneq ($(OBJCOPY),)
++#  ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
++#  ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
++#endif
+ ADD_SA_BINARIES/ppc   = 
+ ADD_SA_BINARIES/ia64  = 
+ ADD_SA_BINARIES/arm   = 
+
+--- openjdk-boot/hotspot/make/linux/makefiles/defs.make.orig	2012-02-15 09:26:53.000000000 +0100
++++ openjdk-boot/hotspot/make/linux/makefiles/defs.make	2012-03-18 23:22:09.000000000 +0100
+@@ -132,7 +132,7 @@
+   # Full Debug Symbols is supported on JDK7 or newer
+ 
+   # Default OBJCOPY comes from GNU Binutils on Linux:
+-  DEF_OBJCOPY=/usr/bin/objcopy
++  DEF_OBJCOPY=feck
+   ifdef CROSS_COMPILE_ARCH
+     # don't try to generate .debuginfo files when cross compiling
+     _JUNK_ := $(shell \
+@@ -215,10 +215,10 @@
+                         $(EXPORT_LIB_DIR)/sa-jdi.jar 
+ ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
+                         $(EXPORT_LIB_DIR)/sa-jdi.jar 
+-ifneq ($(OBJCOPY),)
+-  ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+-  ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+-endif
++#ifneq ($(OBJCOPY),)
++#  ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
++#  ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
++#endif
+ ADD_SA_BINARIES/ppc   = 
+ ADD_SA_BINARIES/ia64  = 
+ ADD_SA_BINARIES/arm   = 
Index: npl/java/openjdk/patches/nonreparenting_wm.patch
===================================================================
--- npl/java/openjdk/patches/nonreparenting_wm.patch	(revision 981dbbc6c900fb75ec9e5eaf6305054362a41911)
+++ npl/java/openjdk/patches/nonreparenting_wm.patch	(revision 981dbbc6c900fb75ec9e5eaf6305054362a41911)
@@ -0,0 +1,59 @@
+--- openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java	2016-04-01 07:04:05.000000000 +0200
++++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java	2016-04-10 13:49:06.513358648 +0200
+@@ -104,7 +104,8 @@
+         COMPIZ_WM = 12,
+         LG3D_WM = 13,
+         CWM_WM = 14,
+-        MUTTER_WM = 15;
++        MUTTER_WM = 15,
++        OTHER_NONREPARENTING_WM = 16;
+     public String toString() {
+         switch  (WMID) {
+           case NO_WM:
+@@ -601,7 +602,8 @@
+             awtWMNonReparenting = (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) ? 1 : 0;
+         }
+         return (awtWMNonReparenting == 1 || XWM.getWMID() == XWM.COMPIZ_WM
+-                || XWM.getWMID() == XWM.LG3D_WM || XWM.getWMID() == XWM.CWM_WM);
++                || XWM.getWMID() == XWM.LG3D_WM || XWM.getWMID() == XWM.CWM_WM
++                || XWM.getWMID() == XWM.OTHER_NONREPARENTING_WM);
+     }
+ 
+     /*
+@@ -796,9 +798,17 @@
+              * supports WIN or _NET wm spec.
+              */
+             else if (l_net_protocol.active()) {
+-                awt_wmgr = XWM.OTHER_WM;
++                if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
++                    awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
++                } else {
++                    awt_wmgr = XWM.OTHER_WM;
++		}
+             } else if (win.active()) {
+-                awt_wmgr = XWM.OTHER_WM;
++                if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
++                    awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
++                } else {
++                    awt_wmgr = XWM.OTHER_WM;
++		}
+             }
+             /*
+              * Check for legacy WMs.
+@@ -809,6 +819,8 @@
+                 awt_wmgr = XWM.MOTIF_WM;
+             } else if (isOpenLook()) {
+                 awt_wmgr = XWM.OPENLOOK_WM;
++            } else if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
++                awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
+             } else {
+                 awt_wmgr = XWM.OTHER_WM;
+             }
+@@ -1337,6 +1349,7 @@
+                   res = new Insets(28, 6, 6, 6);
+                   break;
+               case NO_WM:
++              case OTHER_NONREPARENTING_WM:
+               case LG3D_WM:
+                   res = zeroInsets;
+                   break;
Index: npl/java/openjdk/patches/openjdk.arm_fixes.patch
===================================================================
--- npl/java/openjdk/patches/openjdk.arm_fixes.patch	(revision 981dbbc6c900fb75ec9e5eaf6305054362a41911)
+++ npl/java/openjdk/patches/openjdk.arm_fixes.patch	(revision 981dbbc6c900fb75ec9e5eaf6305054362a41911)
@@ -0,0 +1,44 @@
+diff -up openjdk/jdk/make/common/shared/Sanity.gmk.sav openjdk/jdk/make/common/shared/Sanity.gmk
+--- openjdk/jdk/make/common/shared/Sanity.gmk.sav	2012-02-14 16:12:48.000000000 -0500
++++ openjdk/jdk/make/common/shared/Sanity.gmk	2012-03-07 17:31:26.153840755 -0500
+@@ -814,12 +814,12 @@ ifdef OPENJDK
+ 	@(($(CD) $(BUILDDIR)/tools/freetypecheck && $(MAKE)) || \
+ 	    $(ECHO) "Failed to build freetypecheck." ) > $@
+ 
+-    sane-freetype: $(TEMPDIR)/freetypeinfo
+-	@if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \
+-	  $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \
+-	          " or higher is required. \n" \
+-		  "`$(CAT) $<`  \n" >> $(ERROR_FILE) ; \
+-	fi
++#    sane-freetype: $(TEMPDIR)/freetypeinfo
++#	@if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \
++#	  $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \
++#	          " or higher is required. \n" \
++#		  "`$(CAT) $<`  \n" >> $(ERROR_FILE) ; \
++#	fi
+   else
+     #do nothing  (cross-compiling)
+     sane-freetype: 
+diff -up openjdk/jdk/make/jdk_generic_profile.sh.sav openjdk/jdk/make/jdk_generic_profile.sh
+--- openjdk/jdk/make/jdk_generic_profile.sh.sav	2012-02-14 16:12:48.000000000 -0500
++++ openjdk/jdk/make/jdk_generic_profile.sh	2012-03-07 17:31:26.154840740 -0500
+@@ -280,7 +280,7 @@ if [ "${ZERO_BUILD}" = true ] ; then
+ 
+   # ZERO_ENDIANNESS is the endianness of the processor
+   case "${ZERO_LIBARCH}" in
+-    i386|amd64|ia64)
++    i386|amd64|ia64|arm)
+       ZERO_ENDIANNESS=little
+       ;;
+     ppc*|s390*|sparc*|alpha)
+@@ -307,6 +307,9 @@ if [ "${ZERO_BUILD}" = true ] ; then
+     s390)
+       ZERO_ARCHFLAG="-m31"
+       ;;
++    arm)
++      ZERO_ARCHFLAG="-D_LITTLE_ENDIAN"
++      ;;
+     *)
+       ZERO_ARCHFLAG="-m${ARCH_DATA_MODEL}"
+   esac
