summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/8141491.diff115
-rw-r--r--debian/patches/8164293.diff49
-rw-r--r--debian/patches/aarch64.diff202
-rw-r--r--debian/patches/accessible-toolkit.patch15
-rw-r--r--debian/patches/adlc-parser.patch11
-rw-r--r--debian/patches/alpha-float-const.diff13
-rw-r--r--debian/patches/applet-hole.patch106
-rw-r--r--debian/patches/atk-wrapper-security.patch12
-rw-r--r--debian/patches/autoconf-select.diff12
-rw-r--r--debian/patches/autoconf-updates.diff2267
-rw-r--r--debian/patches/bootstrap-with-gcj.diff654
-rw-r--r--debian/patches/compare-pointer-with-literal.patch11
-rw-r--r--debian/patches/compiler-flags.diff11
-rw-r--r--debian/patches/default-jvm-cfg-aarch64.diff22
-rw-r--r--debian/patches/default-jvm-cfg-default.diff22
-rw-r--r--debian/patches/disable-doclint-by-default.diff56
-rw-r--r--debian/patches/dnd-files.patch20
-rw-r--r--debian/patches/dont-strip-images.diff13
-rw-r--r--debian/patches/enumipv6-fix.patch11
-rw-r--r--debian/patches/fontconfig-arphic-uming.diff244
-rw-r--r--debian/patches/fontconfig-japanese.diff219
-rw-r--r--debian/patches/fontconfig-korean-nanum.diff266
-rw-r--r--debian/patches/fontconfig-wqy-microhei.patch53
-rw-r--r--debian/patches/gcc6.diff1086
-rw-r--r--debian/patches/hotspot-disable-werror.diff13
-rw-r--r--debian/patches/hotspot-libpath-aarch64.diff33
-rw-r--r--debian/patches/hotspot-libpath-default.diff37
-rw-r--r--debian/patches/hotspot-mips-align.diff11
-rw-r--r--debian/patches/hotspot-no-march-i586.diff13
-rw-r--r--debian/patches/hotspot-powerpcspe.diff11
-rw-r--r--debian/patches/hotspot-set-compiler.diff12
-rw-r--r--debian/patches/hotspot-warn-no-errformat.diff24
-rw-r--r--debian/patches/icc_loading_with_symlink.diff35
-rw-r--r--debian/patches/icedtea-4953367.patch21
-rw-r--r--debian/patches/icedtea-override-redirect-compiz.patch10
-rw-r--r--debian/patches/icedtea-sound.diff180
-rw-r--r--debian/patches/include-all-srcs.diff57
-rw-r--r--debian/patches/jamvm-fix.diff108
-rw-r--r--debian/patches/java-access-bridge-security.patch15
-rw-r--r--debian/patches/javadoc-sort-enum-and-annotation-types.diff21
-rw-r--r--debian/patches/jdk-841269-filechooser.patch26
-rw-r--r--debian/patches/jdk-derived-font-size.diff14
-rw-r--r--debian/patches/jdk-freetypeScaler-crash.diff129
-rw-r--r--debian/patches/jdk-getAccessibleValue.diff272
-rw-r--r--debian/patches/jdk-ppc64el-S8165231.diff48
-rw-r--r--debian/patches/jdk-ppc64el-S8170153.patch44
-rw-r--r--debian/patches/jdk-pulseaudio.diff16
-rw-r--r--debian/patches/jdk-target-arch-define.diff19
-rw-r--r--debian/patches/jexec.diff.in14
-rw-r--r--debian/patches/kfreebsd-support-hotspot.diff827
-rw-r--r--debian/patches/kfreebsd-support-jamvm.diff42
-rw-r--r--debian/patches/kfreebsd-support-jdk.diff5171
-rw-r--r--debian/patches/ld-symbolic-functions-aarch64.diff32
-rw-r--r--debian/patches/ld-symbolic-functions-default.diff21
-rw-r--r--debian/patches/libjpeg-fix.diff13
-rw-r--r--debian/patches/libpcsclite-dlopen.diff36
-rw-r--r--debian/patches/link-with-as-needed.diff40
-rw-r--r--debian/patches/m68k-support.diff1255
-rw-r--r--debian/patches/multiple-pkcs11-library-init.patch72
-rw-r--r--debian/patches/no-pch-build.diff110
-rw-r--r--debian/patches/nonreparenting-wm.diff59
-rw-r--r--debian/patches/openjdk-ppc64el-S8170153.patch37
-rw-r--r--debian/patches/pass-extra-flags.diff36
-rw-r--r--debian/patches/ppc64el.diff53
-rw-r--r--debian/patches/ppc64le-8036767.diff143
-rw-r--r--debian/patches/pr2775-cache_api.diff54
-rw-r--r--debian/patches/s390x-thread-stack-size.diff13
-rw-r--r--debian/patches/set-exec-name.diff47
-rw-r--r--debian/patches/shebang.diff7
-rw-r--r--debian/patches/sparc-fixes.diff15
-rw-r--r--debian/patches/sparc-stubgenerator.diff44
-rw-r--r--debian/patches/stack-direction.diff217
-rw-r--r--debian/patches/system-lcms.diff101
-rw-r--r--debian/patches/system-libjpeg.diff361
-rw-r--r--debian/patches/system-libpng.diff113
-rw-r--r--debian/patches/system-pcsclite.diff181
-rw-r--r--debian/patches/workaround_expand_exec_shield_cs_limit.diff22
-rw-r--r--debian/patches/zero-architectures.diff102
-rw-r--r--debian/patches/zero-fpu-control-is-noop.diff27
-rw-r--r--debian/patches/zero-missing-headers.diff25
-rw-r--r--debian/patches/zero-opt.diff16
-rw-r--r--debian/patches/zero-sh.diff29
-rw-r--r--debian/patches/zero-sparc.diff287
-rw-r--r--debian/patches/zero-x32.diff86
84 files changed, 16367 insertions, 0 deletions
diff --git a/debian/patches/8141491.diff b/debian/patches/8141491.diff
new file mode 100644
index 0000000..6370c7c
--- /dev/null
+++ b/debian/patches/8141491.diff
@@ -0,0 +1,115 @@
+# DP: JDK-8141491: Unaligned memory access in Bits.c
+
+--- a/jdk/src/share/native/java/nio/Bits.c
++++ b/jdk/src/share/native/java/nio/Bits.c
+@@ -67,16 +67,38 @@
+ #define SWAPLONG(x) ((jlong)(((jlong)SWAPINT((jint)(x)) << 32) | \
+ ((jlong)SWAPINT((jint)((x) >> 32)) & 0xffffffff)))
+
++/* The destination buffer passed to Java_java_nio_Bits_copyFromShor<type>tArray
++ * function and the source buffer passed to Java_java_nio_Bits_copyTo<type>Array
++ * may not be aligned on <type>'s boundary. Inform the compiler about this via
++ * 'unaligned' attribute, provided it supports this attribute. For recent
++ * compilers, use __has_attribute preprocessor predicate; if it is not available,
++ * we know that GCC supports it.
++ */
++#ifndef __has_attribute
++#define __has_attribute(x) 0
++#endif
++
++#if defined(__GNUC__) || __has_attribute(aligned)
++typedef jshort __attribute__((aligned(1))) jshort_unaligned;
++typedef jint __attribute__((aligned(1))) jint_unaligned;
++typedef jlong __attribute__((aligned(1))) jlong_unaligned;
++#else
++typedef jshort jshort_unaligned;
++typedef jint jint_unaligned;
++typedef jlong jlong_unaligned;
++#endif
++
+ JNIEXPORT void JNICALL
+ Java_java_nio_Bits_copyFromShortArray(JNIEnv *env, jobject this, jobject src,
+ jlong srcPos, jlong dstAddr, jlong length)
+ {
+ jbyte *bytes;
+ size_t size;
+- jshort *srcShort, *dstShort, *endShort;
++ jshort *srcShort, *endShort;
++ jshort_unaligned *dstShort;
+ jshort tmpShort;
+
+- dstShort = (jshort *)jlong_to_ptr(dstAddr);
++ dstShort = (jshort_unaligned *)jlong_to_ptr(dstAddr);
+
+ while (length > 0) {
+ /* do not change this if-else statement, see WARNING above */
+@@ -108,10 +130,11 @@ Java_java_nio_Bits_copyToShortArray(JNIE
+ {
+ jbyte *bytes;
+ size_t size;
+- jshort *srcShort, *dstShort, *endShort;
++ jshort_unaligned *srcShort, *endShort;
++ jshort *dstShort;
+ jshort tmpShort;
+
+- srcShort = (jshort *)jlong_to_ptr(srcAddr);
++ srcShort = (jshort_unaligned *)jlong_to_ptr(srcAddr);
+
+ while (length > 0) {
+ /* do not change this if-else statement, see WARNING above */
+@@ -143,10 +166,11 @@ Java_java_nio_Bits_copyFromIntArray(JNIE
+ {
+ jbyte *bytes;
+ size_t size;
+- jint *srcInt, *dstInt, *endInt;
++ jint *srcInt, *endInt;
++ jint_unaligned *dstInt;
+ jint tmpInt;
+
+- dstInt = (jint *)jlong_to_ptr(dstAddr);
++ dstInt = (jint_unaligned *)jlong_to_ptr(dstAddr);
+
+ while (length > 0) {
+ /* do not change this code, see WARNING above */
+@@ -178,10 +202,11 @@ Java_java_nio_Bits_copyToIntArray(JNIEnv
+ {
+ jbyte *bytes;
+ size_t size;
+- jint *srcInt, *dstInt, *endInt;
++ jint_unaligned *srcInt, *endInt;
++ jint *dstInt;
+ jint tmpInt;
+
+- srcInt = (jint *)jlong_to_ptr(srcAddr);
++ srcInt = (jint_unaligned *)jlong_to_ptr(srcAddr);
+
+ while (length > 0) {
+ /* do not change this code, see WARNING above */
+@@ -213,10 +238,11 @@ Java_java_nio_Bits_copyFromLongArray(JNI
+ {
+ jbyte *bytes;
+ size_t size;
+- jlong *srcLong, *dstLong, *endLong;
++ jlong *srcLong, *endLong;
++ jlong_unaligned *dstLong;
+ jlong tmpLong;
+
+- dstLong = (jlong *)jlong_to_ptr(dstAddr);
++ dstLong = (jlong_unaligned *)jlong_to_ptr(dstAddr);
+
+ while (length > 0) {
+ /* do not change this code, see WARNING above */
+@@ -248,10 +274,11 @@ Java_java_nio_Bits_copyToLongArray(JNIEn
+ {
+ jbyte *bytes;
+ size_t size;
+- jlong *srcLong, *dstLong, *endLong;
++ jlong_unaligned *srcLong, *endLong;
++ jlong *dstLong;
+ jlong tmpLong;
+
+- srcLong = (jlong *)jlong_to_ptr(srcAddr);
++ srcLong = (jlong_unaligned *)jlong_to_ptr(srcAddr);
+
+ while (length > 0) {
+ /* do not change this code, see WARNING above */
diff --git a/debian/patches/8164293.diff b/debian/patches/8164293.diff
new file mode 100644
index 0000000..3f995fb
--- /dev/null
+++ b/debian/patches/8164293.diff
@@ -0,0 +1,49 @@
+
+# HG changeset patch
+# User jcm
+# Date 1484137609 28800
+# Node ID 8dfbb002197a8e9dfa2881d33ec282fd7a449c25
+# Parent c7140a91e56a846a9691f81c744fd26609de093c
+8164293: HotSpot leaking memory in long-running requests
+Summary: Applied RMs in sweep_code_cache and related codes.
+Reviewed-by: kvn, thartmann
+
+diff -r c7140a91e56a -r 8dfbb002197a src/share/vm/code/nmethod.cpp
+--- a/hotspot/src/share/vm/code/nmethod.cpp Thu Jan 05 18:55:20 2017 -0500
++++ b/hotspot/src/share/vm/code/nmethod.cpp Wed Jan 11 04:26:49 2017 -0800
+@@ -1151,6 +1151,7 @@
+ // Clear ICStubs of all compiled ICs
+ void nmethod::clear_ic_stubs() {
+ assert_locked_or_safepoint(CompiledIC_lock);
++ ResourceMark rm;
+ RelocIterator iter(this);
+ while(iter.next()) {
+ if (iter.type() == relocInfo::virtual_call_type) {
+diff -r c7140a91e56a -r 8dfbb002197a src/share/vm/runtime/sweeper.cpp
+--- a/hotspot/src/share/vm/runtime/sweeper.cpp Thu Jan 05 18:55:20 2017 -0500
++++ b/hotspot/src/share/vm/runtime/sweeper.cpp Wed Jan 11 04:26:49 2017 -0800
+@@ -319,6 +319,7 @@
+ }
+
+ void NMethodSweeper::sweep_code_cache() {
++ ResourceMark rm;
+ Ticks sweep_start_counter = Ticks::now();
+
+ _flushed_count = 0;
+@@ -626,6 +627,7 @@
+ // state of the code cache if it's requested.
+ void NMethodSweeper::log_sweep(const char* msg, const char* format, ...) {
+ if (PrintMethodFlushing) {
++ ResourceMark rm;
+ stringStream s;
+ // Dump code cache state into a buffer before locking the tty,
+ // because log_state() will use locks causing lock conflicts.
+@@ -643,6 +645,7 @@
+ }
+
+ if (LogCompilation && (xtty != NULL)) {
++ ResourceMark rm;
+ stringStream s;
+ // Dump code cache state into a buffer before locking the tty,
+ // because log_state() will use locks causing lock conflicts.
+
diff --git a/debian/patches/aarch64.diff b/debian/patches/aarch64.diff
new file mode 100644
index 0000000..a7848b2
--- /dev/null
+++ b/debian/patches/aarch64.diff
@@ -0,0 +1,202 @@
+# DP: Add missing build bits for AArch64 from the AArch64 branch.
+
+--- a/common/autoconf/build-aux/autoconf-config.sub
++++ b/common/autoconf/build-aux/autoconf-config.sub
+@@ -264,6 +264,7 @@ case $basic_machine in
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
++ | aarch64 \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+@@ -340,6 +341,7 @@ case $basic_machine in
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
++ | aarch64-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+--- a/common/autoconf/generated-configure.sh
++++ b/common/autoconf/generated-configure.sh
+@@ -6868,6 +6868,12 @@ test -n "$target_alias" &&
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+ ;;
++ aarch64)
++ VAR_CPU=aarch64
++ VAR_CPU_ARCH=aarch64
++ VAR_CPU_BITS=64
++ VAR_CPU_ENDIAN=little
++ ;;
+ powerpc)
+ VAR_CPU=ppc
+ VAR_CPU_ARCH=ppc
+@@ -7005,6 +7011,12 @@ $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUI
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+ ;;
++ aarch64)
++ VAR_CPU=aarch64
++ VAR_CPU_ARCH=aarch64
++ VAR_CPU_BITS=64
++ VAR_CPU_ENDIAN=little
++ ;;
+ powerpc)
+ VAR_CPU=ppc
+ VAR_CPU_ARCH=ppc
+@@ -7975,11 +7987,6 @@ $as_echo "$with_jvm_variants" >&6; }
+ JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
+ JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
+
+- if test "x$JVM_VARIANT_CLIENT" = xtrue; then
+- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+- as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
+- fi
+- fi
+ if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
+@@ -29731,7 +29738,7 @@ fi
+ #
+ case $COMPILER_NAME in
+ gcc )
+- COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-unused-parameter -Wno-parentheses \
+ -pipe \
+ -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+ CXXSTD_CXXFLAG="-std=gnu++98"
+@@ -30235,6 +30242,9 @@ $as_echo "$supports" >&6; }
+ s390)
+ ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
+ ;;
++ aarch64)
++ ZERO_ARCHFLAG=""
++ ;;
+ *)
+ ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
+ esac
+--- a/common/autoconf/jdk-options.m4
++++ b/common/autoconf/jdk-options.m4
+@@ -164,6 +164,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS
+ if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
+ INCLUDE_SA=false
+ fi
++ if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
++ INCLUDE_SA=false
++ fi
+ AC_SUBST(INCLUDE_SA)
+
+ if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
+--- a/common/autoconf/platform.m4
++++ b/common/autoconf/platform.m4
+@@ -54,6 +54,12 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+ ;;
++ aarch64)
++ VAR_CPU=aarch64
++ VAR_CPU_ARCH=aarch64
++ VAR_CPU_BITS=64
++ VAR_CPU_ENDIAN=little
++ ;;
+ powerpc)
+ VAR_CPU=ppc
+ VAR_CPU_ARCH=ppc
+--- a/common/autoconf/toolchain.m4
++++ b/common/autoconf/toolchain.m4
+@@ -1018,7 +1018,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ #
+ case $COMPILER_NAME in
+ gcc )
+- COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-unused-parameter -Wno-parentheses \
+ -pipe \
+ -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
+ CXXSTD_CXXFLAG="-std=gnu++98"
+@@ -1346,6 +1346,9 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ s390)
+ ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
+ ;;
++ aarch64)
++ ZERO_ARCHFLAG=""
++ ;;
+ *)
+ ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
+ esac
+--- a/jdk/make/gensrc/GensrcMisc.gmk
++++ b/jdk/make/gensrc/GensrcMisc.gmk
+@@ -76,7 +76,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ INCLUDE_FILES := $(GENSRC_SOR_SRC_FILE), \
+ LANG := C, \
+ CC := $(BUILD_CC), \
+- LDEXE := $(BUILD_LD), \
++ LDEXE := $(BUILD_CC), \
+ OBJECT_DIR := $(GENSRC_SOR_BIN), \
+ OUTPUT_DIR := $(GENSRC_SOR_BIN), \
+ PROGRAM := genSocketOptionRegistry))
+--- a/jdk/make/lib/SoundLibraries.gmk
++++ b/jdk/make/lib/SoundLibraries.gmk
+@@ -139,6 +139,10 @@ else
+ ifeq ($(OPENJDK_TARGET_CPU), ppc64)
+ LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64
+ endif
++
++ ifeq ($(OPENJDK_TARGET_CPU), aarch64)
++ LIBJSOUND_CFLAGS += -DX_ARCH=X_AARCH64
++ endif
+ endif
+
+ LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
+--- a/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
++++ b/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
+@@ -43,6 +43,7 @@
+ #define X_ZERO 6
+ #define X_ARM 7
+ #define X_PPC 8
++#define X_AARCH64 9
+
+ // **********************************
+ // Make sure you set X_PLATFORM and X_ARCH defines correctly.
+--- /dev/null
++++ b/jdk/src/solaris/bin/aarch64/jvm.cfg
+@@ -0,0 +1,38 @@
++# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation. Oracle designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Oracle in the LICENSE file that accompanied this code.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++# or visit www.oracle.com if you need additional information or have any
++# questions.
++#
++# List of JVMs that can be used as an option to java, javac, etc.
++# Order is important -- first in this list is the default JVM.
++# NOTE that this both this file and its format are UNSUPPORTED and
++# WILL GO AWAY in a future release.
++#
++# You may also select a JVM in an arbitrary location with the
++# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
++# and may not be available in a future release.
++#
++# n.b. server must be first so it is used as the default
++-server KNOWN
++-minimal ERROR
++-zero KNOWN
++-shark ERROR
++-jamvm ERROR
diff --git a/debian/patches/accessible-toolkit.patch b/debian/patches/accessible-toolkit.patch
new file mode 100644
index 0000000..b337a9c
--- /dev/null
+++ b/debian/patches/accessible-toolkit.patch
@@ -0,0 +1,15 @@
+--- a/jdk/src/share/classes/java/awt/Toolkit.java
++++ b/jdk/src/share/classes/java/awt/Toolkit.java
+@@ -894,7 +894,11 @@
+ return null;
+ }
+ });
+- loadAssistiveTechnologies();
++ try {
++ loadAssistiveTechnologies();
++ } catch ( AWTError error) {
++ // ignore silently
++ }
+ } finally {
+ // Make sure to always re-enable the JIT.
+ java.lang.Compiler.enable();
diff --git a/debian/patches/adlc-parser.patch b/debian/patches/adlc-parser.patch
new file mode 100644
index 0000000..e092c03
--- /dev/null
+++ b/debian/patches/adlc-parser.patch
@@ -0,0 +1,11 @@
+# DP: fixes an uninitialized memory issue in adlc
+--- a/hotspot/src/share/vm/adlc/formsopt.cpp
++++ b/hotspot/src/share/vm/adlc/formsopt.cpp
+@@ -440,6 +440,7 @@ FrameForm::FrameForm() {
+ _return_value = NULL;
+ _c_return_value = NULL;
+ _interpreter_frame_pointer_reg = NULL;
++ _cisc_spilling_operand_name = NULL;
+ }
+
+ FrameForm::~FrameForm() {
diff --git a/debian/patches/alpha-float-const.diff b/debian/patches/alpha-float-const.diff
new file mode 100644
index 0000000..e238050
--- /dev/null
+++ b/debian/patches/alpha-float-const.diff
@@ -0,0 +1,13 @@
+--- src/jdk/src/share/classes/java/lang/Float.java
++++ src/jdk/src/share/classes/java/lang/Float.java
+@@ -85,7 +85,9 @@
+ *
+ * @since 1.6
+ */
+- public static final float MIN_NORMAL = 0x1.0p-126f; // 1.17549435E-38f
++ // FIXME: still required on alpha?
++ // public static final float MIN_NORMAL = 0x1.0p-126f; // 1.17549435E-38f
++ public static final float MIN_NORMAL = Float.intBitsToFloat(0x00800000);
+
+ /**
+ * A constant holding the smallest positive nonzero value of type
diff --git a/debian/patches/applet-hole.patch b/debian/patches/applet-hole.patch
new file mode 100644
index 0000000..912db34
--- /dev/null
+++ b/debian/patches/applet-hole.patch
@@ -0,0 +1,106 @@
+--- a/jdk/src/share/classes/sun/applet/AppletPanel.java
++++ b/jdk/src/share/classes/sun/applet/AppletPanel.java
+@@ -61,7 +61,7 @@ abstract class AppletPanel extends Panel
+ /**
+ * The applet (if loaded).
+ */
+- Applet applet;
++ protected Applet applet;
+
+ /**
+ * Applet will allow initialization. Should be
+@@ -157,7 +157,8 @@ abstract class AppletPanel extends Panel
+ * Creates a thread to run the applet. This method is called
+ * each time an applet is loaded and reloaded.
+ */
+- synchronized void createAppletThread() {
++ //Overridden by NetxPanel.
++ protected synchronized void createAppletThread() {
+ // Create a thread group for the applet, and start a new
+ // thread to load the applet.
+ String nm = "applet-" + getCode();
+@@ -304,7 +305,7 @@ abstract class AppletPanel extends Panel
+ /**
+ * Get an event from the queue.
+ */
+- synchronized AppletEvent getNextEvent() throws InterruptedException {
++ protected synchronized AppletEvent getNextEvent() throws InterruptedException {
+ while (queue == null || queue.isEmpty()) {
+ wait();
+ }
+@@ -698,7 +699,8 @@ abstract class AppletPanel extends Panel
+ * applet event processing so that it can be gracefully interrupted from
+ * things like HotJava.
+ */
+- private void runLoader() {
++ //Overridden by NetxPanel.
++ protected void runLoader() {
+ if (status != APPLET_DISPOSE) {
+ showAppletStatus("notdisposed");
+ return;
+--- a/jdk/src/share/classes/sun/applet/AppletViewerPanel.java
++++ b/jdk/src/share/classes/sun/applet/AppletViewerPanel.java
+@@ -42,25 +42,25 @@ import sun.tools.jar.*;
+ *
+ * @author Arthur van Hoff
+ */
+-class AppletViewerPanel extends AppletPanel {
++public class AppletViewerPanel extends AppletPanel {
+
+ /* Are we debugging? */
+- static boolean debug = false;
++ protected static boolean debug = false;
+
+ /**
+ * The document url.
+ */
+- URL documentURL;
++ protected URL documentURL;
+
+ /**
+ * The base url.
+ */
+- URL baseURL;
++ protected URL baseURL;
+
+ /**
+ * The attributes of the applet.
+ */
+- Hashtable atts;
++ protected Hashtable<String,String> atts;
+
+ /*
+ * JDK 1.1 serialVersionUID
+@@ -70,7 +70,7 @@ class AppletViewerPanel extends AppletPa
+ /**
+ * Construct an applet viewer and start the applet.
+ */
+- AppletViewerPanel(URL documentURL, Hashtable atts) {
++ protected AppletViewerPanel(URL documentURL, Hashtable<String,String> atts) {
+ this.documentURL = documentURL;
+ this.atts = atts;
+
+@@ -106,7 +106,7 @@ class AppletViewerPanel extends AppletPa
+ * Get an applet parameter.
+ */
+ public String getParameter(String name) {
+- return (String)atts.get(name.toLowerCase());
++ return atts.get(name.toLowerCase());
+ }
+
+ /**
+@@ -202,12 +202,12 @@ class AppletViewerPanel extends AppletPa
+ return (AppletContext)getParent();
+ }
+
+- static void debug(String s) {
++ protected static void debug(String s) {
+ if(debug)
+ System.err.println("AppletViewerPanel:::" + s);
+ }
+
+- static void debug(String s, Throwable t) {
++ protected static void debug(String s, Throwable t) {
+ if(debug) {
+ t.printStackTrace();
+ debug(s);
diff --git a/debian/patches/atk-wrapper-security.patch b/debian/patches/atk-wrapper-security.patch
new file mode 100644
index 0000000..844feef
--- /dev/null
+++ b/debian/patches/atk-wrapper-security.patch
@@ -0,0 +1,12 @@
+Index: b/jdk/src/share/lib/security/java.security-linux
+===================================================================
+--- a/jdk/src/share/lib/security/java.security-linux
++++ b/jdk/src/share/lib/security/java.security-linux
+@@ -186,6 +186,7 @@ keystore.type.compat=true
+ # corresponding RuntimePermission ("accessClassInPackage."+package) has
+ # been granted.
+ package.access=sun.,\
++ org.GNOME.Accessibility.,\
+ com.sun.xml.internal.,\
+ com.sun.imageio.,\
+ com.sun.istack.internal.,\
diff --git a/debian/patches/autoconf-select.diff b/debian/patches/autoconf-select.diff
new file mode 100644
index 0000000..1d650eb
--- /dev/null
+++ b/debian/patches/autoconf-select.diff
@@ -0,0 +1,12 @@
+--- a/common/autoconf/autogen.sh
++++ b/common/autoconf/autogen.sh
+@@ -43,7 +43,9 @@ fi
+
+ custom_hook=$custom_script_dir/custom-hook.m4
+
++if test "x${AUTOCONF}" = x; then
+ AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
++fi
+
+ echo "Autoconf found: ${AUTOCONF}"
+
diff --git a/debian/patches/autoconf-updates.diff b/debian/patches/autoconf-updates.diff
new file mode 100644
index 0000000..3e176ba
--- /dev/null
+++ b/debian/patches/autoconf-updates.diff
@@ -0,0 +1,2267 @@
+Index: b/common/autoconf/build-aux/config.guess
+===================================================================
+--- a/common/autoconf/build-aux/config.guess
++++ b/common/autoconf/build-aux/config.guess
+@@ -1,89 +1,1420 @@
+-#!/bin/sh
++#! /bin/sh
++# Attempt to guess a canonical system name.
++# Copyright 1992-2014 Free Software Foundation, Inc.
++
++timestamp='2014-03-23'
++
++# This file is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
++# (at your option) any later version.
+ #
+-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
+ #
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+-# or visit www.oracle.com if you need additional information or have any
+-# questions.
+-#
+-
+-# This is a wrapper for the config.guess from autoconf. The latter does not
+-# properly detect 64 bit systems on all platforms. Instead of patching the
+-# autoconf system (which might easily get lost in a future update), we wrap it
+-# and fix the broken property, if needed.
+-
+-DIR=`dirname $0`
+-OUT=`. $DIR/autoconf-config.guess`
+-
+-# Test and fix solaris on x86_64
+-echo $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null
+-if test $? = 0; then
+- # isainfo -n returns either i386 or amd64
+- REAL_CPU=`isainfo -n`
+- OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
+-fi
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
++#
++# As a special exception to the GNU General Public License, if you
++# distribute this file as part of a program that contains a
++# configuration script generated by Autoconf, you may include it under
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
++#
++# Originally written by Per Bothner.
++#
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++#
++# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
+-# Test and fix solaris on sparcv9
+-echo $OUT | grep sparc-sun-solaris > /dev/null 2> /dev/null
+-if test $? = 0; then
+- # isainfo -n returns either sparc or sparcv9
+- REAL_CPU=`isainfo -n`
+- OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
+-fi
+
+-# Test and fix cygwin on x86_64
+-echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
+-if test $? != 0; then
+- echo $OUT | grep 86-pc-mingw > /dev/null 2> /dev/null
+-fi
+-if test $? = 0; then
+- case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in
+- intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
+- REAL_CPU=x86_64
+- OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
+- ;;
++me=`echo "$0" | sed -e 's,.*/,,'`
++
++usage="\
++Usage: $0 [OPTION]
++
++Output the configuration name of the system \`$me' is run on.
++
++Operation modes:
++ -h, --help print this help, then exit
++ -t, --time-stamp print date of last modification, then exit
++ -v, --version print version number, then exit
++
++Report bugs and patches to <config-patches@gnu.org>."
++
++version="\
++GNU config.guess ($timestamp)
++
++Originally written by Per Bothner.
++Copyright 1992-2014 Free Software Foundation, Inc.
++
++This is free software; see the source for copying conditions. There is NO
++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
++
++help="
++Try \`$me --help' for more information."
++
++# Parse command line
++while test $# -gt 0 ; do
++ case $1 in
++ --time-stamp | --time* | -t )
++ echo "$timestamp" ; exit ;;
++ --version | -v )
++ echo "$version" ; exit ;;
++ --help | --h* | -h )
++ echo "$usage"; exit ;;
++ -- ) # Stop option processing
++ shift; break ;;
++ - ) # Use stdin as input.
++ break ;;
++ -* )
++ echo "$me: invalid option $1$help" >&2
++ exit 1 ;;
++ * )
++ break ;;
+ esac
+-fi
++done
+
+-# Test and fix architecture string on AIX
+-# On AIX 'config.guess' returns 'powerpc' as architecture but 'powerpc' is
+-# implicitely handled as 32-bit architecture in 'platform.m4' so we check
+-# for the kernel mode rewrite it to 'powerpc64' if we'Re running in 64-bit mode.
+-# The check could also be done with `/usr/sbin/prtconf | grep "Kernel Type" | grep "64-bit"`
+-echo $OUT | grep powerpc-ibm-aix > /dev/null 2> /dev/null
+-if test $? = 0; then
+- if [ -x /bin/getconf ] ; then
+- KERNEL_BITMODE=`getconf KERNEL_BITMODE`
+- if [ "$KERNEL_BITMODE" = "32" ]; then
+- KERNEL_BITMODE=""
+- fi
+- fi
+- OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'`
++if test $# != 0; then
++ echo "$me: too many arguments$help" >&2
++ exit 1
+ fi
+
+-# Test and fix little endian PowerPC64.
+-# TODO: should be handled by autoconf-config.guess.
+-if [ "x$OUT" = x ]; then
+- if [ `uname -m` = ppc64le ]; then
+- if [ `uname -s` = Linux ]; then
+- OUT=powerpc64le-unknown-linux-gnu
+- fi
+- fi
++trap 'exit 1' 1 2 15
++
++# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
++# compiler to aid in system detection is discouraged as it requires
++# temporary files to be created and, as you can see below, it is a
++# headache to deal with in a portable fashion.
++
++# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
++# use `HOST_CC' if defined, but it is deprecated.
++
++# Portable tmp directory creation inspired by the Autoconf team.
++
++set_cc_for_build='
++trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
++trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
++: ${TMPDIR=/tmp} ;
++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
++ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
++ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
++ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
++dummy=$tmp/dummy ;
++tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
++case $CC_FOR_BUILD,$HOST_CC,$CC in
++ ,,) echo "int x;" > $dummy.c ;
++ for c in cc gcc c89 c99 ; do
++ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
++ CC_FOR_BUILD="$c"; break ;
++ fi ;
++ done ;
++ if test x"$CC_FOR_BUILD" = x ; then
++ CC_FOR_BUILD=no_compiler_found ;
++ fi
++ ;;
++ ,,*) CC_FOR_BUILD=$CC ;;
++ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
++esac ; set_cc_for_build= ;'
++
++# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
++# (ghazi@noc.rutgers.edu 1994-08-24)
++if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
++ PATH=$PATH:/.attbin ; export PATH
+ fi
+
+-echo $OUT
++UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
++UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
++UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
++UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
++
++case "${UNAME_SYSTEM}" in
++Linux|GNU|GNU/*)
++ # If the system lacks a compiler, then just pick glibc.
++ # We could probably try harder.
++ LIBC=gnu
++
++ eval $set_cc_for_build
++ cat <<-EOF > $dummy.c
++ #include <features.h>
++ #if defined(__UCLIBC__)
++ LIBC=uclibc
++ #elif defined(__dietlibc__)
++ LIBC=dietlibc
++ #else
++ LIBC=gnu
++ #endif
++ EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
++ ;;
++esac
++
++# Note: order is significant - the case branches are not exclusive.
++
++case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
++ *:NetBSD:*:*)
++ # NetBSD (nbsd) targets should (where applicable) match one or
++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
++ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
++ # switched to ELF, *-*-netbsd* would select the old
++ # object file format. This provides both forward
++ # compatibility and a consistent mechanism for selecting the
++ # object file format.
++ #
++ # Note: NetBSD doesn't particularly care about the vendor
++ # portion of the name. We always set it to "unknown".
++ sysctl="sysctl -n hw.machine_arch"
++ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
++ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
++ case "${UNAME_MACHINE_ARCH}" in
++ armeb) machine=armeb-unknown ;;
++ arm*) machine=arm-unknown ;;
++ sh3el) machine=shl-unknown ;;
++ sh3eb) machine=sh-unknown ;;
++ sh5el) machine=sh5le-unknown ;;
++ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
++ esac
++ # The Operating System including object format, if it has switched
++ # to ELF recently, or will in the future.
++ case "${UNAME_MACHINE_ARCH}" in
++ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
++ eval $set_cc_for_build
++ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
++ | grep -q __ELF__
++ then
++ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
++ # Return netbsd for either. FIX?
++ os=netbsd
++ else
++ os=netbsdelf
++ fi
++ ;;
++ *)
++ os=netbsd
++ ;;
++ esac
++ # The OS release
++ # Debian GNU/NetBSD machines have a different userland, and
++ # thus, need a distinct triplet. However, they do not need
++ # kernel version information, so it can be replaced with a
++ # suitable tag, in the style of linux-gnu.
++ case "${UNAME_VERSION}" in
++ Debian*)
++ release='-gnu'
++ ;;
++ *)
++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
++ ;;
++ esac
++ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
++ # contains redundant information, the shorter form:
++ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
++ echo "${machine}-${os}${release}"
++ exit ;;
++ *:Bitrig:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
++ exit ;;
++ *:OpenBSD:*:*)
++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
++ exit ;;
++ *:ekkoBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
++ exit ;;
++ *:SolidBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
++ exit ;;
++ macppc:MirBSD:*:*)
++ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
++ exit ;;
++ *:MirBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
++ exit ;;
++ alpha:OSF1:*:*)
++ case $UNAME_RELEASE in
++ *4.0)
++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
++ ;;
++ *5.*)
++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
++ ;;
++ esac
++ # According to Compaq, /usr/sbin/psrinfo has been available on
++ # OSF/1 and Tru64 systems produced since 1995. I hope that
++ # covers most systems running today. This code pipes the CPU
++ # types through head -n 1, so we only detect the type of CPU 0.
++ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
++ case "$ALPHA_CPU_TYPE" in
++ "EV4 (21064)")
++ UNAME_MACHINE="alpha" ;;
++ "EV4.5 (21064)")
++ UNAME_MACHINE="alpha" ;;
++ "LCA4 (21066/21068)")
++ UNAME_MACHINE="alpha" ;;
++ "EV5 (21164)")
++ UNAME_MACHINE="alphaev5" ;;
++ "EV5.6 (21164A)")
++ UNAME_MACHINE="alphaev56" ;;
++ "EV5.6 (21164PC)")
++ UNAME_MACHINE="alphapca56" ;;
++ "EV5.7 (21164PC)")
++ UNAME_MACHINE="alphapca57" ;;
++ "EV6 (21264)")
++ UNAME_MACHINE="alphaev6" ;;
++ "EV6.7 (21264A)")
++ UNAME_MACHINE="alphaev67" ;;
++ "EV6.8CB (21264C)")
++ UNAME_MACHINE="alphaev68" ;;
++ "EV6.8AL (21264B)")
++ UNAME_MACHINE="alphaev68" ;;
++ "EV6.8CX (21264D)")
++ UNAME_MACHINE="alphaev68" ;;
++ "EV6.9A (21264/EV69A)")
++ UNAME_MACHINE="alphaev69" ;;
++ "EV7 (21364)")
++ UNAME_MACHINE="alphaev7" ;;
++ "EV7.9 (21364A)")
++ UNAME_MACHINE="alphaev79" ;;
++ esac
++ # A Pn.n version is a patched version.
++ # A Vn.n version is a released version.
++ # A Tn.n version is a released field test version.
++ # A Xn.n version is an unreleased experimental baselevel.
++ # 1.2 uses "1.2" for uname -r.
++ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
++ exitcode=$?
++ trap '' 0
++ exit $exitcode ;;
++ Alpha\ *:Windows_NT*:*)
++ # How do we know it's Interix rather than the generic POSIX subsystem?
++ # Should we change UNAME_MACHINE based on the output of uname instead
++ # of the specific Alpha model?
++ echo alpha-pc-interix
++ exit ;;
++ 21064:Windows_NT:50:3)
++ echo alpha-dec-winnt3.5
++ exit ;;
++ Amiga*:UNIX_System_V:4.0:*)
++ echo m68k-unknown-sysv4
++ exit ;;
++ *:[Aa]miga[Oo][Ss]:*:*)
++ echo ${UNAME_MACHINE}-unknown-amigaos
++ exit ;;
++ *:[Mm]orph[Oo][Ss]:*:*)
++ echo ${UNAME_MACHINE}-unknown-morphos
++ exit ;;
++ *:OS/390:*:*)
++ echo i370-ibm-openedition
++ exit ;;
++ *:z/VM:*:*)
++ echo s390-ibm-zvmoe
++ exit ;;
++ *:OS400:*:*)
++ echo powerpc-ibm-os400
++ exit ;;
++ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
++ echo arm-acorn-riscix${UNAME_RELEASE}
++ exit ;;
++ arm*:riscos:*:*|arm*:RISCOS:*:*)
++ echo arm-unknown-riscos
++ exit ;;
++ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
++ echo hppa1.1-hitachi-hiuxmpp
++ exit ;;
++ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
++ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
++ if test "`(/bin/universe) 2>/dev/null`" = att ; then
++ echo pyramid-pyramid-sysv3
++ else
++ echo pyramid-pyramid-bsd
++ fi
++ exit ;;
++ NILE*:*:*:dcosx)
++ echo pyramid-pyramid-svr4
++ exit ;;
++ DRS?6000:unix:4.0:6*)
++ echo sparc-icl-nx6
++ exit ;;
++ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
++ case `/usr/bin/uname -p` in
++ sparc) echo sparc-icl-nx7; exit ;;
++ esac ;;
++ s390x:SunOS:*:*)
++ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ sun4H:SunOS:5.*:*)
++ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
++ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
++ echo i386-pc-auroraux${UNAME_RELEASE}
++ exit ;;
++ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
++ eval $set_cc_for_build
++ SUN_ARCH="i386"
++ # If there is a compiler, see if it is configured for 64-bit objects.
++ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
++ # This test works for both compilers.
++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ SUN_ARCH="x86_64"
++ fi
++ fi
++ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ sun4*:SunOS:6*:*)
++ # According to config.sub, this is the proper way to canonicalize
++ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
++ # it's likely to be more like Solaris than SunOS4.
++ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ sun4*:SunOS:*:*)
++ case "`/usr/bin/arch -k`" in
++ Series*|S4*)
++ UNAME_RELEASE=`uname -v`
++ ;;
++ esac
++ # Japanese Language versions have a version number like `4.1.3-JL'.
++ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
++ exit ;;
++ sun3*:SunOS:*:*)
++ echo m68k-sun-sunos${UNAME_RELEASE}
++ exit ;;
++ sun*:*:4.2BSD:*)
++ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
++ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
++ case "`/bin/arch`" in
++ sun3)
++ echo m68k-sun-sunos${UNAME_RELEASE}
++ ;;
++ sun4)
++ echo sparc-sun-sunos${UNAME_RELEASE}
++ ;;
++ esac
++ exit ;;
++ aushp:SunOS:*:*)
++ echo sparc-auspex-sunos${UNAME_RELEASE}
++ exit ;;
++ # The situation for MiNT is a little confusing. The machine name
++ # can be virtually everything (everything which is not
++ # "atarist" or "atariste" at least should have a processor
++ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
++ # to the lowercase version "mint" (or "freemint"). Finally
++ # the system name "TOS" denotes a system which is actually not
++ # MiNT. But MiNT is downward compatible to TOS, so this should
++ # be no problem.
++ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
++ echo m68k-atari-mint${UNAME_RELEASE}
++ exit ;;
++ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
++ echo m68k-atari-mint${UNAME_RELEASE}
++ exit ;;
++ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
++ echo m68k-atari-mint${UNAME_RELEASE}
++ exit ;;
++ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
++ echo m68k-milan-mint${UNAME_RELEASE}
++ exit ;;
++ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
++ echo m68k-hades-mint${UNAME_RELEASE}
++ exit ;;
++ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
++ echo m68k-unknown-mint${UNAME_RELEASE}
++ exit ;;
++ m68k:machten:*:*)
++ echo m68k-apple-machten${UNAME_RELEASE}
++ exit ;;
++ powerpc:machten:*:*)
++ echo powerpc-apple-machten${UNAME_RELEASE}
++ exit ;;
++ RISC*:Mach:*:*)
++ echo mips-dec-mach_bsd4.3
++ exit ;;
++ RISC*:ULTRIX:*:*)
++ echo mips-dec-ultrix${UNAME_RELEASE}
++ exit ;;
++ VAX*:ULTRIX*:*:*)
++ echo vax-dec-ultrix${UNAME_RELEASE}
++ exit ;;
++ 2020:CLIX:*:* | 2430:CLIX:*:*)
++ echo clipper-intergraph-clix${UNAME_RELEASE}
++ exit ;;
++ mips:*:*:UMIPS | mips:*:*:RISCos)
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++#ifdef __cplusplus
++#include <stdio.h> /* for printf() prototype */
++ int main (int argc, char *argv[]) {
++#else
++ int main (argc, argv) int argc; char *argv[]; {
++#endif
++ #if defined (host_mips) && defined (MIPSEB)
++ #if defined (SYSTYPE_SYSV)
++ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
++ #endif
++ #if defined (SYSTYPE_SVR4)
++ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
++ #endif
++ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
++ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
++ #endif
++ #endif
++ exit (-1);
++ }
++EOF
++ $CC_FOR_BUILD -o $dummy $dummy.c &&
++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
++ SYSTEM_NAME=`$dummy $dummyarg` &&
++ { echo "$SYSTEM_NAME"; exit; }
++ echo mips-mips-riscos${UNAME_RELEASE}
++ exit ;;
++ Motorola:PowerMAX_OS:*:*)
++ echo powerpc-motorola-powermax
++ exit ;;
++ Motorola:*:4.3:PL8-*)
++ echo powerpc-harris-powermax
++ exit ;;
++ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
++ echo powerpc-harris-powermax
++ exit ;;
++ Night_Hawk:Power_UNIX:*:*)
++ echo powerpc-harris-powerunix
++ exit ;;
++ m88k:CX/UX:7*:*)
++ echo m88k-harris-cxux7
++ exit ;;
++ m88k:*:4*:R4*)
++ echo m88k-motorola-sysv4
++ exit ;;
++ m88k:*:3*:R3*)
++ echo m88k-motorola-sysv3
++ exit ;;
++ AViiON:dgux:*:*)
++ # DG/UX returns AViiON for all architectures
++ UNAME_PROCESSOR=`/usr/bin/uname -p`
++ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
++ then
++ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
++ [ ${TARGET_BINARY_INTERFACE}x = x ]
++ then
++ echo m88k-dg-dgux${UNAME_RELEASE}
++ else
++ echo m88k-dg-dguxbcs${UNAME_RELEASE}
++ fi
++ else
++ echo i586-dg-dgux${UNAME_RELEASE}
++ fi
++ exit ;;
++ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
++ echo m88k-dolphin-sysv3
++ exit ;;
++ M88*:*:R3*:*)
++ # Delta 88k system running SVR3
++ echo m88k-motorola-sysv3
++ exit ;;
++ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
++ echo m88k-tektronix-sysv3
++ exit ;;
++ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
++ echo m68k-tektronix-bsd
++ exit ;;
++ *:IRIX*:*:*)
++ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
++ exit ;;
++ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
++ i*86:AIX:*:*)
++ echo i386-ibm-aix
++ exit ;;
++ ia64:AIX:*:*)
++ if [ -x /usr/bin/oslevel ] ; then
++ IBM_REV=`/usr/bin/oslevel`
++ else
++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++ fi
++ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
++ exit ;;
++ *:AIX:2:3)
++ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #include <sys/systemcfg.h>
++
++ main()
++ {
++ if (!__power_pc())
++ exit(1);
++ puts("powerpc-ibm-aix3.2.5");
++ exit(0);
++ }
++EOF
++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
++ then
++ echo "$SYSTEM_NAME"
++ else
++ echo rs6000-ibm-aix3.2.5
++ fi
++ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
++ echo rs6000-ibm-aix3.2.4
++ else
++ echo rs6000-ibm-aix3.2
++ fi
++ exit ;;
++ *:AIX:*:[4567])
++ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
++ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
++ IBM_ARCH=rs6000
++ else
++ IBM_ARCH=powerpc
++ fi
++ if [ -x /usr/bin/oslevel ] ; then
++ IBM_REV=`/usr/bin/oslevel`
++ else
++ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
++ fi
++ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
++ exit ;;
++ *:AIX:*:*)
++ echo rs6000-ibm-aix
++ exit ;;
++ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
++ echo romp-ibm-bsd4.4
++ exit ;;
++ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
++ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
++ exit ;; # report: romp-ibm BSD 4.3
++ *:BOSX:*:*)
++ echo rs6000-bull-bosx
++ exit ;;
++ DPX/2?00:B.O.S.:*:*)
++ echo m68k-bull-sysv3
++ exit ;;
++ 9000/[34]??:4.3bsd:1.*:*)
++ echo m68k-hp-bsd
++ exit ;;
++ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
++ echo m68k-hp-bsd4.4
++ exit ;;
++ 9000/[34678]??:HP-UX:*:*)
++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
++ case "${UNAME_MACHINE}" in
++ 9000/31? ) HP_ARCH=m68000 ;;
++ 9000/[34]?? ) HP_ARCH=m68k ;;
++ 9000/[678][0-9][0-9])
++ if [ -x /usr/bin/getconf ]; then
++ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
++ case "${sc_cpu_version}" in
++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
++ 532) # CPU_PA_RISC2_0
++ case "${sc_kernel_bits}" in
++ 32) HP_ARCH="hppa2.0n" ;;
++ 64) HP_ARCH="hppa2.0w" ;;
++ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
++ esac ;;
++ esac
++ fi
++ if [ "${HP_ARCH}" = "" ]; then
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++
++ #define _HPUX_SOURCE
++ #include <stdlib.h>
++ #include <unistd.h>
++
++ int main ()
++ {
++ #if defined(_SC_KERNEL_BITS)
++ long bits = sysconf(_SC_KERNEL_BITS);
++ #endif
++ long cpu = sysconf (_SC_CPU_VERSION);
++
++ switch (cpu)
++ {
++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
++ case CPU_PA_RISC2_0:
++ #if defined(_SC_KERNEL_BITS)
++ switch (bits)
++ {
++ case 64: puts ("hppa2.0w"); break;
++ case 32: puts ("hppa2.0n"); break;
++ default: puts ("hppa2.0"); break;
++ } break;
++ #else /* !defined(_SC_KERNEL_BITS) */
++ puts ("hppa2.0"); break;
++ #endif
++ default: puts ("hppa1.0"); break;
++ }
++ exit (0);
++ }
++EOF
++ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
++ test -z "$HP_ARCH" && HP_ARCH=hppa
++ fi ;;
++ esac
++ if [ ${HP_ARCH} = "hppa2.0w" ]
++ then
++ eval $set_cc_for_build
++
++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
++ # generating 64-bit code. GNU and HP use different nomenclature:
++ #
++ # $ CC_FOR_BUILD=cc ./config.guess
++ # => hppa2.0w-hp-hpux11.23
++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
++ # => hppa64-hp-hpux11.23
++
++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
++ grep -q __LP64__
++ then
++ HP_ARCH="hppa2.0w"
++ else
++ HP_ARCH="hppa64"
++ fi
++ fi
++ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
++ exit ;;
++ ia64:HP-UX:*:*)
++ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
++ echo ia64-hp-hpux${HPUX_REV}
++ exit ;;
++ 3050*:HI-UX:*:*)
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #include <unistd.h>
++ int
++ main ()
++ {
++ long cpu = sysconf (_SC_CPU_VERSION);
++ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
++ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
++ results, however. */
++ if (CPU_IS_PA_RISC (cpu))
++ {
++ switch (cpu)
++ {
++ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
++ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
++ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
++ default: puts ("hppa-hitachi-hiuxwe2"); break;
++ }
++ }
++ else if (CPU_IS_HP_MC68K (cpu))
++ puts ("m68k-hitachi-hiuxwe2");
++ else puts ("unknown-hitachi-hiuxwe2");
++ exit (0);
++ }
++EOF
++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
++ { echo "$SYSTEM_NAME"; exit; }
++ echo unknown-hitachi-hiuxwe2
++ exit ;;
++ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
++ echo hppa1.1-hp-bsd
++ exit ;;
++ 9000/8??:4.3bsd:*:*)
++ echo hppa1.0-hp-bsd
++ exit ;;
++ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
++ echo hppa1.0-hp-mpeix
++ exit ;;
++ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
++ echo hppa1.1-hp-osf
++ exit ;;
++ hp8??:OSF1:*:*)
++ echo hppa1.0-hp-osf
++ exit ;;
++ i*86:OSF1:*:*)
++ if [ -x /usr/sbin/sysversion ] ; then
++ echo ${UNAME_MACHINE}-unknown-osf1mk
++ else
++ echo ${UNAME_MACHINE}-unknown-osf1
++ fi
++ exit ;;
++ parisc*:Lites*:*:*)
++ echo hppa1.1-hp-lites
++ exit ;;
++ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
++ echo c1-convex-bsd
++ exit ;;
++ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
++ if getsysinfo -f scalar_acc
++ then echo c32-convex-bsd
++ else echo c2-convex-bsd
++ fi
++ exit ;;
++ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
++ echo c34-convex-bsd
++ exit ;;
++ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
++ echo c38-convex-bsd
++ exit ;;
++ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
++ echo c4-convex-bsd
++ exit ;;
++ CRAY*Y-MP:*:*:*)
++ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ CRAY*[A-Z]90:*:*:*)
++ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
++ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
++ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
++ -e 's/\.[^.]*$/.X/'
++ exit ;;
++ CRAY*TS:*:*:*)
++ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ CRAY*T3E:*:*:*)
++ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ CRAY*SV1:*:*:*)
++ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ *:UNICOS/mp:*:*)
++ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
++ exit ;;
++ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
++ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ exit ;;
++ 5000:UNIX_System_V:4.*:*)
++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
++ exit ;;
++ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
++ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
++ exit ;;
++ sparc*:BSD/OS:*:*)
++ echo sparc-unknown-bsdi${UNAME_RELEASE}
++ exit ;;
++ *:BSD/OS:*:*)
++ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
++ exit ;;
++ *:FreeBSD:*:*)
++ UNAME_PROCESSOR=`/usr/bin/uname -p`
++ case ${UNAME_PROCESSOR} in
++ amd64)
++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ *)
++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ esac
++ exit ;;
++ i*:CYGWIN*:*)
++ echo ${UNAME_MACHINE}-pc-cygwin
++ exit ;;
++ *:MINGW64*:*)
++ echo ${UNAME_MACHINE}-pc-mingw64
++ exit ;;
++ *:MINGW*:*)
++ echo ${UNAME_MACHINE}-pc-mingw32
++ exit ;;
++ *:MSYS*:*)
++ echo ${UNAME_MACHINE}-pc-msys
++ exit ;;
++ i*:windows32*:*)
++ # uname -m includes "-pc" on this system.
++ echo ${UNAME_MACHINE}-mingw32
++ exit ;;
++ i*:PW*:*)
++ echo ${UNAME_MACHINE}-pc-pw32
++ exit ;;
++ *:Interix*:*)
++ case ${UNAME_MACHINE} in
++ x86)
++ echo i586-pc-interix${UNAME_RELEASE}
++ exit ;;
++ authenticamd | genuineintel | EM64T)
++ echo x86_64-unknown-interix${UNAME_RELEASE}
++ exit ;;
++ IA64)
++ echo ia64-unknown-interix${UNAME_RELEASE}
++ exit ;;
++ esac ;;
++ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
++ echo i${UNAME_MACHINE}-pc-mks
++ exit ;;
++ 8664:Windows_NT:*)
++ echo x86_64-pc-mks
++ exit ;;
++ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
++ # How do we know it's Interix rather than the generic POSIX subsystem?
++ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
++ # UNAME_MACHINE based on the output of uname instead of i386?
++ echo i586-pc-interix
++ exit ;;
++ i*:UWIN*:*)
++ echo ${UNAME_MACHINE}-pc-uwin
++ exit ;;
++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
++ echo x86_64-unknown-cygwin
++ exit ;;
++ p*:CYGWIN*:*)
++ echo powerpcle-unknown-cygwin
++ exit ;;
++ prep*:SunOS:5.*:*)
++ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++ exit ;;
++ *:GNU:*:*)
++ # the GNU system
++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
++ exit ;;
++ *:GNU/*:*:*)
++ # other systems with GNU libc and userland
++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
++ exit ;;
++ i*86:Minix:*:*)
++ echo ${UNAME_MACHINE}-pc-minix
++ exit ;;
++ aarch64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ aarch64_be:Linux:*:*)
++ UNAME_MACHINE=aarch64_be
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ alpha:Linux:*:*)
++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
++ EV5) UNAME_MACHINE=alphaev5 ;;
++ EV56) UNAME_MACHINE=alphaev56 ;;
++ PCA56) UNAME_MACHINE=alphapca56 ;;
++ PCA57) UNAME_MACHINE=alphapca56 ;;
++ EV6) UNAME_MACHINE=alphaev6 ;;
++ EV67) UNAME_MACHINE=alphaev67 ;;
++ EV68*) UNAME_MACHINE=alphaev68 ;;
++ esac
++ objdump --private-headers /bin/sh | grep -q ld.so.1
++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ arc:Linux:*:* | arceb:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ arm*:Linux:*:*)
++ eval $set_cc_for_build
++ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
++ | grep -q __ARM_EABI__
++ then
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ else
++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
++ | grep -q __ARM_PCS_VFP
++ then
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
++ else
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
++ fi
++ fi
++ exit ;;
++ avr32*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ cris:Linux:*:*)
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
++ exit ;;
++ crisv32:Linux:*:*)
++ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
++ exit ;;
++ frv:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ hexagon:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ i*86:Linux:*:*)
++ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
++ exit ;;
++ ia64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ m32r*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ m68*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ mips:Linux:*:* | mips64:Linux:*:*)
++ eval $set_cc_for_build
++ sed 's/^ //' << EOF >$dummy.c
++ #undef CPU
++ #undef ${UNAME_MACHINE}
++ #undef ${UNAME_MACHINE}el
++ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
++ CPU=${UNAME_MACHINE}el
++ #else
++ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
++ CPU=${UNAME_MACHINE}
++ #else
++ CPU=
++ #endif
++ #endif
++EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
++ ;;
++ openrisc*:Linux:*:*)
++ echo or1k-unknown-linux-${LIBC}
++ exit ;;
++ or32:Linux:*:* | or1k*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ padre:Linux:*:*)
++ echo sparc-unknown-linux-${LIBC}
++ exit ;;
++ parisc64:Linux:*:* | hppa64:Linux:*:*)
++ echo hppa64-unknown-linux-${LIBC}
++ exit ;;
++ parisc:Linux:*:* | hppa:Linux:*:*)
++ # Look for CPU level
++ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++ *) echo hppa-unknown-linux-${LIBC} ;;
++ esac
++ exit ;;
++ ppc64:Linux:*:*)
++ echo powerpc64-unknown-linux-${LIBC}
++ exit ;;
++ ppc:Linux:*:*)
++ echo powerpc-unknown-linux-${LIBC}
++ exit ;;
++ ppc64le:Linux:*:*)
++ echo powerpc64le-unknown-linux-${LIBC}
++ exit ;;
++ ppcle:Linux:*:*)
++ echo powerpcle-unknown-linux-${LIBC}
++ exit ;;
++ s390:Linux:*:* | s390x:Linux:*:*)
++ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
++ exit ;;
++ sh64*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ sh*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ sparc:Linux:*:* | sparc64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ tile*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ vax:Linux:*:*)
++ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
++ exit ;;
++ x86_64:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ xtensa*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ i*86:DYNIX/ptx:4*:*)
++ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
++ # earlier versions are messed up and put the nodename in both
++ # sysname and nodename.
++ echo i386-sequent-sysv4
++ exit ;;
++ i*86:UNIX_SV:4.2MP:2.*)
++ # Unixware is an offshoot of SVR4, but it has its own version
++ # number series starting with 2...
++ # I am not positive that other SVR4 systems won't match this,
++ # I just have to hope. -- rms.
++ # Use sysv4.2uw... so that sysv4* matches it.
++ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
++ exit ;;
++ i*86:OS/2:*:*)
++ # If we were able to find `uname', then EMX Unix compatibility
++ # is probably installed.
++ echo ${UNAME_MACHINE}-pc-os2-emx
++ exit ;;
++ i*86:XTS-300:*:STOP)
++ echo ${UNAME_MACHINE}-unknown-stop
++ exit ;;
++ i*86:atheos:*:*)
++ echo ${UNAME_MACHINE}-unknown-atheos
++ exit ;;
++ i*86:syllable:*:*)
++ echo ${UNAME_MACHINE}-pc-syllable
++ exit ;;
++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
++ echo i386-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ i*86:*DOS:*:*)
++ echo ${UNAME_MACHINE}-pc-msdosdjgpp
++ exit ;;
++ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
++ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
++ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
++ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
++ else
++ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
++ fi
++ exit ;;
++ i*86:*:5:[678]*)
++ # UnixWare 7.x, OpenUNIX and OpenServer 6.
++ case `/bin/uname -X | grep "^Machine"` in
++ *486*) UNAME_MACHINE=i486 ;;
++ *Pentium) UNAME_MACHINE=i586 ;;
++ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
++ esac
++ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
++ exit ;;
++ i*86:*:3.2:*)
++ if test -f /usr/options/cb.name; then
++ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
++ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
++ elif /bin/uname -X 2>/dev/null >/dev/null ; then
++ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
++ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
++ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
++ && UNAME_MACHINE=i586
++ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
++ && UNAME_MACHINE=i686
++ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
++ && UNAME_MACHINE=i686
++ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
++ else
++ echo ${UNAME_MACHINE}-pc-sysv32
++ fi
++ exit ;;
++ pc:*:*:*)
++ # Left here for compatibility:
++ # uname -m prints for DJGPP always 'pc', but it prints nothing about
++ # the processor, so we play safe by assuming i586.
++ # Note: whatever this is, it MUST be the same as what config.sub
++ # prints for the "djgpp" host, or else GDB configury will decide that
++ # this is a cross-build.
++ echo i586-pc-msdosdjgpp
++ exit ;;
++ Intel:Mach:3*:*)
++ echo i386-pc-mach3
++ exit ;;
++ paragon:*:*:*)
++ echo i860-intel-osf1
++ exit ;;
++ i860:*:4.*:*) # i860-SVR4
++ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
++ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
++ else # Add other i860-SVR4 vendors below as they are discovered.
++ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
++ fi
++ exit ;;
++ mini*:CTIX:SYS*5:*)
++ # "miniframe"
++ echo m68010-convergent-sysv
++ exit ;;
++ mc68k:UNIX:SYSTEM5:3.51m)
++ echo m68k-convergent-sysv
++ exit ;;
++ M680?0:D-NIX:5.3:*)
++ echo m68k-diab-dnix
++ exit ;;
++ M68*:*:R3V[5678]*:*)
++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
++ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
++ OS_REL=''
++ test -r /etc/.relid \
++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
++ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++ && { echo i486-ncr-sysv4; exit; } ;;
++ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
++ OS_REL='.3'
++ test -r /etc/.relid \
++ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
++ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
++ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
++ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
++ echo m68k-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ mc68030:UNIX_System_V:4.*:*)
++ echo m68k-atari-sysv4
++ exit ;;
++ TSUNAMI:LynxOS:2.*:*)
++ echo sparc-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ rs6000:LynxOS:2.*:*)
++ echo rs6000-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
++ echo powerpc-unknown-lynxos${UNAME_RELEASE}
++ exit ;;
++ SM[BE]S:UNIX_SV:*:*)
++ echo mips-dde-sysv${UNAME_RELEASE}
++ exit ;;
++ RM*:ReliantUNIX-*:*:*)
++ echo mips-sni-sysv4
++ exit ;;
++ RM*:SINIX-*:*:*)
++ echo mips-sni-sysv4
++ exit ;;
++ *:SINIX-*:*:*)
++ if uname -p 2>/dev/null >/dev/null ; then
++ UNAME_MACHINE=`(uname -p) 2>/dev/null`
++ echo ${UNAME_MACHINE}-sni-sysv4
++ else
++ echo ns32k-sni-sysv
++ fi
++ exit ;;
++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
++ # says <Richard.M.Bartel@ccMail.Census.GOV>
++ echo i586-unisys-sysv4
++ exit ;;
++ *:UNIX_System_V:4*:FTX*)
++ # From Gerald Hewes <hewes@openmarket.com>.
++ # How about differentiating between stratus architectures? -djm
++ echo hppa1.1-stratus-sysv4
++ exit ;;
++ *:*:*:FTX*)
++ # From seanf@swdc.stratus.com.
++ echo i860-stratus-sysv4
++ exit ;;
++ i*86:VOS:*:*)
++ # From Paul.Green@stratus.com.
++ echo ${UNAME_MACHINE}-stratus-vos
++ exit ;;
++ *:VOS:*:*)
++ # From Paul.Green@stratus.com.
++ echo hppa1.1-stratus-vos
++ exit ;;
++ mc68*:A/UX:*:*)
++ echo m68k-apple-aux${UNAME_RELEASE}
++ exit ;;
++ news*:NEWS-OS:6*:*)
++ echo mips-sony-newsos6
++ exit ;;
++ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
++ if [ -d /usr/nec ]; then
++ echo mips-nec-sysv${UNAME_RELEASE}
++ else
++ echo mips-unknown-sysv${UNAME_RELEASE}
++ fi
++ exit ;;
++ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
++ echo powerpc-be-beos
++ exit ;;
++ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
++ echo powerpc-apple-beos
++ exit ;;
++ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
++ echo i586-pc-beos
++ exit ;;
++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
++ echo i586-pc-haiku
++ exit ;;
++ x86_64:Haiku:*:*)
++ echo x86_64-unknown-haiku
++ exit ;;
++ SX-4:SUPER-UX:*:*)
++ echo sx4-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-5:SUPER-UX:*:*)
++ echo sx5-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-6:SUPER-UX:*:*)
++ echo sx6-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-7:SUPER-UX:*:*)
++ echo sx7-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-8:SUPER-UX:*:*)
++ echo sx8-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-8R:SUPER-UX:*:*)
++ echo sx8r-nec-superux${UNAME_RELEASE}
++ exit ;;
++ Power*:Rhapsody:*:*)
++ echo powerpc-apple-rhapsody${UNAME_RELEASE}
++ exit ;;
++ *:Rhapsody:*:*)
++ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
++ exit ;;
++ *:Darwin:*:*)
++ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
++ eval $set_cc_for_build
++ if test "$UNAME_PROCESSOR" = unknown ; then
++ UNAME_PROCESSOR=powerpc
++ fi
++ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++ grep IS_64BIT_ARCH >/dev/null
++ then
++ case $UNAME_PROCESSOR in
++ i386) UNAME_PROCESSOR=x86_64 ;;
++ powerpc) UNAME_PROCESSOR=powerpc64 ;;
++ esac
++ fi
++ fi
++ elif test "$UNAME_PROCESSOR" = i386 ; then
++ # Avoid executing cc on OS X 10.9, as it ships with a stub
++ # that puts up a graphical alert prompting to install
++ # developer tools. Any system running Mac OS X 10.7 or
++ # later (Darwin 11 and later) is required to have a 64-bit
++ # processor. This is not true of the ARM version of Darwin
++ # that Apple uses in portable devices.
++ UNAME_PROCESSOR=x86_64
++ fi
++ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
++ exit ;;
++ *:procnto*:*:* | *:QNX:[0123456789]*:*)
++ UNAME_PROCESSOR=`uname -p`
++ if test "$UNAME_PROCESSOR" = "x86"; then
++ UNAME_PROCESSOR=i386
++ UNAME_MACHINE=pc
++ fi
++ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
++ exit ;;
++ *:QNX:*:4*)
++ echo i386-pc-qnx
++ exit ;;
++ NEO-?:NONSTOP_KERNEL:*:*)
++ echo neo-tandem-nsk${UNAME_RELEASE}
++ exit ;;
++ NSE-*:NONSTOP_KERNEL:*:*)
++ echo nse-tandem-nsk${UNAME_RELEASE}
++ exit ;;
++ NSR-?:NONSTOP_KERNEL:*:*)
++ echo nsr-tandem-nsk${UNAME_RELEASE}
++ exit ;;
++ *:NonStop-UX:*:*)
++ echo mips-compaq-nonstopux
++ exit ;;
++ BS2000:POSIX*:*:*)
++ echo bs2000-siemens-sysv
++ exit ;;
++ DS/*:UNIX_System_V:*:*)
++ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
++ exit ;;
++ *:Plan9:*:*)
++ # "uname -m" is not consistent, so use $cputype instead. 386
++ # is converted to i386 for consistency with other x86
++ # operating systems.
++ if test "$cputype" = "386"; then
++ UNAME_MACHINE=i386
++ else
++ UNAME_MACHINE="$cputype"
++ fi
++ echo ${UNAME_MACHINE}-unknown-plan9
++ exit ;;
++ *:TOPS-10:*:*)
++ echo pdp10-unknown-tops10
++ exit ;;
++ *:TENEX:*:*)
++ echo pdp10-unknown-tenex
++ exit ;;
++ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
++ echo pdp10-dec-tops20
++ exit ;;
++ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
++ echo pdp10-xkl-tops20
++ exit ;;
++ *:TOPS-20:*:*)
++ echo pdp10-unknown-tops20
++ exit ;;
++ *:ITS:*:*)
++ echo pdp10-unknown-its
++ exit ;;
++ SEI:*:*:SEIUX)
++ echo mips-sei-seiux${UNAME_RELEASE}
++ exit ;;
++ *:DragonFly:*:*)
++ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
++ exit ;;
++ *:*VMS:*:*)
++ UNAME_MACHINE=`(uname -p) 2>/dev/null`
++ case "${UNAME_MACHINE}" in
++ A*) echo alpha-dec-vms ; exit ;;
++ I*) echo ia64-dec-vms ; exit ;;
++ V*) echo vax-dec-vms ; exit ;;
++ esac ;;
++ *:XENIX:*:SysV)
++ echo i386-pc-xenix
++ exit ;;
++ i*86:skyos:*:*)
++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
++ exit ;;
++ i*86:rdos:*:*)
++ echo ${UNAME_MACHINE}-pc-rdos
++ exit ;;
++ i*86:AROS:*:*)
++ echo ${UNAME_MACHINE}-pc-aros
++ exit ;;
++ x86_64:VMkernel:*:*)
++ echo ${UNAME_MACHINE}-unknown-esx
++ exit ;;
++esac
++
++cat >&2 <<EOF
++$0: unable to guess system type
++
++This script, last modified $timestamp, has failed to recognize
++the operating system you are using. It is advised that you
++download the most up to date version of the config scripts from
++
++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
++and
++ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
++
++If the version you run ($0) is already up to date, please
++send the following data and any information you think might be
++pertinent to <config-patches@gnu.org> in order to provide the needed
++information to handle your system.
++
++config.guess timestamp = $timestamp
++
++uname -m = `(uname -m) 2>/dev/null || echo unknown`
++uname -r = `(uname -r) 2>/dev/null || echo unknown`
++uname -s = `(uname -s) 2>/dev/null || echo unknown`
++uname -v = `(uname -v) 2>/dev/null || echo unknown`
++
++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
++/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
++
++hostinfo = `(hostinfo) 2>/dev/null`
++/bin/universe = `(/bin/universe) 2>/dev/null`
++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
++/bin/arch = `(/bin/arch) 2>/dev/null`
++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
++
++UNAME_MACHINE = ${UNAME_MACHINE}
++UNAME_RELEASE = ${UNAME_RELEASE}
++UNAME_SYSTEM = ${UNAME_SYSTEM}
++UNAME_VERSION = ${UNAME_VERSION}
++EOF
++
++exit 1
++
++# Local variables:
++# eval: (add-hook 'write-file-hooks 'time-stamp)
++# time-stamp-start: "timestamp='"
++# time-stamp-format: "%:y-%02m-%02d"
++# time-stamp-end: "'"
++# End:
+Index: b/common/autoconf/build-aux/config.sub
+===================================================================
+--- a/common/autoconf/build-aux/config.sub
++++ b/common/autoconf/build-aux/config.sub
+@@ -1,70 +1,40 @@
+ #! /bin/sh
++# Configuration validation subroutine script.
++# Copyright 1992-2014 Free Software Foundation, Inc.
+
+-#
+-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation. Oracle designates this
+-# particular file as subject to the "Classpath" exception as provided
+-# by Oracle in the LICENSE file that accompanied this code.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+-# or visit www.oracle.com if you need additional information or have any
+-# questions.
+-#
++timestamp='2014-05-01'
+
+-# Configuration validation subroutine script.
+-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+-# Free Software Foundation, Inc.
+-
+-timestamp='2008-01-16'
+-
+-# This file is (in principle) common to ALL GNU software.
+-# The presence of a machine in this file suggests that SOME GNU software
+-# can handle that machine. It does not imply ALL GNU software can.
+-#
+-# This file is free software; you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation; either version 2 of the License, or
++# This file is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3 of the License, or
+ # (at your option) any later version.
+ #
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+-# 02110-1301, USA.
++# along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+-# the same distribution terms that you use for the rest of that program.
++# the same distribution terms that you use for the rest of that
++# program. This Exception is an additional permission under section 7
++# of the GNU General Public License, version 3 ("GPLv3").
+
+
+-# Please send patches to <config-patches@gnu.org>. Submit a context
+-# diff and a properly formatted ChangeLog entry.
++# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+ #
+ # Configuration subroutine to validate and canonicalize a configuration type.
+ # Supply the specified configuration type as an argument.
+ # If it is invalid, we print an error message on stderr and exit with code 1.
+ # Otherwise, we print the canonical config type on stdout and succeed.
+
++# You can get the latest version of this script from:
++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
++
+ # This file is supposed to be the same for all GNU packages
+ # and recognize all the CPU types, system types and aliases
+ # that are meaningful with *any* GNU software.
+@@ -98,8 +68,7 @@ Report bugs and patches to <config-patch
+ version="\
+ GNU config.sub ($timestamp)
+
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
++Copyright 1992-2014 Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -146,12 +115,18 @@ esac
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
++ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
++ knetbsd*-gnu* | netbsd*-gnu* | \
++ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
++ android-linux)
++ os=-linux-android
++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
++ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+@@ -174,10 +149,13 @@ case $os in
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+- -apple | -axis | -knuth | -cray)
++ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
++ -bluegene*)
++ os=-cnk
++ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+@@ -192,10 +170,10 @@ case $os in
+ os=-chorusos
+ basic_machine=$1
+ ;;
+- -chorusrdb)
+- os=-chorusrdb
++ -chorusrdb)
++ os=-chorusrdb
+ basic_machine=$1
+- ;;
++ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+@@ -240,6 +218,12 @@ case $os in
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
++ -lynx*178)
++ os=-lynxos178
++ ;;
++ -lynx*5)
++ os=-lynxos5
++ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+@@ -264,59 +248,85 @@ case $basic_machine in
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
++ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
++ | arc | arceb \
++ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
++ | avr | avr32 \
++ | be32 | be64 \
+ | bfin \
+- | c4x | clipper \
++ | c4x | c8051 | clipper \
+ | d10v | d30v | dlx | dsp16xx \
++ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
++ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
++ | k1om \
++ | le32 | le64 \
++ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+- | maxq | mb | microblaze | mcore | mep \
++ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+- | mips64vr | mips64vrel \
++ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
++ | mips64r5900 | mips64r5900el \
++ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
++ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
++ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
++ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
++ | moxie \
+ | mt \
+ | msp430 \
+- | nios | nios2 \
++ | nds32 | nds32le | nds32be \
++ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+- | or32 \
++ | open8 | or1k | or1knd | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
++ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
++ | rl78 | rx \
+ | score \
+- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
++ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+- | spu | strongarm \
+- | tahoe | thumb | tic4x | tic80 | tron \
+- | v850 | v850e \
++ | spu \
++ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
++ | ubicom32 \
++ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+- | z8k)
++ | x86 | xc16x | xstormy16 | xtensa \
++ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+- m6811 | m68hc11 | m6812 | m68hc12)
+- # Motorola 68HC11/12.
++ c54x)
++ basic_machine=tic54x-unknown
++ ;;
++ c55x)
++ basic_machine=tic55x-unknown
++ ;;
++ c6x)
++ basic_machine=tic6x-unknown
++ ;;
++ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+@@ -326,6 +336,21 @@ case $basic_machine in
+ basic_machine=mt-unknown
+ ;;
+
++ strongarm | thumb | xscale)
++ basic_machine=arm-unknown
++ ;;
++ xgate)
++ basic_machine=$basic_machine-unknown
++ os=-none
++ ;;
++ xscaleeb)
++ basic_machine=armeb-unknown
++ ;;
++
++ xscaleel)
++ basic_machine=armel-unknown
++ ;;
++
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+@@ -340,64 +365,82 @@ case $basic_machine in
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
++ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
++ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
++ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+- | clipper-* | craynv-* | cydra-* \
++ | c[123]* | c30-* | [cjt]90-* | c4x-* \
++ | c8051-* | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
++ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
++ | k1om-* \
++ | le32-* | le64-* \
++ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+- | m88110-* | m88k-* | maxq-* | mcore-* \
++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
++ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+- | mips64vr-* | mips64vrel-* \
++ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
++ | mips64r5900-* | mips64r5900el-* \
++ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
++ | mipsisa32r6-* | mipsisa32r6el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
++ | mipsisa64r6-* | mipsisa64r6el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
++ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+- | nios-* | nios2-* \
++ | nds32-* | nds32le-* | nds32be-* \
++ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
++ | open8-* \
++ | or1k*-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+- | romp-* | rs6000-* \
+- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
++ | rl78-* | romp-* | rs6000-* | rx-* \
++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+- | tahoe-* | thumb-* \
++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
++ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++ | tile*-* \
+ | tron-* \
+- | v850-* | v850e-* | vax-* \
++ | ubicom32-* \
++ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
++ | vax-* \
+ | we32k-* \
+- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+- | z8k-*)
++ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+@@ -419,7 +462,7 @@ case $basic_machine in
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+- abacus)
++ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+@@ -465,6 +508,10 @@ case $basic_machine in
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
++ aros)
++ basic_machine=i386-pc
++ os=-aros
++ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+@@ -481,10 +528,27 @@ case $basic_machine in
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
++ bluegene*)
++ basic_machine=powerpc-ibm
++ os=-cnk
++ ;;
++ c54x-*)
++ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ c55x-*)
++ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
++ c6x-*)
++ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
++ cegcc)
++ basic_machine=arm-unknown
++ os=-cegcc
++ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+@@ -513,7 +577,7 @@ case $basic_machine in
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+- cr16)
++ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+@@ -552,6 +616,10 @@ case $basic_machine in
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
++ dicos)
++ basic_machine=i686-pc
++ os=-dicos
++ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+@@ -667,7 +735,6 @@ case $basic_machine in
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+@@ -725,8 +792,15 @@ case $basic_machine in
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
++ microblaze*)
++ basic_machine=microblaze-xilinx
++ ;;
++ mingw64)
++ basic_machine=x86_64-pc
++ os=-mingw64
++ ;;
+ mingw32)
+- basic_machine=i386-pc
++ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+@@ -761,10 +835,18 @@ case $basic_machine in
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
++ msys)
++ basic_machine=i686-pc
++ os=-msys
++ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
++ nacl)
++ basic_machine=le32-unknown
++ os=-nacl
++ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+@@ -829,6 +911,12 @@ case $basic_machine in
+ np1)
+ basic_machine=np1-gould
+ ;;
++ neo-tandem)
++ basic_machine=neo-tandem
++ ;;
++ nse-tandem)
++ basic_machine=nse-tandem
++ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+@@ -911,9 +999,10 @@ case $basic_machine in
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+- ppc) basic_machine=powerpc-unknown
++ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ppc-* | ppcbe-*)
++ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+@@ -938,7 +1027,11 @@ case $basic_machine in
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+- rdos)
++ rdos | rdos64)
++ basic_machine=x86_64-pc
++ os=-rdos
++ ;;
++ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+@@ -1007,6 +1100,9 @@ case $basic_machine in
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
++ strongarm-* | thumb-*)
++ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+@@ -1063,20 +1159,8 @@ case $basic_machine in
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+- tic54x | c54x*)
+- basic_machine=tic54x-unknown
+- os=-coff
+- ;;
+- tic55x | c55x*)
+- basic_machine=tic55x-unknown
+- os=-coff
+- ;;
+- tic6x | c6x*)
+- basic_machine=tic6x-unknown
+- os=-coff
+- ;;
+ tile*)
+- basic_machine=tile-unknown
++ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+@@ -1146,6 +1230,9 @@ case $basic_machine in
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
++ xscale-* | xscalee[bl]-*)
++ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
++ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+@@ -1154,6 +1241,10 @@ case $basic_machine in
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
++ z80-*-coff)
++ basic_machine=z80-unknown
++ os=-sim
++ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+@@ -1192,7 +1283,7 @@ case $basic_machine in
+ we32k)
+ basic_machine=we32k-att
+ ;;
+- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
++ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+@@ -1239,9 +1330,12 @@ esac
+ if [ x"$os" != x"" ]
+ then
+ case $os in
+- # First match some system type aliases
+- # that might get confused with valid system types.
++ # First match some system type aliases
++ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
++ -auroraux)
++ os=-auroraux
++ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+@@ -1262,21 +1356,23 @@ case $os in
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
++ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+- | -aos* \
++ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+- | -openbsd* | -solidbsd* \
++ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+- | -chorusos* | -chorusrdb* \
+- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++ | -chorusos* | -chorusrdb* | -cegcc* \
++ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
++ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
++ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+@@ -1284,7 +1380,7 @@ case $os in
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+@@ -1323,7 +1419,7 @@ case $os in
+ -opened*)
+ os=-openedition
+ ;;
+- -os400*)
++ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+@@ -1372,7 +1468,7 @@ case $os in
+ -sinix*)
+ os=-sysv4
+ ;;
+- -tpf*)
++ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+@@ -1408,12 +1504,14 @@ case $os in
+ -aros*)
+ os=-aros
+ ;;
+- -kaos*)
+- os=-kaos
+- ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
++ -dicos*)
++ os=-dicos
++ ;;
++ -nacl*)
++ ;;
+ -none)
+ ;;
+ *)
+@@ -1436,10 +1534,10 @@ else
+ # system, and we'll never get to this point.
+
+ case $basic_machine in
+- score-*)
++ score-*)
+ os=-elf
+ ;;
+- spu-*)
++ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+@@ -1451,8 +1549,23 @@ case $basic_machine in
+ arm*-semi)
+ os=-aout
+ ;;
+- c4x-* | tic4x-*)
+- os=-coff
++ c4x-* | tic4x-*)
++ os=-coff
++ ;;
++ c8051-*)
++ os=-elf
++ ;;
++ hexagon-*)
++ os=-elf
++ ;;
++ tic54x-*)
++ os=-coff
++ ;;
++ tic55x-*)
++ os=-coff
++ ;;
++ tic6x-*)
++ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+@@ -1472,14 +1585,11 @@ case $basic_machine in
+ ;;
+ m68000-sun)
+ os=-sunos3
+- # This also exists in the configure program, but was not the
+- # default.
+- # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+- mep-*)
++ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+@@ -1506,7 +1616,7 @@ case $basic_machine in
+ *-ibm)
+ os=-aix
+ ;;
+- *-knuth)
++ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+@@ -1611,7 +1721,7 @@ case $basic_machine in
+ -sunos*)
+ vendor=sun
+ ;;
+- -aix*)
++ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
diff --git a/debian/patches/bootstrap-with-gcj.diff b/debian/patches/bootstrap-with-gcj.diff
new file mode 100644
index 0000000..1b4ea12
--- /dev/null
+++ b/debian/patches/bootstrap-with-gcj.diff
@@ -0,0 +1,654 @@
+Description: Build the langtools with GCJ. This patch is incomplete but may be
+ used as a starting point for someone really willing to bootstrap OpenJDK 8
+ with GCJ. The compilation fails due to the missing java.nio.file API, several
+ classes would have to be modified to work without this package. It's possible
+ to ignore ~100 errors by skipping the compilation of jdeps (delete the
+ langtools/src/share/classes/com/sun/tools/jdeps directory). The build will then
+ fail on the BUILD_FULL_JAVAC phase.
+Author: Emmanuel Bourg <ebourg@apache.org>
+--- a/common/autoconf/boot-jdk.m4
++++ b/common/autoconf/boot-jdk.m4
+@@ -54,7 +54,7 @@
+ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
+
+ # Extra M4 quote needed to protect [] in grep expression.
+- [FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`]
++ [FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[5678]\.'`]
+ if test "x$FOUND_VERSION_78" = x; then
+ AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
+ AC_MSG_NOTICE([(Your Boot JDK must be version 7 or 8)])
+@@ -278,7 +278,7 @@
+ BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
+ BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
+ BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
+- BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
++ #BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
+ BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
+ BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
+ BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
+@@ -286,7 +286,7 @@
+ # Finally, set some other options...
+
+ # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
+- BOOT_JDK_SOURCETARGET="-source 7 -target 7"
++ BOOT_JDK_SOURCETARGET="-source 1.7 -target 1.7"
+ AC_SUBST(BOOT_JDK_SOURCETARGET)
+ AC_SUBST(JAVAC_FLAGS)
+ ])
+--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java
++++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java
+@@ -1163,7 +1163,8 @@
+ }
+
+ protected ZipFormatException(String message, Throwable cause) {
+- super(message, cause);
++ super(message);
++ initCause(cause);
+ }
+ }
+ }
+--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java
++++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java
+@@ -218,7 +218,7 @@
+ println(out, cppGuardEnd());
+ println(out, guardEnd(cname));
+ } catch (TypeSignature.SignatureException e) {
+- throw new IOException(e);
++ throw (IOException) new IOException().initCause(e);
+ }
+ }
+
+--- a/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java
++++ b/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java
+@@ -40,7 +40,6 @@
+ import java.nio.CharBuffer;
+ import java.nio.charset.CharsetDecoder;
+ import javax.tools.JavaFileObject;
+-import java.text.Normalizer;
+
+ /**
+ * A subclass of JavaFileObject representing regular files.
+@@ -182,17 +181,6 @@
+ if (name.equals(n)) {
+ return true;
+ }
+- if (isMacOS && Normalizer.isNormalized(name, Normalizer.Form.NFD)
+- && Normalizer.isNormalized(n, Normalizer.Form.NFC)) {
+- // On Mac OS X it is quite possible to file name and class
+- // name normalized in a different way - in that case we have to normalize file name
+- // to the Normal Form Compised (NFC)
+- String normName = Normalizer.normalize(name, Normalizer.Form.NFC);
+- if (normName.equals(n)) {
+- this.name = normName;
+- return true;
+- }
+- }
+
+ if (name.equalsIgnoreCase(n)) {
+ try {
+--- a/langtools/src/share/classes/com/sun/tools/javac/tree/DocPretty.java
++++ b/langtools/src/share/classes/com/sun/tools/javac/tree/DocPretty.java
+@@ -67,7 +67,7 @@
+ tree.accept(this, null);
+ }
+ } catch (UncheckedIOException ex) {
+- throw new IOException(ex.getMessage(), ex);
++ throw (IOException) new IOException(ex.getMessage()).initCause(ex);
+ }
+ }
+
+--- a/make/common/JavaCompilation.gmk
++++ b/make/common/JavaCompilation.gmk
+@@ -549,7 +549,7 @@
+ $$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
+ $(ECHO) Compiling `$(WC) $$($1_BIN)/_the.$1_batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
+ ($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) \
+- -implicit:none -sourcepath "$$($1_SRCROOTSC)" \
++ -sourcepath "$$($1_SRCROOTSC)" \
+ -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.$1_batch.tmp && \
+ $(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch)
+
+--- a/langtools/src/share/classes/com/sun/tools/javac/util/ServiceLoader.java
++++ b/langtools/src/share/classes/com/sun/tools/javac/util/ServiceLoader.java
+@@ -38,7 +38,6 @@
+ import java.util.List;
+ import java.util.Map;
+ import java.util.NoSuchElementException;
+-import java.util.Objects;
+ import java.util.ServiceConfigurationError;
+
+
+@@ -70,7 +69,7 @@
+ private ClassLoader loader;
+
+ // Cached providers, in instantiation order
+- private LinkedHashMap<String,S> providers = new LinkedHashMap<>();
++ private LinkedHashMap<String,S> providers = new LinkedHashMap<String,S>();
+
+ // The current lazy-lookup iterator
+ private LazyIterator lookupIterator;
+@@ -92,7 +91,10 @@
+ }
+
+ private ServiceLoader(Class<S> svc, ClassLoader cl) {
+- service = Objects.requireNonNull(svc, "Service interface cannot be null");
++ if (svc == null) {
++ throw new NullPointerException("Service interface cannot be null");
++ }
++ service = svc;
+ loader = (cl == null) ? ClassLoader.getSystemClassLoader() : cl;
+ reload();
+ }
+@@ -170,7 +172,7 @@
+ {
+ InputStream in = null;
+ BufferedReader r = null;
+- ArrayList<String> names = new ArrayList<>();
++ ArrayList<String> names = new ArrayList<String>();
+ try {
+ // The problem is that by default, streams opened with
+ // u.openInputStream use a cached reference to a JarFile, which
+@@ -362,7 +364,7 @@
+ public static <S> ServiceLoader<S> load(Class<S> service,
+ ClassLoader loader)
+ {
+- return new ServiceLoader<>(service, loader);
++ return new ServiceLoader<S>(service, loader);
+ }
+
+ /**
+--- a/langtools/src/share/classes/javax/annotation/processing/AbstractProcessor.java
++++ b/langtools/src/share/classes/javax/annotation/processing/AbstractProcessor.java
+@@ -28,7 +28,6 @@
+ import java.util.Set;
+ import java.util.HashSet;
+ import java.util.Collections;
+-import java.util.Objects;
+ import javax.lang.model.element.*;
+ import javax.lang.model.SourceVersion;
+ import javax.tools.Diagnostic;
+@@ -147,7 +146,8 @@
+ public synchronized void init(ProcessingEnvironment processingEnv) {
+ if (initialized)
+ throw new IllegalStateException("Cannot call init more than once.");
+- Objects.requireNonNull(processingEnv, "Tool provided null ProcessingEnvironment");
++ if (processingEnv == null)
++ throw new NullPointerException("Tool provided null ProcessingEnvironment");
+
+ this.processingEnv = processingEnv;
+ initialized = true;
+--- a/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java
++++ b/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java
+@@ -25,8 +25,6 @@
+
+ package com.sun.tools.javac.util;
+
+-import java.util.Objects;
+-
+ /** A generic class for pairs.
+ *
+ * <p><b>This is NOT part of any supported API.
+@@ -51,8 +49,12 @@
+ public boolean equals(Object other) {
+ return
+ other instanceof Pair<?,?> &&
+- Objects.equals(fst, ((Pair<?,?>)other).fst) &&
+- Objects.equals(snd, ((Pair<?,?>)other).snd);
++ equals(fst, ((Pair<?,?>)other).fst) &&
++ equals(snd, ((Pair<?,?>)other).snd);
++ }
++
++ private boolean equals(Object a, Object b) {
++ return (a == b) || (a != null && a.equals(b));
+ }
+
+ public int hashCode() {
+--- a/langtools/make/build.properties
++++ b/langtools/make/build.properties
+@@ -68,7 +68,7 @@
+ # set the following to -version to verify the versions of javac being used
+ javac.version.opt =
+ # in time, there should be no exceptions to -Xlint:all
+-javac.lint.opts = -Xlint:all -Werror
++javac.lint.opts = -Xlint:all
+
+ # options for the <javadoc> task for javac
+ #javadoc.jls3.url=http://java.sun.com/docs/books/jls/
+--- a/langtools/make/BuildLangtools.gmk
++++ b/langtools/make/BuildLangtools.gmk
+@@ -36,7 +36,7 @@
+ JAVAC := $(JAVAC), \
+ SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+ SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
+- FLAGS := -XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror))
++ FLAGS := -XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -nowarn -1.7))
+
+ # javax.tools.JavaCompilerTool isn't really a suffix but this gets the file copied.
+ RESOURCE_SUFFIXES := .gif .xml .css .js javax.tools.JavaCompilerTool
+@@ -175,7 +175,7 @@
+ JAVAC := "-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" \
+ -cp $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar \
+ com.sun.tools.javac.Main, \
+- FLAGS := -XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation -Werror, \
++ FLAGS := -XDignore.symbol.file=true -Xlint:all$(COMMA)-deprecation, \
+ SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+ SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
+
+--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java
++++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java
+@@ -28,8 +28,7 @@
+ import java.io.File;
+ import java.io.IOException;
+ import java.io.InputStream;
+-import java.nio.file.Files;
+-import java.nio.file.Path;
++import java.io.FileInputStream;
+
+ import static com.sun.tools.classfile.AccessFlags.*;
+
+@@ -44,26 +43,16 @@
+ public class ClassFile {
+ public static ClassFile read(File file)
+ throws IOException, ConstantPoolException {
+- return read(file.toPath(), new Attribute.Factory());
++ return read(file, new Attribute.Factory());
+ }
+
+- public static ClassFile read(Path input)
+- throws IOException, ConstantPoolException {
+- return read(input, new Attribute.Factory());
+- }
+-
+- public static ClassFile read(Path input, Attribute.Factory attributeFactory)
++ public static ClassFile read(File file, Attribute.Factory attributeFactory)
+ throws IOException, ConstantPoolException {
+- try (InputStream in = Files.newInputStream(input)) {
++ try (InputStream in = new FileInputStream(file)) {
+ return new ClassFile(in, attributeFactory);
+ }
+ }
+
+- public static ClassFile read(File file, Attribute.Factory attributeFactory)
+- throws IOException, ConstantPoolException {
+- return read(file.toPath(), attributeFactory);
+- }
+-
+ public static ClassFile read(InputStream in)
+ throws IOException, ConstantPoolException {
+ return new ClassFile(in, new Attribute.Factory());
+--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java
++++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java
+@@ -25,10 +25,8 @@
+
+ package com.sun.tools.javac.nio;
+
++import java.io.File;
+ import java.io.IOException;
+-import java.nio.file.FileSystem;
+-import java.nio.file.FileSystems;
+-import java.nio.file.Path;
+ import javax.tools.FileObject;
+ import javax.tools.JavaFileManager;
+ import javax.tools.JavaFileObject;
+@@ -52,13 +50,13 @@
+ * Get the default file system used to create paths. If no value has been
+ * set, the default file system is {@link FileSystems#getDefault}.
+ */
+- FileSystem getDefaultFileSystem();
++ //FileSystem getDefaultFileSystem();
+
+ /**
+ * Set the default file system used to create paths.
+ * @param fs the default file system used to create any new paths.
+ */
+- void setDefaultFileSystem(FileSystem fs);
++ //void setDefaultFileSystem(FileSystem fs);
+
+ /**
+ * Get file objects representing the given files.
+@@ -69,7 +67,7 @@
+ * a directory
+ */
+ Iterable<? extends JavaFileObject> getJavaFileObjectsFromPaths(
+- Iterable<? extends Path> paths);
++ Iterable<File> paths);
+
+ /**
+ * Get file objects representing the given paths.
+@@ -86,7 +84,7 @@
+ * @throws NullPointerException if the given array contains null
+ * elements
+ */
+- Iterable<? extends JavaFileObject> getJavaFileObjects(Path... paths);
++ Iterable<? extends JavaFileObject> getJavaFileObjects(File... paths);
+
+ /**
+ * Return the Path for a file object that has been obtained from this
+@@ -97,7 +95,7 @@
+ * @throws IllegalArgumentException is the file object was not obtained from
+ * from this file manager.
+ */
+- Path getPath(FileObject fo);
++ File getPath(FileObject fo);
+
+ /**
+ * Get the search path associated with the given location.
+@@ -107,7 +105,7 @@
+ * associated search path
+ * @see #setLocation
+ */
+- Iterable<? extends Path> getLocation(Location location);
++ Iterable<File> getLocation(Location location);
+
+ /**
+ * Associate the given search path with the given location. Any
+@@ -122,5 +120,5 @@
+ * @throws IOException if location is an output location and searchpath
+ * does not represent an existing directory
+ */
+- void setLocation(Location location, Iterable<? extends Path> searchPath) throws IOException;
++ void setLocation(Location location, Iterable<File> searchPath) throws IOException;
+ }
+--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PathDocFileFactory.java
++++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PathDocFileFactory.java
+@@ -28,15 +28,13 @@
+ import java.io.BufferedInputStream;
+ import java.io.BufferedOutputStream;
+ import java.io.BufferedWriter;
++import java.io.File;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.OutputStream;
+ import java.io.OutputStreamWriter;
+ import java.io.UnsupportedEncodingException;
+ import java.io.Writer;
+-import java.nio.file.DirectoryStream;
+-import java.nio.file.Files;
+-import java.nio.file.Path;
+ import java.util.ArrayList;
+ import java.util.Arrays;
+ import java.util.LinkedHashSet;
+@@ -65,7 +63,7 @@
+ */
+ class PathDocFileFactory extends DocFileFactory {
+ private final PathFileManager fileManager;
+- private final Path destDir;
++ private final File destDir;
+
+ public PathDocFileFactory(Configuration configuration) {
+ super(configuration);
+@@ -75,7 +73,7 @@
+ || !fileManager.hasLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT)) {
+ try {
+ String dirName = configuration.destDirName.isEmpty() ? "." : configuration.destDirName;
+- Path dir = fileManager.getDefaultFileSystem().getPath(dirName);
++ File dir = new File(dirName);
+ fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
+ } catch (IOException e) {
+ throw new DocletAbortException(e);
+@@ -86,11 +84,11 @@
+ }
+
+ public DocFile createFileForDirectory(String file) {
+- return new StandardDocFile(fileManager.getDefaultFileSystem().getPath(file));
++ return new StandardDocFile(new File(file));
+ }
+
+ public DocFile createFileForInput(String file) {
+- return new StandardDocFile(fileManager.getDefaultFileSystem().getPath(file));
++ return new StandardDocFile(new File(file));
+ }
+
+ public DocFile createFileForOutput(DocPath path) {
+@@ -104,10 +102,10 @@
+
+ Set<DocFile> files = new LinkedHashSet<DocFile>();
+ if (fileManager.hasLocation(location)) {
+- for (Path f: fileManager.getLocation(location)) {
+- if (Files.isDirectory(f)) {
+- f = f.resolve(path.getPath());
+- if (Files.exists(f))
++ for (File f: fileManager.getLocation(location)) {
++ if (f.isDirectory()) {
++ f = new File(f, path.getPath());
++ if (f.exists())
+ files.add(new StandardDocFile(f));
+ }
+ }
+@@ -116,10 +114,10 @@
+ }
+
+ class StandardDocFile extends DocFile {
+- private Path file;
++ private File file;
+
+ /** Create a StandardDocFile for a given file. */
+- private StandardDocFile(Path file) {
++ private StandardDocFile(File file) {
+ super(configuration);
+ this.file = file;
+ }
+@@ -127,7 +125,7 @@
+ /** Create a StandardDocFile for a given location and relative path. */
+ private StandardDocFile(Location location, DocPath path) {
+ super(configuration, location, path);
+- this.file = destDir.resolve(path.getPath());
++ this.file = new File(destDir, path.getPath());
+ }
+
+ /** Open an input stream for the file. */
+@@ -169,22 +167,22 @@
+
+ /** Return true if the file can be read. */
+ public boolean canRead() {
+- return Files.isReadable(file);
++ return file.canRead();
+ }
+
+ /** Return true if the file can be written. */
+ public boolean canWrite() {
+- return Files.isWritable(file);
++ return file.canWrite();
+ }
+
+ /** Return true if the file exists. */
+ public boolean exists() {
+- return Files.exists(file);
++ return file.exists();
+ }
+
+ /** Return the base name (last component) of the file name. */
+ public String getName() {
+- return file.getFileName().toString();
++ return file.getName();
+ }
+
+ /** Return the file system path for this file. */
+@@ -199,12 +197,12 @@
+
+ /** Return true is file identifies a directory. */
+ public boolean isDirectory() {
+- return Files.isDirectory(file);
++ return file.isDirectory();
+ }
+
+ /** Return true is file identifies a file. */
+ public boolean isFile() {
+- return Files.isRegularFile(file);
++ return file.exists() && !file.isDirectory();
+ }
+
+ /** Return true if this file is the same as another. */
+@@ -212,32 +210,21 @@
+ if (!(other instanceof StandardDocFile))
+ return false;
+
+- try {
+- return Files.isSameFile(file, ((StandardDocFile) other).file);
+- } catch (IOException e) {
+- return false;
+- }
++ return file.equals(((StandardDocFile) other).file);
+ }
+
+ /** If the file is a directory, list its contents. */
+ public Iterable<DocFile> list() throws IOException {
+ List<DocFile> files = new ArrayList<DocFile>();
+- try (DirectoryStream<Path> ds = Files.newDirectoryStream(file)) {
+- for (Path f: ds) {
+- files.add(new StandardDocFile(f));
+- }
++ for (File f : file.listFiles()) {
++ files.add(new StandardDocFile(f));
+ }
+ return files;
+ }
+
+ /** Create the file as a directory, including any parent directories. */
+ public boolean mkdirs() {
+- try {
+- Files.createDirectories(file);
+- return true;
+- } catch (IOException e) {
+- return false;
+- }
++ return file.mkdirs();
+ }
+
+ /**
+@@ -258,7 +245,7 @@
+ */
+ public DocFile resolve(String p) {
+ if (location == null && path == null) {
+- return new StandardDocFile(file.resolve(p));
++ return new StandardDocFile(new File(file, p));
+ } else {
+ return new StandardDocFile(location, path.resolve(p));
+ }
+@@ -272,7 +259,7 @@
+ public DocFile resolveAgainst(Location locn) {
+ if (locn != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
+ throw new IllegalArgumentException();
+- return new StandardDocFile(destDir.resolve(file));
++ return new StandardDocFile(new File(destDir, file.toString()));
+ }
+
+ /** Return a string to identify the contents of this object,
+@@ -291,7 +278,7 @@
+ return sb.toString();
+ }
+
+- private JavaFileObject getJavaFileObjectForInput(Path file) {
++ private JavaFileObject getJavaFileObjectForInput(File file) {
+ return fileManager.getJavaFileObjects(file).iterator().next();
+ }
+
+--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
++++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
+@@ -196,7 +196,8 @@
+ }
+
+ private static String encodeURL(String url) {
+- byte[] urlBytes = url.getBytes(Charset.forName("UTF-8"));
++ try {
++ byte[] urlBytes = url.getBytes("UTF-8");
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < urlBytes.length; i++) {
+ int c = urlBytes[i];
+@@ -207,6 +208,9 @@
+ }
+ }
+ return sb.toString();
++ } catch (java.io.UnsupportedEncodingException e) {
++ throw new RuntimeException(e);
++ }
+ }
+
+ /**
+--- a/langtools/src/share/classes/com/sun/tools/classfile/ReferenceFinder.java
++++ b/langtools/src/share/classes/com/sun/tools/classfile/ReferenceFinder.java
+@@ -28,7 +28,6 @@
+ import java.util.ArrayList;
+ import java.util.HashSet;
+ import java.util.List;
+-import java.util.Objects;
+ import java.util.Set;
+ import com.sun.tools.classfile.Instruction.TypeKind;
+ import static com.sun.tools.classfile.ConstantPool.*;
+@@ -77,8 +76,11 @@
+ * Constructor.
+ */
+ public ReferenceFinder(Filter filter, Visitor visitor) {
+- this.filter = Objects.requireNonNull(filter);
+- this.visitor = Objects.requireNonNull(visitor);
++ if (filter == null || visitor == null) {
++ throw new NullPointerException();
++ }
++ this.filter = filter;
++ this.visitor = visitor;
+ }
+
+ /**
+--- a/langtools/src/share/classes/com/sun/tools/javac/sym/Profiles.java
++++ b/langtools/src/share/classes/com/sun/tools/javac/sym/Profiles.java
+@@ -25,13 +25,14 @@
+ package com.sun.tools.javac.sym;
+
+ import java.io.BufferedInputStream;
++import java.io.BufferedReader;
+ import java.io.BufferedWriter;
+ import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.FileWriter;
++import java.io.InputStreamReader;
+ import java.io.IOException;
+ import java.nio.charset.Charset;
+-import java.nio.file.Files;
+ import java.util.HashMap;
+ import java.util.Map;
+ import java.util.Properties;
+@@ -59,7 +60,9 @@
+ lists.put(i, new TreeSet<String>());
+
+ File rt_jar_lst = new File(args[1]);
+- for (String line: Files.readAllLines(rt_jar_lst.toPath(), Charset.defaultCharset())) {
++ BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(rt_jar_lst)));
++ String line;
++ while ((line = reader.readLine()) != null) {
+ if (line.endsWith(".class")) {
+ String type = line.substring(0, line.length() - 6);
+ int profile = p.getProfile(type);
+@@ -67,6 +70,7 @@
+ lists.get(i).add(type);
+ }
+ }
++ reader.close();
+
+ for (int i = 1; i <= 4; i++) {
+ BufferedWriter out = new BufferedWriter(new FileWriter(i + ".txt"));
+--- a/langtools/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java
++++ b/langtools/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java
+@@ -58,7 +58,11 @@
+ }
+
+ public String getValue() {
+- return new String(debug_extension, UTF8);
++ try {
++ return new String(debug_extension, "UTF-8");
++ } catch (java.io.UnsupportedEncodingException e) {
++ throw new RuntimeException(e);
++ }
+ }
+
+ public <R, D> R accept(Visitor<R, D> visitor, D data) {
+--- a/langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java
++++ b/langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java
+@@ -121,7 +121,7 @@
+ ResourceBundle rb = ResourceBundle.getBundle(bundleName, locale);
+ bundleList = bundleList.prepend(rb);
+ } catch (MissingResourceException e) {
+- throw new InternalError("Cannot find javac resource bundle for locale " + locale);
++ //throw (Error) new InternalError("Cannot find javac resource bundle for locale " + locale).initCause(e);
+ }
+ }
+ bundleCache.put(locale, new SoftReference<List<ResourceBundle>>(bundleList));
diff --git a/debian/patches/compare-pointer-with-literal.patch b/debian/patches/compare-pointer-with-literal.patch
new file mode 100644
index 0000000..3d2109a
--- /dev/null
+++ b/debian/patches/compare-pointer-with-literal.patch
@@ -0,0 +1,11 @@
+--- a/jdk/src/solaris/native/sun/awt/awt_Font.c
++++ b/jdk/src/solaris/native/sun/awt/awt_Font.c
+@@ -502,7 +502,7 @@ awtJNI_GetFontData(JNIEnv * env, jobject
+ jio_snprintf(fdata->flist[i].xlfd, strlen(nativename) + 10,
+ nativename, size * 10);
+
+- if (nativename != NULL && nativename != "")
++ if (nativename && !strcmp(nativename, ""))
+ JNU_ReleaseStringPlatformChars(env, fontDescriptorName, (const char *) nativename);
+
+ /*
diff --git a/debian/patches/compiler-flags.diff b/debian/patches/compiler-flags.diff
new file mode 100644
index 0000000..47101c2
--- /dev/null
+++ b/debian/patches/compiler-flags.diff
@@ -0,0 +1,11 @@
+# DP: Build using the default flags (POWER8) on ppc64el.
+
+--- a/hotspot/make/linux/makefiles/ppc64.make
++++ b/hotspot/make/linux/makefiles/ppc64.make
+@@ -47,5 +47,5 @@
+ CFLAGS += -DVM_LITTLE_ENDIAN -DABI_ELFv2
+
+ # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
+- CFLAGS += -mcpu=power7 -mtune=power8 -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
++ CFLAGS += -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
+ endif
diff --git a/debian/patches/default-jvm-cfg-aarch64.diff b/debian/patches/default-jvm-cfg-aarch64.diff
new file mode 100644
index 0000000..6a07e4e
--- /dev/null
+++ b/debian/patches/default-jvm-cfg-aarch64.diff
@@ -0,0 +1,22 @@
+--- openjdk/jdk/src/share/bin/java.c.orig
++++ openjdk/jdk/src/share/bin/java.c
+@@ -1580,7 +1580,7 @@
+ ReadKnownVMs(const char *jvmCfgName, jboolean speculative)
+ {
+ FILE *jvmCfg;
+- char line[MAXPATHLEN+20];
++ char line[MAXPATHLEN+30];
+ int cnt = 0;
+ int lineno = 0;
+ jlong start, end;
+@@ -1595,6 +1595,10 @@
+
+ jvmCfg = fopen(jvmCfgName, "r");
+ if (jvmCfg == NULL) {
++ strcat(jvmCfgName, "-default");
++ jvmCfg = fopen(jvmCfgName, "r");
++ }
++ if (jvmCfg == NULL) {
+ if (!speculative) {
+ JLI_ReportErrorMessage(CFG_ERROR6, jvmCfgName);
+ exit(1);
diff --git a/debian/patches/default-jvm-cfg-default.diff b/debian/patches/default-jvm-cfg-default.diff
new file mode 100644
index 0000000..e215ccd
--- /dev/null
+++ b/debian/patches/default-jvm-cfg-default.diff
@@ -0,0 +1,22 @@
+--- a/jdk/src/share/bin/java.c
++++ b/jdk/src/share/bin/java.c
+@@ -1699,7 +1699,7 @@ jint
+ ReadKnownVMs(const char *jvmCfgName, jboolean speculative)
+ {
+ FILE *jvmCfg;
+- char line[MAXPATHLEN+20];
++ char line[MAXPATHLEN+30];
+ int cnt = 0;
+ int lineno = 0;
+ jlong start, end;
+@@ -1714,6 +1714,10 @@ ReadKnownVMs(const char *jvmCfgName, jbo
+
+ jvmCfg = fopen(jvmCfgName, "r");
+ if (jvmCfg == NULL) {
++ strcat(jvmCfgName, "-default");
++ jvmCfg = fopen(jvmCfgName, "r");
++ }
++ if (jvmCfg == NULL) {
+ if (!speculative) {
+ JLI_ReportErrorMessage(CFG_ERROR6, jvmCfgName);
+ exit(1);
diff --git a/debian/patches/disable-doclint-by-default.diff b/debian/patches/disable-doclint-by-default.diff
new file mode 100644
index 0000000..b9570fc
--- /dev/null
+++ b/debian/patches/disable-doclint-by-default.diff
@@ -0,0 +1,56 @@
+Description: Disable doclint by default
+ OpenJDK 8 adds and enables doclint by default. This catches issues in
+ javadoc comments. It is too strict, breaks javadoc compilation and, in
+ general, breaks the build for old code known to build with previous
+ versions of OpenJDK.
+ .
+ See: http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
+ See: https://lists.fedoraproject.org/pipermail/java-devel/2014-February/005150.html
+Author: Andrew John Hughes <ahughes@redhat.com>
+Forwarded: not-needed
+--- a/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
++++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
+@@ -812,10 +812,9 @@ public class DocEnv {
+ doclintOpts.add(opt == null ? DocLint.XMSGS_OPTION : DocLint.XMSGS_CUSTOM_PREFIX + opt);
+ }
+
+- if (doclintOpts.isEmpty()) {
+- doclintOpts.add(DocLint.XMSGS_OPTION);
+- } else if (doclintOpts.size() == 1
+- && doclintOpts.get(0).equals(DocLint.XMSGS_CUSTOM_PREFIX + "none")) {
++ if (doclintOpts.isEmpty() ||
++ (doclintOpts.size() == 1
++ && doclintOpts.get(0).equals(DocLint.XMSGS_CUSTOM_PREFIX + "none"))) {
+ return;
+ }
+
+--- a/langtools/test/tools/javadoc/doclint/DocLintTest.java
++++ b/langtools/test/tools/javadoc/doclint/DocLintTest.java
+@@ -130,12 +130,12 @@ public class DocLintTest {
+ };
+
+ test(Collections.<String>emptyList(),
+- Main.Result.ERROR,
+- EnumSet.of(Message.DL_ERR9A, Message.DL_WRN12A));
++ Main.Result.OK,
++ EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
+
+ test(Arrays.asList(rawDiags),
+- Main.Result.ERROR,
+- EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
++ Main.Result.OK,
++ EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
+
+ test(Arrays.asList("-Xdoclint:none"),
+ Main.Result.OK,
+@@ -158,8 +158,8 @@ public class DocLintTest {
+ EnumSet.of(Message.DL_WRN12));
+
+ test(Arrays.asList(rawDiags, "-private"),
+- Main.Result.ERROR,
+- EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12));
++ Main.Result.OK,
++ EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
+
+ test(Arrays.asList(rawDiags, "-Xdoclint:syntax", "-private"),
+ Main.Result.ERROR,
diff --git a/debian/patches/dnd-files.patch b/debian/patches/dnd-files.patch
new file mode 100644
index 0000000..e900ae8
--- /dev/null
+++ b/debian/patches/dnd-files.patch
@@ -0,0 +1,20 @@
+--- a/jdk/src/solaris/classes/sun/awt/X11/XDataTransferer.java
++++ b/jdk/src/solaris/classes/sun/awt/X11/XDataTransferer.java
+@@ -282,14 +282,14 @@ public class XDataTransferer extends Dat
+ reader = new BufferedReader(new InputStreamReader(stream, charset));
+ String line;
+ ArrayList<URI> uriList = new ArrayList<URI>();
+- URI uri;
+ while ((line = reader.readLine()) != null) {
+ try {
+- uri = new URI(line);
++ if (!"\0".equals(line)) {
++ uriList.add(new URI(line));
++ }
+ } catch (URISyntaxException uriSyntaxException) {
+ throw new IOException(uriSyntaxException);
+ }
+- uriList.add(uri);
+ }
+ return uriList.toArray(new URI[uriList.size()]);
+ } finally {
diff --git a/debian/patches/dont-strip-images.diff b/debian/patches/dont-strip-images.diff
new file mode 100644
index 0000000..275eb5d
--- /dev/null
+++ b/debian/patches/dont-strip-images.diff
@@ -0,0 +1,13 @@
+--- a/common/autoconf/toolchain.m4
++++ b/common/autoconf/toolchain.m4
+@@ -679,7 +679,9 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ LDEXE="$CC"
+ LDCXX="$CXX"
+ LDEXECXX="$CXX"
+- POST_STRIP_CMD="$STRIP -g"
++ if test -z "$POST_STRIP_CMD" ; then
++ POST_STRIP_CMD="$STRIP -g"
++ fi
+
+ # Linking is different on MacOSX
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
diff --git a/debian/patches/enumipv6-fix.patch b/debian/patches/enumipv6-fix.patch
new file mode 100644
index 0000000..82f73c5
--- /dev/null
+++ b/debian/patches/enumipv6-fix.patch
@@ -0,0 +1,11 @@
+--- openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c~ 2012-02-15 09:26:50.000000000 +0100
++++ openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c 2012-02-26 14:13:22.602107361 +0100
+@@ -1105,7 +1105,7 @@
+ uint8_t ipv6addr[16];
+
+ if ((f = fopen(_PATH_PROCNET_IFINET6, "r")) != NULL) {
+- while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
++ while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %x %x %x %x %20s\n",
+ addr6p[0], addr6p[1], addr6p[2], addr6p[3], addr6p[4], addr6p[5], addr6p[6], addr6p[7],
+ &if_idx, &plen, &scope, &dad_status, devname) != EOF) {
+
diff --git a/debian/patches/fontconfig-arphic-uming.diff b/debian/patches/fontconfig-arphic-uming.diff
new file mode 100644
index 0000000..106029a
--- /dev/null
+++ b/debian/patches/fontconfig-arphic-uming.diff
@@ -0,0 +1,244 @@
+--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.orig 2008-10-12 10:42:26.000000000 +0000
++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties 2008-10-12 10:43:49.000000000 +0000
+@@ -25,107 +25,156 @@
+
+ # Version
+
+-# Uses Ubuntu 6.10 (Edgy) fonts and file paths.
++# Used for Ubuntu 6.10 (edgy), Ubuntu 7.04 (feisty), Ubuntu 7.10 (gutsy),
++# Debian 4.0 (etch), Debian 5.0 (lenny) fonts and file paths.
+ version=1
+
+ # Component Font Mappings
+
++allfonts.chinese-gb18030=-misc-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1
++allfonts.chinese-gb18030.motif=-misc-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1
++allfonts.chinese-big5=-misc-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1
++allfonts.chinese-big5.motif=-misc-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1
++
+ dialog.plain.latin-1=DejaVu Sans
+-dialog.plain.japanese-x0208=Kochi Gothic
+-dialog.plain.korean=Baekmuk Dotum
++dialog.plain.latin-1.motif=LuxiSans-Regular
++dialog.plain.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++dialog.plain.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
++dialog.plain.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ dialog.bold.latin-1=DejaVu Sans Bold
+-dialog.bold.japanese-x0208=Kochi Gothic
+-dialog.bold.korean=Baekmuk Dotum
++dialog.bold.latin-1.motif=LuxiSans-Bold
++dialog.bold.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++dialog.bold.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
++dialog.bold.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ dialog.italic.latin-1=DejaVu Sans Oblique
+-dialog.italic.japanese-x0208=Kochi Gothic
+-dialog.italic.korean=Baekmuk Dotum
++dialog.italic.latin-1.motif=LuxiSans-Oblique
++dialog.italic.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++dialog.italic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
++dialog.italic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique
+-dialog.bolditalic.japanese-x0208=Kochi Gothic
+-dialog.bolditalic.korean=Baekmuk Dotum
+-
++dialog.bolditalic.latin-1.motif=LuxiSans-BoldOblique
++dialog.bolditalic.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++dialog.bolditalic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
++dialog.bolditalic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ sansserif.plain.latin-1=DejaVu Sans
+-sansserif.plain.japanese-x0208=Kochi Gothic
+-sansserif.plain.korean=Baekmuk Dotum
++sansserif.plain.latin-1.motif=LuxiSans-Regular
++sansserif.plain.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++sansserif.plain.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
++sansserif.plain.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ sansserif.bold.latin-1=DejaVu Sans Bold
+-sansserif.bold.japanese-x0208=Kochi Gothic
+-sansserif.bold.korean=Baekmuk Dotum
++sansserif.bold.latin-1.motif=LuxiSans-Bold
++sansserif.bold.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++sansserif.bold.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
++sansserif.bold.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ sansserif.italic.latin-1=DejaVu Sans Oblique
+-sansserif.italic.japanese-x0208=Kochi Gothic
+-sansserif.italic.korean=Baekmuk Dotum
++sansserif.italic.latin-1.motif=LuxiSans-Oblique
++sansserif.italic.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++sansserif.italic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
++sansserif.italic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique
+-sansserif.bolditalic.japanese-x0208=Kochi Gothic
+-sansserif.bolditalic.korean=Baekmuk Dotum
+-
++sansserif.bolditalic.latin-1.motif=LuxiSans-BoldOblique
++sansserif.bolditalic.japanese-x0208=-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++sansserif.bolditalic.korean=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
++sansserif.bolditalic.korean.motif=-misc-baekmuk gulim-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ serif.plain.latin-1=DejaVu Serif
+-serif.plain.japanese-x0208=Kochi Mincho
+-serif.plain.korean=Baekmuk Batang
++serif.plain.latin-1.motif=LuxiSerif-Regular
++serif.plain.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++serif.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++serif.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ serif.bold.latin-1=DejaVu Serif Bold
+-serif.bold.japanese-x0208=Kochi Mincho
+-serif.bold.korean=Baekmuk Batang
++serif.bold.latin-1.motif=LuxiSerif-Bold
++serif.bold.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++serif.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++serif.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ serif.italic.latin-1=DejaVu Serif Oblique
+-serif.italic.japanese-x0208=Kochi Mincho
+-serif.italic.korean=Baekmuk Batang
++serif.italic.latin-1.motif=LuxiSerif-Oblique
++serif.italic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++serif.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++serif.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ serif.bolditalic.latin-1=DejaVu Serif Bold Oblique
+-serif.bolditalic.japanese-x0208=Kochi Mincho
+-serif.bolditalic.korean=Baekmuk Batang
+-
++serif.bolditalic.latin-1.motif=LuxiSerif-BoldOblique
++serif.bolditalic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++serif.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++serif.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ monospaced.plain.latin-1=DejaVu Sans Mono
+-monospaced.plain.japanese-x0208=Kochi Gothic
+-monospaced.plain.korean=Baekmuk Dotum
++monospaced.plain.latin-1.motif=LuxiMono-Regular
++monospaced.plain.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++monospaced.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++monospaced.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ monospaced.bold.latin-1=DejaVu Sans Mono Bold
+-monospaced.bold.japanese-x0208=Kochi Gothic
+-monospaced.bold.korean=Baekmuk Dotum
++monospaced.bold.latin-1.motif=LuxiMono-Bold
++monospaced.bold.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++monospaced.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++monospaced.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ monospaced.italic.latin-1=DejaVu Sans Mono Oblique
+-monospaced.italic.japanese-x0208=Kochi Gothic
+-monospaced.italic.korean=Baekmuk Dotum
++monospaced.italic.latin-1.motif=LuxiMono-Oblique
++monospaced.italic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++monospaced.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++monospaced.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
+-monospaced.bolditalic.japanese-x0208=Kochi Gothic
+-monospaced.bolditalic.korean=Baekmuk Dotum
+-
++monospaced.bolditalic.latin-1.motif=LuxiMono-BoldOblique
++monospaced.bolditalic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++monospaced.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++monospaced.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ dialoginput.plain.latin-1=DejaVu Sans Mono
+-dialoginput.plain.japanese-x0208=Kochi Gothic
+-dialoginput.plain.korean=Baekmuk Dotum
++dialoginput.plain.latin-1.motif=LuxiMono-Regular
++dialoginput.plain.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++dialoginput.plain.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++dialoginput.plain.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ dialoginput.bold.latin-1=DejaVu Sans Mono Bold
+-dialoginput.bold.japanese-x0208=Kochi Gothic
+-dialoginput.bold.korean=Baekmuk Dotum
++dialoginput.bold.latin-1.motif=LuxiMono-Bold
++dialoginput.bold.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++dialoginput.bold.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++dialoginput.bold.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ dialoginput.italic.latin-1=DejaVu Sans Mono Oblique
+-dialoginput.italic.japanese-x0208=Kochi Gothic
+-dialoginput.italic.korean=Baekmuk Dotum
++dialoginput.italic.latin-1.motif=LuxiMono-Oblique
++dialoginput.italic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++dialoginput.italic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++dialoginput.italic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
+-dialoginput.bolditalic.japanese-x0208=Kochi Gothic
+-dialoginput.bolditalic.korean=Baekmuk Dotum
+-
+-allfonts.chinese-big5=AR PL ZenKai Uni
+-allfonts.chinese-gb18030=AR PL ZenKai Uni
++dialoginput.bolditalic.latin-1.motif=LuxiMono-BoldOblique
++dialoginput.bolditalic.japanese-x0208=-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0
++dialoginput.bolditalic.korean=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
++dialoginput.bolditalic.korean.motif=-misc-baekmuk batang-medium-r-normal--*-%d-*-*-c-*-*-*
+
+ # Search Sequences
+
+ sequence.allfonts=latin-1
+-sequence.allfonts.Big5=chinese-big5,latin-1
+-sequence.allfonts.x-euc-jp-linux=japanese-x0208,latin-1
+-sequence.allfonts.EUC-KR=korean,latin-1
+-sequence.allfonts.GB18030=chinese-gb18030,latin-1
++sequence.allfonts.UTF-8.ko=latin-1,korean
++sequence.allfonts.UTF-8=latin-1,chinese-gb18030
++sequence.allfonts.UTF-8.ja=latin-1,japanese-x0208
++sequence.allfonts.UTF-8.zh.CN=latin-1,chinese-gb18030
++sequence.allfonts.UTF-8.zh.TW=latin-1,chinese-big5
++sequence.allfonts.Big5=latin-1,chinese-big5
++sequence.allfonts.GB2312=latin-1,chinese-gb18030
++sequence.allfonts.x-euc-jp-linux=latin-1,japanese-x0208
++sequence.allfonts.EUC-KR=latin-1,korean
++sequence.allfonts.GB18030=latin-1,chinese-gb18030
+ sequence.fallback=chinese-big5,chinese-gb18030,japanese-x0208,korean
+
++# Exclusion Ranges
++
++exclusion.japanese-x0208=0390-03d6,2200-22ef,2701-27be
++
+ # Font File Names
+
+ filename.DejaVu_Sans=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
+@@ -143,8 +192,27 @@
+ filename.DejaVu_Serif_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Oblique.ttf
+ filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldOblique.ttf
+
+-filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic-subst.ttf
+-filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho-subst.ttf
+-filename.AR_PL_ZenKai_Uni=/usr/share/fonts//truetype/arphic/ukai.ttf
+-filename.Baekmuk_Dotum=/usr/share/fonts/truetype/baekmuk/dotum.ttf
+-filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf
++filename.-misc-ar_pl_shanheisun_uni-medium-r-normal--*-*-*-*-p-*-iso10646-1=/usr/share/fonts/truetype/arphic/uming.ttf
++filename.-misc-baekmuk_batang-medium-r-normal--*-%d-*-*-c-*-*-*=/usr/share/fonts/truetype/baekmuk/batang.ttf
++filename.-misc-baekmuk_gulim-medium-r-normal--*-%d-*-*-c-*-*-*=/usr/share/fonts/truetype/baekmuk/gulim.ttf
++filename.-vlgothic-gothic-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf
++filename.-sazanami-mincho-medium-r-normal--*-%d-*-*-c-*-jisx0208.1983-0=/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf
++
++filename.LuxiSans-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisr.ttf
++filename.LuxiSans-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisb.ttf
++filename.LuxiSans-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisri.ttf
++filename.LuxiSans-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisbi.ttf
++filename.LuxiMono-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximr.ttf
++filename.LuxiMono-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximb.ttf
++filename.LuxiMono-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximri.ttf
++filename.LuxiMono-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximbi.ttf
++filename.LuxiSerif-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirr.ttf
++filename.LuxiSerif-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirb.ttf
++filename.LuxiSerif-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirri.ttf
++filename.LuxiSerif-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirbi.ttf
++
++# AWT X11 font paths
++awtfontpath.latin-1=/usr/share/fonts/X11/Type1
++awtfontpath.chinese-gb18030=/usr/share/fonts/truetype/arphic
++awtfontpath.japanese-x0208=/usr/share/fonts/truetype/vlgothic
++awtfontpath.korean=/usr/share/fonts/truetype/baekmuk
diff --git a/debian/patches/fontconfig-japanese.diff b/debian/patches/fontconfig-japanese.diff
new file mode 100644
index 0000000..793b2dd
--- /dev/null
+++ b/debian/patches/fontconfig-japanese.diff
@@ -0,0 +1,219 @@
+# used for Debian wheezy and Ubuntu 12.04 LTS or newer
+
+--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.orig 2013-02-07 17:01:24.723477262 +0100
++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties 2013-02-07 17:03:39.043477916 +0100
+@@ -57,142 +57,142 @@
+
+ serif.plain.latin-1=DejaVu Serif
+ #serif.plain.latin-1.motif=LuxiSerif-Regular
+-serif.plain.japanese-kochi=Kochi Mincho
+ serif.plain.japanese-sazanami=Sazanami Mincho
+ serif.plain.japanese-vlgothic=Sazanami Mincho
++serif.plain.japanese-ipafont=IPAMincho
+ serif.plain.korean-nanum=NanumMyeongjo
+
+ serif.bold.latin-1=DejaVu Serif Bold
+ #serif.bold.latin-1.motif=LuxiSerif-Bold
+-serif.bold.japanese-kochi=Kochi Mincho
+ serif.bold.japanese-sazanami=Sazanami Mincho
+ serif.bold.japanese-vlgothic=Sazanami Mincho
++serif.bold.japanese-ipafont=IPAMincho
+ serif.bold.korean-nanum=NanumMyeongjo Bold
+
+ serif.italic.latin-1=DejaVu Serif Oblique
+ #serif.italic.latin-1.motif=LuxiSerif-Oblique
+-serif.italic.japanese-kochi=Kochi Mincho
+ serif.italic.japanese-sazanami=Sazanami Mincho
+ serif.italic.japanese-vlgothic=Sazanami Mincho
++serif.italic.japanese-ipafont=IPAMincho
+ serif.italic.korean-nanum=NanumMyeongjo
+
+ serif.bolditalic.latin-1=DejaVu Serif Bold Oblique
+ #serif.bolditalic.latin-1.motif=LuxiSerif-BoldOblique
+-serif.bolditalic.japanese-kochi=Kochi Mincho
+ serif.bolditalic.japanese-sazanami=Sazanami Mincho
+ serif.bolditalic.japanese-vlgothic=Sazanami Mincho
++serif.bolditalic.japanese-ipafont=IPAMincho
+ serif.bolditalic.korean-nanum=NanumMyeongjo Bold
+
+ sansserif.plain.latin-1=DejaVu Sans
+ #sansserif.plain.latin-1.motif=LuxiSans-Regular
+-sansserif.plain.japanese-kochi=Kochi Gothic
+ sansserif.plain.japanese-sazanami=Sazanami Gothic
+ sansserif.plain.japanese-vlgothic=VL PGothic
++sansserif.plain.japanese-ipafont=IPAPGothic
+ sansserif.plain.korean-nanum=NanumGothic
+
+ sansserif.bold.latin-1=DejaVu Sans Bold
+ #sansserif.bold.latin-1.motif=LuxiSans-Bold
+-sansserif.bold.japanese-kochi=Kochi Gothic
+ sansserif.bold.japanese-sazanami=Sazanami Gothic
+ sansserif.bold.japanese-vlgothic=VL PGothic
++sansserif.bold.japanese-ipafont=IPAPGothic
+ sansserif.bold.korean-nanum=NanumGothic Bold
+
+ sansserif.italic.latin-1=DejaVu Sans Oblique
+ #sansserif.italic.latin-1.motif=LuxiSans-Oblique
+-sansserif.italic.japanese-kochi=Kochi Gothic
+ sansserif.italic.japanese-sazanami=Sazanami Gothic
+ sansserif.italic.japanese-vlgothic=VL PGothic
++sansserif.italic.japanese-ipafont=IPAPGothic
+ sansserif.italic.korean-nanum=NanumGothic
+
+ sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique
+ #sansserif.bolditalic.latin-1.motif=LuxiSans-BoldOblique
+-sansserif.bolditalic.japanese-kochi=Kochi Gothic
+ sansserif.bolditalic.japanese-sazanami=Sazanami Gothic
+ sansserif.bolditalic.japanese-vlgothic=VL PGothic
++sansserif.bolditalic.japanese-ipafont=IPAPGothic
+ sansserif.bolditalic.korean-nanum=NanumGothic Bold
+
+ monospaced.plain.latin-1=DejaVu Sans Mono
+ #monospaced.plain.latin-1.motif=LuxiMono-Regular
+-monospaced.plain.japanese-kochi=Kochi Gothic
+ monospaced.plain.japanese-sazanami=Sazanami Gothic
+ monospaced.plain.japanese-vlgothic=VL Gothic
++monospaced.plain.japanese-ipafont=IPAGothic
+ monospaced.plain.korean-nanum=NanumGothicCoding
+
+ monospaced.bold.latin-1=DejaVu Sans Mono Bold
+ #monospaced.bold.latin-1.motif=LuxiMono-Bold
+-monospaced.bold.japanese-kochi=Kochi Gothic
+ monospaced.bold.japanese-sazanami=Sazanami Gothic
+ monospaced.bold.japanese-vlgothic=VL Gothic
++monospaced.bold.japanese-ipafont=IPAGothic
+ monospaced.bold.korean-nanum=NanumGothicCoding Bold
+
+ monospaced.italic.latin-1=DejaVu Sans Mono Oblique
+ #monospaced.italic.latin-1.motif=LuxiMono-Oblique
+-monospaced.italic.japanese-kochi=Kochi Gothic
+ monospaced.italic.japanese-sazanami=Sazanami Gothic
+ monospaced.italic.japanese-vlgothic=VL Gothic
++monospaced.italic.japanese-ipafont=IPAGothic
+ monospaced.italic.korean-nanum=NanumGothicCoding
+
+ monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
+ #monospaced.bolditalic.latin-1.motif=LuxiMono-BoldOblique
+-monospaced.bolditalic.japanese-kochi=Kochi Gothic
+ monospaced.bolditalic.japanese-sazanami=Sazanami Gothic
+ monospaced.bolditalic.japanese-vlgothic=VL Gothic
++monospaced.bolditalic.japanese-ipafont=IPAGothic
+ monospaced.bolditalic.korean-nanum=NanumGothicCoding Bold
+
+ dialog.plain.latin-1=DejaVu Sans
+ #dialog.plain.latin-1.motif=LuxiSans-Regular
+-dialog.plain.japanese-kochi=Kochi Gothic
+ dialog.plain.japanese-sazanami=Sazanami Gothic
+ dialog.plain.japanese-vlgothic=VL PGothic
++dialog.plain.japanese-ipafont=IPAPGothic
+ dialog.plain.korean-nanum=NanumGothic
+
+ dialog.bold.latin-1=DejaVu Sans Bold
+ #dialog.bold.latin-1.motif=LuxiSans-Bold
+-dialog.bold.japanese-kochi=Kochi Gothic
+ dialog.bold.japanese-sazanami=Sazanami Gothic
+ dialog.bold.japanese-vlgothic=VL PGothic
++dialog.bold.japanese-ipafont=IPAPGothic
+ dialog.bold.korean-nanum=NanumGothic Bold
+
+ dialog.italic.latin-1=DejaVu Sans Oblique
+ #dialog.italic.latin-1.motif=LuxiSans-Oblique
+-dialog.italic.japanese-kochi=Kochi Gothic
+ dialog.italic.japanese-sazanami=Sazanami Gothic
+ dialog.italic.japanese-vlgothic=VL PGothic
++dialog.italic.japanese-ipafont=IPAPGothic
+ dialog.italic.korean-nanum=NanumGothic
+
+ dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique
+ #dialog.bolditalic.latin-1.motif=LuxiSans-BoldOblique
+-dialog.bolditalic.japanese-kochi=Kochi Gothic
+ dialog.bolditalic.japanese-sazanami=Sazanami Gothic
+ dialog.bolditalic.japanese-vlgothic=VL PGothic
++dialog.bolditalic.japanese-ipafont=IPAPGothic
+ dialog.bolditalic.korean-nanum=NanumGothic Bold
+
+ dialoginput.plain.latin-1=DejaVu Sans Mono
+ #dialoginput.plain.latin-1.motif=LuxiMono-Regular
+-dialoginput.plain.japanese-kochi=Kochi Gothic
+ dialoginput.plain.japanese-sazanami=Sazanami Gothic
+ dialoginput.plain.japanese-vlgothic=VL Gothic
++dialoginput.plain.japanese-ipafont=IPAGothic
+ dialoginput.plain.korean-nanum=NanumGothic
+
+ dialoginput.bold.latin-1=DejaVu Sans Mono Bold
+ #dialoginput.bold.latin-1.motif=LuxiMono-Bold
+-dialoginput.bold.japanese-kochi=Kochi Gothic
+ dialoginput.bold.japanese-sazanami=Sazanami Gothic
+ dialoginput.bold.japanese-vlgothic=VL Gothic
++dialoginput.bold.japanese-ipafont=IPAGothic
+ dialoginput.bold.korean-nanum=NanumGothic Bold
+
+ dialoginput.italic.latin-1=DejaVu Sans Mono Oblique
+ #dialoginput.italic.latin-1.motif=LuxiMono-Oblique
+-dialoginput.italic.japanese-kochi=Kochi Gothic
+ dialoginput.italic.japanese-sazanami=Sazanami Gothic
+ dialoginput.italic.japanese-vlgothic=VL Gothic
++dialoginput.italic.japanese-ipafont=IPAGothic
+ dialoginput.italic.korean-nanum=NanumGothic
+
+ dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
+ #dialoginput.bolditalic.latin-1.motif=LuxiMono-BoldOblique
+-dialoginput.bolditalic.japanese-kochi=Kochi Gothic
+ dialoginput.bolditalic.japanese-sazanami=Sazanami Gothic
+ dialoginput.bolditalic.japanese-vlgothic=VL Gothic
++dialoginput.bolditalic.japanese-ipafont=IPAGothic
+ dialoginput.bolditalic.korean-nanum=NanumGothic Bold
+
+ # Search Sequences
+@@ -201,18 +201,20 @@
+ sequence.allfonts.GB18030=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
+ sequence.allfonts.GB2312=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
+ sequence.allfonts.GBK=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
+-sequence.allfonts.x-euc-jp-linux=latin-1,japanese-vlgothic,japanese-sazanami,japanese-kochi
++sequence.allfonts.x-euc-jp-linux=latin-1,japanese-ipafont,japanese-vlgothic,japanese-sazanami
+ sequence.allfonts.EUC-KR=latin-1,korean-nanum
+ sequence.allfonts.Big5=latin-1,umingtw,shanheisun,wqy-microhei,wqy-zenhei
+ sequence.allfonts.Big5-HKSCS=latin-1,uminghk,shanheisun,wqy-microhei,wqy-zenhei
+-#sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala
+-sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-nanum,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu
++#sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-ipafont,japanese-vlgothic,japanese-sazanami,korean-un,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala
++sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-ipafont,japanese-vlgothic,japanese-sazanami,korean-nanum,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu
++
++sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-ipafont,japanese-vlgothic,japanese-sazanami,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu
+
+ # Exclusion Ranges
+
+-exclusion.japanese-kochi=0390-03d6,2200-22ef,2701-27be
+ exclusion.japanese-sazanami=0390-03d6,2200-22ef,2701-27be
+ exclusion.japanese-vlgothic=0390-03d6,2200-22ef,2701-27be
++exclusion.japanese-ipafont=0390-03d6,2200-22ef,2701-27be
+
+ # Font File Names
+
+@@ -244,12 +246,16 @@
+ filename.NanumGothic_Bold=/usr/share/fonts/truetype/nanum/NanumGothicBold.ttf
+ filename.NanumGothicCoding=/usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding.ttf
+ filename.NanumGothicCoding_Bold=/usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding_Bold.ttf
+-filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic.ttf
++
++#Japanese fonts
+ filename.Sazanami_Gothic=/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf
+-filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho.ttf
+ filename.Sazanami_Mincho=/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf
+ filename.VL_Gothic=/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf
+ filename.VL_PGothic=/usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf
++filename.IPAGothic=/usr/share/fonts/opentype/ipafont-gothic/ipag.ttf
++filename.IPAPGothic=/usr/share/fonts/opentype/ipafont-gothic/ipagp.ttf
++filename.IPAMincho=/usr/share/fonts/opentype/ipafont-mincho/ipam.ttf
++filename.IPAPMincho=/usr/share/fonts/opentype/ipafont-mincho/ipamp.ttf
+
+ filename.Lohit_Bengali=/usr/share/fonts/truetype/ttf-bengali-fonts/lohit_bn.ttf
+ filename.Lohit_Gujarati=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_gu.ttf
+@@ -283,7 +289,6 @@
+ awtfontpath.shanheisun=/usr/share/fonts/truetype/arphic
+ awtfontpath.wqy-microhei=/usr/share/fonts/truetype/wqy
+ awtfontpath.wqy-zenhei=/usr/share/fonts/truetype/wqy
+-awtfontpath.japanese-kochi=/usr/share/fonts/truetype/kochi
+ awtfontpath.japanese-sazanami=/usr/share/fonts/truetype/sazanami
+ awtfontpath.japanese-vlgothic=/usr/share/fonts/truetype/vlgothic
+ awtfontpath.korean-nanum=/usr/share/fonts/truetype/nanum
diff --git a/debian/patches/fontconfig-korean-nanum.diff b/debian/patches/fontconfig-korean-nanum.diff
new file mode 100644
index 0000000..6d28ad5
--- /dev/null
+++ b/debian/patches/fontconfig-korean-nanum.diff
@@ -0,0 +1,266 @@
+# used for Debian wheezy and Ubuntu 12.04 LTS or newer
+
+--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.orig
++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties
+@@ -60,200 +60,140 @@
+ serif.plain.japanese-kochi=Kochi Mincho
+ serif.plain.japanese-sazanami=Sazanami Mincho
+ serif.plain.japanese-vlgothic=Sazanami Mincho
+-serif.plain.korean-baekmuk=Baekmuk Batang
+-#serif.plain.korean-baekmuk.motif=Baekmuk Batang
+-serif.plain.korean-un=UnBatang
+-#serif.plain.korean-un.motif=UnBatang
++serif.plain.korean-nanum=NanumMyeongjo
+
+ serif.bold.latin-1=DejaVu Serif Bold
+ #serif.bold.latin-1.motif=LuxiSerif-Bold
+ serif.bold.japanese-kochi=Kochi Mincho
+ serif.bold.japanese-sazanami=Sazanami Mincho
+ serif.bold.japanese-vlgothic=Sazanami Mincho
+-serif.bold.korean-baekmuk=Baekmuk Batang
+-#serif.bold.korean-baekmuk.motif=Baekmuk Batang
+-serif.bold.korean-un=UnBatang Bold
+-#serif.bold.korean-un.motif=UnBatang Bold
++serif.bold.korean-nanum=NanumMyeongjo Bold
+
+ serif.italic.latin-1=DejaVu Serif Oblique
+ #serif.italic.latin-1.motif=LuxiSerif-Oblique
+ serif.italic.japanese-kochi=Kochi Mincho
+ serif.italic.japanese-sazanami=Sazanami Mincho
+ serif.italic.japanese-vlgothic=Sazanami Mincho
+-serif.italic.korean-baekmuk=Baekmuk Batang
+-#serif.italic.korean-baekmuk.motif=Baekmuk Batang
+-serif.italic.korean-un=UnBatang
+-#serif.italic.korean-un.motif=UnBatang
++serif.italic.korean-nanum=NanumMyeongjo
+
+ serif.bolditalic.latin-1=DejaVu Serif Bold Oblique
+ #serif.bolditalic.latin-1.motif=LuxiSerif-BoldOblique
+ serif.bolditalic.japanese-kochi=Kochi Mincho
+ serif.bolditalic.japanese-sazanami=Sazanami Mincho
+ serif.bolditalic.japanese-vlgothic=Sazanami Mincho
+-serif.bolditalic.korean-baekmuk=Baekmuk Batang
+-#serif.bolditalic.korean-baekmuk.motif=Baekmuk Batang
+-serif.bolditalic.korean-un=UnBatang Bold
+-#serif.bolditalic.korean-un.motif=UnBatang Bold
++serif.bolditalic.korean-nanum=NanumMyeongjo Bold
+
+ sansserif.plain.latin-1=DejaVu Sans
+ #sansserif.plain.latin-1.motif=LuxiSans-Regular
+ sansserif.plain.japanese-kochi=Kochi Gothic
+ sansserif.plain.japanese-sazanami=Sazanami Gothic
+ sansserif.plain.japanese-vlgothic=VL PGothic
+-sansserif.plain.korean-baekmuk=Baekmuk Gulim
+-#sansserif.plain.korean-baekmuk.motif=Baekmuk Gulim
+-sansserif.plain.korean-un=UnDotum
+-#sansserif.plain.korean-un.motif=UnDotum
++sansserif.plain.korean-nanum=NanumGothic
+
+ sansserif.bold.latin-1=DejaVu Sans Bold
+ #sansserif.bold.latin-1.motif=LuxiSans-Bold
+ sansserif.bold.japanese-kochi=Kochi Gothic
+ sansserif.bold.japanese-sazanami=Sazanami Gothic
+ sansserif.bold.japanese-vlgothic=VL PGothic
+-sansserif.bold.korean-baekmuk=Baekmuk Gulim
+-#sansserif.bold.korean-baekmuk.motif=Baekmuk Gulim
+-sansserif.bold.korean-un=UnDotum Bold
+-#sansserif.bold.korean-un.motif=UnDotum Bold
++sansserif.bold.korean-nanum=NanumGothic Bold
+
+ sansserif.italic.latin-1=DejaVu Sans Oblique
+ #sansserif.italic.latin-1.motif=LuxiSans-Oblique
+ sansserif.italic.japanese-kochi=Kochi Gothic
+ sansserif.italic.japanese-sazanami=Sazanami Gothic
+ sansserif.italic.japanese-vlgothic=VL PGothic
+-sansserif.italic.korean-baekmuk=Baekmuk Gulim
+-#sansserif.italic.korean-baekmuk.motif=Baekmuk Gulim
+-sansserif.italic.korean-un=UnDotum
+-#sansserif.italic.korean-un.motif=UnDotum
++sansserif.italic.korean-nanum=NanumGothic
+
+ sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique
+ #sansserif.bolditalic.latin-1.motif=LuxiSans-BoldOblique
+ sansserif.bolditalic.japanese-kochi=Kochi Gothic
+ sansserif.bolditalic.japanese-sazanami=Sazanami Gothic
+ sansserif.bolditalic.japanese-vlgothic=VL PGothic
+-sansserif.bolditalic.korean-baekmuk=Baekmuk Gulim
+-#sansserif.bolditalic.korean-baekmuk.motif=Baekmuk Gulim
+-sansserif.bolditalic.korean-un=UnDotum Bold
+-#sansserif.bolditalic.korean-un.motif=UnDotum Bold
++sansserif.bolditalic.korean-nanum=NanumGothic Bold
+
+ monospaced.plain.latin-1=DejaVu Sans Mono
+ #monospaced.plain.latin-1.motif=LuxiMono-Regular
+ monospaced.plain.japanese-kochi=Kochi Gothic
+ monospaced.plain.japanese-sazanami=Sazanami Gothic
+ monospaced.plain.japanese-vlgothic=VL Gothic
+-monospaced.plain.korean-baekmuk=Baekmuk Gulim
+-#monospaced.plain.korean-baekmuk.motif=Baekmuk Gulim
+-monospaced.plain.korean-un=UnDotum
+-#monospaced.plain.korean-un.motif=UnDotum
++monospaced.plain.korean-nanum=NanumGothicCoding
+
+ monospaced.bold.latin-1=DejaVu Sans Mono Bold
+ #monospaced.bold.latin-1.motif=LuxiMono-Bold
+ monospaced.bold.japanese-kochi=Kochi Gothic
+ monospaced.bold.japanese-sazanami=Sazanami Gothic
+ monospaced.bold.japanese-vlgothic=VL Gothic
+-monospaced.bold.korean-baekmuk=Baekmuk Gulim
+-#monospaced.bold.korean-baekmuk.motif=Baekmuk Gulim
+-monospaced.bold.korean-un=UnDotum Bold
+-#monospaced.bold.korean-un.motif=UnDotum Bold
++monospaced.bold.korean-nanum=NanumGothicCoding Bold
+
+ monospaced.italic.latin-1=DejaVu Sans Mono Oblique
+ #monospaced.italic.latin-1.motif=LuxiMono-Oblique
+ monospaced.italic.japanese-kochi=Kochi Gothic
+ monospaced.italic.japanese-sazanami=Sazanami Gothic
+ monospaced.italic.japanese-vlgothic=VL Gothic
+-monospaced.italic.korean-baekmuk=Baekmuk Gulim
+-#monospaced.italic.korean-baekmuk.motif=Baekmuk Gulim
+-monospaced.italic.korean-un=UnDotum
+-#monospaced.italic.korean-un.motif=UnDotum
++monospaced.italic.korean-nanum=NanumGothicCoding
+
+ monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
+ #monospaced.bolditalic.latin-1.motif=LuxiMono-BoldOblique
+ monospaced.bolditalic.japanese-kochi=Kochi Gothic
+ monospaced.bolditalic.japanese-sazanami=Sazanami Gothic
+ monospaced.bolditalic.japanese-vlgothic=VL Gothic
+-monospaced.bolditalic.korean-baekmuk=Baekmuk Gulim
+-#monospaced.bolditalic.korean-baekmuk.motif=Baekmuk Gulim
+-monospaced.bolditalic.korean-un=UnDotum Bold
+-#monospaced.bolditalic.korean-un.motif=UnDotum Bold
++monospaced.bolditalic.korean-nanum=NanumGothicCoding Bold
+
+ dialog.plain.latin-1=DejaVu Sans
+ #dialog.plain.latin-1.motif=LuxiSans-Regular
+ dialog.plain.japanese-kochi=Kochi Gothic
+ dialog.plain.japanese-sazanami=Sazanami Gothic
+ dialog.plain.japanese-vlgothic=VL PGothic
+-dialog.plain.korean-baekmuk=Baekmuk Gulim
+-#dialog.plain.korean-baekmuk.motif=Baekmuk Gulim
+-dialog.plain.korean-un=UnDotum
+-#dialog.plain.korean-un.motif=UnDotum
++dialog.plain.korean-nanum=NanumGothic
+
+ dialog.bold.latin-1=DejaVu Sans Bold
+ #dialog.bold.latin-1.motif=LuxiSans-Bold
+ dialog.bold.japanese-kochi=Kochi Gothic
+ dialog.bold.japanese-sazanami=Sazanami Gothic
+ dialog.bold.japanese-vlgothic=VL PGothic
+-dialog.bold.korean-baekmuk=Baekmuk Gulim
+-#dialog.bold.korean-baekmuk.motif=Baekmuk Gulim
+-dialog.bold.korean-un=UnDotum Bold
+-#dialog.bold.korean-un.motif=UnDotum Bold
++dialog.bold.korean-nanum=NanumGothic Bold
+
+ dialog.italic.latin-1=DejaVu Sans Oblique
+ #dialog.italic.latin-1.motif=LuxiSans-Oblique
+ dialog.italic.japanese-kochi=Kochi Gothic
+ dialog.italic.japanese-sazanami=Sazanami Gothic
+ dialog.italic.japanese-vlgothic=VL PGothic
+-dialog.italic.korean-baekmuk=Baekmuk Gulim
+-#dialog.italic.korean-baekmuk.motif=Baekmuk Gulim
+-dialog.italic.korean-un=UnDotum
+-#dialog.italic.korean-un.motif=UnDotum
++dialog.italic.korean-nanum=NanumGothic
+
+ dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique
+ #dialog.bolditalic.latin-1.motif=LuxiSans-BoldOblique
+ dialog.bolditalic.japanese-kochi=Kochi Gothic
+ dialog.bolditalic.japanese-sazanami=Sazanami Gothic
+ dialog.bolditalic.japanese-vlgothic=VL PGothic
+-dialog.bolditalic.korean-baekmuk=Baekmuk Gulim
+-#dialog.bolditalic.korean-baekmuk.motif=Baekmuk Gulim
+-dialog.bolditalic.korean-un=UnDotum Bold
+-#dialog.bolditalic.korean-un.motif=UnDotum Bold
++dialog.bolditalic.korean-nanum=NanumGothic Bold
+
+ dialoginput.plain.latin-1=DejaVu Sans Mono
+ #dialoginput.plain.latin-1.motif=LuxiMono-Regular
+ dialoginput.plain.japanese-kochi=Kochi Gothic
+ dialoginput.plain.japanese-sazanami=Sazanami Gothic
+ dialoginput.plain.japanese-vlgothic=VL Gothic
+-dialoginput.plain.korean-baekmuk=Baekmuk Gulim
+-#dialoginput.plain.korean-baekmuk.motif=Baekmuk Gulim
+-dialoginput.plain.korean-un=UnDotum
+-#dialoginput.plain.korean-un.motif=UnDotum
++dialoginput.plain.korean-nanum=NanumGothic
+
+ dialoginput.bold.latin-1=DejaVu Sans Mono Bold
+ #dialoginput.bold.latin-1.motif=LuxiMono-Bold
+ dialoginput.bold.japanese-kochi=Kochi Gothic
+ dialoginput.bold.japanese-sazanami=Sazanami Gothic
+ dialoginput.bold.japanese-vlgothic=VL Gothic
+-dialoginput.bold.korean-baekmuk=Baekmuk Gulim
+-#dialoginput.bold.korean-baekmuk.motif=Baekmuk Gulim
+-dialoginput.bold.korean-un=UnDotum Bold
+-#dialoginput.bold.korean-un.motif=UnDotum Bold
++dialoginput.bold.korean-nanum=NanumGothic Bold
+
+ dialoginput.italic.latin-1=DejaVu Sans Mono Oblique
+ #dialoginput.italic.latin-1.motif=LuxiMono-Oblique
+ dialoginput.italic.japanese-kochi=Kochi Gothic
+ dialoginput.italic.japanese-sazanami=Sazanami Gothic
+ dialoginput.italic.japanese-vlgothic=VL Gothic
+-dialoginput.italic.korean-baekmuk=Baekmuk Gulim
+-#dialoginput.italic.korean-baekmuk.motif=Baekmuk Gulim
+-dialoginput.italic.korean-un=UnDotum
+-#dialoginput.italic.korean-un.motif=UnDotum
++dialoginput.italic.korean-nanum=NanumGothic
+
+ dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
+ #dialoginput.bolditalic.latin-1.motif=LuxiMono-BoldOblique
+ dialoginput.bolditalic.japanese-kochi=Kochi Gothic
+ dialoginput.bolditalic.japanese-sazanami=Sazanami Gothic
+ dialoginput.bolditalic.japanese-vlgothic=VL Gothic
+-dialoginput.bolditalic.korean-baekmuk=Baekmuk Gulim
+-#dialoginput.bolditalic.korean-baekmuk.motif=Baekmuk Gulim
+-dialoginput.bolditalic.korean-un=UnDotum Bold
+-#dialoginput.bolditalic.korean-un.motif=UnDotum Bold
++dialoginput.bolditalic.korean-nanum=NanumGothic Bold
+
+ # Search Sequences
+
+@@ -262,11 +202,11 @@
+ sequence.allfonts.GB2312=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
+ sequence.allfonts.GBK=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
+ sequence.allfonts.x-euc-jp-linux=latin-1,japanese-vlgothic,japanese-sazanami,japanese-kochi
+-sequence.allfonts.EUC-KR=latin-1,korean-un,korean-baekmuk
++sequence.allfonts.EUC-KR=latin-1,korean-nanum
+ sequence.allfonts.Big5=latin-1,umingtw,shanheisun,wqy-microhei,wqy-zenhei
+ sequence.allfonts.Big5-HKSCS=latin-1,uminghk,shanheisun,wqy-microhei,wqy-zenhei
+-#sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala
+-sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu
++#sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala
++sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-nanum,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu
+
+ # Exclusion Ranges
+
+@@ -298,12 +238,12 @@
+
+ filename.WenQuanYi_Micro_Hei=/usr/share/fonts/truetype/wqy/wqy-microhei.ttc
+ filename.WenQuanYi_Zen_Hei=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc
+-filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf
+-filename.UnBatang=/usr/share/fonts/truetype/unfonts/UnBatang.ttf
+-filename.UnBatang_Bold=/usr/share/fonts/truetype/unfonts/UnBatangBold.ttf
+-filename.Baekmuk_Gulim=/usr/share/fonts/truetype/baekmuk/gulim.ttf
+-filename.UnDotum=/usr/share/fonts/truetype/unfonts/UnDotum.ttf
+-filename.UnDotum_Bold=/usr/share/fonts/truetype/unfonts/UnDotumBold.ttf
++filename.NanumMyeongjo=/usr/share/fonts/truetype/nanum/NanumMyeongjo.ttf
++filename.NanumMyeongjo_Bold=/usr/share/fonts/truetype/nanum/NanumMyeongjoBold.ttf
++filename.NanumGothic=/usr/share/fonts/truetype/nanum/NanumGothic.ttf
++filename.NanumGothic_Bold=/usr/share/fonts/truetype/nanum/NanumGothicBold.ttf
++filename.NanumGothicCoding=/usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding.ttf
++filename.NanumGothicCoding_Bold=/usr/share/fonts/truetype/nanum-coding/NanumGothic_Coding_Bold.ttf
+ filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic.ttf
+ filename.Sazanami_Gothic=/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf
+ filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho.ttf
+@@ -346,5 +286,4 @@
+ awtfontpath.japanese-kochi=/usr/share/fonts/truetype/kochi
+ awtfontpath.japanese-sazanami=/usr/share/fonts/truetype/sazanami
+ awtfontpath.japanese-vlgothic=/usr/share/fonts/truetype/vlgothic
+-awtfontpath.korean-baekmuk=/usr/share/fonts/truetype/baekmuk
+-awtfontpath.korean-un=/usr/share/fonts/truetype/unfonts
++awtfontpath.korean-nanum=/usr/share/fonts/truetype/nanum
diff --git a/debian/patches/fontconfig-wqy-microhei.patch b/debian/patches/fontconfig-wqy-microhei.patch
new file mode 100644
index 0000000..23093aa
--- /dev/null
+++ b/debian/patches/fontconfig-wqy-microhei.patch
@@ -0,0 +1,53 @@
+--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.orig
++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties
+@@ -37,6 +37,7 @@
+ #allfonts.uminghk.motif=AR PL UMing HK
+ allfonts.umingtw=AR PL UMing TW
+ #allfonts.umingtw.motif=AR PL UMing TW
++allfonts.wqy-microhei=WenQuanYi Micro Hei
+ allfonts.wqy-zenhei=WenQuanYi Zen Hei
+ #allfonts.wqy-zenhei.motif=WenQuanYi Zen Hei
+ allfonts.shanheisun=AR PL ShanHeiSun Uni
+@@ -257,15 +258,15 @@
+ # Search Sequences
+
+ sequence.allfonts=latin-1
+-sequence.allfonts.GB18030=latin-1,umingcn,shanheisun,wqy-zenhei
+-sequence.allfonts.GB2312=latin-1,umingcn,shanheisun,wqy-zenhei
+-sequence.allfonts.GBK=latin-1,umingcn,shanheisun,wqy-zenhei
++sequence.allfonts.GB18030=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
++sequence.allfonts.GB2312=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
++sequence.allfonts.GBK=latin-1,wqy-microhei,umingcn,shanheisun,wqy-zenhei
+ sequence.allfonts.x-euc-jp-linux=latin-1,japanese-vlgothic,japanese-sazanami,japanese-kochi
+ sequence.allfonts.EUC-KR=latin-1,korean-un,korean-baekmuk
+-sequence.allfonts.Big5=latin-1,umingtw,shanheisun,wqy-zenhei
+-sequence.allfonts.Big5-HKSCS=latin-1,uminghk,shanheisun,wqy-zenhei
++sequence.allfonts.Big5=latin-1,umingtw,shanheisun,wqy-microhei,wqy-zenhei
++sequence.allfonts.Big5-HKSCS=latin-1,uminghk,shanheisun,wqy-microhei,wqy-zenhei
+ #sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-kochi,japanese-sazanami,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala
+-sequence.fallback=uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu
++sequence.fallback=wqy-microhei,uminghk,shanheisun,wqy-zenhei,japanese-vlgothic,japanese-sazanami,japanese-kochi,korean-un,korean-baekmuk,bengali,gujarati,hindi,oriya,punjabi,tamil,telugu
+
+ # Exclusion Ranges
+
+@@ -293,9 +294,10 @@
+ filename.AR_PL_UMing_CN=/usr/share/fonts/truetype/arphic/uming.ttc
+ filename.AR_PL_UMing_HK=/usr/share/fonts/truetype/arphic/uming.ttc
+ filename.AR_PL_UMing_TW=/usr/share/fonts/truetype/arphic/uming.ttc
+-filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/truetype/arphic/uming.ttf
++filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/truetype/arphic/uming.ttc
+
+-filename.WenQuanYi_Zen_Hei=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttf
++filename.WenQuanYi_Micro_Hei=/usr/share/fonts/truetype/wqy/wqy-microhei.ttc
++filename.WenQuanYi_Zen_Hei=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc
+ filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf
+ filename.UnBatang=/usr/share/fonts/truetype/unfonts/UnBatang.ttf
+ filename.UnBatang_Bold=/usr/share/fonts/truetype/unfonts/UnBatangBold.ttf
+@@ -339,6 +341,7 @@
+ awtfontpath.uminghk=/usr/share/fonts/truetype/arphic
+ awtfontpath.umingtw=/usr/share/fonts/truetype/arphic
+ awtfontpath.shanheisun=/usr/share/fonts/truetype/arphic
++awtfontpath.wqy-microhei=/usr/share/fonts/truetype/wqy
+ awtfontpath.wqy-zenhei=/usr/share/fonts/truetype/wqy
+ awtfontpath.japanese-kochi=/usr/share/fonts/truetype/kochi
+ awtfontpath.japanese-sazanami=/usr/share/fonts/truetype/sazanami
diff --git a/debian/patches/gcc6.diff b/debian/patches/gcc6.diff
new file mode 100644
index 0000000..8b3b1b8
--- /dev/null
+++ b/debian/patches/gcc6.diff
@@ -0,0 +1,1086 @@
+# HG changeset patch
+# User andrew
+# Date 1468209748 -3600
+# Mon Jul 11 05:02:28 2016 +0100
+# Node ID 7eb66a95dbd58d26ed271477076e0ab72e8c9ebf
+# Parent 817d9fb584baecae7c989dfd7009a7f0ac7c6360
+8151841: Build needs additional flags to compile with GCC 6 [plus parts of 8149647 & 8032045]
+Summary: C++ standard needs to be explicitly set and some optimisations turned off to build on GCC 6
+Reviewed-by: erikj, dholmes, kbarrett
+
+--- a/common/autoconf/generated-configure.sh
++++ b/common/autoconf/generated-configure.sh
+@@ -679,6 +679,9 @@ CFLAGS_JDKEXE
+ CFLAGS_JDKLIB
+ MACOSX_VERSION_MIN
+ PACKAGE_PATH
++NO_LIFETIME_DSE_CFLAG
++NO_DELETE_NULL_POINTER_CHECKS_CFLAG
++CXXSTD_CXXFLAG
+ LEGACY_EXTRA_LDFLAGS
+ LEGACY_EXTRA_CXXFLAGS
+ LEGACY_EXTRA_CFLAGS
+@@ -743,6 +746,8 @@ LD
+ ac_ct_OBJC
+ OBJCFLAGS
+ OBJC
++CXX_VERSION
++CC_VERSION
+ ac_ct_CXX
+ CXXFLAGS
+ CXX
+@@ -3672,7 +3677,7 @@ fi
+
+
+ #
+-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ #
+ # This code is free software; you can redistribute it and/or modify it
+@@ -3795,6 +3800,19 @@ fi
+ # questions.
+ #
+
++# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
++# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
++
++
++# Check if the configured compiler (C and C++) is of a specific version or
++# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
++#
++# Arguments:
++# $1: The version string to check against the found version
++# $2: block to run if the compiler is at least this version (>=)
++# $3: block to run if the compiler is older than this version (<)
++
++
+ # $1 = compiler to test (CC or CXX)
+ # $2 = human readable name of compiler (C or C++)
+
+@@ -3818,10 +3836,22 @@ fi
+
+
+
++# TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
++# [RUN-IF-FALSE])
++# ------------------------------------------------------------
++# Check that the C compiler supports an argument
++
++
++# TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
++# [RUN-IF-FALSE])
++# ------------------------------------------------------------
++# Check that the C++ compiler supports an argument
++
++
+ # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
+-# [RUN-IF-FALSE])
++# [RUN-IF-FALSE])
+ # ------------------------------------------------------------
+-# Check that the c and c++ compilers support an argument
++# Check that the C and C++ compilers support an argument
+
+
+
+@@ -3829,6 +3859,8 @@ fi
+ # Setup the JTREG paths
+
+
++
++
+ #
+ # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -3880,7 +3912,7 @@ fi
+ #CUSTOM_AUTOCONF_INCLUDE
+
+ # Do not change or remove the following line, it is needed for consistency checks:
+-DATE_WHEN_GENERATED=1449096260
++DATE_WHEN_GENERATED=1468207795
+
+ ###############################################################################
+ #
+@@ -20368,7 +20400,8 @@ $as_echo "$as_me: The result from runnin
+
+ # First line typically looks something like:
+ # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
+- COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
++ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | \
++ $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
+ COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
+ fi
+ # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
+@@ -21969,7 +22002,8 @@ $as_echo "$as_me: The result from runnin
+
+ # First line typically looks something like:
+ # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
+- COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
++ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | \
++ $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
+ COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
+ fi
+ # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
+@@ -22240,6 +22274,32 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
++ # This is the compiler version number on the form X.Y[.Z]
++
++
++
++
++ if test "x$CC_VERSION" != "x$CXX_VERSION"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&5
++$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&2;}
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
++$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
++ fi
++
++ # We only check CC_VERSION since we assume CXX_VERSION is equal.
++ if [[ "$CC_VERSION" =~ (.*\.){3} ]] ; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&5
++$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&2;}
++ fi
++
++ if [[ "$CC_VERSION" =~ [0-9]{6} ]] ; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&5
++$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
++ fi
++
++ COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION"`
++
++
+ ### Locate other tools
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+@@ -24831,7 +24891,8 @@ $as_echo "$as_me: Rewriting DUMPBIN to \
+
+
+ COMPILER_TYPE=CL
+- CCXXFLAGS="$CCXXFLAGS -nologo"
++ # silence copyright notice and other headers.
++ COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
+
+ fi
+
+@@ -29664,12 +29725,57 @@ fi
+ #
+ # Now setup the CFLAGS and LDFLAGS for the JDK build.
+ # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
++ # CFLAGS_JDK - C Compiler flags
++ # CXXFLAGS_JDK - C++ Compiler flags
++ # COMMON_CCXXFLAGS_JDK - common to C and C++
+ #
+ case $COMPILER_NAME in
+ gcc )
+- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
+ -pipe \
+ -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
++ CXXSTD_CXXFLAG="-std=gnu++98"
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS\"" >&5
++$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS\"... " >&6; }
++ supports=yes
++
++ saved_cxxflags="$CXXFLAGS"
++ CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS"
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++int i;
++_ACEOF
++if ac_fn_cxx_try_compile "$LINENO"; then :
++
++else
++ supports=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ CXXFLAGS="$saved_cxxflags"
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ :
++ else
++ CXXSTD_CXXFLAG=""
++ fi
++
++ CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
++
+ case $OPENJDK_TARGET_CPU_ARCH in
+ arm )
+ # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
+@@ -29679,16 +29785,234 @@ fi
+ # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
+ ;;
+ * )
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
+ CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+ ;;
+ esac
++
++ REFERENCE_VERSION=6
++
++ if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
++ as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
++ fi
++
++ if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
++ as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported" "$LINENO" 5
++ fi
++
++ # Version comparison method inspired by http://stackoverflow.com/a/24067243
++ COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
++
++ if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
++
++ # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
++ # runs afoul of the more aggressive versions of these optimisations.
++ # Notably, value range propagation now assumes that the this pointer of C++
++ # member functions is non-null.
++ NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
++$as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
++ supports=yes
++
++ saved_cflags="$CFLAGS"
++ CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
++ ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++int i;
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++else
++ supports=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ CFLAGS="$saved_cflags"
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ C_COMP_SUPPORTS="yes"
++ else
++ C_COMP_SUPPORTS="no"
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
++$as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
++ supports=yes
++
++ saved_cxxflags="$CXXFLAGS"
++ CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++int i;
++_ACEOF
++if ac_fn_cxx_try_compile "$LINENO"; then :
++
++else
++ supports=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ CXXFLAGS="$saved_cxxflags"
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ CXX_COMP_SUPPORTS="yes"
++ else
++ CXX_COMP_SUPPORTS="no"
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
++$as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
++ supports=no
++ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ :
++ else
++ NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""
++ fi
++
++
++ NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
++$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
++ supports=yes
++
++ saved_cflags="$CFLAGS"
++ CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
++ ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
++
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++int i;
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++else
++ supports=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ CFLAGS="$saved_cflags"
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ C_COMP_SUPPORTS="yes"
++ else
++ C_COMP_SUPPORTS="no"
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
++$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
++ supports=yes
++
++ saved_cxxflags="$CXXFLAGS"
++ CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++int i;
++_ACEOF
++if ac_fn_cxx_try_compile "$LINENO"; then :
++
++else
++ supports=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_ext=cpp
++ac_cpp='$CXXCPP $CPPFLAGS'
++ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
++
++ CXXFLAGS="$saved_cxxflags"
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ CXX_COMP_SUPPORTS="yes"
++ else
++ CXX_COMP_SUPPORTS="no"
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
++$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
++ supports=no
++ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ :
++ else
++ NO_LIFETIME_DSE_CFLAG=""
++ fi
++
++ CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
++
++
++
++ else
++ :
++ fi
++
+ ;;
+ ossc )
+- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
+ case $OPENJDK_TARGET_CPU_ARCH in
+ x86 )
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
+ CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
+ ;;
+ esac
+@@ -29707,16 +30031,16 @@ fi
+ LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
+ ;;
+ cl )
+- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+ -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
+ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+ -DWIN32 -DIAL"
+ case $OPENJDK_TARGET_CPU in
+ x86 )
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
+ ;;
+ x86_64 )
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
+ ;;
+ esac
+ ;;
+@@ -29746,7 +30070,7 @@ fi
+ ;;
+ esac
+
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
+
+ # The package path is used only on macosx?
+ PACKAGE_PATH=/opt/local
+@@ -29759,27 +30083,27 @@ fi
+ # Note: -Dmacro is the same as #define macro 1
+ # -Dmacro= is the same as #define macro
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
+ else
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
+ fi
+ else
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DWINDOWS"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DSOLARIS"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xaix; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DAIX -DPPC64"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
+ # Setting these parameters makes it an error to link to macosx APIs that are
+ # newer than the given OS version and makes the linked binaries compatible even
+ # if built on a newer version of the OS.
+@@ -29789,25 +30113,25 @@ fi
+ # The macro takes the version with no dots, ex: 1070
+ # Let the flags variables get resolved in make for easier override on make
+ # command line.
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+ LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xbsd; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
+ fi
+ if test "x$DEBUG_LEVEL" = xrelease; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
+ fi
+ else
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
+ fi
+
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
+
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
+ -I${JDK_OUTPUTDIR}/include \
+ -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
+ -I${JDK_TOPDIR}/src/share/javavm/export \
+@@ -29816,12 +30140,12 @@ fi
+ -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
+
+ # The shared libraries are compiled using the picflag.
+- CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
+- CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
++ CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
++ CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
+
+ # Executable flags
+- CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
+- CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
++ CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
++ CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
+
+ # Now this is odd. The JDK native libraries have to link against libjvm.so
+ # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
+@@ -29905,7 +30229,6 @@ fi
+
+
+
+-
+ # Some Zero and Shark settings.
+ # ZERO_ARCHFLAG tells the compiler which mode to build for
+ case "${OPENJDK_TARGET_CPU}" in
+@@ -29916,8 +30239,9 @@ fi
+ ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
+ esac
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
+-$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
++$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
+ supports=yes
+
+ saved_cflags="$CFLAGS"
+@@ -29946,6 +30270,19 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ CFLAGS="$saved_cflags"
+
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ C_COMP_SUPPORTS="yes"
++ else
++ C_COMP_SUPPORTS="no"
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
++$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
++ supports=yes
++
+ saved_cxxflags="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
+ ac_ext=cpp
+@@ -29975,6 +30312,20 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+ $as_echo "$supports" >&6; }
+ if test "x$supports" = "xyes" ; then
++ CXX_COMP_SUPPORTS="yes"
++ else
++ CXX_COMP_SUPPORTS="no"
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
++$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
++ supports=no
++ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
+ :
+ else
+ ZERO_ARCHFLAG=""
+@@ -29985,8 +30336,9 @@ $as_echo "$supports" >&6; }
+ # Check that the compiler supports -mX (or -qX on AIX) flags
+ # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
+-$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
++$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
+ supports=yes
+
+ saved_cflags="$CFLAGS"
+@@ -30015,6 +30367,19 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ CFLAGS="$saved_cflags"
+
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ C_COMP_SUPPORTS="yes"
++ else
++ C_COMP_SUPPORTS="no"
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
++$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
++ supports=yes
++
+ saved_cxxflags="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
+ ac_ext=cpp
+@@ -30043,6 +30408,20 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
+ $as_echo "$supports" >&6; }
++ if test "x$supports" = "xyes" ; then
++ CXX_COMP_SUPPORTS="yes"
++ else
++ CXX_COMP_SUPPORTS="no"
++ fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
++$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
++ supports=no
++ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
++$as_echo "$supports" >&6; }
+ if test "x$supports" = "xyes" ; then
+ COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
+ else
+--- a/common/autoconf/hotspot-spec.gmk.in
++++ b/common/autoconf/hotspot-spec.gmk.in
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ #
+ # This code is free software; you can redistribute it and/or modify it
+@@ -109,7 +109,8 @@ LD:=@HOTSPOT_LD@
+ MT:=@HOTSPOT_MT@
+ RC:=@HOTSPOT_RC@
+
+-EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
++EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(NO_DELETE_NULL_POINTER_CHECKS_CFLAG) \
++ $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
+ EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
+ EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
+
+--- a/common/autoconf/spec.gmk.in
++++ b/common/autoconf/spec.gmk.in
+@@ -331,6 +331,10 @@ CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
+ CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
+ CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
+
++NO_DELETE_NULL_POINTER_CHECKS_CFLAG=@NO_DELETE_NULL_POINTER_CHECKS_CFLAG@
++NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@
++CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
++
+ CXX:=@FIXPATH@ @CCACHE@ @CXX@
+ #CXXFLAGS:=@CXXFLAGS@
+
+--- a/common/autoconf/toolchain.m4
++++ b/common/autoconf/toolchain.m4
+@@ -23,9 +23,59 @@
+ # questions.
+ #
+
++# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
++# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
++AC_DEFUN([TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS],
++[
++ if test "x$CC_VERSION" != "x$CXX_VERSION"; then
++ AC_MSG_WARN([C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION.])
++ AC_MSG_WARN([This typically indicates a broken setup, and is not supported])
++ fi
++
++ # We only check CC_VERSION since we assume CXX_VERSION is equal.
++ if [ [[ "$CC_VERSION" =~ (.*\.){3} ]] ]; then
++ AC_MSG_WARN([C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong.])
++ fi
++
++ if [ [[ "$CC_VERSION" =~ [0-9]{6} ]] ]; then
++ AC_MSG_WARN([C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong.])
++ fi
++
++ COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$CC_VERSION"`
++])
++
++# Check if the configured compiler (C and C++) is of a specific version or
++# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
++#
++# Arguments:
++# $1: The version string to check against the found version
++# $2: block to run if the compiler is at least this version (>=)
++# $3: block to run if the compiler is older than this version (<)
++AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
++[
++ REFERENCE_VERSION=$1
++
++ if [ [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ]; then
++ AC_MSG_ERROR([Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported])
++ fi
++
++ if [ [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ]; then
++ AC_MSG_ERROR([Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported])
++ fi
++
++ # Version comparison method inspired by http://stackoverflow.com/a/24067243
++ COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$REFERENCE_VERSION"`
++
++ if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
++ m4_ifval([$2], [$2], [:])
++ else
++ m4_ifval([$3], [$3], [:])
++ fi
++])
++
+ # $1 = compiler to test (CC or CXX)
+ # $2 = human readable name of compiler (C or C++)
+-AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
++AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
+ [
+ COMPILER=[$]$1
+ COMPILER_NAME=$2
+@@ -81,7 +131,8 @@ AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSI
+
+ # First line typically looks something like:
+ # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
+- COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \(@<:@1-9@:>@@<:@0-9.@:>@*\)/\1/p"`
++ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | \
++ $SED -e 's/^.* \(@<:@1-9@:>@\.@<:@0-9.@:>@*\)@<:@^0-9.@:>@.*$/\1/'`
+ COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) @<:@1-9@:>@@<:@0-9.@:>@*/\1/p"`
+ fi
+ # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
+@@ -181,7 +232,7 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
+ AC_MSG_RESULT([no, keeping $1])
+ $1="$TEST_COMPILER"
+ fi
+- TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
++ TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME])
+ ])
+
+
+@@ -385,6 +436,12 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
+ # Now that we have resolved CXX ourself, let autoconf have its go at it
+ AC_PROG_CXX([$CXX])
+
++ # This is the compiler version number on the form X.Y[.Z]
++ AC_SUBST(CC_VERSION)
++ AC_SUBST(CXX_VERSION)
++
++ TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS
++
+ ### Locate other tools
+
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+@@ -507,7 +564,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
+ BASIC_FIXUP_EXECUTABLE(DUMPBIN)
+
+ COMPILER_TYPE=CL
+- CCXXFLAGS="$CCXXFLAGS -nologo"
++ # silence copyright notice and other headers.
++ COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
+ ])
+ AC_SUBST(RC_FLAGS)
+ AC_SUBST(COMPILER_TYPE)
+@@ -954,12 +1012,20 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ #
+ # Now setup the CFLAGS and LDFLAGS for the JDK build.
+ # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
++ # CFLAGS_JDK - C Compiler flags
++ # CXXFLAGS_JDK - C++ Compiler flags
++ # COMMON_CCXXFLAGS_JDK - common to C and C++
+ #
+ case $COMPILER_NAME in
+ gcc )
+- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
+ -pipe \
+ -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
++ CXXSTD_CXXFLAG="-std=gnu++98"
++ TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS],
++ [], [CXXSTD_CXXFLAG=""])
++ CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
++ AC_SUBST([CXXSTD_CXXFLAG])
+ case $OPENJDK_TARGET_CPU_ARCH in
+ arm )
+ # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
+@@ -969,16 +1035,17 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
+ ;;
+ * )
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
+ CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+ ;;
+ esac
++ TOOLCHAIN_CHECK_COMPILER_VERSION(6, TOOLCHAIN_SETUP_GCC6_COMPILER_FLAGS)
+ ;;
+ ossc )
+- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
+ case $OPENJDK_TARGET_CPU_ARCH in
+ x86 )
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
+ CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
+ ;;
+ esac
+@@ -997,16 +1064,16 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
+ ;;
+ cl )
+- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
+ -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
+ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
+ -DWIN32 -DIAL"
+ case $OPENJDK_TARGET_CPU in
+ x86 )
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
+ ;;
+ x86_64 )
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
+ ;;
+ esac
+ ;;
+@@ -1036,7 +1103,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ ;;
+ esac
+
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
+
+ # The package path is used only on macosx?
+ PACKAGE_PATH=/opt/local
+@@ -1049,27 +1116,27 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ # Note: -Dmacro is the same as #define macro 1
+ # -Dmacro= is the same as #define macro
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
+ else
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
+ fi
+ else
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xwindows; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DWINDOWS"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DSOLARIS"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xaix; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DAIX -DPPC64"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
+ # Setting these parameters makes it an error to link to macosx APIs that are
+ # newer than the given OS version and makes the linked binaries compatible even
+ # if built on a newer version of the OS.
+@@ -1079,25 +1146,25 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ # The macro takes the version with no dots, ex: 1070
+ # Let the flags variables get resolved in make for easier override on make
+ # command line.
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+ LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+ fi
+ if test "x$OPENJDK_TARGET_OS" = xbsd; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
+ fi
+ if test "x$DEBUG_LEVEL" = xrelease; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
+ fi
+ else
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
+ fi
+
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
+
+- CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
+ -I${JDK_OUTPUTDIR}/include \
+ -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
+ -I${JDK_TOPDIR}/src/share/javavm/export \
+@@ -1106,12 +1173,12 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
+
+ # The shared libraries are compiled using the picflag.
+- CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
+- CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
++ CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
++ CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
+
+ # Executable flags
+- CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
+- CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
++ CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
++ CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
+
+ # Now this is odd. The JDK native libraries have to link against libjvm.so
+ # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
+@@ -1196,13 +1263,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ ])
+
+
+-# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
+-# [RUN-IF-FALSE])
++# TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
++# [RUN-IF-FALSE])
+ # ------------------------------------------------------------
+-# Check that the c and c++ compilers support an argument
+-AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUMENTS],
++# Check that the C compiler supports an argument
++AC_DEFUN([TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS],
+ [
+- AC_MSG_CHECKING([if compiler supports "$1"])
++ AC_MSG_CHECKING([if the C compiler supports "$1"])
+ supports=yes
+
+ saved_cflags="$CFLAGS"
+@@ -1213,6 +1280,23 @@ AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUM
+ AC_LANG_POP([C])
+ CFLAGS="$saved_cflags"
+
++ AC_MSG_RESULT([$supports])
++ if test "x$supports" = "xyes" ; then
++ m4_ifval([$2], [$2], [:])
++ else
++ m4_ifval([$3], [$3], [:])
++ fi
++])
++
++# TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
++# [RUN-IF-FALSE])
++# ------------------------------------------------------------
++# Check that the C++ compiler supports an argument
++AC_DEFUN([TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS],
++[
++ AC_MSG_CHECKING([if the C++ compiler supports "$1"])
++ supports=yes
++
+ saved_cxxflags="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAG $1"
+ AC_LANG_PUSH([C++])
+@@ -1220,7 +1304,32 @@ AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUM
+ [supports=no])
+ AC_LANG_POP([C++])
+ CXXFLAGS="$saved_cxxflags"
++
++ AC_MSG_RESULT([$supports])
++ if test "x$supports" = "xyes" ; then
++ m4_ifval([$2], [$2], [:])
++ else
++ m4_ifval([$3], [$3], [:])
++ fi
++])
+
++# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
++# [RUN-IF-FALSE])
++# ------------------------------------------------------------
++# Check that the C and C++ compilers support an argument
++AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUMENTS],
++[
++ TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS([$1],
++ [C_COMP_SUPPORTS="yes"],
++ [C_COMP_SUPPORTS="no"])
++ TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([$1],
++ [CXX_COMP_SUPPORTS="yes"],
++ [CXX_COMP_SUPPORTS="no"])
++
++ AC_MSG_CHECKING([if both compilers support "$1"])
++ supports=no
++ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
++
+ AC_MSG_RESULT([$supports])
+ if test "x$supports" = "xyes" ; then
+ m4_ifval([$2], [$2], [:])
+@@ -1311,3 +1420,20 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
+ AC_SUBST(JT_HOME)
+ AC_SUBST(JTREGEXE)
+ ])
++
++AC_DEFUN_ONCE([TOOLCHAIN_SETUP_GCC6_COMPILER_FLAGS],
++[
++ # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
++ # runs afoul of the more aggressive versions of these optimisations.
++ # Notably, value range propagation now assumes that the this pointer of C++
++ # member functions is non-null.
++ NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
++ TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror],
++ [], [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
++ AC_SUBST([NO_DELETE_NULL_POINTER_CHECKS_CFLAG])
++ NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
++ TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$NO_LIFETIME_DSE_CFLAG -Werror],
++ [], [NO_LIFETIME_DSE_CFLAG=""])
++ CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
++ AC_SUBST([NO_LIFETIME_DSE_CFLAG])
++])
diff --git a/debian/patches/hotspot-disable-werror.diff b/debian/patches/hotspot-disable-werror.diff
new file mode 100644
index 0000000..45f7e9c
--- /dev/null
+++ b/debian/patches/hotspot-disable-werror.diff
@@ -0,0 +1,13 @@
+# DP: Turn off -Werror for hotspot, overwrites -fpermissive.
+
+--- a/hotspot/make/linux/makefiles/gcc.make
++++ b/hotspot/make/linux/makefiles/gcc.make
+@@ -198,7 +198,7 @@ else
+ endif
+
+ # Compiler warnings are treated as errors
+-WARNINGS_ARE_ERRORS = -Werror -Wno-error=format -Wno-error=deprecated
++WARNINGS_ARE_ERRORS =
+
+ ifeq ($(USE_CLANG), true)
+ # However we need to clean the code up before we can unrestrictedly enable this option with Clang
diff --git a/debian/patches/hotspot-libpath-aarch64.diff b/debian/patches/hotspot-libpath-aarch64.diff
new file mode 100644
index 0000000..e32eedf
--- /dev/null
+++ b/debian/patches/hotspot-libpath-aarch64.diff
@@ -0,0 +1,33 @@
+# DP: Set the hotspot default libpath to ignore lib64 and add multiarch
+
+--- a/hotspot/src/os/linux/vm/os_linux.cpp
++++ b/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -308,10 +308,10 @@ void os::init_system_properties_values()
+ // 1: ...
+ // ...
+ // 7: The default directories, normally /lib and /usr/lib.
+-#if defined(AMD64) || defined(_LP64) && (defined(SPARC) || defined(PPC) || defined(S390)) || defined(BUILTIN_SIM)
+-#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
++#ifdef DEB_MULTIARCH
++#define DEFAULT_LIBPATH "/usr/lib/" DEB_MULTIARCH "/jni" ":/lib/" DEB_MULTIARCH ":/usr/lib/" DEB_MULTIARCH ":/usr/lib/jni:/lib:/usr/lib"
+ #else
+-#define DEFAULT_LIBPATH "/lib:/usr/lib"
++#define DEFAULT_LIBPATH "/usr/lib/jni:/lib:/usr/lib"
+ #endif
+
+ // Base path of extensions installed on the system.
+--- a/hotspot/make/linux/makefiles/vm.make
++++ b/hotspot/make/linux/makefiles/vm.make
+@@ -99,6 +99,12 @@ CXXFLAGS = \
+ ${HS_LIB_ARCH} \
+ ${VM_DISTRO}
+
++DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true)
++ifneq (,$(DEB_MULTIARCH))
++CPPFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
++CXXFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
++endif
++
+ # This is VERY important! The version define must only be supplied to vm_version.o
+ # If not, ccache will not re-use the cache at all, since the version string might contain
+ # a time and date.
diff --git a/debian/patches/hotspot-libpath-default.diff b/debian/patches/hotspot-libpath-default.diff
new file mode 100644
index 0000000..92b60b4
--- /dev/null
+++ b/debian/patches/hotspot-libpath-default.diff
@@ -0,0 +1,37 @@
+# DP: Set the hotspot default libpath to ignore lib64 and add multiarch
+
+Index: b/hotspot/src/os/linux/vm/os_linux.cpp
+===================================================================
+--- a/hotspot/src/os/linux/vm/os_linux.cpp
++++ b/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -328,10 +328,10 @@ void os::init_system_properties_values()
+ // 1: ...
+ // ...
+ // 7: The default directories, normally /lib and /usr/lib.
+-#if defined(AMD64) || defined(_LP64) && (defined(SPARC) || defined(PPC) || defined(S390))
+-#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
++#ifdef DEB_MULTIARCH
++#define DEFAULT_LIBPATH "/usr/lib/" DEB_MULTIARCH "/jni" ":/lib/" DEB_MULTIARCH ":/usr/lib/" DEB_MULTIARCH ":/usr/lib/jni:/lib:/usr/lib"
+ #else
+-#define DEFAULT_LIBPATH "/lib:/usr/lib"
++#define DEFAULT_LIBPATH "/usr/lib/jni:/lib:/usr/lib"
+ #endif
+
+ // Base path of extensions installed on the system.
+Index: b/hotspot/make/linux/makefiles/vm.make
+===================================================================
+--- a/hotspot/make/linux/makefiles/vm.make
++++ b/hotspot/make/linux/makefiles/vm.make
+@@ -99,6 +99,12 @@ CXXFLAGS = \
+ ${HS_LIB_ARCH} \
+ ${VM_DISTRO}
+
++DEB_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || true)
++ifneq (,$(DEB_MULTIARCH))
++CPPFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
++CXXFLAGS += -DDEB_MULTIARCH="\"$(DEB_MULTIARCH)\""
++endif
++
+ # This is VERY important! The version define must only be supplied to vm_version.o
+ # If not, ccache will not re-use the cache at all, since the version string might contain
+ # a time and date.
diff --git a/debian/patches/hotspot-mips-align.diff b/debian/patches/hotspot-mips-align.diff
new file mode 100644
index 0000000..d65a5ca
--- /dev/null
+++ b/debian/patches/hotspot-mips-align.diff
@@ -0,0 +1,11 @@
+--- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
++++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
+@@ -367,7 +367,7 @@ int CppInterpreter::native_entry(Method*
+ ThreadStateTransition::transition_from_java(thread, _thread_in_native);
+
+ // Make the call
+- intptr_t result[4 - LogBytesPerWord];
++ intptr_t result[4 - LogBytesPerWord] __attribute__((__aligned__(__alignof__(double))));
+ ffi_call(handler->cif(), (void (*)()) function, result, arguments);
+
+ // Change the thread state back to _thread_in_Java.
diff --git a/debian/patches/hotspot-no-march-i586.diff b/debian/patches/hotspot-no-march-i586.diff
new file mode 100644
index 0000000..c031025
--- /dev/null
+++ b/debian/patches/hotspot-no-march-i586.diff
@@ -0,0 +1,13 @@
+# Don't explicitly build with -march=i586 on i386 architectures.
+
+--- a/hotspot/make/linux/makefiles/gcc.make
++++ b/hotspot/make/linux/makefiles/gcc.make
+@@ -171,7 +171,7 @@ ifeq ($(USE_CLANG), true)
+ endif
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32 -march=i586
++ARCHFLAG/i486 = -m32
+ ARCHFLAG/amd64 = -m64 $(STACK_ALIGNMENT_OPT)
+ ARCHFLAG/aarch64 =
+ ARCHFLAG/ia64 =
diff --git a/debian/patches/hotspot-powerpcspe.diff b/debian/patches/hotspot-powerpcspe.diff
new file mode 100644
index 0000000..7c50d71
--- /dev/null
+++ b/debian/patches/hotspot-powerpcspe.diff
@@ -0,0 +1,11 @@
+--- openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
+@@ -36,7 +36,7 @@
+
+ // Atomically copy 64 bits of data
+ static void atomic_copy64(volatile void *src, volatile void *dst) {
+-#if defined(PPC32)
++#if defined(PPC32) && !defined(__NO_FPRS__)
+ double tmp;
+ asm volatile ("lfd %0, 0(%1)\n"
+ "stfd %0, 0(%2)\n"
diff --git a/debian/patches/hotspot-set-compiler.diff b/debian/patches/hotspot-set-compiler.diff
new file mode 100644
index 0000000..a2a6dfd
--- /dev/null
+++ b/debian/patches/hotspot-set-compiler.diff
@@ -0,0 +1,12 @@
+# DP: Allow to overwrite CC/CXX from the environment
+--- a/hotspot/make/linux/makefiles/gcc.make
++++ b/hotspot/make/linux/makefiles/gcc.make
+@@ -39,7 +39,7 @@ ifeq ($(SPEC),)
+ ifeq ($(USE_CLANG), true)
+ CXX = clang++
+ CC = clang
+- else
++ else ifeq ($(CXX),)
+ CXX = g++
+ CC = gcc
+ endif
diff --git a/debian/patches/hotspot-warn-no-errformat.diff b/debian/patches/hotspot-warn-no-errformat.diff
new file mode 100644
index 0000000..b0ab7c3
--- /dev/null
+++ b/debian/patches/hotspot-warn-no-errformat.diff
@@ -0,0 +1,24 @@
+# DP: Build Hotspot with -Wno-error=format (not warning free on ppc64el).
+
+--- a/hotspot/make/solaris/makefiles/gcc.make
++++ b/hotspot/make/solaris/makefiles/gcc.make
+@@ -116,7 +116,7 @@ endif
+
+
+ # Compiler warnings are treated as errors
+-WARNINGS_ARE_ERRORS = -Werror
++WARNINGS_ARE_ERRORS = -Werror -Wno-error=format
+ # Enable these warnings. See 'info gcc' about details on these options
+ WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef
+ CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
+--- a/hotspot/make/linux/makefiles/gcc.make
++++ b/hotspot/make/linux/makefiles/gcc.make
+@@ -198,7 +198,7 @@ else
+ endif
+
+ # Compiler warnings are treated as errors
+-WARNINGS_ARE_ERRORS = -Werror
++WARNINGS_ARE_ERRORS = -Werror -Wno-error=format -Wno-error=deprecated
+
+ ifeq ($(USE_CLANG), true)
+ # However we need to clean the code up before we can unrestrictedly enable this option with Clang
diff --git a/debian/patches/icc_loading_with_symlink.diff b/debian/patches/icc_loading_with_symlink.diff
new file mode 100644
index 0000000..ed0937a
--- /dev/null
+++ b/debian/patches/icc_loading_with_symlink.diff
@@ -0,0 +1,35 @@
+Description: Allow loading of ICC profiles when jre/lib/cmm is a
+ symlink by disabling call to isChildOf(f, dir) in getStandardProfileFile
+ and getProfileFile methods.
+ .
+ isChildOf method try to ensures f.getCanonicalPath start with
+ dir.getCanonicalPath but, on openjdk-6, dir.getCanonicalPath
+ will resolve to realpath and so won't match.
+ .
+ It should fix "Cannot open file sRGB.pf" errors.
+Author: Damien Raude-Morvan <drazzib@debian.org>
+Last-Update: 2012-05-18
+Bug-Debian: http://bugs.debian.org/641530
+Forwarded: not-yet
+
+--- a/jdk/src/share/classes/java/awt/color/ICC_Profile.java
++++ b/jdk/src/share/classes/java/awt/color/ICC_Profile.java
+@@ -1833,9 +1833,6 @@ public class ICC_Profile implements Seri
+ dir = st.nextToken();
+ fullPath = dir + File.separatorChar + fileName;
+ f = new File(fullPath);
+- if (!isChildOf(f, dir)) {
+- f = null;
+- }
+ }
+ }
+
+@@ -1872,7 +1869,7 @@ public class ICC_Profile implements Seri
+ File.separatorChar + "lib" + File.separatorChar + "cmm";
+ String fullPath = dir + File.separatorChar + fileName;
+ File f = new File(fullPath);
+- return (f.isFile() && isChildOf(f, dir)) ? f : null;
++ return (f.isFile()) ? f : null;
+ }
+
+ /**
diff --git a/debian/patches/icedtea-4953367.patch b/debian/patches/icedtea-4953367.patch
new file mode 100644
index 0000000..9c083cd
--- /dev/null
+++ b/debian/patches/icedtea-4953367.patch
@@ -0,0 +1,21 @@
+http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4953367
+
+--- a/jdk/src/solaris/native/java/lang/java_props_md.c
++++ b/jdk/src/solaris/native/java/lang/java_props_md.c
+@@ -612,6 +612,7 @@ GetJavaProperties(JNIEnv *env)
+ sprops.path_separator = ":";
+ sprops.line_separator = "\n";
+
++#ifndef __linux__
+ #if !defined(_ALLBSD_SOURCE)
+ /* Append CDE message and resource search path to NLSPATH and
+ * XFILESEARCHPATH, in order to pick localized message for
+@@ -620,7 +621,7 @@ GetJavaProperties(JNIEnv *env)
+ setPathEnvironment("NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat");
+ setPathEnvironment("XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt");
+ #endif
+-
++#endif
+
+ #ifdef MACOSX
+ setProxyProperties(&sprops);
diff --git a/debian/patches/icedtea-override-redirect-compiz.patch b/debian/patches/icedtea-override-redirect-compiz.patch
new file mode 100644
index 0000000..a90b8ef
--- /dev/null
+++ b/debian/patches/icedtea-override-redirect-compiz.patch
@@ -0,0 +1,10 @@
+--- a/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java
++++ b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java
+@@ -1220,6 +1220,7 @@ class XWindowPeer extends XPanelPeer imp
+
+ boolean isOverrideRedirect() {
+ return XWM.getWMID() == XWM.OPENLOOK_WM ||
++ XWM.getWMID() == XWM.COMPIZ_WM ||
+ Window.Type.POPUP.equals(getWindowType());
+ }
+
diff --git a/debian/patches/icedtea-sound.diff b/debian/patches/icedtea-sound.diff
new file mode 100644
index 0000000..d74f2be
--- /dev/null
+++ b/debian/patches/icedtea-sound.diff
@@ -0,0 +1,180 @@
+--- a/icedtea-sound/Makefile.am
++++ b/icedtea-sound/Makefile.am
+@@ -143,7 +143,7 @@
+ touch $@
+
+ $(ICEDTEA_SOUND_NATIVE_BUILDDIR)/%.o: $(ICEDTEA_SOUND_NATIVE_SRCDIR)/%.c stamps/icedtea-sound-headers.stamp
+- $(CC) $(IT_CFLAGS) -fPIC -I$(SYSTEM_JDK_DIR)/include/linux -I$(SYSTEM_JDK_DIR)/include \
++ $(CC) $(IT_CFLAGS) -fPIC -I$(SYSTEM_JDK_DIR)/include/linux -I$(SYSTEM_JDK_DIR)/include/bsd -I$(SYSTEM_JDK_DIR)/include \
+ -I$(ICEDTEA_SOUND_NATIVE_BUILDDIR) -o $@ -c $<
+
+ $(ICEDTEA_SOUND_NATIVE_BUILDDIR)/$(TARGET_NAME): $(ICEDTEA_SOUND_NATIVE_OBJECTS)
+--- a/icedtea-sound/Makefile.in
++++ b/icedtea-sound/Makefile.in
+@@ -721,7 +721,7 @@
+ touch $@
+
+ $(ICEDTEA_SOUND_NATIVE_BUILDDIR)/%.o: $(ICEDTEA_SOUND_NATIVE_SRCDIR)/%.c stamps/icedtea-sound-headers.stamp
+- $(CC) $(IT_CFLAGS) -fPIC -I$(SYSTEM_JDK_DIR)/include/linux -I$(SYSTEM_JDK_DIR)/include \
++ $(CC) $(IT_CFLAGS) -fPIC -I$(SYSTEM_JDK_DIR)/include/linux -I$(SYSTEM_JDK_DIR)/include/bsd -I$(SYSTEM_JDK_DIR)/include \
+ -I$(ICEDTEA_SOUND_NATIVE_BUILDDIR) -o $@ -c $<
+
+ $(ICEDTEA_SOUND_NATIVE_BUILDDIR)/$(TARGET_NAME): $(ICEDTEA_SOUND_NATIVE_OBJECTS)
+--- a/icedtea-sound/acinclude.m4
++++ b/icedtea-sound/acinclude.m4
+@@ -24,14 +24,12 @@
+ BUILD_ARCH_DIR=amd64
+ INSTALL_ARCH_DIR=amd64
+ JRE_ARCH_DIR=amd64
+- ARCHFLAG="-m64"
+ ;;
+ i?86)
+ BUILD_ARCH_DIR=i586
+ INSTALL_ARCH_DIR=i386
+ JRE_ARCH_DIR=i386
+ ARCH_PREFIX=${LINUX32}
+- ARCHFLAG="-m32"
+ ;;
+ alpha*)
+ BUILD_ARCH_DIR=alpha
+@@ -42,13 +40,11 @@
+ BUILD_ARCH_DIR=arm
+ INSTALL_ARCH_DIR=arm
+ JRE_ARCH_DIR=arm
+- ARCHFLAG="-D_LITTLE_ENDIAN"
+ ;;
+ arm64|aarch64)
+ BUILD_ARCH_DIR=aarch64
+ INSTALL_ARCH_DIR=aarch64
+ JRE_ARCH_DIR=aarch64
+- ARCHFLAG="-D_LITTLE_ENDIAN"
+ ;;
+ mips)
+ BUILD_ARCH_DIR=mips
+@@ -65,19 +61,16 @@
+ INSTALL_ARCH_DIR=ppc
+ JRE_ARCH_DIR=ppc
+ ARCH_PREFIX=${LINUX32}
+- ARCHFLAG="-m32"
+ ;;
+ powerpc64)
+ BUILD_ARCH_DIR=ppc64
+ INSTALL_ARCH_DIR=ppc64
+ JRE_ARCH_DIR=ppc64
+- ARCHFLAG="-m64"
+ ;;
+ powerpc64le)
+ BUILD_ARCH_DIR=ppc64
+ INSTALL_ARCH_DIR=ppc64
+ JRE_ARCH_DIR=ppc64
+- ARCHFLAG="-m64"
+ ;;
+ sparc)
+ BUILD_ARCH_DIR=sparc
+@@ -85,27 +78,23 @@
+ JRE_ARCH_DIR=sparc
+ CROSS_TARGET_ARCH=sparc
+ ARCH_PREFIX=${LINUX32}
+- ARCHFLAG="-m32"
+ ;;
+ sparc64)
+ BUILD_ARCH_DIR=sparcv9
+ INSTALL_ARCH_DIR=sparcv9
+ JRE_ARCH_DIR=sparc64
+- ARCHFLAG="-m64"
+ ;;
+ s390)
+ BUILD_ARCH_DIR=s390
+ INSTALL_ARCH_DIR=s390
+ JRE_ARCH_DIR=s390
+ ARCH_PREFIX=${LINUX32}
+- ARCHFLAG="-m31"
+ ;;
+ s390x)
+ BUILD_ARCH_DIR=s390x
+ INSTALL_ARCH_DIR=s390x
+ JRE_ARCH_DIR=s390x
+ CROSS_TARGET_ARCH=s390x
+- ARCHFLAG="-m64"
+ ;;
+ sh*)
+ BUILD_ARCH_DIR=sh
+--- a/icedtea-sound/configure
++++ b/icedtea-sound/configure
+@@ -3719,14 +3719,12 @@
+ BUILD_ARCH_DIR=amd64
+ INSTALL_ARCH_DIR=amd64
+ JRE_ARCH_DIR=amd64
+- ARCHFLAG="-m64"
+ ;;
+ i?86)
+ BUILD_ARCH_DIR=i586
+ INSTALL_ARCH_DIR=i386
+ JRE_ARCH_DIR=i386
+ ARCH_PREFIX=${LINUX32}
+- ARCHFLAG="-m32"
+ ;;
+ alpha*)
+ BUILD_ARCH_DIR=alpha
+@@ -3737,13 +3735,11 @@
+ BUILD_ARCH_DIR=arm
+ INSTALL_ARCH_DIR=arm
+ JRE_ARCH_DIR=arm
+- ARCHFLAG="-D_LITTLE_ENDIAN"
+ ;;
+ arm64|aarch64)
+ BUILD_ARCH_DIR=aarch64
+ INSTALL_ARCH_DIR=aarch64
+ JRE_ARCH_DIR=aarch64
+- ARCHFLAG="-D_LITTLE_ENDIAN"
+ ;;
+ mips)
+ BUILD_ARCH_DIR=mips
+@@ -3760,19 +3756,16 @@
+ INSTALL_ARCH_DIR=ppc
+ JRE_ARCH_DIR=ppc
+ ARCH_PREFIX=${LINUX32}
+- ARCHFLAG="-m32"
+ ;;
+ powerpc64)
+ BUILD_ARCH_DIR=ppc64
+ INSTALL_ARCH_DIR=ppc64
+ JRE_ARCH_DIR=ppc64
+- ARCHFLAG="-m64"
+ ;;
+ powerpc64le)
+ BUILD_ARCH_DIR=ppc64
+ INSTALL_ARCH_DIR=ppc64
+ JRE_ARCH_DIR=ppc64
+- ARCHFLAG="-m64"
+ ;;
+ sparc)
+ BUILD_ARCH_DIR=sparc
+@@ -3780,27 +3773,23 @@
+ JRE_ARCH_DIR=sparc
+ CROSS_TARGET_ARCH=sparc
+ ARCH_PREFIX=${LINUX32}
+- ARCHFLAG="-m32"
+ ;;
+ sparc64)
+ BUILD_ARCH_DIR=sparcv9
+ INSTALL_ARCH_DIR=sparcv9
+ JRE_ARCH_DIR=sparc64
+- ARCHFLAG="-m64"
+ ;;
+ s390)
+ BUILD_ARCH_DIR=s390
+ INSTALL_ARCH_DIR=s390
+ JRE_ARCH_DIR=s390
+ ARCH_PREFIX=${LINUX32}
+- ARCHFLAG="-m31"
+ ;;
+ s390x)
+ BUILD_ARCH_DIR=s390x
+ INSTALL_ARCH_DIR=s390x
+ JRE_ARCH_DIR=s390x
+ CROSS_TARGET_ARCH=s390x
+- ARCHFLAG="-m64"
+ ;;
+ sh*)
+ BUILD_ARCH_DIR=sh
diff --git a/debian/patches/include-all-srcs.diff b/debian/patches/include-all-srcs.diff
new file mode 100644
index 0000000..e37769c
--- /dev/null
+++ b/debian/patches/include-all-srcs.diff
@@ -0,0 +1,57 @@
+Description: Include all source files in src.zip
+Origin: vendor, http://pkgs.fedoraproject.org/cgit/java-1.8.0-openjdk.git/plain/include-all-srcs.patch
+Forwarded: not-needed
+--- a/jdk/make/CreateJars.gmk
++++ b/jdk/make/CreateJars.gmk
+@@ -580,38 +580,12 @@ $(eval $(call SetupArchive,BUILD_CT_SYM,
+ ##########################################################################################
+
+ SRC_ZIP_INCLUDES = \
+- com/sun/corba \
+- com/sun/image/codec/jpeg \
+- com/sun/imageio \
+- com/sun/java_cup \
+- com/sun/javadoc \
+- com/sun/java/swing \
+- com/sun/jmx \
+- com/sun/naming \
+- com/sun/org/apache \
+- com/sun/security/auth \
+- com/sun/security/jgss \
+- com/sun/source \
++ com \
+ java \
+- javax/accessibility \
+- javax/annotation \
+- javax/imageio \
+- javax/lang \
+- javax/management \
+- javax/naming \
+- javax/print \
+- javax/rmi \
+- javax/script \
+- javax/security \
+- javax/sound \
+- javax/sql \
+- javax/swing \
+- javax/tools \
+- javax/xml \
+- org/ietf \
+- org/omg \
+- org/w3c/dom \
+- org/xml/sax \
++ javax \
++ jdk \
++ org \
++ sun \
+ #
+
+ SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
+@@ -643,7 +617,6 @@ $(eval $(call MakeDir, $(IMAGES_OUTPUTDI
+ $(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
+ SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
+ INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
+- EXCLUDES := javax/swing/beaninfo, \
+ SUFFIXES := .java .c .h, \
+ ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
+ EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
diff --git a/debian/patches/jamvm-fix.diff b/debian/patches/jamvm-fix.diff
new file mode 100644
index 0000000..93e26ca
--- /dev/null
+++ b/debian/patches/jamvm-fix.diff
@@ -0,0 +1,108 @@
+--- jamvm/jamvm/src/classlib/openjdk/jvm.c
++++ jamvm/jamvm/src/classlib/openjdk/jvm.c
+@@ -517,6 +517,48 @@ jclass JVM_FindClassFromBootLoader(JNIEnv *env, const char *name) {
+ }
+
+
++/* JVM_FindClassFromCaller
++ * Find a class from a given class loader. Throws ClassNotFoundException.
++ * name: name of class
++ * init: whether initialization is done
++ * loader: class loader to look up the class.
++ * This may not be the same as the caller's class loader.
++ * caller: initiating class. The initiating class may be null when a security
++ * manager is not installed.
++ *
++ * Find a class with this name in this loader,
++ * using the caller's "protection domain".
++ */
++
++jclass JVM_FindClassFromCaller(JNIEnv *env, const char *name,
++ jboolean init, jobject loader,
++ jclass caller) {
++ Class *class;
++
++ TRACE("JVM_FindClassFromCaller(env=%p, name=%s, init=%d, loader=%p,"
++ " caller=%p)", env, name, init, loader, caller);
++
++ /* XXX The caller's protection domain should be used during
++ the findClassFromClassLoader but there is no specification or
++ unit-test in OpenJDK documenting the desired effect */
++
++ class = findClassFromClassLoader((char *)name, loader);
++
++ if(class == NULL) {
++ Object *excep = exceptionOccurred();
++ char *dot_name = slash2DotsDup((char*)name);
++
++ clearException();
++ signalChainedException(java_lang_ClassNotFoundException,
++ dot_name, excep);
++ sysFree(dot_name);
++ } else if(init)
++ initClass(class);
++
++ return class;
++}
++
++
+ /* JVM_FindClassFromClassLoader */
+
+ jclass JVM_FindClassFromClassLoader(JNIEnv *env, const char *name,
+@@ -2965,6 +3007,24 @@ void JVM_GetVersionInfo(JNIEnv *env, jvm_version_info *info, size_t info_size) {
+ }
+
+
++/* JVM_GetTemporaryDirectory
++ * Return the temporary directory that the VM uses for the attach
++ * and perf data files.
++ *
++ * It is important that this directory is well-known and the
++ * same for all VM instances. It cannot be affected by configuration
++ * variables such as java.io.tmpdir.
++ *
++ * JamVM do not support the jvmstat framework thus this is left unimplemented.
++ */
++
++jstring JVM_GetTemporaryDirectory(JNIEnv *env) {
++ UNIMPLEMENTED("JVM_GetTemporaryDirectory");
++
++ return 0;
++}
++
++
+ /* JVM_RegisterSignal */
+
+ extern void signalHandler(int sig);
+--- jamvm/jamvm/src/classlib/openjdk/classlib-defs.h
++++ jamvm/jamvm/src/classlib/openjdk/classlib-defs.h
+@@ -1,5 +1,6 @@
+ /*
+- * Copyright (C) 2011, 2013, 2014 Robert Lougher <rob@jamvm.org.uk>.
++ * Copyright (C) 2011, 2013, 2014, 2015
++ * Robert Lougher <rob@jamvm.org.uk>.
+ *
+ * This file is part of JamVM.
+ *
+@@ -23,7 +23,7 @@
+ #define CLASSLIB_CLASS_SPECIAL JTHREAD
+
+ #if OPENJDK_VERSION == 8
+-#define CLASSLIB_CLASS_PAD_SIZE 10*sizeof(Object*)+1*sizeof(int)
++#define CLASSLIB_CLASS_PAD_SIZE 11*sizeof(Object*)+1*sizeof(int)
+ #elif OPENJDK_VERSION == 7
+ #define CLASSLIB_CLASS_PAD_SIZE 18*sizeof(Object*)+2*sizeof(int)
+ #else
+diff -u -ur a/src/os/linux/mips/callNative.S b/src/os/linux/mips/callNative.S
+--- jamvm/jamvm/src/os/linux/mips/callNative.S
++++ jamvm/jamvm/src/os/linux/mips/callNative.S
+@@ -157,8 +157,7 @@
+
+ ret_double:
+ #ifdef __mips_hard_float
+- swc1 $f0,0($8)
+- swc1 $f1,4($8)
++ sdc1 $f0,0($8)
+ addu $8,8
+ j return
+ #endif
diff --git a/debian/patches/java-access-bridge-security.patch b/debian/patches/java-access-bridge-security.patch
new file mode 100644
index 0000000..2e5d0e1
--- /dev/null
+++ b/debian/patches/java-access-bridge-security.patch
@@ -0,0 +1,15 @@
+# patch only used for builds with java-access-bridge support
+
+--- openjdk/jdk/src/share/lib/security/java.security-linux
++++ openjdk/jdk/src/share/lib/security/java.security-linux
+@@ -149,7 +149,9 @@
+ com.sun.org.apache.xml.internal.security.,\
+ com.sun.org.glassfish.,\
+ org.jcp.xml.dsig.internal.,\
+- oracle.jrockit.jfr.
++ oracle.jrockit.jfr.,\
++ org.GNOME.Accessibility.,\
++ org.GNOME.Bonobo.
+ #
+ # List of comma-separated packages that start with or equal this string
+ # will cause a security exception to be thrown when
diff --git a/debian/patches/javadoc-sort-enum-and-annotation-types.diff b/debian/patches/javadoc-sort-enum-and-annotation-types.diff
new file mode 100644
index 0000000..56e4d12
--- /dev/null
+++ b/debian/patches/javadoc-sort-enum-and-annotation-types.diff
@@ -0,0 +1,21 @@
+Description: Sort the enums and the annotations in the package-tree.html files
+Author: Emmanuel Bourg <ebourg@apache.org>
+Forwarded: no
+--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java
++++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java
+@@ -161,6 +161,15 @@ public class ClassTree {
+ for (Iterator<List<ClassDoc>> it = subclasses.values().iterator(); it.hasNext(); ) {
+ Collections.sort(it.next());
+ }
++
++ Collections.sort(baseEnums);
++ for (Iterator<List<ClassDoc>> it = subEnums.values().iterator(); it.hasNext(); ) {
++ Collections.sort(it.next());
++ }
++ Collections.sort(baseAnnotationTypes);
++ for (Iterator<List<ClassDoc>> it = subAnnotationTypes.values().iterator(); it.hasNext(); ) {
++ Collections.sort(it.next());
++ }
+ }
+
+ /**
diff --git a/debian/patches/jdk-841269-filechooser.patch b/debian/patches/jdk-841269-filechooser.patch
new file mode 100644
index 0000000..32f52c4
--- /dev/null
+++ b/debian/patches/jdk-841269-filechooser.patch
@@ -0,0 +1,26 @@
+--- openjdk/jdk/src/share/classes/sun/awt/shell/ShellFolder.java 2016-10-19 11:41:05.669056845 +0530
++++ openjdk/jdk/src/share/classes/sun/awt/shell/ShellFolder.java 2016-10-19 11:44:37.957056845 +0530
+@@ -30,6 +30,10 @@
+ import java.awt.Toolkit;
+ import java.io.*;
+ import java.io.FileNotFoundException;
++import java.nio.file.Files;
++import java.nio.file.LinkOption;
++import java.nio.file.Path;
++import java.nio.file.Paths;
+ import java.util.*;
+ import java.util.concurrent.Callable;
+
+@@ -240,10 +244,11 @@
+ * @exception FileNotFoundException if file does not exist
+ */
+ public static ShellFolder getShellFolder(File file) throws FileNotFoundException {
++ Path path = Paths.get(file.getPath());
+ if (file instanceof ShellFolder) {
+ return (ShellFolder)file;
+ }
+- if (!file.exists()) {
++ if (!Files.exists(path, LinkOption.NOFOLLOW_LINKS)) {
+ throw new FileNotFoundException();
+ }
+ return shellFolderManager.createShellFolder(file);
diff --git a/debian/patches/jdk-derived-font-size.diff b/debian/patches/jdk-derived-font-size.diff
new file mode 100644
index 0000000..7934979
--- /dev/null
+++ b/debian/patches/jdk-derived-font-size.diff
@@ -0,0 +1,14 @@
+# DP: Debian issue #834053, adjust size for derived fonts.
+# not yet forwarded.
+
+--- src/jdk/src/share/classes/java/awt/Font.java
++++ src/jdk/src/share/classes/java/awt/Font.java
+@@ -1864,7 +1864,7 @@
+ */
+ public Font deriveFont(int style, float size){
+ if (values == null) {
+- return new Font(name, style, size, createdFont, font2DHandle);
++ return new Font(name, style, pointSize, createdFont, font2DHandle);
+ }
+ AttributeValues newValues = getAttributeValues().clone();
+ int oldStyle = (this.style != style) ? this.style : -1;
diff --git a/debian/patches/jdk-freetypeScaler-crash.diff b/debian/patches/jdk-freetypeScaler-crash.diff
new file mode 100644
index 0000000..4d68018
--- /dev/null
+++ b/debian/patches/jdk-freetypeScaler-crash.diff
@@ -0,0 +1,129 @@
+Description:
+
+ Fixing the bad JNI code in the font manager code. Two issues:
+
+ o The JNIEnv is unique to the thread. It cannot be saved by one thread and
+ reused by another. Use GetEnv instead.
+
+ o The 'font2D' jobject needs to be converted into a global reference because
+ its lifetime exceeds the lifetime of a native method call.
+
+Evaluation:
+
+Appropriately register/free everything with the garbage collector.
+
+Fix:
+
+# HG changeset patch
+# User martin
+# Date 1224202830 25200
+# Node ID 3c9d6001d8a90698a3540a2a483717f26a98db78
+# Parent 68730f05449cd4f39ce1cb82adc6c4e57f87554f
+Crash in freetypeScaler.c due to insufficient GC protection
+Summary: NewGlobalRef/DeleteGlobalRef as needed.
+Reviewed-by:
+Contributed-by: yamauchi@google.com
+
+--- a/jdk/make/mapfiles/libfontmanager/mapfile-vers.openjdk
++++ b/jdk/make/mapfiles/libfontmanager/mapfile-vers.openjdk
+@@ -29,6 +29,7 @@
+
+ SUNWprivate_1.1 {
+ global:
++ JNI_OnLoad;
+ getSunFontIDs;
+ newLayoutTableCache;
+ freeLayoutTableCache;
+--- a/jdk/src/share/native/sun/font/freetypeScaler.c
++++ b/jdk/src/share/native/sun/font/freetypeScaler.c
+@@ -48,16 +48,6 @@
+ #define ROUND(x) ((int) (x+0.5))
+
+ typedef struct {
+- /* Important note:
+- JNI forbids sharing same env between different threads.
+- We are safe, because pointer is overwritten every time we get into
+- JNI call (see setupFTContext).
+-
+- Pointer is used by font data reading callbacks
+- such as ReadTTFontFileFunc.
+-
+- NB: We may consider switching to JNI_GetEnv. */
+- JNIEnv* env;
+ FT_Library library;
+ FT_Face face;
+ jobject font2D;
+@@ -90,6 +80,13 @@ int z_verbose;
+ void z_error(char *s) {}
+ #endif
+
++static JavaVM* jvm = NULL;
++
++JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
++ jvm = vm;
++ return JNI_VERSION_1_2;
++}
++
+ /**************** Error handling utilities *****************/
+
+ static jmethodID invalidateScalerMID;
+@@ -120,6 +117,10 @@ static void freeNativeResources(JNIEnv *
+ FT_Done_Face(scalerInfo->face);
+ FT_Done_FreeType(scalerInfo->library);
+
++ if (scalerInfo->font2D != NULL) {
++ (*env)->DeleteGlobalRef(env, scalerInfo->font2D);
++ }
++
+ if (scalerInfo->directBuffer != NULL) {
+ (*env)->DeleteGlobalRef(env, scalerInfo->directBuffer);
+ }
+@@ -152,8 +153,8 @@ static unsigned long ReadTTFontFileFunc(
+ unsigned char* destBuffer,
+ unsigned long numBytes)
+ {
++ JNIEnv* env = (JNIEnv*) JNU_GetEnv(jvm, JNI_VERSION_1_2);
+ FTScalerInfo *scalerInfo = (FTScalerInfo *) stream->pathname.pointer;
+- JNIEnv* env = scalerInfo->env;
+ jobject bBuffer;
+ int bread = 0;
+
+@@ -229,8 +230,7 @@ Java_sun_font_FreetypeFontScaler_initNat
+ if (scalerInfo == NULL)
+ return 0;
+
+- scalerInfo->env = env;
+- scalerInfo->font2D = font2D;
++ scalerInfo->font2D = (*env)->NewGlobalRef(env, font2D);
+ scalerInfo->fontDataOffset = 0;
+ scalerInfo->fontDataLength = 0;
+ scalerInfo->fileSize = filesize;
+@@ -247,6 +247,7 @@ Java_sun_font_FreetypeFontScaler_initNat
+ */
+ error = FT_Init_FreeType(&scalerInfo->library);
+ if (error) {
++ (*env)->DeleteGlobalRef(env, scalerInfo->font2D);
+ free(scalerInfo);
+ return 0;
+ }
+@@ -317,6 +318,7 @@ Java_sun_font_FreetypeFontScaler_initNat
+ }
+ if (scalerInfo->fontData != NULL)
+ free(scalerInfo->fontData);
++ (*env)->DeleteGlobalRef(env, scalerInfo->font2D);
+ free(scalerInfo);
+ return 0;
+ }
+@@ -377,8 +379,10 @@ static int setupFTContext(JNIEnv *env,
+ FTScalerContext *context) {
+ int errCode = 0;
+
+- scalerInfo->env = env;
+- scalerInfo->font2D = font2D;
++ if (scalerInfo->font2D != NULL) {
++ (*env)->DeleteGlobalRef(env, scalerInfo->font2D);
++ }
++ scalerInfo->font2D = (*env)->NewGlobalRef(env, font2D);
+
+ if (context != NULL) {
+ FT_Set_Transform(scalerInfo->face, &context->transform, NULL);
diff --git a/debian/patches/jdk-getAccessibleValue.diff b/debian/patches/jdk-getAccessibleValue.diff
new file mode 100644
index 0000000..f2b95c1
--- /dev/null
+++ b/debian/patches/jdk-getAccessibleValue.diff
@@ -0,0 +1,272 @@
+--- a/jdk/src/share/classes/javax/swing/JList.java
++++ b/jdk/src/share/classes/javax/swing/JList.java
+@@ -3371,7 +3371,12 @@ public class JList<E> extends JComponent
+ }
+
+ public AccessibleAction getAccessibleAction() {
+- return getCurrentAccessibleContext().getAccessibleAction();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleAction();
++ } else {
++ return null;
++ }
+ }
+
+ /**
+@@ -3387,15 +3392,30 @@ public class JList<E> extends JComponent
+ }
+
+ public AccessibleSelection getAccessibleSelection() {
+- return getCurrentAccessibleContext().getAccessibleSelection();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleSelection();
++ } else {
++ return null;
++ }
+ }
+
+ public AccessibleText getAccessibleText() {
+- return getCurrentAccessibleContext().getAccessibleText();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleText();
++ } else {
++ return null;
++ }
+ }
+
+ public AccessibleValue getAccessibleValue() {
+- return getCurrentAccessibleContext().getAccessibleValue();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleValue();
++ } else {
++ return null;
++ }
+ }
+
+
+--- a/jdk/src/share/classes/javax/swing/JTree.java
++++ b/jdk/src/share/classes/javax/swing/JTree.java
+@@ -4962,7 +4962,7 @@ public class JTree extends JComponent im
+ public AccessibleSelection getAccessibleSelection() {
+ AccessibleContext ac = getCurrentAccessibleContext();
+ if (ac != null && isLeaf) {
+- return getCurrentAccessibleContext().getAccessibleSelection();
++ return ac.getAccessibleSelection();
+ } else {
+ return this;
+ }
+@@ -4977,7 +4977,7 @@ public class JTree extends JComponent im
+ public AccessibleText getAccessibleText() {
+ AccessibleContext ac = getCurrentAccessibleContext();
+ if (ac != null) {
+- return getCurrentAccessibleContext().getAccessibleText();
++ return ac.getAccessibleText();
+ } else {
+ return null;
+ }
+@@ -4992,7 +4992,7 @@ public class JTree extends JComponent im
+ public AccessibleValue getAccessibleValue() {
+ AccessibleContext ac = getCurrentAccessibleContext();
+ if (ac != null) {
+- return getCurrentAccessibleContext().getAccessibleValue();
++ return ac.getAccessibleValue();
+ } else {
+ return null;
+ }
+--- a/jdk/src/share/classes/javax/swing/table/JTableHeader.java
++++ b/jdk/src/share/classes/javax/swing/table/JTableHeader.java
+@@ -1083,7 +1083,12 @@ public class JTableHeader extends JCompo
+ }
+
+ public AccessibleAction getAccessibleAction() {
+- return getCurrentAccessibleContext().getAccessibleAction();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleAction();
++ } else {
++ return null;
++ }
+ }
+
+ /**
+@@ -1099,15 +1104,30 @@ public class JTableHeader extends JCompo
+ }
+
+ public AccessibleSelection getAccessibleSelection() {
+- return getCurrentAccessibleContext().getAccessibleSelection();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleSelection();
++ } else {
++ return null;
++ }
+ }
+
+ public AccessibleText getAccessibleText() {
+- return getCurrentAccessibleContext().getAccessibleText();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleText();
++ } else {
++ return null;
++ }
+ }
+
+ public AccessibleValue getAccessibleValue() {
+- return getCurrentAccessibleContext().getAccessibleValue();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleValue();
++ } else {
++ return null;
++ }
+ }
+
+
+--- a/jdk/src/share/classes/javax/swing/JTable.java
++++ b/jdk/src/share/classes/javax/swing/JTable.java
+@@ -8218,7 +8218,12 @@ public class JTable extends JComponent i
+ * @return the <code>AccessibleAction</code>, or <code>null</code>
+ */
+ public AccessibleAction getAccessibleAction() {
+- return getCurrentAccessibleContext().getAccessibleAction();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleAction();
++ } else {
++ return null;
++ }
+ }
+
+ /**
+@@ -8240,7 +8245,12 @@ public class JTable extends JComponent i
+ * <code>null</code>
+ */
+ public AccessibleSelection getAccessibleSelection() {
+- return getCurrentAccessibleContext().getAccessibleSelection();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleSelection();
++ } else {
++ return null;
++ }
+ }
+
+ /**
+@@ -8250,7 +8260,12 @@ public class JTable extends JComponent i
+ * @return the <code>AccessibleText</code>, or <code>null</code>
+ */
+ public AccessibleText getAccessibleText() {
+- return getCurrentAccessibleContext().getAccessibleText();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleText();
++ } else {
++ return null;
++ }
+ }
+
+ /**
+@@ -8260,7 +8275,12 @@ public class JTable extends JComponent i
+ * @return the <code>AccessibleValue</code>, or <code>null</code>
+ */
+ public AccessibleValue getAccessibleValue() {
+- return getCurrentAccessibleContext().getAccessibleValue();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleValue();
++ } else {
++ return null;
++ }
+ }
+
+
+@@ -9019,7 +9039,12 @@ public class JTable extends JComponent i
+ * @return the <code>AccessibleAction</code>, or <code>null</code>
+ */
+ public AccessibleAction getAccessibleAction() {
+- return getCurrentAccessibleContext().getAccessibleAction();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleAction();
++ } else {
++ return null;
++ }
+ }
+
+ /**
+@@ -9041,7 +9066,12 @@ public class JTable extends JComponent i
+ * <code>null</code>
+ */
+ public AccessibleSelection getAccessibleSelection() {
+- return getCurrentAccessibleContext().getAccessibleSelection();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleSelection();
++ } else {
++ return null;
++ }
+ }
+
+ /**
+@@ -9051,7 +9081,12 @@ public class JTable extends JComponent i
+ * @return the <code>AccessibleText</code>, or <code>null</code>
+ */
+ public AccessibleText getAccessibleText() {
+- return getCurrentAccessibleContext().getAccessibleText();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleText();
++ } else {
++ return null;
++ }
+ }
+
+ /**
+@@ -9061,7 +9096,12 @@ public class JTable extends JComponent i
+ * @return the <code>AccessibleValue</code>, or <code>null</code>
+ */
+ public AccessibleValue getAccessibleValue() {
+- return getCurrentAccessibleContext().getAccessibleValue();
++ AccessibleContext ac = getCurrentAccessibleContext();
++ if (ac != null) {
++ return ac.getAccessibleValue();
++ } else {
++ return null;
++ }
+ }
+
+
+--- a/jdk/src/windows/classes/com/sun/java/accessibility/AccessBridge.java
++++ b/jdk/src/windows/classes/com/sun/java/accessibility/AccessBridge.java
+@@ -6509,7 +6509,7 @@ final public class AccessBridge extends
+ public AccessibleSelection getAccessibleSelection() {
+ AccessibleContext ac = getCurrentAccessibleContext();
+ if (ac != null && isLeaf) {
+- return getCurrentAccessibleContext().getAccessibleSelection();
++ return ac.getAccessibleSelection();
+ } else {
+ return this;
+ }
+@@ -6524,7 +6524,7 @@ final public class AccessBridge extends
+ public AccessibleText getAccessibleText() {
+ AccessibleContext ac = getCurrentAccessibleContext();
+ if (ac != null) {
+- return getCurrentAccessibleContext().getAccessibleText();
++ return ac.getAccessibleText();
+ } else {
+ return null;
+ }
+@@ -6539,7 +6539,7 @@ final public class AccessBridge extends
+ public AccessibleValue getAccessibleValue() {
+ AccessibleContext ac = getCurrentAccessibleContext();
+ if (ac != null) {
+- return getCurrentAccessibleContext().getAccessibleValue();
++ return ac.getAccessibleValue();
+ } else {
+ return null;
+ }
diff --git a/debian/patches/jdk-ppc64el-S8165231.diff b/debian/patches/jdk-ppc64el-S8165231.diff
new file mode 100644
index 0000000..0e4ce3f
--- /dev/null
+++ b/debian/patches/jdk-ppc64el-S8165231.diff
@@ -0,0 +1,48 @@
+# HG changeset patch
+# User horii
+# Date 1473905514 14400
+# Node ID 8d16f74380a78eb76cb33183a64440316393903e
+# Parent be698ac288484ab140715ee29ed9335e6ea8a33b
+8165231: java.nio.Bits.unaligned() doesn't return true on ppc
+Reviewed-by: simonis, coffeys
+
+diff -r be698ac28848 -r 8d16f74380a7 src/share/classes/java/nio/Bits.java
+--- openjdk/jdk/src/share/classes/java/nio/Bits.java Fri Sep 23 18:19:23 2016 +0000
++++ openjdk/jdk/src/share/classes/java/nio/Bits.java Wed Sep 14 22:11:54 2016 -0400
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -614,7 +614,8 @@
+ String arch = AccessController.doPrivileged(
+ new sun.security.action.GetPropertyAction("os.arch"));
+ unaligned = arch.equals("i386") || arch.equals("x86")
+- || arch.equals("amd64") || arch.equals("x86_64");
++ || arch.equals("amd64") || arch.equals("x86_64")
++ || arch.equals("ppc64") || arch.equals("ppc64le");
+ unalignedKnown = true;
+ return unaligned;
+ }
+diff -r be698ac28848 -r 8d16f74380a7 src/share/classes/sun/security/provider/ByteArrayAccess.java
+--- openjdk/jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java Fri Sep 23 18:19:23 2016 +0000
++++ openjdk/jdk/src/share/classes/sun/security/provider/ByteArrayAccess.java Wed Sep 14 22:11:54 2016 -0400
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+@@ -94,7 +94,7 @@
+ String arch = java.security.AccessController.doPrivileged
+ (new sun.security.action.GetPropertyAction("os.arch", ""));
+ return arch.equals("i386") || arch.equals("x86") || arch.equals("amd64")
+- || arch.equals("x86_64");
++ || arch.equals("x86_64") || arch.equals("ppc64") || arch.equals("ppc64le");
+ }
+
+ /**
+
diff --git a/debian/patches/jdk-ppc64el-S8170153.patch b/debian/patches/jdk-ppc64el-S8170153.patch
new file mode 100644
index 0000000..d2e05a9
--- /dev/null
+++ b/debian/patches/jdk-ppc64el-S8170153.patch
@@ -0,0 +1,44 @@
+
+# HG changeset patch
+# User gromero
+# Date 1481806695 18000
+# Node ID 80927e772b9ac63361e05cd4edb9ce6e71ec9c45
+# Parent 71215ac21d105d3b73f4c7ebae62252f9af8bc6d
+8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
+Reviewed-by: mdoerr, erikj, simonis, aph
+
+diff -r 71215ac21d10 -r 80927e772b9a make/lib/CoreLibraries.gmk
+--- openjdk/jdk/make/lib/CoreLibraries.gmk Thu Dec 15 09:03:36 2016 +0100
++++ openjdk/jdk/make/lib/CoreLibraries.gmk Thu Dec 15 07:58:15 2016 -0500
+@@ -27,10 +27,18 @@
+
+ ##########################################################################################
+
+-BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
++BUILD_LIBFDLIBM_OPTIMIZATION := NONE
+
+-ifneq ($(OPENJDK_TARGET_OS), solaris)
+- BUILD_LIBFDLIBM_OPTIMIZATION := NONE
++ifeq ($(OPENJDK_TARGET_OS), solaris)
++ BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
++endif
++
++ifeq ($(OPENJDK_TARGET_OS), linux)
++ ifeq ($(OPENJDK_TARGET_CPU), ppc64)
++ BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
++ else ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
++ BUILD_LIBFDLIBM_OPTIMIZATION := HIGH
++ endif
+ endif
+
+ ifneq ($(OPENJDK_TARGET_OS), macosx)
+@@ -44,6 +52,8 @@
+ -I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
+ CFLAGS_windows_debug := -DLOGGING, \
+ CFLAGS_aix := -qfloat=nomaf, \
++ CFLAGS_linux_ppc64 := -ffp-contract=off, \
++ CFLAGS_linux_ppc64le := -ffp-contract=off, \
+ ARFLAGS := $(ARFLAGS), \
+ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
+ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
diff --git a/debian/patches/jdk-pulseaudio.diff b/debian/patches/jdk-pulseaudio.diff
new file mode 100644
index 0000000..06263ab
--- /dev/null
+++ b/debian/patches/jdk-pulseaudio.diff
@@ -0,0 +1,16 @@
+--- a/jdk/src/share/lib/sound.properties
++++ b/jdk/src/share/lib/sound.properties
+@@ -37,3 +37,13 @@
+ # Specify the default Receiver by provider and name:
+ # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1
+ #
++
++javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
++javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
++javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
++javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
++
++#javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider
++#javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider
++#javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider
++#javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider
diff --git a/debian/patches/jdk-target-arch-define.diff b/debian/patches/jdk-target-arch-define.diff
new file mode 100644
index 0000000..22a2b1f
--- /dev/null
+++ b/debian/patches/jdk-target-arch-define.diff
@@ -0,0 +1,19 @@
+# DP: Define _alpha_ / _sh_ preprocessor macros instead of alpha / sh.
+
+--- a/common/autoconf/toolchain.m4
++++ b/common/autoconf/toolchain.m4
+@@ -1163,7 +1163,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
+ fi
+
+- COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"'"
++ case "$OPENJDK_TARGET_CPU_LEGACY" in
++ alpha*|sh*)
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_${OPENJDK_TARGET_CPU_LEGACY}_";;
++ *)
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_CPU_LEGACY"
++ esac
+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
+
+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
diff --git a/debian/patches/jexec.diff.in b/debian/patches/jexec.diff.in
new file mode 100644
index 0000000..5f343a1
--- /dev/null
+++ b/debian/patches/jexec.diff.in
@@ -0,0 +1,14 @@
+--- a/jdk/src/solaris/bin/jexec.c
++++ b/jdk/src/solaris/bin/jexec.c
+@@ -168,9 +168,10 @@
+
+ /* Get the path to the java binary, which is in a known position relative
+ * to our current position, which is in argv[0]. */
+- if (getJavaPath(argv[argi++], java, RELATIVE_DEPTH) != 0) {
++ if (getJavaPath("/@basedir@/jre/lib/jexec", java, RELATIVE_DEPTH) != 0) {
+ errorExit(errno, MISSING_JAVA_MSG);
+ }
++ argi++;
+ alen = (argc + 2) * (sizeof (const char *));
+ if (alen <= 0 || alen > INT_MAX / sizeof(char *)) {
+ errorExit(errno, BAD_ARG_MSG);
diff --git a/debian/patches/kfreebsd-support-hotspot.diff b/debian/patches/kfreebsd-support-hotspot.diff
new file mode 100644
index 0000000..e4ffdcc
--- /dev/null
+++ b/debian/patches/kfreebsd-support-hotspot.diff
@@ -0,0 +1,827 @@
+Index: b/hotspot/src/os/linux/vm/decoder_linux.cpp
+===================================================================
+--- a/hotspot/src/os/linux/vm/decoder_linux.cpp
++++ b/hotspot/src/os/linux/vm/decoder_linux.cpp
+@@ -22,6 +22,7 @@
+ *
+ */
+
++#include "utilities/globalDefinitions.hpp"
+ #include "prims/jvm.h"
+ #include "utilities/decoder_elf.hpp"
+
+Index: b/hotspot/src/os/linux/vm/attachListener_linux.cpp
+===================================================================
+--- a/hotspot/src/os/linux/vm/attachListener_linux.cpp
++++ b/hotspot/src/os/linux/vm/attachListener_linux.cpp
+@@ -39,6 +39,10 @@
+ #define UNIX_PATH_MAX sizeof(((struct sockaddr_un *)0)->sun_path)
+ #endif
+
++#if defined(__FreeBSD_kernel__)
++#include <sys/ucred.h>
++#endif
++
+ // The attach mechanism on Linux uses a UNIX domain socket. An attach listener
+ // thread is created at startup or is created on-demand via a signal from
+ // the client tool. The attach listener creates a socket and binds it to a file
+@@ -337,16 +341,26 @@ LinuxAttachOperation* LinuxAttachListene
+
+ // get the credentials of the peer and check the effective uid/guid
+ // - check with jeff on this.
++#if defined(LOCAL_PEERCRED) /* GNU/kFreeBSD */
++ struct xucred cred_info;
++ socklen_t optlen = sizeof(cred_info);
++ if (::getsockopt(s, SOL_SOCKET, LOCAL_PEERCRED, (void*)&cred_info, &optlen) == -1) {
++#else
+ struct ucred cred_info;
+ socklen_t optlen = sizeof(cred_info);
+ if (::getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void*)&cred_info, &optlen) == -1) {
++#endif
+ ::close(s);
+ continue;
+ }
+ uid_t euid = geteuid();
+ gid_t egid = getegid();
+
++#if defined(LOCAL_PEERCRED) /* GNU/kFreeBSD */
++ if (cred_info.cr_uid != euid || cred_info.cr_gid != egid) {
++#else
+ if (cred_info.uid != euid || cred_info.gid != egid) {
++#endif
+ ::close(s);
+ continue;
+ }
+Index: b/hotspot/src/os/linux/vm/jvm_linux.cpp
+===================================================================
+--- a/hotspot/src/os/linux/vm/jvm_linux.cpp
++++ b/hotspot/src/os/linux/vm/jvm_linux.cpp
+@@ -169,7 +169,9 @@ struct siglabel siglabels[] = {
+ "WINCH", SIGWINCH, /* Window size change (4.3 BSD, Sun). */
+ "POLL", SIGPOLL, /* Pollable event occurred (System V). */
+ "IO", SIGIO, /* I/O now possible (4.2 BSD). */
++#ifdef SIGPWR
+ "PWR", SIGPWR, /* Power failure restart (System V). */
++#endif
+ #ifdef SIGSYS
+ "SYS", SIGSYS /* Bad system call. Only on some Linuxen! */
+ #endif
+Index: b/hotspot/src/os/linux/vm/os_linux.cpp
+===================================================================
+--- a/hotspot/src/os/linux/vm/os_linux.cpp
++++ b/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -22,6 +22,7 @@
+ *
+ */
+
++#include "utilities/globalDefinitions.hpp"
+ // no precompiled headers
+ #include "classfile/classLoader.hpp"
+ #include "classfile/systemDictionary.hpp"
+@@ -92,8 +93,16 @@
+ # include <semaphore.h>
+ # include <fcntl.h>
+ # include <string.h>
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++# include <sys/param.h>
++# include <sys/sysctl.h>
++#ifndef ETIME
++# define ETIME ETIMEDOUT
++#endif
++#else
+ # include <syscall.h>
+ # include <sys/sysinfo.h>
++#endif
+ # include <gnu/libc-version.h>
+ # include <sys/ipc.h>
+ # include <sys/shm.h>
+@@ -169,11 +178,22 @@ julong os::available_memory() {
+ }
+
+ julong os::Linux::available_memory() {
++#ifndef __FreeBSD_kernel__
+ // values in struct sysinfo are "unsigned long"
+ struct sysinfo si;
+ sysinfo(&si);
+
+ return (julong)si.freeram * si.mem_unit;
++#else
++ int mib[2] = {CTL_HW, HW_USERMEM}, mem;
++ size_t len;
++ len = sizeof(mem);
++ if (sysctl(mib, 2, &mem, &len, NULL, 0) == 0) {
++ return (julong) mem;
++ } else {
++ return 0;
++ }
++#endif
+ }
+
+ julong os::physical_memory() {
+@@ -2174,18 +2194,22 @@ void os::print_memory_info(outputStream*
+ st->print("Memory:");
+ st->print(" %dk page", os::vm_page_size()>>10);
+
++#ifndef __FreeBSD_kernel__
+ // values in struct sysinfo are "unsigned long"
+ struct sysinfo si;
+ sysinfo(&si);
++#endif
+
+ st->print(", physical " UINT64_FORMAT "k",
+ os::physical_memory() >> 10);
+ st->print("(" UINT64_FORMAT "k free)",
+ os::available_memory() >> 10);
++#ifndef __FreeBSD_kernel__
+ st->print(", swap " UINT64_FORMAT "k",
+ ((jlong)si.totalswap * si.mem_unit) >> 10);
+ st->print("(" UINT64_FORMAT "k free)",
+ ((jlong)si.freeswap * si.mem_unit) >> 10);
++#endif
+ st->cr();
+ }
+
+Index: b/hotspot/src/os/linux/vm/osThread_linux.cpp
+===================================================================
+--- a/hotspot/src/os/linux/vm/osThread_linux.cpp
++++ b/hotspot/src/os/linux/vm/osThread_linux.cpp
+@@ -22,6 +22,7 @@
+ *
+ */
+
++#include "utilities/globalDefinitions.hpp"
+ // no precompiled headers
+ #include "runtime/mutex.hpp"
+ #include "runtime/osThread.hpp"
+Index: b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+===================================================================
+--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
++++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+@@ -22,6 +22,7 @@
+ *
+ */
+
++#include "utilities/globalDefinitions.hpp"
+ // no precompiled headers
+ #include "asm/macroAssembler.hpp"
+ #include "classfile/classLoader.hpp"
+@@ -74,6 +75,7 @@
+ # include <ucontext.h>
+ # include <fpu_control.h>
+
++#ifdef __linux__
+ #ifdef AMD64
+ #define REG_SP REG_RSP
+ #define REG_PC REG_RIP
+@@ -87,6 +89,54 @@
+ #define SPELL_REG_SP "esp"
+ #define SPELL_REG_FP "ebp"
+ #endif // AMD64
++#endif
++
++#if defined(__FreeBSD_kernel__)
++#define context_trapno uc_mcontext.mc_trapno
++#ifdef AMD64
++#define SPELL_REG_SP "rsp"
++#define SPELL_REG_FP "rbp"
++#define context_sp uc_mcontext.mc_rsp
++#define context_pc uc_mcontext.mc_rip
++#define context_fp uc_mcontext.mc_rbp
++#define context_rip uc_mcontext.mc_rip
++#define context_rsp uc_mcontext.mc_rsp
++#define context_rbp uc_mcontext.mc_rbp
++#define context_flags uc_mcontext.mc_flags
++#define context_err uc_mcontext.mc_err
++#define context_rax uc_mcontext.mc_rax
++#define context_rbx uc_mcontext.mc_rbx
++#define context_rcx uc_mcontext.mc_rcx
++#define context_rdx uc_mcontext.mc_rdx
++#define context_rsi uc_mcontext.mc_rsi
++#define context_rdi uc_mcontext.mc_rdi
++#define context_r8 uc_mcontext.mc_r8
++#define context_r9 uc_mcontext.mc_r9
++#define context_r10 uc_mcontext.mc_r10
++#define context_r11 uc_mcontext.mc_r11
++#define context_r12 uc_mcontext.mc_r12
++#define context_r13 uc_mcontext.mc_r13
++#define context_r14 uc_mcontext.mc_r14
++#define context_r15 uc_mcontext.mc_r15
++#else
++#define SPELL_REG_SP "esp"
++#define SPELL_REG_FP "ebp"
++#define context_sp uc_mcontext.mc_esp
++#define context_pc uc_mcontext.mc_eip
++#define context_fp uc_mcontext.mc_ebp
++#define context_eip uc_mcontext.mc_eip
++#define context_esp uc_mcontext.mc_esp
++#define context_eax uc_mcontext.mc_eax
++#define context_ebx uc_mcontext.mc_ebx
++#define context_ecx uc_mcontext.mc_ecx
++#define context_edx uc_mcontext.mc_edx
++#define context_ebp uc_mcontext.mc_ebp
++#define context_esi uc_mcontext.mc_esi
++#define context_edi uc_mcontext.mc_edi
++#define context_eflags uc_mcontext.mc_eflags
++#define context_trapno uc_mcontext.mc_trapno
++#endif // AMD64
++#endif
+
+ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
+
+@@ -118,15 +168,27 @@ void os::initialize_thread(Thread* thr)
+ }
+
+ address os::Linux::ucontext_get_pc(ucontext_t * uc) {
++#if defined(__FreeBSD_kernel__)
++ return (address)uc->context_pc;
++#else
+ return (address)uc->uc_mcontext.gregs[REG_PC];
++#endif
+ }
+
+ intptr_t* os::Linux::ucontext_get_sp(ucontext_t * uc) {
++#if defined(__FreeBSD_kernel__)
++ return (intptr_t*)uc->context_sp;
++#else
+ return (intptr_t*)uc->uc_mcontext.gregs[REG_SP];
++#endif
+ }
+
+ intptr_t* os::Linux::ucontext_get_fp(ucontext_t * uc) {
++#if defined(__FreeBSD_kernel__)
++ return (intptr_t*)uc->context_fp;
++#else
+ return (intptr_t*)uc->uc_mcontext.gregs[REG_FP];
++#endif
+ }
+
+ // For Forte Analyzer AsyncGetCallTrace profiling support - thread
+@@ -278,7 +340,11 @@ JVM_handle_linux_signal(int sig,
+ pc = (address) os::Linux::ucontext_get_pc(uc);
+
+ if (StubRoutines::is_safefetch_fault(pc)) {
++#if defined(__FreeBSD_kernel__)
++ uc->context_pc = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc));
++#else
+ uc->uc_mcontext.gregs[REG_PC] = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc));
++#endif
+ return 1;
+ }
+
+@@ -443,7 +509,11 @@ JVM_handle_linux_signal(int sig,
+ // Furthermore, a false-positive should be harmless.
+ if (UnguardOnExecutionViolation > 0 &&
+ (sig == SIGSEGV || sig == SIGBUS) &&
++#if defined(__FreeBSD_kernel__)
++ uc->context_trapno == trap_page_fault) {
++#else
+ uc->uc_mcontext.gregs[REG_TRAPNO] == trap_page_fault) {
++#endif
+ int page_size = os::vm_page_size();
+ address addr = (address) info->si_addr;
+ address pc = os::Linux::ucontext_get_pc(uc);
+@@ -513,7 +583,11 @@ JVM_handle_linux_signal(int sig,
+ // save all thread context in case we need to restore it
+ if (thread != NULL) thread->set_saved_exception_pc(pc);
+
++#if defined(__FreeBSD_kernel__)
++ uc->context_pc = (intptr_t)stub;
++#else
+ uc->uc_mcontext.gregs[REG_PC] = (greg_t)stub;
++#endif
+ return true;
+ }
+
+@@ -765,6 +839,7 @@ void os::print_context(outputStream *st,
+
+ ucontext_t *uc = (ucontext_t*)context;
+ st->print_cr("Registers:");
++#ifdef __linux__
+ #ifdef AMD64
+ st->print( "RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]);
+ st->print(", RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]);
+@@ -807,6 +882,48 @@ void os::print_context(outputStream *st,
+ st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
+ st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2);
+ #endif // AMD64
++#elif defined(__FreeBSD_kernel__)
++#ifdef AMD64
++ st->print( "RAX=" INTPTR_FORMAT, uc->context_rax);
++ st->print(", RBX=" INTPTR_FORMAT, uc->context_rbx);
++ st->print(", RCX=" INTPTR_FORMAT, uc->context_rcx);
++ st->print(", RDX=" INTPTR_FORMAT, uc->context_rdx);
++ st->cr();
++ st->print( "RSP=" INTPTR_FORMAT, uc->context_rsp);
++ st->print(", RBP=" INTPTR_FORMAT, uc->context_rbp);
++ st->print(", RSI=" INTPTR_FORMAT, uc->context_rsi);
++ st->print(", RDI=" INTPTR_FORMAT, uc->context_rdi);
++ st->cr();
++ st->print( "R8 =" INTPTR_FORMAT, uc->context_r8);
++ st->print(", R9 =" INTPTR_FORMAT, uc->context_r9);
++ st->print(", R10=" INTPTR_FORMAT, uc->context_r10);
++ st->print(", R11=" INTPTR_FORMAT, uc->context_r11);
++ st->cr();
++ st->print( "R12=" INTPTR_FORMAT, uc->context_r12);
++ st->print(", R13=" INTPTR_FORMAT, uc->context_r13);
++ st->print(", R14=" INTPTR_FORMAT, uc->context_r14);
++ st->print(", R15=" INTPTR_FORMAT, uc->context_r15);
++ st->cr();
++ st->print( "RIP=" INTPTR_FORMAT, uc->context_rip);
++ st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_flags);
++ st->print(", ERR=" INTPTR_FORMAT, uc->context_err);
++ st->cr();
++ st->print(" TRAPNO=" INTPTR_FORMAT, uc->context_trapno);
++#else
++ st->print( "EAX=" INTPTR_FORMAT, uc->context_eax);
++ st->print(", EBX=" INTPTR_FORMAT, uc->context_ebx);
++ st->print(", ECX=" INTPTR_FORMAT, uc->context_ecx);
++ st->print(", EDX=" INTPTR_FORMAT, uc->context_edx);
++ st->cr();
++ st->print( "ESP=" INTPTR_FORMAT, uc->context_esp);
++ st->print(", EBP=" INTPTR_FORMAT, uc->context_ebp);
++ st->print(", ESI=" INTPTR_FORMAT, uc->context_esi);
++ st->print(", EDI=" INTPTR_FORMAT, uc->context_edi);
++ st->cr();
++ st->print( "EIP=" INTPTR_FORMAT, uc->context_eip);
++ st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_eflags);
++#endif // AMD64
++#endif
+ st->cr();
+ st->cr();
+
+@@ -837,6 +954,7 @@ void os::print_register_info(outputStrea
+
+ // this is only for the "general purpose" registers
+
++#ifdef __linux__
+ #ifdef AMD64
+ st->print("RAX="); print_location(st, uc->uc_mcontext.gregs[REG_RAX]);
+ st->print("RBX="); print_location(st, uc->uc_mcontext.gregs[REG_RBX]);
+@@ -864,6 +982,35 @@ void os::print_register_info(outputStrea
+ st->print("ESI="); print_location(st, uc->uc_mcontext.gregs[REG_ESI]);
+ st->print("EDI="); print_location(st, uc->uc_mcontext.gregs[REG_EDI]);
+ #endif // AMD64
++#elif defined(__FreeBSD_kernel__)
++#ifdef AMD64
++ st->print("RAX="); print_location(st, uc->context_rax);
++ st->print("RBX="); print_location(st, uc->context_rbx);
++ st->print("RCX="); print_location(st, uc->context_rcx);
++ st->print("RDX="); print_location(st, uc->context_rdx);
++ st->print("RSP="); print_location(st, uc->context_rsp);
++ st->print("RBP="); print_location(st, uc->context_rbp);
++ st->print("RSI="); print_location(st, uc->context_rsi);
++ st->print("RDI="); print_location(st, uc->context_rdi);
++ st->print("R8 ="); print_location(st, uc->context_r8);
++ st->print("R9 ="); print_location(st, uc->context_r9);
++ st->print("R10="); print_location(st, uc->context_r10);
++ st->print("R11="); print_location(st, uc->context_r11);
++ st->print("R12="); print_location(st, uc->context_r12);
++ st->print("R13="); print_location(st, uc->context_r13);
++ st->print("R14="); print_location(st, uc->context_r14);
++ st->print("R15="); print_location(st, uc->context_r15);
++#else
++ st->print("EAX="); print_location(st, uc->context_eax);
++ st->print("EBX="); print_location(st, uc->context_ebx);
++ st->print("ECX="); print_location(st, uc->context_ecx);
++ st->print("EDX="); print_location(st, uc->context_edx);
++ st->print("ESP="); print_location(st, uc->context_esp);
++ st->print("EBP="); print_location(st, uc->context_ebp);
++ st->print("ESI="); print_location(st, uc->context_esi);
++ st->print("EDI="); print_location(st, uc->context_edi);
++#endif // AMD64
++#endif
+
+ st->cr();
+ }
+Index: b/hotspot/src/share/vm/memory/allocation.hpp
+===================================================================
+--- a/hotspot/src/share/vm/memory/allocation.hpp
++++ b/hotspot/src/share/vm/memory/allocation.hpp
+@@ -25,8 +25,8 @@
+ #ifndef SHARE_VM_MEMORY_ALLOCATION_HPP
+ #define SHARE_VM_MEMORY_ALLOCATION_HPP
+
+-#include "runtime/globals.hpp"
+ #include "utilities/globalDefinitions.hpp"
++#include "runtime/globals.hpp"
+ #include "utilities/macros.hpp"
+ #ifdef COMPILER1
+ #include "c1/c1_globals.hpp"
+Index: b/hotspot/src/share/vm/ci/ciObject.hpp
+===================================================================
+--- a/hotspot/src/share/vm/ci/ciObject.hpp
++++ b/hotspot/src/share/vm/ci/ciObject.hpp
+@@ -25,6 +25,7 @@
+ #ifndef SHARE_VM_CI_CIOBJECT_HPP
+ #define SHARE_VM_CI_CIOBJECT_HPP
+
++#include "utilities/globalDefinitions.hpp"
+ #include "ci/ciBaseObject.hpp"
+ #include "ci/ciClassList.hpp"
+ #include "memory/allocation.hpp"
+Index: b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
+===================================================================
+--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
++++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
+@@ -22,6 +22,7 @@
+ *
+ */
+
++#include "utilities/globalDefinitions.hpp"
+ // no precompiled headers
+ #include "classfile/vmSymbols.hpp"
+ #include "gc_interface/collectedHeap.hpp"
+Index: b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
+===================================================================
+--- a/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
++++ b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
+@@ -68,7 +68,7 @@
+ # include <sys/procfs.h>
+ # endif
+
+-#if defined(LINUX) || defined(_ALLBSD_SOURCE)
++#if defined(LINUX) || defined(_ALLBSD_SOURCE) || defined(__FreeBSD_kernel__)
+ #ifndef __STDC_LIMIT_MACROS
+ #define __STDC_LIMIT_MACROS
+ #endif // __STDC_LIMIT_MACROS
+Index: b/hotspot/make/defs.make
+===================================================================
+--- a/hotspot/make/defs.make
++++ b/hotspot/make/defs.make
+@@ -179,9 +179,6 @@ endif
+ # Windows should have OS predefined
+ ifeq ($(OS),)
+ OS := $(shell uname -s)
+- ifneq ($(findstring BSD,$(OS)),)
+- OS=bsd
+- endif
+ ifeq ($(OS), Darwin)
+ OS=bsd
+ endif
+@@ -207,6 +204,10 @@ else
+ OSNAME=linux
+ endif
+
++ifeq ($(OS), GNU/kFreeBSD)
++ OSNAME=linux
++endif
++
+ # Determinations of default make arguments and platform specific settings
+ MAKE_ARGS=
+
+Index: b/hotspot/make/linux/Makefile
+===================================================================
+--- a/hotspot/make/linux/Makefile
++++ b/hotspot/make/linux/Makefile
+@@ -236,6 +236,9 @@ checks: check_os_version check_j2se_vers
+ SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3% 4%
+ OS_VERSION := $(shell uname -r)
+ EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
++ifeq ($(shell uname -s), GNU/kFreeBSD)
++EMPTY_IF_NOT_SUPPORTED = supported
++endif
+
+ check_os_version:
+ ifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
+Index: b/hotspot/make/linux/makefiles/defs.make
+===================================================================
+--- a/hotspot/make/linux/makefiles/defs.make
++++ b/hotspot/make/linux/makefiles/defs.make
+@@ -84,7 +84,7 @@ ifneq (,$(findstring $(ARCH), sparc))
+ endif
+
+ # i686/i586 and amd64/x86_64
+-ifneq (,$(findstring $(ARCH), amd64 x86_64 i686 i586))
++ifneq (,$(findstring $(ARCH), amd64 x86_64 i686 i586 i486 i386))
+ ifeq ($(ARCH_DATA_MODEL), 64)
+ ARCH_DATA_MODEL = 64
+ MAKE_ARGS += LP64=1
+@@ -92,7 +92,7 @@ ifneq (,$(findstring $(ARCH), amd64 x86_
+ VM_PLATFORM = linux_amd64
+ else
+ ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
++ PLATFORM = linux_i486
+ VM_PLATFORM = linux_i486
+ endif
+ HS_ARCH = x86
+Index: b/hotspot/agent/src/os/linux/ps_core.c
+===================================================================
+--- a/hotspot/agent/src/os/linux/ps_core.c
++++ b/hotspot/agent/src/os/linux/ps_core.c
+@@ -551,11 +551,16 @@ static bool core_handle_prstatus(struct
+ return false;
+
+ // copy regs
++#if defined(__FreeBSD_kernel__)
++ memcpy(&newthr->regs, &prstat->pr_reg, sizeof(struct user_regs_struct));
++#else
+ memcpy(&newthr->regs, prstat->pr_reg, sizeof(struct user_regs_struct));
++#endif
+
+ if (is_debug()) {
+ print_debug("integer regset\n");
+ #ifdef i386
++#ifdef __linux__
+ // print the regset
+ print_debug("\teax = 0x%x\n", newthr->regs.eax);
+ print_debug("\tebx = 0x%x\n", newthr->regs.ebx);
+@@ -566,9 +571,21 @@ static bool core_handle_prstatus(struct
+ print_debug("\tesi = 0x%x\n", newthr->regs.esi);
+ print_debug("\tedi = 0x%x\n", newthr->regs.edi);
+ print_debug("\teip = 0x%x\n", newthr->regs.eip);
++#elif defined(__FreeBSD_kernel__)
++ print_debug("\teax = 0x%x\n", newthr->regs.r_eax);
++ print_debug("\tebx = 0x%x\n", newthr->regs.r_ebx);
++ print_debug("\tecx = 0x%x\n", newthr->regs.r_ecx);
++ print_debug("\tedx = 0x%x\n", newthr->regs.r_edx);
++ print_debug("\tesp = 0x%x\n", newthr->regs.r_esp);
++ print_debug("\tebp = 0x%x\n", newthr->regs.r_ebp);
++ print_debug("\tesi = 0x%x\n", newthr->regs.r_esi);
++ print_debug("\tedi = 0x%x\n", newthr->regs.r_edi);
++ print_debug("\teip = 0x%x\n", newthr->regs.r_eip);
++#endif
+ #endif
+
+ #if defined(amd64) || defined(x86_64)
++#ifdef __linux__
+ // print the regset
+ print_debug("\tr15 = 0x%lx\n", newthr->regs.r15);
+ print_debug("\tr14 = 0x%lx\n", newthr->regs.r14);
+@@ -597,6 +614,27 @@ static bool core_handle_prstatus(struct
+ print_debug("\tes = 0x%lx\n", newthr->regs.es);
+ print_debug("\tfs = 0x%lx\n", newthr->regs.fs);
+ print_debug("\tgs = 0x%lx\n", newthr->regs.gs);
++#elif defined(__FreeBSD_kernel__)
++ print_debug("\tr15 = 0x%lx\n", newthr->regs.r_r15);
++ print_debug("\tr14 = 0x%lx\n", newthr->regs.r_r14);
++ print_debug("\tr13 = 0x%lx\n", newthr->regs.r_r13);
++ print_debug("\tr12 = 0x%lx\n", newthr->regs.r_r12);
++ print_debug("\trbp = 0x%lx\n", newthr->regs.r_rbp);
++ print_debug("\trbx = 0x%lx\n", newthr->regs.r_rbx);
++ print_debug("\tr11 = 0x%lx\n", newthr->regs.r_r11);
++ print_debug("\tr10 = 0x%lx\n", newthr->regs.r_r10);
++ print_debug("\tr9 = 0x%lx\n", newthr->regs.r_r9);
++ print_debug("\tr8 = 0x%lx\n", newthr->regs.r_r8);
++ print_debug("\trax = 0x%lx\n", newthr->regs.r_rax);
++ print_debug("\trcx = 0x%lx\n", newthr->regs.r_rcx);
++ print_debug("\trdx = 0x%lx\n", newthr->regs.r_rdx);
++ print_debug("\trsi = 0x%lx\n", newthr->regs.r_rsi);
++ print_debug("\trdi = 0x%lx\n", newthr->regs.r_rdi);
++ print_debug("\trip = 0x%lx\n", newthr->regs.r_rip);
++ print_debug("\tcs = 0x%lx\n", newthr->regs.r_cs);
++ print_debug("\trsp = 0x%lx\n", newthr->regs.r_rsp);
++ print_debug("\tss = 0x%lx\n", newthr->regs.r_ss);
++#endif
+ #endif
+ }
+
+Index: b/hotspot/agent/src/os/linux/ps_proc.c
+===================================================================
+--- a/hotspot/agent/src/os/linux/ps_proc.c
++++ b/hotspot/agent/src/os/linux/ps_proc.c
+@@ -42,6 +42,22 @@
+ #define __WALL 0x40000000 // Copied from /usr/include/linux/wait.h
+ #endif
+
++#ifndef PTRACE_PEEKDATA
++#define PTRACE_PEEKDATA PT_READ_D
++#endif
++
++#ifndef PTRACE_ATTACH
++#define PTRACE_ATTACH PT_ATTACH
++#endif
++
++#ifndef PTRACE_DETACH
++#define PTRACE_DETACH PT_DETACH
++#endif
++
++#ifndef PTRACE_CONT
++#define PTRACE_CONT PT_CONTINUE
++#endif
++
+ // This file has the libproc implementation specific to live process
+ // For core files, refer to ps_core.c
+
+@@ -59,7 +75,11 @@ static inline uintptr_t align(uintptr_t
+ // before calling process_read_data.
+
+ static bool process_read_data(struct ps_prochandle* ph, uintptr_t addr, char *buf, size_t size) {
++#if defined(__FreeBSD_kernel__)
++ int rslt;
++#else
+ long rslt;
++#endif
+ size_t i, words;
+ uintptr_t end_addr = addr + size;
+ uintptr_t aligned_addr = align(addr, sizeof(long));
+@@ -67,36 +87,62 @@ static bool process_read_data(struct ps_
+ if (aligned_addr != addr) {
+ char *ptr = (char *)&rslt;
+ errno = 0;
++#if defined(__FreeBSD_kernel__)
++ rslt = ptrace(PTRACE_PEEKDATA, ph->pid, (caddr_t) aligned_addr, 0);
++#else
+ rslt = ptrace(PTRACE_PEEKDATA, ph->pid, aligned_addr, 0);
++#endif
+ if (errno) {
+ print_debug("ptrace(PTRACE_PEEKDATA, ..) failed for %d bytes @ %lx\n", size, addr);
+ return false;
+ }
+ for (; aligned_addr != addr; aligned_addr++, ptr++);
++#if defined(__FreeBSD_kernel__)
++ for (; ((intptr_t)aligned_addr % sizeof(int)) && aligned_addr < end_addr;
++#else
+ for (; ((intptr_t)aligned_addr % sizeof(long)) && aligned_addr < end_addr;
++#endif
+ aligned_addr++)
+ *(buf++) = *(ptr++);
+ }
+
++#if defined(__FreeBSD_kernel__)
++ words = (end_addr - aligned_addr) / sizeof(int);
++#else
+ words = (end_addr - aligned_addr) / sizeof(long);
++#endif
+
+ // assert((intptr_t)aligned_addr % sizeof(long) == 0);
+ for (i = 0; i < words; i++) {
+ errno = 0;
++#if defined(__FreeBSD_kernel__)
++ rslt = ptrace(PTRACE_PEEKDATA, ph->pid, (caddr_t) aligned_addr, 0);
++#else
+ rslt = ptrace(PTRACE_PEEKDATA, ph->pid, aligned_addr, 0);
++#endif
+ if (errno) {
+ print_debug("ptrace(PTRACE_PEEKDATA, ..) failed for %d bytes @ %lx\n", size, addr);
+ return false;
+ }
++#if defined(__FreeBSD_kernel__)
++ *(int *)buf = rslt;
++ buf += sizeof(int);
++ aligned_addr += sizeof(int);
++#else
+ *(long *)buf = rslt;
+ buf += sizeof(long);
+ aligned_addr += sizeof(long);
++#endif
+ }
+
+ if (aligned_addr != end_addr) {
+ char *ptr = (char *)&rslt;
+ errno = 0;
++#if defined(__FreeBSD_kernel__)
++ rslt = ptrace(PTRACE_PEEKDATA, ph->pid, (caddr_t) aligned_addr, 0);
++#else
+ rslt = ptrace(PTRACE_PEEKDATA, ph->pid, aligned_addr, 0);
++#endif
+ if (errno) {
+ print_debug("ptrace(PTRACE_PEEKDATA, ..) failed for %d bytes @ %lx\n", size, addr);
+ return false;
+@@ -135,7 +181,11 @@ static bool process_get_lwp_regs(struct
+ #endif
+
+ #ifdef PTRACE_GETREGS_REQ
++#if defined(__FreeBSD_kernel__)
++ if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, (caddr_t) user, 0) < 0) {
++#else
+ if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, user, NULL) < 0) {
++#endif
+ print_debug("ptrace(PTRACE_GETREGS, ...) failed for lwp %d\n", pid);
+ return false;
+ }
+@@ -216,7 +266,11 @@ static bool ptrace_waitpid(pid_t pid) {
+
+ // attach to a process/thread specified by "pid"
+ static bool ptrace_attach(pid_t pid, char* err_buf, size_t err_buf_len) {
++#if defined(__FreeBSD_kernel__)
++ if (ptrace(PTRACE_ATTACH, pid, NULL, 0) < 0) {
++#else
+ if (ptrace(PTRACE_ATTACH, pid, NULL, NULL) < 0) {
++#endif
+ char buf[200];
+ char* msg = strerror_r(errno, buf, sizeof(buf));
+ snprintf(err_buf, err_buf_len, "ptrace(PTRACE_ATTACH, ..) failed for %d: %s", pid, msg);
+@@ -313,7 +367,11 @@ static bool read_lib_info(struct ps_proc
+
+ // detach a given pid
+ static bool ptrace_detach(pid_t pid) {
++#if defined(__FreeBSD_kernel__)
++ if (pid && ptrace(PTRACE_DETACH, pid, NULL, 0) < 0) {
++#else
+ if (pid && ptrace(PTRACE_DETACH, pid, NULL, NULL) < 0) {
++#endif
+ print_debug("ptrace(PTRACE_DETACH, ..) failed for %d\n", pid);
+ return false;
+ } else {
+Index: b/hotspot/agent/src/os/linux/libproc.h
+===================================================================
+--- a/hotspot/agent/src/os/linux/libproc.h
++++ b/hotspot/agent/src/os/linux/libproc.h
+@@ -28,6 +28,10 @@
+ #include <jni.h>
+ #include <unistd.h>
+ #include <stdint.h>
++#if defined(__FreeBSD_kernel__)
++#include <sys/types.h>
++#include <machine/reg.h>
++#endif
+ #include "proc_service.h"
+
+ #ifdef ALT_SASRCDIR
+@@ -73,6 +77,10 @@ combination of ptrace and /proc calls.
+ #define user_regs_struct pt_regs
+ #endif
+
++#if defined(__FreeBSD_kernel__)
++#define user_regs_struct reg
++#endif
++
+ // This C bool type must be int for compatibility with Linux calls and
+ // it would be a mistake to equivalence it to C++ bool on many platforms
+
+Index: b/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+===================================================================
+--- a/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
++++ b/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+@@ -367,7 +367,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jv
+
+ #ifdef i386
+ #define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
+-
++#ifdef __linux__
+ regs[REG_INDEX(GS)] = (uintptr_t) gregs.xgs;
+ regs[REG_INDEX(FS)] = (uintptr_t) gregs.xfs;
+ regs[REG_INDEX(ES)] = (uintptr_t) gregs.xes;
+@@ -383,12 +383,28 @@ JNIEXPORT jlongArray JNICALL Java_sun_jv
+ regs[REG_INDEX(PC)] = (uintptr_t) gregs.eip;
+ regs[REG_INDEX(CS)] = (uintptr_t) gregs.xcs;
+ regs[REG_INDEX(SS)] = (uintptr_t) gregs.xss;
+-
++#elif defined(__FreeBSD_kernel__)
++ regs[REG_INDEX(GS)] = (uintptr_t) gregs.r_gs;
++ regs[REG_INDEX(FS)] = (uintptr_t) gregs.r_fs;
++ regs[REG_INDEX(ES)] = (uintptr_t) gregs.r_es;
++ regs[REG_INDEX(DS)] = (uintptr_t) gregs.r_ds;
++ regs[REG_INDEX(EDI)] = (uintptr_t) gregs.r_edi;
++ regs[REG_INDEX(ESI)] = (uintptr_t) gregs.r_esi;
++ regs[REG_INDEX(FP)] = (uintptr_t) gregs.r_ebp;
++ regs[REG_INDEX(SP)] = (uintptr_t) gregs.r_isp;
++ regs[REG_INDEX(EBX)] = (uintptr_t) gregs.r_ebx;
++ regs[REG_INDEX(EDX)] = (uintptr_t) gregs.r_edx;
++ regs[REG_INDEX(ECX)] = (uintptr_t) gregs.r_ecx;
++ regs[REG_INDEX(EAX)] = (uintptr_t) gregs.r_eax;
++ regs[REG_INDEX(PC)] = (uintptr_t) gregs.r_eip;
++ regs[REG_INDEX(CS)] = (uintptr_t) gregs.r_cs;
++ regs[REG_INDEX(SS)] = (uintptr_t) gregs.r_ss;
++#endif
+ #endif /* i386 */
+
+ #ifdef amd64
+ #define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg
+-
++#ifdef __linux__
+ regs[REG_INDEX(R15)] = gregs.r15;
+ regs[REG_INDEX(R14)] = gregs.r14;
+ regs[REG_INDEX(R13)] = gregs.r13;
+@@ -414,7 +430,27 @@ JNIEXPORT jlongArray JNICALL Java_sun_jv
+ regs[REG_INDEX(ES)] = gregs.es;
+ regs[REG_INDEX(FS)] = gregs.fs;
+ regs[REG_INDEX(GS)] = gregs.gs;
+-
++#elif defined(__FreeBSD_kernel__)
++ regs[REG_INDEX(R15)] = gregs.r_r15;
++ regs[REG_INDEX(R14)] = gregs.r_r14;
++ regs[REG_INDEX(R13)] = gregs.r_r13;
++ regs[REG_INDEX(R12)] = gregs.r_r12;
++ regs[REG_INDEX(RBP)] = gregs.r_rbp;
++ regs[REG_INDEX(RBX)] = gregs.r_rbx;
++ regs[REG_INDEX(R11)] = gregs.r_r11;
++ regs[REG_INDEX(R10)] = gregs.r_r10;
++ regs[REG_INDEX(R9)] = gregs.r_r9;
++ regs[REG_INDEX(R8)] = gregs.r_r8;
++ regs[REG_INDEX(RAX)] = gregs.r_rax;
++ regs[REG_INDEX(RCX)] = gregs.r_rcx;
++ regs[REG_INDEX(RDX)] = gregs.r_rdx;
++ regs[REG_INDEX(RSI)] = gregs.r_rsi;
++ regs[REG_INDEX(RDI)] = gregs.r_rdi;
++ regs[REG_INDEX(RIP)] = gregs.r_rip;
++ regs[REG_INDEX(CS)] = gregs.r_cs;
++ regs[REG_INDEX(RSP)] = gregs.r_rsp;
++ regs[REG_INDEX(SS)] = gregs.r_ss;
++#endif
+ #endif /* amd64 */
+
+ #if defined(sparc) || defined(sparcv9)
+Index: b/hotspot/make/linux/makefiles/saproc.make
+===================================================================
+--- a/hotspot/make/linux/makefiles/saproc.make
++++ b/hotspot/make/linux/makefiles/saproc.make
+@@ -90,6 +90,7 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
+ -I$(GENERATED) \
+ -I$(BOOT_JAVA_HOME)/include \
+ -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
++ -I$(BOOT_JAVA_HOME)/include/bsd \
+ $(ALT_SAINCDIR) \
+ $(SASRCFILES) \
+ $(SA_LFLAGS) \
diff --git a/debian/patches/kfreebsd-support-jamvm.diff b/debian/patches/kfreebsd-support-jamvm.diff
new file mode 100644
index 0000000..cd44bcf
--- /dev/null
+++ b/debian/patches/kfreebsd-support-jamvm.diff
@@ -0,0 +1,42 @@
+Description:
+ - Add ifdef TIOCINQ = FIONREAD
+ jamvm/src/classlib/openjdk/jvm.c
+ - Update configure for kfreebsd-amd64
+ jamvm/jamvm/configure.ac
+Author: Damien Raude-Morvan <drazzib@debian.org>
+Last-Update: 2011-08-05
+Forwarded: no
+
+--- a/jamvm/configure.ac
++++ b/jamvm/configure.ac
+@@ -38,6 +38,7 @@
+ i386-*-freebsd*) host_os=bsd libdl_needed=no ;;
+ i386-*-solaris*) host_cpu=x86 host_os=solaris ;;
+ x86_64-*-linux*) host_os=linux ;;
++x86_64-*-kfreebsd*) host_os=linux ;;
+ hppa*-*-linux*) host_cpu=parisc host_os=linux ;;
+ mips*-*-linux*) host_cpu=mips host_os=linux ;;
+ x86_64-*-openbsd*) host_os=bsd libdl_needed=no ;;
+--- a/jamvm/configure
++++ b/jamvm/configure
+@@ -2926,6 +2926,7 @@
+ i386-*-freebsd*) host_os=bsd libdl_needed=no ;;
+ i386-*-solaris*) host_cpu=x86 host_os=solaris ;;
+ x86_64-*-linux*) host_os=linux ;;
++x86_64-*-kfreebsd*) host_os=linux ;;
+ hppa*-*-linux*) host_cpu=parisc host_os=linux ;;
+ mips*-*-linux*) host_cpu=mips host_os=linux ;;
+ x86_64-*-openbsd*) host_os=bsd libdl_needed=no ;;
+--- a/jamvm/src/classlib/openjdk/jvm.c
++++ b/jamvm/src/classlib/openjdk/jvm.c
+@@ -63,6 +63,10 @@
+ #define have_monotonic_clock FALSE
+ #endif
+
++#ifndef TIOCINQ
++#define TIOCINQ FIONREAD
++#endif
++
+ static Class *cloneable_class, *constant_pool_class;
+ static Class *exception_class, *runtime_excp_class;
+
diff --git a/debian/patches/kfreebsd-support-jdk.diff b/debian/patches/kfreebsd-support-jdk.diff
new file mode 100644
index 0000000..b809da3
--- /dev/null
+++ b/debian/patches/kfreebsd-support-jdk.diff
@@ -0,0 +1,5171 @@
+Description: Initial GNU/kFreeBSD support for openjdk-8 (JDK part)
+ - Alter build system to consider GNU/kFreeBSD like linux
+ since this port is libc based.
+ openjdk/jdk/make/common/shared/Platform.gmk
+ - ENODATA is undefined :
+ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
+ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java
+ - sendfile implementation :
+ openjdk/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
+ (from bsd-port)
+ - BSD network stack usage :
+ openjdk/jdk/src/solaris/native/java/net/*
+ (from bsd-port)
+ - Don't build sctp protocol
+ openjdk/jdk/make/com/sun/nio/Makefile
+ - Don't build jsoundalsa
+ openjdk/jdk/make/javax/sound/Makefile
+ - Disable epoll feature and so LinuxWatchService
+ openjdk/jdk/make/java/nio/Makefile
+Author: Damien Raude-Morvan <drazzib@debian.org>
+Author: Guido Günther <agx@sigxcpu.org>
+Author: Steven Chamberlain <steven@pyro.eu.org>
+Forwarded: no
+
+Index: b/jdk/src/solaris/bin/ergo_i586.c
+===================================================================
+--- a/jdk/src/solaris/bin/ergo_i586.c
++++ b/jdk/src/solaris/bin/ergo_i586.c
+@@ -106,7 +106,7 @@ ServerClassMachineImpl(void) {
+
+ #endif /* __solaris__ */
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+
+ /*
+ * A utility method for asking the CPU about itself.
+Index: b/jdk/src/solaris/bin/jexec.c
+===================================================================
+--- a/jdk/src/solaris/bin/jexec.c
++++ b/jdk/src/solaris/bin/jexec.c
+@@ -76,7 +76,7 @@
+ #include <string.h>
+ #include <limits.h>
+ #include <errno.h>
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ # include <sys/types.h>
+ # include <sys/stat.h>
+ # include <fcntl.h>
+@@ -92,7 +92,7 @@ static const char * CRAZY_EXEC_MSG = "
+ static const char * MISSING_JAVA_MSG = "can't locate java";
+ static const char * BAD_ARG_MSG = "incorrect number of arguments";
+ static const char * MEM_FAILED_MSG = "memory allocation failed";
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ static const char * BAD_PATHNAME_MSG = "invalid path";
+ static const char * BAD_FILE_MSG = "invalid file";
+ static const char * BAD_MAGIC_MSG = "invalid file (bad magic number)";
+@@ -101,7 +101,7 @@ static const char * UNKNOWN_ERROR = "
+
+ /* Define a constant that represents the number of directories to pop off the
+ * current location to find the java binary */
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ static const int RELATIVE_DEPTH = 2;
+ #else /* Solaris */
+ static const int RELATIVE_DEPTH = 3;
+@@ -114,7 +114,7 @@ static const char * BIN_PATH = "/bin/jav
+ static const char * JAR_FLAG = "-jar";
+
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ /* largest possible size for a local file header */
+ static const size_t CHUNK_SIZE = 65535;
+
+@@ -126,7 +126,7 @@ static const ssize_t MIN_SIZE = LOCHDR +
+ int main(int argc, const char * argv[]);
+ void errorExit(int error, const char * message);
+ int getJavaPath(const char * path, char * buf, int depth);
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ const char * isJar(const char * path);
+ #endif
+
+@@ -182,7 +182,7 @@ int main(int argc, const char * argv[])
+ }
+ nargv[nargc++] = java;
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ /* The "-jar" flag is already in the original args list on Solaris,
+ * so it only needs to be added on Linux. */
+ nargv[nargc++] = JAR_FLAG;
+@@ -192,7 +192,7 @@ int main(int argc, const char * argv[])
+ const char * jarfile = argv[argi++];
+ const char * message = NULL;
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ /* On Linux we also need to make sure argv[1] is really a JAR
+ * file (this will also resolve any symlinks, which helps). */
+ char jarPath[PATH_MAX + 1];
+@@ -301,7 +301,7 @@ int getJavaPath(const char * path, char
+ }
+
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ /*
+ * Check if the given file is a JAR file.
+ *
+Index: b/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
++++ b/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
+@@ -42,7 +42,7 @@
+ #include <strings.h>
+ #endif
+
+-#if defined(__linux__) || defined(_AIX)
++#if defined(__linux__) || defined(_AIX) || defined(__GLIBC__)
+ #include <string.h>
+ #endif
+
+Index: b/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c
++++ b/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c
+@@ -35,7 +35,7 @@
+ #include <strings.h>
+ #endif
+
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <string.h>
+ #endif
+
+Index: b/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
++++ b/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
+@@ -41,7 +41,7 @@
+ #include <sys/sendfile.h>
+ #elif defined(_AIX)
+ #include <sys/socket.h>
+-#elif defined(_ALLBSD_SOURCE)
++#elif defined(_ALLBSD_SOURCE) || defined(__FreeBSD_kernel__)
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/uio.h>
+@@ -216,6 +216,31 @@ Java_sun_nio_ch_FileChannelImpl_transfer
+
+ if (numBytes > 0)
+ return numBytes;
++
++ if (result == -1) {
++ if (errno == EAGAIN)
++ return IOS_UNAVAILABLE;
++ if (errno == EOPNOTSUPP || errno == ENOTSOCK || errno == ENOTCONN)
++ return IOS_UNSUPPORTED_CASE;
++ if ((errno == EINVAL) && ((ssize_t)count >= 0))
++ return IOS_UNSUPPORTED_CASE;
++ if (errno == EINTR)
++ return IOS_INTERRUPTED;
++ JNU_ThrowIOExceptionWithLastError(env, "Transfer failed");
++ return IOS_THROWN;
++ }
++
++ return result;
++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++ off_t numBytes;
++ int result;
++
++ numBytes = count;
++
++ result = sendfile(srcFD, dstFD, position, count, NULL, &numBytes, 0);
++
++ if (numBytes > 0)
++ return numBytes;
+
+ if (result == -1) {
+ if (errno == EAGAIN)
+Index: b/jdk/src/solaris/native/sun/nio/ch/sctp/Sctp.h
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/sctp/Sctp.h
++++ b/jdk/src/solaris/native/sun/nio/ch/sctp/Sctp.h
+@@ -65,9 +65,25 @@ typedef int sctp_freepaddrs_func(void *a
+ typedef int sctp_bindx_func(int sock, void *addrs, int addrcnt, int flags);
+ typedef int sctp_peeloff_func(int sock, sctp_assoc_t id);
+
++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+
++#include <stdint.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/sctp.h>
++#include <netinet/sctp_peeloff.h>
++#include <netinet/sctp_uio.h>
++#include "jni.h"
++
++#define nio_sctp_getladdrs sctp_getladdrs
++#define nio_sctp_freeladdrs sctp_freeladdrs
++#define nio_sctp_getpaddrs sctp_getpaddrs
++#define nio_sctp_freepaddrs sctp_freepaddrs
++#define nio_sctp_bindx sctp_bindx
++#define nio_sctp_peeloff sctp_peeloff
+
+ #else /* __linux__ */
++
+ #include <stdint.h>
+ #include <linux/types.h>
+ #include <sys/socket.h>
+@@ -319,9 +335,19 @@ typedef int sctp_freepaddrs_func(struct
+ typedef int sctp_bindx_func(int sd, struct sockaddr *addrs, int addrcnt, int flags);
+ typedef int sctp_peeloff_func(int sock, sctp_assoc_t id);
+
+-
+ #endif /* __linux__ */
+
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++
++#define nio_sctp_getladdrs sctp_getladdrs
++#define nio_sctp_freeladdrs sctp_freeladdrs
++#define nio_sctp_getpaddrs sctp_getpaddrs
++#define nio_sctp_freepaddrs sctp_freepaddrs
++#define nio_sctp_bindx sctp_bindx
++#define nio_sctp_peeloff sctp_peeloff
++
++#else
++
+ sctp_getladdrs_func* nio_sctp_getladdrs;
+ sctp_freeladdrs_func* nio_sctp_freeladdrs;
+ sctp_getpaddrs_func* nio_sctp_getpaddrs;
+@@ -329,6 +355,8 @@ sctp_freepaddrs_func* nio_sctp_freepaddr
+ sctp_bindx_func* nio_sctp_bindx;
+ sctp_peeloff_func* nio_sctp_peeloff;
+
++#endif
++
+ jboolean loadSocketExtensionFuncs(JNIEnv* env);
+
+ #endif /* !SUN_NIO_CH_SCTP_H */
+Index: b/jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c
++++ b/jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c
+@@ -445,7 +445,7 @@ JNIEXPORT jint JNICALL Java_sun_nio_ch_s
+ } else if (errno == EINTR) {
+ return IOS_INTERRUPTED;
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ } else if (errno == ENOTCONN) {
+ /* ENOTCONN when EOF reached */
+ rv = 0;
+Index: b/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c
++++ b/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c
+@@ -35,7 +35,7 @@
+ #include <string.h>
+ #include <errno.h>
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ #include <netinet/in.h>
+ #endif
+
+@@ -91,7 +91,7 @@ Java_sun_nio_ch_DatagramChannelImpl_disc
+ rv = connect(fd, 0, 0);
+ #endif
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX) || defined(__GLIBC__)
+ {
+ int len;
+ SOCKADDR sa;
+Index: b/jdk/src/solaris/native/sun/nio/ch/Net.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/Net.c
++++ b/jdk/src/solaris/native/sun/nio/ch/Net.c
+@@ -273,7 +273,7 @@ Java_sun_nio_ch_Net_socket0(JNIEnv *env,
+ }
+ }
+
+-#if defined(__linux__)
++#ifdef __linux__
+ if (type == SOCK_DGRAM) {
+ int arg = 0;
+ int level = (domain == AF_INET6) ? IPPROTO_IPV6 : IPPROTO_IP;
+Index: b/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
++++ b/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
+@@ -32,7 +32,7 @@
+ #include "sun_nio_ch_NativeThread.h"
+ #include "nio_util.h"
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <pthread.h>
+ #include <sys/signal.h>
+ /* Also defined in net/linux_close.c */
+Index: b/jdk/src/solaris/native/sun/nio/ch/SocketChannelImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/SocketChannelImpl.c
++++ b/jdk/src/solaris/native/sun/nio/ch/SocketChannelImpl.c
+@@ -31,7 +31,7 @@
+ #include <string.h>
+ #include <poll.h>
+
+-#if __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <netinet/in.h>
+ #endif
+
+Index: b/jdk/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c
++++ b/jdk/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c
+@@ -28,7 +28,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+
+-#if __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <netinet/in.h>
+ #endif
+
+Index: b/jdk/src/solaris/native/sun/nio/ch/sctp/SctpNet.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/sctp/SctpNet.c
++++ b/jdk/src/solaris/native/sun/nio/ch/sctp/SctpNet.c
+@@ -58,6 +58,7 @@ static int preCloseFD = -1; /* File
+ */
+ jboolean loadSocketExtensionFuncs
+ (JNIEnv* env) {
++#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
+ if (dlopen(nativeSctpLib, RTLD_GLOBAL | RTLD_LAZY) == NULL) {
+ JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
+ dlerror());
+@@ -105,6 +106,7 @@ jboolean loadSocketExtensionFuncs
+ dlerror());
+ return JNI_FALSE;
+ }
++#endif /* __FreeBSD__ */
+
+ funcsLoaded = JNI_TRUE;
+ return JNI_TRUE;
+Index: b/jdk/src/solaris/native/sun/awt/extutil.h
+===================================================================
+--- a/jdk/src/solaris/native/sun/awt/extutil.h
++++ b/jdk/src/solaris/native/sun/awt/extutil.h
+@@ -58,7 +58,7 @@ in this Software without prior written a
+ */
+ /* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */
+
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+
+ #ifndef _EXTUTIL_H_
+ #define _EXTUTIL_H_
+Index: b/jdk/src/solaris/native/sun/awt/VDrawingArea.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/awt/VDrawingArea.c
++++ b/jdk/src/solaris/native/sun/awt/VDrawingArea.c
+@@ -33,7 +33,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ /* XXX: Shouldn't be necessary. */
+ #include "awt_p.h"
+ #endif /* __linux__ */
+Index: b/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
++++ b/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
+@@ -121,7 +121,8 @@ static char *x11GraphicsConfigClassName
+ */
+
+ #define MAXFRAMEBUFFERS 16
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
++
+ typedef struct {
+ int screen_number;
+ short x_org;
+@@ -440,7 +441,7 @@ getAllConfigs (JNIEnv *env, int screen,
+ RTLD_LAZY | RTLD_GLOBAL);
+ }
+
+-#ifndef __linux__ /* SOLARIS */
++#if ! defined(__linux__) && ! defined(__GLIBC__) /* SOLARIS */
+ if (xrenderLibHandle == NULL) {
+ xrenderLibHandle = dlopen("/usr/sfw/lib/libXrender.so.1",
+ RTLD_LAZY | RTLD_GLOBAL);
+@@ -584,7 +585,8 @@ getAllConfigs (JNIEnv *env, int screen,
+ }
+
+ #ifndef HEADLESS
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
++
+ static void xinerama_init_linux()
+ {
+ void* libHandle = NULL;
+@@ -635,7 +637,7 @@ static void xinerama_init_linux()
+ }
+ }
+ #endif
+-#if !defined(__linux__) && !defined(MACOSX) /* Solaris */
++#if !defined(__linux__) && !defined(MACOSX) && !defined(__GLIBC__) /* Solaris */
+ static void xinerama_init_solaris()
+ {
+ void* libHandle = NULL;
+@@ -695,11 +697,11 @@ static void xineramaInit(void) {
+ }
+
+ DTRACE_PRINTLN("Xinerama extension is available");
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ xinerama_init_linux();
+ #else /* Solaris */
+ xinerama_init_solaris();
+-#endif /* __linux__ || MACOSX */
++#endif /* __linux__ || MACOSX || __GLIBC__ */
+ }
+ #endif /* HEADLESS */
+
+@@ -1597,7 +1599,7 @@ Java_sun_awt_X11GraphicsEnvironment_getX
+ {
+ jobject point = NULL;
+ #ifndef HEADLESS /* return NULL in HEADLESS, Linux */
+-#if !defined(__linux__) && !defined(MACOSX)
++#if !defined(__linux__) && !defined(MACOSX) && !defined(__GLIBC__)
+ int x,y;
+
+ AWT_LOCK();
+Index: b/jdk/src/solaris/native/sun/awt/awt_Font.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/awt/awt_Font.c
++++ b/jdk/src/solaris/native/sun/awt/awt_Font.c
+@@ -255,7 +255,7 @@ loadFont(Display * display, char *name,
+ if (strcmp(style, "regular") == 0) {
+ altstyle = "roman";
+ }
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ if (!strcmp(family, "lucidasans")) {
+ family = "lucida";
+ }
+Index: b/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
++++ b/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
+@@ -52,7 +52,7 @@ static void PreeditDrawCallback(XIC, XPo
+ XIMPreeditDrawCallbackStruct *);
+ static void PreeditCaretCallback(XIC, XPointer,
+ XIMPreeditCaretCallbackStruct *);
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ static void StatusStartCallback(XIC, XPointer, XPointer);
+ static void StatusDoneCallback(XIC, XPointer, XPointer);
+ static void StatusDrawCallback(XIC, XPointer,
+@@ -66,7 +66,7 @@ static void StatusDrawCallback(XIC, XPoi
+ #define PreeditDoneIndex 1
+ #define PreeditDrawIndex 2
+ #define PreeditCaretIndex 3
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ #define StatusStartIndex 4
+ #define StatusDoneIndex 5
+ #define StatusDrawIndex 6
+@@ -84,14 +84,14 @@ static XIMProc callback_funcs[NCALLBACKS
+ (XIMProc)PreeditDoneCallback,
+ (XIMProc)PreeditDrawCallback,
+ (XIMProc)PreeditCaretCallback,
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ (XIMProc)StatusStartCallback,
+ (XIMProc)StatusDoneCallback,
+ (XIMProc)StatusDrawCallback,
+ #endif
+ };
+
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ #define MAX_STATUS_LEN 100
+ typedef struct {
+ Window w; /*status window id */
+@@ -124,7 +124,7 @@ typedef struct _X11InputMethodData {
+ XIMCallback *callbacks; /* callback parameters */
+ jobject x11inputmethod; /* global ref to X11InputMethod instance */
+ /* associated with the XIC */
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ StatusWindow *statusWindow; /* our own status window */
+ #endif
+ char *lookup_buf; /* buffer used for XmbLookupString */
+@@ -370,7 +370,7 @@ destroyX11InputMethodData(JNIEnv *env, X
+ static void
+ freeX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData)
+ {
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ if (pX11IMData->statusWindow != NULL){
+ StatusWindow *sw = pX11IMData->statusWindow;
+ XFreeGC(awt_display, sw->lightGC);
+@@ -473,7 +473,7 @@ awt_x11inputmethod_lookupString(XKeyPres
+ pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance);
+
+ if (pX11IMData == NULL) {
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ return False;
+ #else
+ return result;
+@@ -481,7 +481,7 @@ awt_x11inputmethod_lookupString(XKeyPres
+ }
+
+ if ((ic = pX11IMData->current_ic) == (XIC)0){
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ return False;
+ #else
+ return result;
+@@ -573,7 +573,7 @@ awt_x11inputmethod_lookupString(XKeyPres
+ return result;
+ }
+
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ static StatusWindow *createStatusWindow(
+ Window parent) {
+ StatusWindow *statusWindow;
+@@ -886,7 +886,7 @@ static void adjustStatusWindow(Window sh
+ }
+ }
+ }
+-#endif /* __linux__ || MACOSX */
++#endif /* __linux__ || MACOSX || __GLIBC__ */
+ /*
+ * Creates two XICs, one for active clients and the other for passive
+ * clients. All information on those XICs are stored in the
+@@ -929,7 +929,7 @@ createXIC(JNIEnv * env, X11InputMethodDa
+ return FALSE ;
+ }
+
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ on_the_spot_styles |= XIMStatusNothing;
+
+ /*kinput does not support XIMPreeditCallbacks and XIMStatusArea
+@@ -942,9 +942,9 @@ createXIC(JNIEnv * env, X11InputMethodDa
+ break;
+ }
+ }
+-#else /*! __linux__ && !MACOSX */
++#else /*! __linux__ && !MACOSX && !__GLIBC__ */
+ on_the_spot_styles |= XIMStatusNothing;
+-#endif /* __linux__ || MACOSX */
++#endif /* __linux__ || MACOSX || __GLIBC__ */
+
+ for (i = 0; i < im_styles->count_styles; i++) {
+ active_styles |= im_styles->supported_styles[i] & on_the_spot_styles;
+@@ -998,7 +998,7 @@ createXIC(JNIEnv * env, X11InputMethodDa
+ NULL);
+ if (preedit == (XVaNestedList)NULL)
+ goto err;
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ /*always try XIMStatusCallbacks for active client...*/
+ {
+ status = (XVaNestedList)XVaCreateNestedList(0,
+@@ -1020,7 +1020,7 @@ createXIC(JNIEnv * env, X11InputMethodDa
+ XFree((void *)status);
+ XFree((void *)preedit);
+ }
+-#else /* !__linux__ && !MACOSX */
++#else /* !__linux__ && !MACOSX && !__GLIBC__ */
+ pX11IMData->ic_active = XCreateIC(X11im,
+ XNClientWindow, w,
+ XNFocusWindow, w,
+@@ -1028,7 +1028,7 @@ createXIC(JNIEnv * env, X11InputMethodDa
+ XNPreeditAttributes, preedit,
+ NULL);
+ XFree((void *)preedit);
+-#endif /* __linux__ || MACOSX */
++#endif /* __linux__ || MACOSX || __GLIBC__ */
+ } else {
+ pX11IMData->ic_active = XCreateIC(X11im,
+ XNClientWindow, w,
+@@ -1188,7 +1188,7 @@ PreeditCaretCallback(XIC ic, XPointer cl
+
+ }
+
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ static void
+ StatusStartCallback(XIC ic, XPointer client_data, XPointer call_data)
+ {
+@@ -1256,7 +1256,7 @@ StatusDrawCallback(XIC ic, XPointer clie
+ finally:
+ AWT_UNLOCK();
+ }
+-#endif /* __linux__ || MACOSX */
++#endif /* __linux__ || MACOSX || __GLIBC__ */
+
+ static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) {
+ JNIEnv *env = GetJNIEnv();
+@@ -1353,14 +1353,14 @@ Java_sun_awt_X11_XInputMethod_openXIMNat
+ /* Use IMInstantiate call back only on Linux, as there is a bug in Solaris
+ (4768335)
+ */
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ registered = XRegisterIMInstantiateCallback(dpy, NULL, NULL,
+ NULL, (XIDProc)OpenXIMCallback, NULL);
+ if (!registered) {
+ /* directly call openXIM callback */
+ #endif
+ OpenXIMCallback(dpy, NULL, NULL);
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ }
+ #endif
+
+@@ -1395,9 +1395,9 @@ Java_sun_awt_X11_XInputMethod_createXICN
+
+ globalRef = (*env)->NewGlobalRef(env, this);
+ pX11IMData->x11inputmethod = globalRef;
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ pX11IMData->statusWindow = NULL;
+-#endif /* __linux__ || MACOSX */
++#endif /* __linux__ || MACOSX || __GLIBC__ */
+
+ pX11IMData->lookup_buf = 0;
+ pX11IMData->lookup_buf_len = 0;
+@@ -1447,14 +1447,14 @@ Java_sun_awt_X11_XInputMethod_setXICFocu
+ setXICFocus(pX11IMData->current_ic, req);
+ currentX11InputMethodInstance = pX11IMData->x11inputmethod;
+ currentFocusWindow = w;
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ if (active && pX11IMData->statusWindow && pX11IMData->statusWindow->on)
+ onoffStatusWindow(pX11IMData, w, True);
+ #endif
+ } else {
+ currentX11InputMethodInstance = NULL;
+ currentFocusWindow = 0;
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ onoffStatusWindow(pX11IMData, 0, False);
+ if (pX11IMData->current_ic != NULL)
+ #endif
+@@ -1471,7 +1471,7 @@ JNIEXPORT void JNICALL
+ Java_sun_awt_X11InputMethod_turnoffStatusWindow(JNIEnv *env,
+ jobject this)
+ {
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ X11InputMethodData *pX11IMData;
+ StatusWindow *statusWindow;
+
+@@ -1639,7 +1639,7 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_
+ JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow
+ (JNIEnv *env, jobject this, jlong window)
+ {
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ AWT_LOCK();
+ adjustStatusWindow(window);
+ AWT_UNLOCK();
+Index: b/jdk/src/solaris/native/sun/awt/fontpath.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/awt/fontpath.c
++++ b/jdk/src/solaris/native/sun/awt/fontpath.c
+@@ -23,9 +23,9 @@
+ * questions.
+ */
+
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <string.h>
+-#endif /* __linux__ */
++#endif /* __linux__ || __GLIBC__ */
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <strings.h>
+Index: b/jdk/src/solaris/native/sun/awt/awt_Robot.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/awt/awt_Robot.c
++++ b/jdk/src/solaris/native/sun/awt/awt_Robot.c
+@@ -45,7 +45,7 @@
+ #include "wsutils.h"
+ #include "list.h"
+ #include "multiVis.h"
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ #include <sys/socket.h>
+ #endif
+
+Index: b/jdk/src/solaris/native/sun/java2d/j2d_md.h
+===================================================================
+--- a/jdk/src/solaris/native/sun/java2d/j2d_md.h
++++ b/jdk/src/solaris/native/sun/java2d/j2d_md.h
+@@ -30,7 +30,8 @@
+ /*
+ * Linux and MACOSX's version of <sys/types.h> does not define intptr_t
+ */
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
++
+ #include <stdint.h>
+ #endif /* __linux__ || MACOSX */
+
+Index: b/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c
++++ b/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c
+@@ -804,7 +804,7 @@ static AnyFunc* hash_table_vis[HASH_SIZE
+ static int initialized;
+ static int usevis = JNI_TRUE;
+
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+ # define ULTRA_CHIP "sparc64"
+ #else
+ # define ULTRA_CHIP "sun4u"
+Index: b/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c
++++ b/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c
+@@ -33,7 +33,7 @@
+ #include <strings.h>
+ #endif
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ #include <string.h>
+ #endif
+
+Index: b/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c
++++ b/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c
+@@ -32,7 +32,7 @@
+ #include <dlfcn.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ #include <string.h>
+ #else
+ #include <strings.h>
+Index: b/jdk/src/solaris/native/sun/xawt/XToolkit.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/xawt/XToolkit.c
++++ b/jdk/src/solaris/native/sun/xawt/XToolkit.c
+@@ -27,7 +27,7 @@
+ #include <X11/Xutil.h>
+ #include <X11/Xos.h>
+ #include <X11/Xatom.h>
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <execinfo.h>
+ #endif
+
+@@ -799,7 +799,7 @@ JNIEXPORT jstring JNICALL Java_sun_awt_X
+ return ret;
+ }
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ void print_stack(void)
+ {
+ void *array[10];
+Index: b/jdk/src/solaris/native/java/nio/MappedByteBuffer.c
+===================================================================
+--- a/jdk/src/solaris/native/java/nio/MappedByteBuffer.c
++++ b/jdk/src/solaris/native/java/nio/MappedByteBuffer.c
+@@ -40,7 +40,7 @@ Java_java_nio_MappedByteBuffer_isLoaded0
+ int result = 0;
+ int i = 0;
+ void *a = (void *) jlong_to_ptr(address);
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ unsigned char *vec = (unsigned char *)malloc(numPages * sizeof(char));
+ #else
+ char *vec = (char *)malloc(numPages * sizeof(char));
+Index: b/jdk/src/solaris/native/java/util/TimeZone_md.c
+===================================================================
+--- a/jdk/src/solaris/native/java/util/TimeZone_md.c
++++ b/jdk/src/solaris/native/java/util/TimeZone_md.c
+@@ -55,7 +55,7 @@
+ #define fileclose fclose
+ #endif
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ static const char *ETC_TIMEZONE_FILE = "/etc/timezone";
+ static const char *ZONEINFO_DIR = "/usr/share/zoneinfo";
+ static const char *DEFAULT_ZONEINFO_FILE = "/etc/localtime";
+@@ -69,7 +69,7 @@ static const char *DEFAULT_ZONEINFO_FILE
+ static const char *ETC_ENVIRONMENT_FILE = "/etc/environment";
+ #endif
+
+-#if defined(__linux__) || defined(MACOSX) || defined(__solaris__)
++#if defined(__linux__) || defined(MACOSX) || defined(__solaris__) || defined(__GLIBC__)
+
+ /*
+ * Returns a pointer to the zone ID portion of the given zoneinfo file
+@@ -215,7 +215,7 @@ findZoneinfoFile(char *buf, size_t size,
+ return tz;
+ }
+
+-#if defined(__linux__) || defined(MACOSX)
++#if defined(__linux__) || defined(MACOSX) || defined(__GLIBC__)
+
+ /*
+ * Performs Linux specific mapping and returns a zone ID
+@@ -231,7 +231,7 @@ getPlatformTimeZoneID()
+ char *buf;
+ size_t size;
+
+-#if defined(__linux__)
++#ifdef __linux__ || defined(__GLIBC__)
+ /*
+ * Try reading the /etc/timezone file for Debian distros. There's
+ * no spec of the file format available. This parsing assumes that
+@@ -771,7 +771,7 @@ findJavaTZ_md(const char *java_home_dir)
+ if (*tz == ':') {
+ tz++;
+ }
+-#if defined(__linux__)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ /* Ignore "posix/" prefix on Linux. */
+ if (strncmp(tz, "posix/", 6) == 0) {
+ tz += 6;
+Index: b/jdk/src/solaris/native/java/io/io_util_md.c
+===================================================================
+--- a/jdk/src/solaris/native/java/io/io_util_md.c
++++ b/jdk/src/solaris/native/java/io/io_util_md.c
+@@ -99,7 +99,7 @@ fileOpen(JNIEnv *env, jobject this, jstr
+ WITH_PLATFORM_STRING(env, path, ps) {
+ FD fd;
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ /* Remove trailing slashes, since the kernel won't */
+ char *p = (char *)ps + strlen(ps) - 1;
+ while ((p > ps) && (*p == '/'))
+Index: b/jdk/src/solaris/native/java/lang/locale_str.h
+===================================================================
+--- a/jdk/src/solaris/native/java/lang/locale_str.h
++++ b/jdk/src/solaris/native/java/lang/locale_str.h
+@@ -48,7 +48,7 @@
+ "gl", "gl_ES",
+ "he", "iw_IL",
+ "hr", "hr_HR",
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ "hs", "en_US", // used on Linux, not clear what it stands for
+ #endif
+ "hu", "hu_HU",
+@@ -78,14 +78,14 @@
+ "sv", "sv_SE",
+ "th", "th_TH",
+ "tr", "tr_TR",
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ "ua", "en_US", // used on Linux, not clear what it stands for
+ #endif
+ "uk", "uk_UA",
+ "vi", "vi_VN",
+ "wa", "wa_BE",
+ "zh", "zh_CN",
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ "bokmal", "nb_NO",
+ "bokm\xE5l", "nb_NO",
+ "catalan", "ca_ES",
+@@ -146,13 +146,13 @@ static char *language_names[] = {
+ "POSIX", "en",
+ "cz", "cs",
+ "he", "iw",
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ "hs", "en", // used on Linux, not clear what it stands for
+ #endif
+ "id", "in",
+ "sh", "sr", // sh is deprecated
+ "su", "fi",
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ "ua", "en", // used on Linux, not clear what it stands for
+ "catalan", "ca",
+ "croatian", "hr",
+@@ -195,7 +195,7 @@ static char *language_names[] = {
+ * Linux/Solaris script string to Java script name mapping table.
+ */
+ static char *script_names[] = {
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ "cyrillic", "Cyrl",
+ "devanagari", "Deva",
+ "iqtelif", "Latn",
+@@ -208,7 +208,7 @@ static char *script_names[] = {
+ * Linux/Solaris country string to ISO3166 string mapping table.
+ */
+ static char *country_names[] = {
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ "RN", "US", // used on Linux, not clear what it stands for
+ #endif
+ "YU", "CS", // YU has been removed from ISO 3166
+Index: b/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
+===================================================================
+--- a/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
++++ b/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
+@@ -397,7 +397,7 @@ __attribute_noinline__
+ #ifdef START_CHILD_USE_CLONE
+ static pid_t
+ cloneChild(ChildStuff *c) {
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ #define START_CHILD_CLONE_STACK_SIZE (64 * 1024)
+ /*
+ * See clone(2).
+Index: b/jdk/src/solaris/native/java/lang/java_props_md.c
+===================================================================
+--- a/jdk/src/solaris/native/java/lang/java_props_md.c
++++ b/jdk/src/solaris/native/java/lang/java_props_md.c
+@@ -23,7 +23,7 @@
+ * questions.
+ */
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ #include <stdio.h>
+ #include <ctype.h>
+ #endif
+@@ -57,7 +57,7 @@
+ #include "java_props.h"
+
+ #if !defined(_ALLBSD_SOURCE)
+-#ifdef __linux__
++#ifdef __linux__ || defined(__GLIBC__)
+ #ifndef CODESET
+ #define CODESET _NL_CTYPE_CODESET_NAME
+ #endif
+@@ -151,7 +151,7 @@ static int ParseLocale(JNIEnv* env, int
+ lc = setlocale(cat, NULL);
+ #endif
+
+-#ifndef __linux__
++#if !defined(__linux__) && !defined(__GLIBC__)
+ if (lc == NULL) {
+ return 0;
+ }
+@@ -331,7 +331,7 @@ static int ParseLocale(JNIEnv* env, int
+ * in order to use optimizations. */
+ *std_encoding = (*p != '\0') ? p : "ISO8859-1";
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ /*
+ * Remap the encoding string to a different value for japanese
+ * locales on linux so that customized converters are used instead
+@@ -559,7 +559,7 @@ GetJavaProperties(JNIEnv *env)
+ sprops.unicode_encoding = "UnicodeBig";
+ #endif
+ #else /* !_ALLBSD_SOURCE */
+-#ifdef __linux__
++#ifdef __linux__ || defined(__GLIBC__)
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+ sprops.unicode_encoding = "UnicodeLittle";
+ #else
+Index: b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+@@ -39,7 +39,7 @@
+ #define BSD_COMP
+ #endif
+ #endif
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <unistd.h>
+ #include <sys/utsname.h>
+ #include <netinet/ip.h>
+@@ -299,7 +299,7 @@ Java_java_net_PlainDatagramSocketImpl_di
+ /* The fdObj'fd */
+ jint fd;
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ SOCKADDR addr;
+ int len;
+ #endif
+@@ -309,19 +309,26 @@ Java_java_net_PlainDatagramSocketImpl_di
+ }
+ fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ memset(&addr, 0, sizeof(addr));
+ #ifdef AF_INET6
+ if (ipv6_available()) {
+ struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&addr;
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++ him6->sin6_family = AF_INET6;
++#else
+ him6->sin6_family = AF_UNSPEC;
++#endif
+ len = sizeof(struct sockaddr_in6);
+ } else
+ #endif
+ {
+ struct sockaddr_in *him4 = (struct sockaddr_in*)&addr;
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ him4->sin_family = AF_UNSPEC;
++#else
+ len = sizeof(struct sockaddr_in);
++#endif
+ }
+ JVM_Connect(fd, (struct sockaddr *)&addr, len);
+
+Index: b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c
++++ b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c
+@@ -75,7 +75,7 @@ Java_java_net_Inet6AddressImpl_getLocalH
+ } else {
+ // ensure null-terminated
+ hostname[NI_MAXHOST] = '\0';
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ /* On Linux/FreeBSD gethostname() says "host.domain.sun.com". On
+ * Solaris gethostname() says "host", so extra work is needed.
+ */
+@@ -805,7 +805,7 @@ Java_java_net_Inet6AddressImpl_isReachab
+ case ENETUNREACH: /* Network Unreachable */
+ case EAFNOSUPPORT: /* Address Family not supported */
+ case EADDRNOTAVAIL: /* address is not available on the remote machine */
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ case EINVAL:
+ case EHOSTUNREACH:
+ /*
+Index: b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
++++ b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
+@@ -645,7 +645,7 @@ ping4(JNIEnv *env, jint fd, struct socka
+ n = sendto(fd, sendbuf, plen, 0, (struct sockaddr *)him,
+ sizeof(struct sockaddr));
+ if (n < 0 && errno != EINPROGRESS ) {
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ if (errno != EINVAL && errno != EHOSTUNREACH)
+ /*
+ * On some Linux versions, when a socket is bound to the loopback
+@@ -811,7 +811,7 @@ Java_java_net_Inet4AddressImpl_isReachab
+ case ENETUNREACH: /* Network Unreachable */
+ case EAFNOSUPPORT: /* Address Family not supported */
+ case EADDRNOTAVAIL: /* address is not available on the remote machine */
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ case EINVAL:
+ case EHOSTUNREACH:
+ /*
+Index: b/jdk/src/solaris/native/java/net/NetworkInterface.c
+===================================================================
+--- a/jdk/src/solaris/native/java/net/NetworkInterface.c
++++ b/jdk/src/solaris/native/java/net/NetworkInterface.c
+@@ -63,17 +63,17 @@
+ #define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6"
+ #endif
+
+-#if defined(_ALLBSD_SOURCE)
++#if defined(_ALLBSD_SOURCE) || defined(__FreeBSD_kernel__)
+ #include <sys/param.h>
+ #include <sys/ioctl.h>
+ #include <sys/sockio.h>
+-#if defined(__APPLE__)
++#if defined(__APPLE__) || defined(__FreeBSD_kernel__)
+ #include <net/ethernet.h>
+ #include <net/if_var.h>
+ #include <net/if_dl.h>
+ #include <netinet/in_var.h>
+-#include <ifaddrs.h>
+ #endif
++#include <ifaddrs.h>
+ #endif
+
+ #include "jvm.h"
+@@ -1821,7 +1821,11 @@ static int getMacAddress(JNIEnv *env, in
+ * try the old way.
+ */
+ memset(&lif, 0, sizeof(lif));
++#if defined(__FreeBSD_kernel__)
++ strcpy(lif.lifr_name, ifname);
++#else
+ strlcpy(lif.lifr_name, ifname, sizeof(lif.lifr_name));
++#endif
+
+ if (ioctl(sock, SIOCGLIFHWADDR, &lif) != -1) {
+ struct sockaddr_dl *sp;
+@@ -1907,7 +1911,7 @@ static int getFlags(int sock, const char
+
+
+ /** BSD **/
+-#ifdef _ALLBSD_SOURCE
++#if defined(_ALLBSD_SOURCE) || defined(__FreeBSD_kernel__)
+ /* Open socket for further ioct calls, try v4 socket first and
+ * if it falls return v6 socket
+ */
+@@ -2036,7 +2040,11 @@ static netif *enumIPv6Interfaces(JNIEnv
+ continue;
+
+ memset(&ifr6, 0, sizeof(ifr6));
++#if defined(__FreeBSD_kernel__)
++ strcpy(ifr6.ifr_name, ifa->ifa_name);
++#else
+ strlcpy(ifr6.ifr_name, ifa->ifa_name, sizeof(ifr6.ifr_name));
++#endif
+ memcpy(&ifr6.ifr_addr, ifa->ifa_addr, MIN(sizeof(ifr6.ifr_addr), ifa->ifa_addr->sa_len));
+
+ if (ioctl(sock, SIOCGIFNETMASK_IN6, (caddr_t)&ifr6) < 0) {
+Index: b/jdk/src/solaris/native/java/net/net_util_md.c
+===================================================================
+--- a/jdk/src/solaris/native/java/net/net_util_md.c
++++ b/jdk/src/solaris/native/java/net/net_util_md.c
+@@ -56,6 +56,11 @@
+ #include <net/route.h>
+ #include <sys/utsname.h>
+
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#endif
++
+ #ifndef IPV6_FLOWINFO_SEND
+ #define IPV6_FLOWINFO_SEND 33
+ #endif
+Index: b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+@@ -32,7 +32,7 @@
+ #endif
+ #include <netinet/tcp.h> /* Defines TCP_NODELAY, needed for 2.6 */
+ #include <netinet/in.h>
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <netinet/ip.h>
+ #endif
+ #include <netdb.h>
+@@ -41,7 +41,7 @@
+ #ifdef __solaris__
+ #include <fcntl.h>
+ #endif
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <unistd.h>
+ #endif
+
+@@ -467,7 +467,7 @@ Java_java_net_PlainSocketImpl_socketConn
+ /* report the appropriate exception */
+ if (connect_rv < 0) {
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ /*
+ * Linux/GNU distribution setup /etc/hosts so that
+ * InetAddress.getLocalHost gets back the loopback address
+Index: b/jdk/src/solaris/native/java/net/net_util_md.h
+===================================================================
+--- a/jdk/src/solaris/native/java/net/net_util_md.h
++++ b/jdk/src/solaris/native/java/net/net_util_md.h
+@@ -47,7 +47,7 @@
+ close subroutine does not return until the select call returns.
+ ...
+ */
+-#if defined(__linux__) || defined(MACOSX) || defined (_AIX)
++#if defined(__linux__) || defined(MACOSX) || defined (_AIX) || defined(__GLIBC__)
+ extern int NET_Timeout(int s, long timeout);
+ extern int NET_Read(int s, void* buf, size_t len);
+ extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
+@@ -179,7 +179,7 @@ extern jint NET_Wait(JNIEnv *env, jint f
+ /************************************************************************
+ * Utilities
+ */
+-#ifdef __linux__
++#if defined(__linux__)
+ extern int kernelIsV24();
+ #endif
+
+Index: b/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java
+===================================================================
+--- a/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java
++++ b/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java
+@@ -306,7 +306,7 @@ public class FcFontConfiguration extends
+
+ super.setOsNameAndVersion();
+
+- if (!osName.equals("Linux")) {
++ if (!(osName.equals("Linux") || osName.equals("GNU/kFreeBSD"))) {
+ return;
+ }
+ try {
+Index: b/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java
+===================================================================
+--- a/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java
++++ b/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java
+@@ -161,6 +161,7 @@ public class UnixPrintServiceLookup exte
+
+ static boolean isBSD() {
+ return (osname.equals("Linux") ||
++ osname.equals("GNU/kFreeBSD") ||
+ osname.contains("OS X"));
+ }
+
+Index: b/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
+===================================================================
+--- a/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
++++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
+@@ -102,9 +102,7 @@ class LinuxFileStore
+ LinuxNativeDispatcher.fgetxattr(fd, name, 0L, 0);
+ return true;
+ } catch (UnixException e) {
+- // attribute does not exist
+- if (e.errno() == UnixConstants.ENODATA)
+- return true;
++ return false;
+ } finally {
+ UnixNativeDispatcher.close(fd);
+ }
+Index: b/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java
+===================================================================
+--- a/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java
++++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java
+@@ -238,9 +238,6 @@ class LinuxDosFileAttributeView
+ }
+ throw new UnixException("Value of " + DOS_XATTR_NAME + " attribute is invalid");
+ } catch (UnixException x) {
+- // default value when attribute does not exist
+- if (x.errno() == ENODATA)
+- return 0;
+ throw x;
+ } finally {
+ buffer.release();
+Index: b/jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java
+===================================================================
+--- a/jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java
++++ b/jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java
+@@ -61,6 +61,8 @@ public class DefaultFileSystemProvider {
+ return createProvider("sun.nio.fs.SolarisFileSystemProvider");
+ if (osname.equals("Linux"))
+ return createProvider("sun.nio.fs.LinuxFileSystemProvider");
++ if (osname.equals("GNU/kFreeBSD"))
++ return createProvider("sun.nio.fs.BsdFileSystemProvider");
+ if (osname.contains("OS X"))
+ return createProvider("sun.nio.fs.MacOSXFileSystemProvider");
+ if (osname.equals("AIX"))
+Index: b/jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java
+===================================================================
+--- a/jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java
++++ b/jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java
+@@ -64,7 +64,7 @@ public class DefaultAsynchronousChannelP
+ .doPrivileged(new GetPropertyAction("os.name"));
+ if (osname.equals("SunOS"))
+ return createProvider("sun.nio.ch.SolarisAsynchronousChannelProvider");
+- if (osname.equals("Linux"))
++ if (osname.equals("Linux") || osname.equals("GNU/kFreeBSD"))
+ return createProvider("sun.nio.ch.LinuxAsynchronousChannelProvider");
+ if (osname.contains("OS X"))
+ return createProvider("sun.nio.ch.BsdAsynchronousChannelProvider");
+Index: b/jdk/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java
+===================================================================
+--- a/jdk/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java
++++ b/jdk/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java
+@@ -74,7 +74,7 @@ class XScrollbarPeer extends XComponentP
+ * Currently uses hardcoded values
+ */
+ private int getDefaultDimension() {
+- if (System.getProperty("os.name").equals("Linux")) {
++ if (System.getProperty("os.name").equals("Linux") || System.getProperty("os.name").equals("GNU/kFreeBSD")) {
+ return DEFAULT_WIDTH_LINUX;
+ } else {
+ return DEFAULT_WIDTH_SOLARIS;
+Index: b/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h
+===================================================================
+--- a/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h
++++ b/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h
+@@ -61,7 +61,7 @@
+ #define log1p jlog1p
+ #define expm1 jexpm1
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(__GLIBC__)
+ #define __ieee754_sqrt __j__ieee754_sqrt
+ #define __ieee754_acos __j__ieee754_acos
+ #define __ieee754_log __j__ieee754_log
+Index: b/jdk/src/share/classes/sun/font/FontUtilities.java
+===================================================================
+--- a/jdk/src/share/classes/sun/font/FontUtilities.java
++++ b/jdk/src/share/classes/sun/font/FontUtilities.java
+@@ -76,7 +76,7 @@ public final class FontUtilities {
+ String osName = System.getProperty("os.name", "unknownOS");
+ isSolaris = osName.startsWith("SunOS");
+
+- isLinux = osName.startsWith("Linux");
++ isLinux = osName.startsWith("Linux") || osName.equals("GNU/kFreeBSD");
+
+ isMacOSX = osName.contains("OS X"); // TODO: MacOSX
+
+Index: b/jdk/src/share/classes/sun/print/PSPrinterJob.java
+===================================================================
+--- a/jdk/src/share/classes/sun/print/PSPrinterJob.java
++++ b/jdk/src/share/classes/sun/print/PSPrinterJob.java
+@@ -1587,7 +1587,9 @@ public class PSPrinterJob extends Raster
+ }
+
+ String osname = System.getProperty("os.name");
+- if (osname.equals("Linux") || osname.contains("OS X")) {
++ if (osname.equals("Linux") ||
++ osname.equals("GNU/kFreeBSD") ||
++ osname.contains("OS X")) {
+ execCmd = new String[ncomps];
+ execCmd[n++] = "/usr/bin/lpr";
+ if ((pFlags & PRINTER) != 0) {
+Index: b/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java
+===================================================================
+--- a/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java
++++ b/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java
+@@ -1306,6 +1306,7 @@ public class ExtendedCharsets
+ String osName = AccessController.doPrivileged(
+ new GetPropertyAction("os.name"));
+ if ("SunOS".equals(osName) || "Linux".equals(osName) || "AIX".equals(osName)
++ || "GNU/kFreeBSD".equals(osName)
+ || osName.contains("OS X")) {
+ charset("x-COMPOUND_TEXT", "COMPOUND_TEXT",
+ new String[] {
+Index: b/jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java
+===================================================================
+--- a/jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java
++++ b/jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java
+@@ -49,6 +49,7 @@ public class GSSManagerImpl extends GSSM
+ String osname = System.getProperty("os.name");
+ if (osname.startsWith("SunOS") ||
+ osname.contains("OS X") ||
++ osname.startsWith("GNU/kFreeBSD") ||
+ osname.startsWith("Linux")) {
+ return new Boolean(System.getProperty
+ (USE_NATIVE_PROP));
+Index: b/jdk/src/solaris/native/sun/net/portconfig.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/net/portconfig.c
++++ b/jdk/src/solaris/native/sun/net/portconfig.c
+@@ -28,7 +28,7 @@
+ #include <unistd.h>
+ #include <errno.h>
+
+-#if defined(_ALLBSD_SOURCE)
++#if defined(_ALLBSD_SOURCE) || defined (__FreeBSD_kernel__)
+ #include <sys/sysctl.h>
+ #endif
+
+@@ -67,7 +67,7 @@ static int getPortRange(struct portrange
+ range->lower = net_getParam("/dev/tcp", "tcp_smallest_anon_port");
+ return 0;
+ }
+-#elif defined(_ALLBSD_SOURCE)
++#elif defined(_ALLBSD_SOURCE) || defined (__FreeBSD_kernel__)
+ {
+ int ret;
+ size_t size = sizeof(range->lower);
+Index: b/jdk/src/solaris/classes/sun/net/PortConfig.java
+===================================================================
+--- a/jdk/src/solaris/classes/sun/net/PortConfig.java
++++ b/jdk/src/solaris/classes/sun/net/PortConfig.java
+@@ -63,6 +63,9 @@ public final class PortConfig {
+ // /usr/sbin/no -a | fgrep ephemeral
+ defaultLower = 32768;
+ defaultUpper = 65535;
++ } else if (os.contains("FreeBSD")) {
++ defaultLower = 10000;
++ defaultUpper = 65535;
+ } else {
+ throw new InternalError(
+ "sun.net.PortConfig: unknown OS");
+Index: b/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
+===================================================================
+--- a/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
++++ b/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
+@@ -180,6 +180,7 @@ public abstract class GraphicsEnvironmen
+ ("Linux".equals(osName) ||
+ "SunOS".equals(osName) ||
+ "FreeBSD".equals(osName) ||
++ "GNU/kFreeBSD".equals(osName) ||
+ "NetBSD".equals(osName) ||
+ "OpenBSD".equals(osName) ||
+ "AIX".equals(osName)) &&
+Index: b/jdk/make/mapfiles/libattach/mapfile-bsd
+===================================================================
+--- /dev/null
++++ b/jdk/make/mapfiles/libattach/mapfile-bsd
+@@ -0,0 +1,41 @@
++#
++# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation. Oracle designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Oracle in the LICENSE file that accompanied this code.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++# or visit www.oracle.com if you need additional information or have any
++# questions.
++#
++
++# Define public interface.
++
++SUNWprivate_1.1 {
++ global:
++ Java_sun_tools_attach_BsdVirtualMachine_checkPermissions;
++ Java_sun_tools_attach_BsdVirtualMachine_close;
++ Java_sun_tools_attach_BsdVirtualMachine_connect;
++ Java_sun_tools_attach_BsdVirtualMachine_createAttachFile;
++ Java_sun_tools_attach_BsdVirtualMachine_getTempDir;
++ Java_sun_tools_attach_BsdVirtualMachine_sendQuitTo;
++ Java_sun_tools_attach_BsdVirtualMachine_socket;
++ Java_sun_tools_attach_BsdVirtualMachine_read;
++ Java_sun_tools_attach_BsdVirtualMachine_write;
++ local:
++ *;
++};
+Index: b/jdk/make/lib/ServiceabilityLibraries.gmk
+===================================================================
+--- a/jdk/make/lib/ServiceabilityLibraries.gmk
++++ b/jdk/make/lib/ServiceabilityLibraries.gmk
+@@ -34,7 +34,7 @@ endif
+ ifneq ($(OPENJDK_TARGET_OS), linux)
+ LIBATTACH_EXCLUDE_FILES += LinuxVirtualMachine.c
+ endif
+-ifneq ($(OPENJDK_TARGET_OS), macosx)
++ifeq (,$(findstring $(OPENJDK_TARGET_OS), bsd macosx))
+ LIBATTACH_EXCLUDE_FILES += BsdVirtualMachine.c
+ endif
+ ifneq ($(OPENJDK_TARGET_OS),aix)
+@@ -160,6 +160,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_SUFFIX_linux := $(LIBDL), \
++ LDFLAGS_SUFFIX_bsd := $(LIBDL), \
+ LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \
+ LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+@@ -189,6 +190,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_SUFFIX_linux := $(LIBDL), \
++ LDFLAGS_SUFFIX_bsd := $(LIBDL), \
+ LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL), \
+ LDFLAGS_SUFFIX_macosx := $(LIBDL), \
+ LDFLAGS_SUFFIX_solaris := -lc, \
+@@ -260,6 +262,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ $(call SET_SHARED_LIBRARY_ORIGIN) \
+ $(LIBINSTRUMENT_LDFLAGS), \
+ LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
++ LDFLAGS_bsd := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
+ LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
+ LDFLAGS_macosx := -Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
+ -framework Cocoa -framework Security -framework ApplicationServices, \
+@@ -267,6 +270,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
+ LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \
+ LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
++ LDFLAGS_SUFFIX_bsd := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
+ LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(JDK_OUTPUTDIR)/objs -ljli_static $(LIBDL),\
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+ RC_FLAGS := $(RC_FLAGS) \
+@@ -379,6 +383,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_windows := wsock32.lib winmm.lib advapi32.lib, \
+ LDFLAGS_SUFFIX_linux := $(LIBDL), \
++ LDFLAGS_SUFFIX_bsd := $(LIBDL), \
+ LDFLAGS_SUFFIX_macosx := $(LIBDL), \
+ LDFLAGS_SUFFIX_solaris := -lsocket -lnsl $(LIBDL) -lc, \
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+Index: b/jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider
+===================================================================
+--- a/jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider
++++ b/jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider
+@@ -31,4 +31,5 @@
+ #[windows]sun.tools.attach.WindowsAttachProvider
+ #[linux]sun.tools.attach.LinuxAttachProvider
+ #[macosx]sun.tools.attach.BsdAttachProvider
++#[bsd]sun.tools.attach.BsdAttachProvider
+ #[aix]sun.tools.attach.AixAttachProvider
+Index: b/jdk/make/CompileJavaClasses.gmk
+===================================================================
+--- a/jdk/make/CompileJavaClasses.gmk
++++ b/jdk/make/CompileJavaClasses.gmk
+@@ -135,16 +135,22 @@ ifneq ($(OPENJDK_TARGET_OS), linux)
+ endif
+
+ ifneq ($(OPENJDK_TARGET_OS), macosx)
++ EXFILES += sun/nio/fs/MacOSXFileSystemProvider.java \
++ sun/nio/fs/MacOSXFileSystem.java \
++ sun/nio/fs/MacOSXNativeDispatcher.java
++endif
++
++ifeq (, $(filter $(OPENJDK_TARGET_OS), bsd macosx))
+ EXFILES += sun/nio/ch/BsdAsynchronousChannelProvider.java \
+ sun/nio/ch/KQueue.java \
++ sun/nio/ch/KQueueArrayWrapper.java \
+ sun/nio/ch/KQueuePort.java \
++ sun/nio/ch/KQueueSelectorImpl.java \
++ sun/nio/ch/KQueueSelectorProvider.java \
+ sun/nio/fs/BsdFileStore.java \
+ sun/nio/fs/BsdFileSystem.java \
+ sun/nio/fs/BsdFileSystemProvider.java \
+ sun/nio/fs/BsdNativeDispatcher.java \
+- sun/nio/fs/MacOSXFileSystemProvider.java \
+- sun/nio/fs/MacOSXFileSystem.java \
+- sun/nio/fs/MacOSXNativeDispatcher.java \
+ sun/tools/attach/BsdAttachProvider.java \
+ sun/tools/attach/BsdVirtualMachine.java
+ endif
+Index: b/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c
++++ b/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c
+@@ -352,7 +352,13 @@ Java_sun_management_OperatingSystemImpl_
+ size_t rlen;
+
+ mib[0] = CTL_HW;
++#if defined (HW_MEMSIZE) // Apple
+ mib[1] = HW_MEMSIZE;
++#elif defined(HW_PHYSMEM) // Most of BSD
++ mib[1] = HW_PHYSMEM;
++#else
++ #error No ways to get physmem
++#endif
+ rlen = sizeof(result);
+ if (sysctl(mib, 2, &result, &rlen, NULL, 0) != 0) {
+ throw_internal_error(env, "sysctl failed");
+Index: b/jdk/make/lib/SoundLibraries.gmk
+===================================================================
+--- a/jdk/make/lib/SoundLibraries.gmk
++++ b/jdk/make/lib/SoundLibraries.gmk
+@@ -71,6 +71,11 @@ ifeq ($(OPENJDK_TARGET_OS), linux)
+ LIBJSOUND_CFLAGS += -DX_PLATFORM=X_LINUX
+ endif # OPENJDK_TARGET_OS linux
+
++ifeq ($(OPENJDK_TARGET_OS), bsd)
++ EXTRA_SOUND_JNI_LIBS += jsoundalsa
++ LIBJSOUND_CFLAGS += -DX_PLATFORM=X_BSD
++endif # OPENJDK_TARGET_OS bsd
++
+ ifeq ($(OPENJDK_TARGET_OS), aix)
+ LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX
+ endif # OPENJDK_TARGET_OS aix
+Index: b/jdk/make/lib/CoreLibraries.gmk
+===================================================================
+--- a/jdk/make/lib/CoreLibraries.gmk
++++ b/jdk/make/lib/CoreLibraries.gmk
+@@ -199,6 +199,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS_SUFFIX_posix := -ljvm -lverify, \
+ LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \
+ LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \
++ LDFLAGS_SUFFIX_bsd := $(LIBDL) $(BUILD_LIBFDLIBM), \
+ LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\
+ LDFLAGS_SUFFIX_macosx := -L$(JDK_OUTPUTDIR)/objs/ -lfdlibm \
+ -framework CoreFoundation \
+@@ -268,6 +269,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ -export:ZIP_ReadEntry -export:ZIP_GetNextEntry -export:ZIP_CRC32 jvm.lib \
+ $(WIN_JAVA_LIB), \
+ LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
++ LDFLAGS_SUFFIX_bsd := -ljvm -ljava $(LIBZ), \
+ LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
+ LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\
+ LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \
+@@ -414,10 +416,12 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
++ LDFLAGS_bsd := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+ LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+ LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \
+ LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \
+ LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \
++ LDFLAGS_SUFFIX_bsd := $(LIBZ) $(LIBDL) -lc -pthread, \
+ LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\
+ LDFLAGS_SUFFIX_macosx := $(LIBZ), \
+ LDFLAGS_SUFFIX_windows := \
+Index: b/jdk/make/lib/NioLibraries.gmk
+===================================================================
+--- a/jdk/make/lib/NioLibraries.gmk
++++ b/jdk/make/lib/NioLibraries.gmk
+@@ -77,6 +77,24 @@ ifeq ($(OPENJDK_TARGET_OS), linux)
+ UnixNativeDispatcher.c
+ endif
+
++ifeq ($(OPENJDK_TARGET_OS), bsd)
++ BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
++# BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/bsd/native/sun/nio/ch
++ BUILD_LIBNIO_FILES += \
++ BsdNativeDispatcher.c \
++ GnomeFileTypeDetector.c \
++ InheritedChannel.c \
++ KQueue.c \
++ KQueueArrayWrapper.c \
++ KQueuePort.c \
++ NativeThread.c \
++ PollArrayWrapper.c \
++ UnixAsynchronousServerSocketChannelImpl.c \
++ UnixAsynchronousSocketChannelImpl.c \
++ UnixCopyFile.c \
++ UnixNativeDispatcher.c
++endif
++
+ ifeq ($(OPENJDK_TARGET_OS), macosx)
+ BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
+ BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch
+@@ -143,6 +161,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_SUFFIX_linux := -ljava -lnet -lpthread $(LIBDL), \
++ LDFLAGS_SUFFIX_bsd := -ljava -lnet -lpthread $(LIBDL), \
+ LDFLAGS_SUFFIX_aix := -ljava -lnet $(LIBDL),\
+ LDFLAGS_SUFFIX_solaris := -ljvm -lsocket -lposix4 $(LIBDL) \
+ -lsendfile -ljava -lnet -lc, \
+@@ -192,6 +211,7 @@ ifeq ($(OPENJDK_TARGET_OS_API), posix)
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \
++ LDFLAGS_SUFFIX_bsd := -lpthread $(LIBDL) -ljava -ljvm, \
+ LDFLAGS_SUFFIX_posix := -lnio -lnet, \
+ LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
+ LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
+Index: b/jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_LinuxOS_ALSA_PCM.c
+===================================================================
+--- a/jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_LinuxOS_ALSA_PCM.c
++++ b/jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_LinuxOS_ALSA_PCM.c
+@@ -675,6 +675,7 @@ int xrun_recovery(AlsaPcmInfo* info, int
+ return -1;
+ }
+ return 1;
++#ifdef __linux__
+ } else if (err == -ESTRPIPE) {
+ TRACE0("xrun_recovery: suspended.\n");
+ ret = snd_pcm_resume(info->handle);
+@@ -690,6 +691,7 @@ int xrun_recovery(AlsaPcmInfo* info, int
+ return -1;
+ }
+ return 1;
++#endif
+ } else if (err == -EAGAIN) {
+ TRACE0("xrun_recovery: EAGAIN try again flag.\n");
+ return 0;
+Index: b/jdk/make/CompileLaunchers.gmk
+===================================================================
+--- a/jdk/make/CompileLaunchers.gmk
++++ b/jdk/make/CompileLaunchers.gmk
+@@ -163,13 +163,13 @@ define SetupLauncher
+ -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
+ -DPROGNAME='"$1"' $(DPACKAGEPATH) \
+ $2, \
+- CFLAGS_linux := -fPIC, \
++ CFLAGS_bsd := -fPIC, \
+ CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \
+ LDFLAGS := $(LDFLAGS_JDKEXE) \
+ $(ORIGIN_ARG) \
+ $$($1_LDFLAGS), \
+ LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_NAME,$1), \
+- LDFLAGS_linux := -lpthread \
++ LDFLAGS_bsd := -lpthread \
+ $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+ LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
+ $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
+@@ -178,7 +178,7 @@ define SetupLauncher
+ LDFLAGS_SUFFIX_posix := $4, \
+ LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \
+ $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5, \
+- LDFLAGS_SUFFIX_linux := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
++ LDFLAGS_SUFFIX_bsd := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
+ LDFLAGS_SUFFIX_solaris := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
+ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR), \
+ OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \
+@@ -538,7 +538,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ endif
+ endif
+
+-ifeq ($(OPENJDK_TARGET_OS), linux)
++ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd), )
+ BUILD_JEXEC := 1
+ endif # OPENJDK_TARGET_OS
+
+@@ -554,7 +554,7 @@ ifeq ($(BUILD_JEXEC), 1)
+ BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
+ endif
+
+- ifeq ($(OPENJDK_TARGET_OS), linux)
++ ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd), )
+ BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
+ BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
+ endif
+@@ -590,7 +590,7 @@ endif
+ # The java-rmi.cgi script in bin/ only gets delivered in certain situations
+ #
+ JAVA_RMI_CGI := $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
+-ifeq ($(OPENJDK_TARGET_OS), linux)
++ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd), )
+ BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
+ endif
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+@@ -621,11 +621,11 @@ BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTP
+ LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
+ LINK_JSPAWNHELPER_FLAGS :=
+
+-ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
++ifneq ($(findstring $(OPENJDK_TARGET_OS), bsd macosx solaris aix), )
+ BUILD_JSPAWNHELPER := 1
+ endif
+
+-ifeq ($(OPENJDK_TARGET_OS), macosx)
++ifeq ($(OPENJDK_TARGET_OS), bsd macosx)
+ BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
+ endif
+
+Index: b/jdk/src/share/bin/jli_util.h
+===================================================================
+--- a/jdk/src/share/bin/jli_util.h
++++ b/jdk/src/share/bin/jli_util.h
+@@ -83,7 +83,7 @@ void JLI_CmdToArgs(char *cmdline);
+ #ifdef __solaris__
+ #define JLI_Lseek llseek
+ #endif
+-#ifdef __linux__
++#if defined(__linux__) || defined (__GLIBC__)
+ #define _LARGFILE64_SOURCE
+ #define JLI_Lseek lseek64
+ #endif
+Index: b/jdk/make/data/classlist/classlist.bsd
+===================================================================
+--- /dev/null
++++ b/jdk/make/data/classlist/classlist.bsd
+@@ -0,0 +1,2454 @@
++com/sun/java/swing/SwingUtilities3
++com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI
++com/sun/swing/internal/plaf/basic/resources/basic
++com/sun/swing/internal/plaf/metal/resources/metal
++java/applet/Applet
++java/awt/AWTEvent
++java/awt/AWTEvent$1
++java/awt/AWTEventMulticaster
++java/awt/AWTKeyStroke
++java/awt/AWTKeyStroke$1
++java/awt/ActiveEvent
++java/awt/Adjustable
++java/awt/AlphaComposite
++java/awt/BasicStroke
++java/awt/BorderLayout
++java/awt/BufferCapabilities
++java/awt/Canvas
++java/awt/CardLayout
++java/awt/CardLayout$Card
++java/awt/Color
++java/awt/Component
++java/awt/Component$1
++java/awt/Component$3
++java/awt/Component$AWTTreeLock
++java/awt/Component$AccessibleAWTComponent
++java/awt/Component$BaselineResizeBehavior
++java/awt/Component$BltBufferStrategy
++java/awt/Component$BltSubRegionBufferStrategy
++java/awt/Component$DummyRequestFocusController
++java/awt/Component$FlipBufferStrategy
++java/awt/ComponentOrientation
++java/awt/Composite
++java/awt/Conditional
++java/awt/Container
++java/awt/Container$1
++java/awt/Container$AccessibleAWTContainer
++java/awt/ContainerOrderFocusTraversalPolicy
++java/awt/Cursor
++java/awt/Cursor$1
++java/awt/DefaultFocusTraversalPolicy
++java/awt/DefaultKeyboardFocusManager
++java/awt/DefaultKeyboardFocusManager$1
++java/awt/DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent
++java/awt/DefaultKeyboardFocusManager$TypeAheadMarker
++java/awt/Dialog
++java/awt/Dialog$ModalExclusionType
++java/awt/Dialog$ModalityType
++java/awt/Dimension
++java/awt/Event
++java/awt/EventDispatchThread
++java/awt/EventDispatchThread$1
++java/awt/EventDispatchThread$HierarchyEventFilter
++java/awt/EventFilter
++java/awt/EventFilter$FilterAction
++java/awt/EventQueue
++java/awt/EventQueue$1
++java/awt/EventQueue$1AWTInvocationLock
++java/awt/EventQueue$2
++java/awt/EventQueue$3
++java/awt/EventQueue$4
++java/awt/EventQueue$5
++java/awt/FlowLayout
++java/awt/FocusTraversalPolicy
++java/awt/Font
++java/awt/Font$FontAccessImpl
++java/awt/FontFormatException
++java/awt/FontMetrics
++java/awt/Frame
++java/awt/Frame$1
++java/awt/Graphics
++java/awt/Graphics2D
++java/awt/GraphicsCallback
++java/awt/GraphicsCallback$PaintCallback
++java/awt/GraphicsConfiguration
++java/awt/GraphicsDevice
++java/awt/GraphicsEnvironment
++java/awt/GraphicsEnvironment$1
++java/awt/GridLayout
++java/awt/Image
++java/awt/Image$1
++java/awt/ImageCapabilities
++java/awt/ImageMediaEntry
++java/awt/Insets
++java/awt/ItemSelectable
++java/awt/KeyEventDispatcher
++java/awt/KeyEventPostProcessor
++java/awt/KeyboardFocusManager
++java/awt/KeyboardFocusManager$1
++java/awt/KeyboardFocusManager$3
++java/awt/KeyboardFocusManager$HeavyweightFocusRequest
++java/awt/KeyboardFocusManager$LightweightFocusRequest
++java/awt/Label
++java/awt/LayoutManager
++java/awt/LayoutManager2
++java/awt/LightweightDispatcher
++java/awt/LightweightDispatcher$2
++java/awt/MediaEntry
++java/awt/MediaTracker
++java/awt/MenuBar
++java/awt/MenuComponent
++java/awt/MenuContainer
++java/awt/ModalEventFilter
++java/awt/Paint
++java/awt/Panel
++java/awt/Point
++java/awt/PrintGraphics
++java/awt/Queue
++java/awt/Rectangle
++java/awt/RenderingHints
++java/awt/RenderingHints$Key
++java/awt/SentEvent
++java/awt/SequencedEvent
++java/awt/SequencedEvent$1
++java/awt/Shape
++java/awt/SplashScreen
++java/awt/Stroke
++java/awt/SystemColor
++java/awt/Toolkit
++java/awt/Toolkit$1
++java/awt/Toolkit$2
++java/awt/Toolkit$3
++java/awt/Toolkit$4
++java/awt/Toolkit$5
++java/awt/Toolkit$DesktopPropertyChangeSupport
++java/awt/Toolkit$DesktopPropertyChangeSupport$1
++java/awt/Toolkit$SelectiveAWTEventListener
++java/awt/Toolkit$ToolkitEventMulticaster
++java/awt/Transparency
++java/awt/TrayIcon
++java/awt/VKCollection
++java/awt/Window
++java/awt/Window$1
++java/awt/Window$1DisposeAction
++java/awt/Window$Type
++java/awt/Window$WindowDisposerRecord
++java/awt/color/ColorSpace
++java/awt/color/ICC_ColorSpace
++java/awt/color/ICC_Profile
++java/awt/color/ICC_Profile$1
++java/awt/color/ICC_ProfileRGB
++java/awt/datatransfer/Clipboard
++java/awt/datatransfer/ClipboardOwner
++java/awt/datatransfer/FlavorMap
++java/awt/datatransfer/FlavorTable
++java/awt/datatransfer/SystemFlavorMap
++java/awt/datatransfer/Transferable
++java/awt/dnd/DropTarget
++java/awt/dnd/DropTargetContext
++java/awt/dnd/DropTargetListener
++java/awt/dnd/peer/DragSourceContextPeer
++java/awt/dnd/peer/DropTargetContextPeer
++java/awt/dnd/peer/DropTargetPeer
++java/awt/event/AWTEventListener
++java/awt/event/AWTEventListenerProxy
++java/awt/event/ActionEvent
++java/awt/event/ActionListener
++java/awt/event/AdjustmentEvent
++java/awt/event/AdjustmentListener
++java/awt/event/ComponentAdapter
++java/awt/event/ComponentEvent
++java/awt/event/ComponentListener
++java/awt/event/ContainerEvent
++java/awt/event/ContainerListener
++java/awt/event/FocusAdapter
++java/awt/event/FocusEvent
++java/awt/event/FocusListener
++java/awt/event/HierarchyBoundsListener
++java/awt/event/HierarchyListener
++java/awt/event/InputEvent
++java/awt/event/InputEvent$1
++java/awt/event/InputMethodEvent
++java/awt/event/InputMethodListener
++java/awt/event/InvocationEvent
++java/awt/event/InvocationEvent$1
++java/awt/event/ItemEvent
++java/awt/event/ItemListener
++java/awt/event/KeyAdapter
++java/awt/event/KeyEvent
++java/awt/event/KeyEvent$1
++java/awt/event/KeyListener
++java/awt/event/MouseAdapter
++java/awt/event/MouseEvent
++java/awt/event/MouseListener
++java/awt/event/MouseMotionAdapter
++java/awt/event/MouseMotionListener
++java/awt/event/MouseWheelListener
++java/awt/event/NativeLibLoader
++java/awt/event/NativeLibLoader$1
++java/awt/event/PaintEvent
++java/awt/event/TextListener
++java/awt/event/WindowAdapter
++java/awt/event/WindowEvent
++java/awt/event/WindowFocusListener
++java/awt/event/WindowListener
++java/awt/event/WindowStateListener
++java/awt/font/FontRenderContext
++java/awt/font/GlyphVector
++java/awt/font/LineMetrics
++java/awt/font/TextAttribute
++java/awt/geom/AffineTransform
++java/awt/geom/Dimension2D
++java/awt/geom/GeneralPath
++java/awt/geom/Line2D
++java/awt/geom/Line2D$Float
++java/awt/geom/Path2D
++java/awt/geom/Path2D$Float
++java/awt/geom/PathIterator
++java/awt/geom/Point2D
++java/awt/geom/Point2D$Float
++java/awt/geom/RectIterator
++java/awt/geom/Rectangle2D
++java/awt/geom/Rectangle2D$Float
++java/awt/geom/RectangularShape
++java/awt/im/InputContext
++java/awt/im/InputMethodRequests
++java/awt/im/spi/InputMethod
++java/awt/im/spi/InputMethodContext
++java/awt/im/spi/InputMethodDescriptor
++java/awt/image/BufferStrategy
++java/awt/image/BufferedImage
++java/awt/image/BufferedImage$1
++java/awt/image/ColorModel
++java/awt/image/ColorModel$1
++java/awt/image/ComponentSampleModel
++java/awt/image/DataBuffer
++java/awt/image/DataBuffer$1
++java/awt/image/DataBufferByte
++java/awt/image/DataBufferInt
++java/awt/image/DirectColorModel
++java/awt/image/FilteredImageSource
++java/awt/image/ImageConsumer
++java/awt/image/ImageFilter
++java/awt/image/ImageObserver
++java/awt/image/ImageProducer
++java/awt/image/IndexColorModel
++java/awt/image/PackedColorModel
++java/awt/image/PixelInterleavedSampleModel
++java/awt/image/RGBImageFilter
++java/awt/image/Raster
++java/awt/image/RenderedImage
++java/awt/image/SampleModel
++java/awt/image/SinglePixelPackedSampleModel
++java/awt/image/VolatileImage
++java/awt/image/WritableRaster
++java/awt/image/WritableRenderedImage
++java/awt/peer/CanvasPeer
++java/awt/peer/ComponentPeer
++java/awt/peer/ContainerPeer
++java/awt/peer/FramePeer
++java/awt/peer/KeyboardFocusManagerPeer
++java/awt/peer/LabelPeer
++java/awt/peer/LightweightPeer
++java/awt/peer/PanelPeer
++java/awt/peer/SystemTrayPeer
++java/awt/peer/WindowPeer
++java/awt/print/PrinterGraphics
++java/beans/ChangeListenerMap
++java/beans/PropertyChangeEvent
++java/beans/PropertyChangeListener
++java/beans/PropertyChangeListenerProxy
++java/beans/PropertyChangeSupport
++java/beans/PropertyChangeSupport$PropertyChangeListenerMap
++java/beans/VetoableChangeListener
++java/io/Bits
++java/io/BufferedInputStream
++java/io/BufferedOutputStream
++java/io/BufferedReader
++java/io/BufferedWriter
++java/io/ByteArrayInputStream
++java/io/ByteArrayOutputStream
++java/io/Closeable
++java/io/DataInput
++java/io/DataInputStream
++java/io/DataOutput
++java/io/DataOutputStream
++java/io/DefaultFileSystem
++java/io/EOFException
++java/io/ExpiringCache
++java/io/ExpiringCache$1
++java/io/ExpiringCache$Entry
++java/io/Externalizable
++java/io/File
++java/io/File$PathStatus
++java/io/FileDescriptor
++java/io/FileDescriptor$1
++java/io/FileInputStream
++java/io/FileInputStream$1
++java/io/FileNotFoundException
++java/io/FileOutputStream
++java/io/FileOutputStream$1
++java/io/FilePermission
++java/io/FilePermission$1
++java/io/FilePermissionCollection
++java/io/FileReader
++java/io/FileSystem
++java/io/FileWriter
++java/io/FilenameFilter
++java/io/FilterInputStream
++java/io/FilterOutputStream
++java/io/FilterReader
++java/io/Flushable
++java/io/IOException
++java/io/InputStream
++java/io/InputStreamReader
++java/io/InterruptedIOException
++java/io/ObjectInput
++java/io/ObjectInputStream
++java/io/ObjectInputStream$BlockDataInputStream
++java/io/ObjectInputStream$GetField
++java/io/ObjectInputStream$GetFieldImpl
++java/io/ObjectInputStream$HandleTable
++java/io/ObjectInputStream$HandleTable$HandleList
++java/io/ObjectInputStream$PeekInputStream
++java/io/ObjectInputStream$ValidationList
++java/io/ObjectOutput
++java/io/ObjectOutputStream
++java/io/ObjectOutputStream$BlockDataOutputStream
++java/io/ObjectOutputStream$HandleTable
++java/io/ObjectOutputStream$ReplaceTable
++java/io/ObjectStreamClass
++java/io/ObjectStreamClass$1
++java/io/ObjectStreamClass$2
++java/io/ObjectStreamClass$3
++java/io/ObjectStreamClass$4
++java/io/ObjectStreamClass$5
++java/io/ObjectStreamClass$Caches
++java/io/ObjectStreamClass$ClassDataSlot
++java/io/ObjectStreamClass$EntryFuture
++java/io/ObjectStreamClass$ExceptionInfo
++java/io/ObjectStreamClass$FieldReflector
++java/io/ObjectStreamClass$FieldReflectorKey
++java/io/ObjectStreamClass$MemberSignature
++java/io/ObjectStreamClass$WeakClassKey
++java/io/ObjectStreamConstants
++java/io/ObjectStreamField
++java/io/OutputStream
++java/io/OutputStreamWriter
++java/io/PrintStream
++java/io/PushbackInputStream
++java/io/RandomAccessFile
++java/io/RandomAccessFile$1
++java/io/Reader
++java/io/SerialCallbackContext
++java/io/Serializable
++java/io/StreamTokenizer
++java/io/StringReader
++java/io/StringWriter
++java/io/UnixFileSystem
++java/io/UnsupportedEncodingException
++java/io/Writer
++java/lang/AbstractStringBuilder
++java/lang/Appendable
++java/lang/ApplicationShutdownHooks
++java/lang/ApplicationShutdownHooks$1
++java/lang/ArithmeticException
++java/lang/ArrayIndexOutOfBoundsException
++java/lang/ArrayStoreException
++java/lang/AutoCloseable
++java/lang/Boolean
++java/lang/BootstrapMethodError
++java/lang/Byte
++java/lang/CharSequence
++java/lang/Character
++java/lang/Character$CharacterCache
++java/lang/CharacterData
++java/lang/CharacterData00
++java/lang/CharacterDataLatin1
++java/lang/Class
++java/lang/Class$1
++java/lang/Class$3
++java/lang/Class$4
++java/lang/Class$AnnotationData
++java/lang/Class$Atomic
++java/lang/Class$ReflectionData
++java/lang/ClassCastException
++java/lang/ClassFormatError
++java/lang/ClassLoader
++java/lang/ClassLoader$2
++java/lang/ClassLoader$3
++java/lang/ClassLoader$NativeLibrary
++java/lang/ClassLoader$ParallelLoaders
++java/lang/ClassNotFoundException
++java/lang/ClassValue$ClassValueMap
++java/lang/CloneNotSupportedException
++java/lang/Cloneable
++java/lang/Comparable
++java/lang/Compiler
++java/lang/Compiler$1
++java/lang/Double
++java/lang/Enum
++java/lang/Error
++java/lang/Exception
++java/lang/ExceptionInInitializerError
++java/lang/Float
++java/lang/IllegalAccessError
++java/lang/IllegalAccessException
++java/lang/IllegalArgumentException
++java/lang/IllegalMonitorStateException
++java/lang/IllegalStateException
++java/lang/IncompatibleClassChangeError
++java/lang/IndexOutOfBoundsException
++java/lang/InheritableThreadLocal
++java/lang/InstantiationException
++java/lang/Integer
++java/lang/Integer$IntegerCache
++java/lang/InternalError
++java/lang/InterruptedException
++java/lang/Iterable
++java/lang/LinkageError
++java/lang/Long
++java/lang/Long$LongCache
++java/lang/Math
++java/lang/NoClassDefFoundError
++java/lang/NoSuchFieldException
++java/lang/NoSuchMethodError
++java/lang/NoSuchMethodException
++java/lang/NullPointerException
++java/lang/Number
++java/lang/NumberFormatException
++java/lang/Object
++java/lang/OutOfMemoryError
++java/lang/Package
++java/lang/Process
++java/lang/ProcessBuilder
++java/lang/ProcessBuilder$NullOutputStream
++java/lang/ProcessEnvironment
++java/lang/ProcessEnvironment$ExternalData
++java/lang/ProcessEnvironment$StringEnvironment
++java/lang/ProcessEnvironment$Value
++java/lang/ProcessEnvironment$Variable
++java/lang/ProcessImpl
++java/lang/Readable
++java/lang/ReflectiveOperationException
++java/lang/Runnable
++java/lang/Runtime
++java/lang/RuntimeException
++java/lang/RuntimePermission
++java/lang/SecurityException
++java/lang/SecurityManager
++java/lang/Short
++java/lang/Shutdown
++java/lang/Shutdown$Lock
++java/lang/StackOverflowError
++java/lang/StackTraceElement
++java/lang/StrictMath
++java/lang/String
++java/lang/String$CaseInsensitiveComparator
++java/lang/StringBuffer
++java/lang/StringBuilder
++java/lang/StringCoding
++java/lang/StringCoding$StringDecoder
++java/lang/StringCoding$StringEncoder
++java/lang/StringIndexOutOfBoundsException
++java/lang/System
++java/lang/System$2
++java/lang/SystemClassLoaderAction
++java/lang/Terminator
++java/lang/Terminator$1
++java/lang/Thread
++java/lang/Thread$State
++java/lang/Thread$UncaughtExceptionHandler
++java/lang/ThreadDeath
++java/lang/ThreadGroup
++java/lang/ThreadLocal
++java/lang/ThreadLocal$ThreadLocalMap
++java/lang/ThreadLocal$ThreadLocalMap$Entry
++java/lang/Throwable
++java/lang/Throwable$PrintStreamOrWriter
++java/lang/Throwable$WrappedPrintStream
++java/lang/UNIXProcess
++java/lang/UNIXProcess$1
++java/lang/UNIXProcess$2
++java/lang/UNIXProcess$3
++java/lang/UNIXProcess$4
++java/lang/UNIXProcess$LaunchMechanism
++java/lang/UNIXProcess$ProcessPipeInputStream
++java/lang/UNIXProcess$ProcessPipeOutputStream
++java/lang/UNIXProcess$ProcessReaperThreadFactory
++java/lang/UNIXProcess$ProcessReaperThreadFactory$1
++java/lang/UnsatisfiedLinkError
++java/lang/UnsupportedOperationException
++java/lang/VirtualMachineError
++java/lang/Void
++java/lang/annotation/Annotation
++java/lang/invoke/CallSite
++java/lang/invoke/ConstantCallSite
++java/lang/invoke/DirectMethodHandle
++java/lang/invoke/Invokers
++java/lang/invoke/LambdaForm
++java/lang/invoke/LambdaForm$NamedFunction
++java/lang/invoke/MemberName
++java/lang/invoke/MemberName$Factory
++java/lang/invoke/MethodHandle
++java/lang/invoke/MethodHandleImpl
++java/lang/invoke/MethodHandleNatives
++java/lang/invoke/MethodHandleStatics
++java/lang/invoke/MethodHandleStatics$1
++java/lang/invoke/MethodType
++java/lang/invoke/MethodType$ConcurrentWeakInternSet
++java/lang/invoke/MethodType$ConcurrentWeakInternSet$WeakEntry
++java/lang/invoke/MethodTypeForm
++java/lang/invoke/MutableCallSite
++java/lang/invoke/VolatileCallSite
++java/lang/ref/FinalReference
++java/lang/ref/Finalizer
++java/lang/ref/Finalizer$FinalizerThread
++java/lang/ref/PhantomReference
++java/lang/ref/Reference
++java/lang/ref/Reference$Lock
++java/lang/ref/Reference$ReferenceHandler
++java/lang/ref/ReferenceQueue
++java/lang/ref/ReferenceQueue$Lock
++java/lang/ref/ReferenceQueue$Null
++java/lang/ref/SoftReference
++java/lang/ref/WeakReference
++java/lang/reflect/AccessibleObject
++java/lang/reflect/AnnotatedElement
++java/lang/reflect/Array
++java/lang/reflect/Constructor
++java/lang/reflect/Executable
++java/lang/reflect/Field
++java/lang/reflect/GenericDeclaration
++java/lang/reflect/InvocationHandler
++java/lang/reflect/InvocationTargetException
++java/lang/reflect/Member
++java/lang/reflect/Method
++java/lang/reflect/Modifier
++java/lang/reflect/Parameter
++java/lang/reflect/Proxy
++java/lang/reflect/Proxy$KeyFactory
++java/lang/reflect/Proxy$ProxyClassFactory
++java/lang/reflect/ReflectAccess
++java/lang/reflect/ReflectPermission
++java/lang/reflect/Type
++java/lang/reflect/WeakCache
++java/math/BigInteger
++java/math/BigInteger$UnsafeHolder
++java/math/MutableBigInteger
++java/math/RoundingMode
++java/math/SignedMutableBigInteger
++java/net/AbstractPlainDatagramSocketImpl
++java/net/AbstractPlainDatagramSocketImpl$1
++java/net/AbstractPlainSocketImpl
++java/net/AbstractPlainSocketImpl$1
++java/net/Authenticator
++java/net/BindException
++java/net/ConnectException
++java/net/DatagramPacket
++java/net/DatagramPacket$1
++java/net/DatagramSocket
++java/net/DatagramSocket$1
++java/net/DatagramSocketImpl
++java/net/DefaultDatagramSocketImplFactory
++java/net/DefaultInterface
++java/net/FileNameMap
++java/net/HttpURLConnection
++java/net/Inet4Address
++java/net/Inet4AddressImpl
++java/net/Inet6Address
++java/net/Inet6Address$Inet6AddressHolder
++java/net/Inet6AddressImpl
++java/net/InetAddress
++java/net/InetAddress$1
++java/net/InetAddress$2
++java/net/InetAddress$Cache
++java/net/InetAddress$Cache$Type
++java/net/InetAddress$CacheEntry
++java/net/InetAddress$InetAddressHolder
++java/net/InetAddressImpl
++java/net/InetAddressImplFactory
++java/net/InetSocketAddress
++java/net/InetSocketAddress$InetSocketAddressHolder
++java/net/InterfaceAddress
++java/net/JarURLConnection
++java/net/MalformedURLException
++java/net/MulticastSocket
++java/net/NetworkInterface
++java/net/NetworkInterface$1
++java/net/NoRouteToHostException
++java/net/Parts
++java/net/PlainDatagramSocketImpl
++java/net/PlainSocketImpl
++java/net/Proxy
++java/net/Proxy$Type
++java/net/ProxySelector
++java/net/ServerSocket
++java/net/Socket
++java/net/SocketAddress
++java/net/SocketException
++java/net/SocketImpl
++java/net/SocketImplFactory
++java/net/SocketOptions
++java/net/SocksConsts
++java/net/SocksSocketImpl
++java/net/SocksSocketImpl$3
++java/net/URI
++java/net/URI$Parser
++java/net/URL
++java/net/URLClassLoader
++java/net/URLClassLoader$1
++java/net/URLClassLoader$2
++java/net/URLClassLoader$3
++java/net/URLClassLoader$3$1
++java/net/URLClassLoader$7
++java/net/URLConnection
++java/net/URLConnection$1
++java/net/URLStreamHandler
++java/net/URLStreamHandlerFactory
++java/net/UnknownHostException
++java/nio/Bits
++java/nio/Bits$1
++java/nio/Buffer
++java/nio/ByteBuffer
++java/nio/ByteBufferAsIntBufferB
++java/nio/ByteBufferAsShortBufferB
++java/nio/ByteOrder
++java/nio/CharBuffer
++java/nio/DirectByteBuffer
++java/nio/DirectByteBuffer$Deallocator
++java/nio/DirectByteBufferR
++java/nio/DirectLongBufferU
++java/nio/HeapByteBuffer
++java/nio/HeapCharBuffer
++java/nio/IntBuffer
++java/nio/LongBuffer
++java/nio/MappedByteBuffer
++java/nio/ShortBuffer
++java/nio/channels/ByteChannel
++java/nio/channels/Channel
++java/nio/channels/FileChannel
++java/nio/channels/FileChannel$MapMode
++java/nio/channels/GatheringByteChannel
++java/nio/channels/InterruptibleChannel
++java/nio/channels/NetworkChannel
++java/nio/channels/ReadableByteChannel
++java/nio/channels/ScatteringByteChannel
++java/nio/channels/SeekableByteChannel
++java/nio/channels/SelectableChannel
++java/nio/channels/SocketChannel
++java/nio/channels/WritableByteChannel
++java/nio/channels/spi/AbstractInterruptibleChannel
++java/nio/channels/spi/AbstractInterruptibleChannel$1
++java/nio/channels/spi/AbstractSelectableChannel
++java/nio/charset/Charset
++java/nio/charset/CharsetDecoder
++java/nio/charset/CharsetEncoder
++java/nio/charset/CoderResult
++java/nio/charset/CoderResult$1
++java/nio/charset/CoderResult$2
++java/nio/charset/CoderResult$Cache
++java/nio/charset/CodingErrorAction
++java/nio/charset/StandardCharsets
++java/nio/charset/spi/CharsetProvider
++java/nio/file/Path
++java/nio/file/Watchable
++java/nio/file/attribute/FileAttribute
++java/security/AccessControlContext
++java/security/AccessController
++java/security/AlgorithmParameters
++java/security/AlgorithmParametersSpi
++java/security/AllPermission
++java/security/AllPermissionCollection
++java/security/BasicPermission
++java/security/BasicPermissionCollection
++java/security/CodeSigner
++java/security/CodeSource
++java/security/GeneralSecurityException
++java/security/Guard
++java/security/InvalidKeyException
++java/security/Key
++java/security/KeyException
++java/security/MessageDigest
++java/security/MessageDigest$Delegate
++java/security/MessageDigestSpi
++java/security/NoSuchAlgorithmException
++java/security/Permission
++java/security/PermissionCollection
++java/security/Permissions
++java/security/Principal
++java/security/PrivateKey
++java/security/PrivilegedAction
++java/security/PrivilegedActionException
++java/security/PrivilegedExceptionAction
++java/security/ProtectionDomain
++java/security/ProtectionDomain$1
++java/security/ProtectionDomain$3
++java/security/ProtectionDomain$Key
++java/security/Provider
++java/security/Provider$EngineDescription
++java/security/Provider$Service
++java/security/Provider$ServiceKey
++java/security/Provider$UString
++java/security/PublicKey
++java/security/SecureClassLoader
++java/security/SecureRandomSpi
++java/security/Security
++java/security/Security$1
++java/security/Signature
++java/security/Signature$Delegate
++java/security/SignatureException
++java/security/SignatureSpi
++java/security/UnresolvedPermission
++java/security/cert/Certificate
++java/security/interfaces/DSAKey
++java/security/interfaces/DSAParams
++java/security/interfaces/DSAPrivateKey
++java/security/interfaces/DSAPublicKey
++java/security/spec/AlgorithmParameterSpec
++java/security/spec/DSAParameterSpec
++java/text/AttributedCharacterIterator$Attribute
++java/text/CharacterIterator
++java/text/Collator
++java/text/DateFormat
++java/text/DateFormat$Field
++java/text/DateFormatSymbols
++java/text/DecimalFormat
++java/text/DecimalFormatSymbols
++java/text/DigitList
++java/text/DontCareFieldPosition
++java/text/DontCareFieldPosition$1
++java/text/EntryPair
++java/text/FieldPosition
++java/text/Format
++java/text/Format$Field
++java/text/Format$FieldDelegate
++java/text/MergeCollation
++java/text/MessageFormat
++java/text/MessageFormat$Field
++java/text/NumberFormat
++java/text/NumberFormat$Field
++java/text/ParseException
++java/text/PatternEntry
++java/text/PatternEntry$Parser
++java/text/RBCollationTables
++java/text/RBCollationTables$BuildAPI
++java/text/RBTableBuilder
++java/text/RuleBasedCollator
++java/text/SimpleDateFormat
++java/text/spi/BreakIteratorProvider
++java/text/spi/CollatorProvider
++java/text/spi/DateFormatProvider
++java/text/spi/DateFormatSymbolsProvider
++java/text/spi/DecimalFormatSymbolsProvider
++java/text/spi/NumberFormatProvider
++java/util/AbstractCollection
++java/util/AbstractList
++java/util/AbstractList$Itr
++java/util/AbstractList$ListItr
++java/util/AbstractMap
++java/util/AbstractQueue
++java/util/AbstractSequentialList
++java/util/AbstractSet
++java/util/ArrayDeque
++java/util/ArrayList
++java/util/ArrayList$Itr
++java/util/ArrayList$ListItr
++java/util/ArrayList$SubList
++java/util/ArrayList$SubList$1
++java/util/Arrays
++java/util/Arrays$ArrayList
++java/util/Arrays$LegacyMergeSort
++java/util/BitSet
++java/util/Calendar
++java/util/Calendar$Builder
++java/util/Collection
++java/util/Collections
++java/util/Collections$3
++java/util/Collections$EmptyEnumeration
++java/util/Collections$EmptyIterator
++java/util/Collections$EmptyList
++java/util/Collections$EmptyMap
++java/util/Collections$EmptySet
++java/util/Collections$SetFromMap
++java/util/Collections$SynchronizedCollection
++java/util/Collections$SynchronizedMap
++java/util/Collections$SynchronizedSet
++java/util/Collections$UnmodifiableCollection
++java/util/Collections$UnmodifiableCollection$1
++java/util/Collections$UnmodifiableList
++java/util/Collections$UnmodifiableList$1
++java/util/Collections$UnmodifiableMap
++java/util/Collections$UnmodifiableRandomAccessList
++java/util/Collections$UnmodifiableSet
++java/util/ComparableTimSort
++java/util/Comparator
++java/util/Currency
++java/util/Currency$1
++java/util/Currency$CurrencyNameGetter
++java/util/Date
++java/util/Deque
++java/util/Dictionary
++java/util/Enumeration
++java/util/EventListener
++java/util/EventListenerProxy
++java/util/EventObject
++java/util/GregorianCalendar
++java/util/HashMap
++java/util/HashMap$EntryIterator
++java/util/HashMap$EntrySet
++java/util/HashMap$HashIterator
++java/util/HashMap$KeyIterator
++java/util/HashMap$KeySet
++java/util/HashMap$Node
++java/util/HashMap$TreeNode
++java/util/HashMap$ValueIterator
++java/util/HashMap$Values
++java/util/HashSet
++java/util/Hashtable
++java/util/Hashtable$Entry
++java/util/Hashtable$EntrySet
++java/util/Hashtable$Enumerator
++java/util/Hashtable$ValueCollection
++java/util/IdentityHashMap
++java/util/IdentityHashMap$IdentityHashMapIterator
++java/util/IdentityHashMap$KeyIterator
++java/util/IdentityHashMap$KeySet
++java/util/IdentityHashMap$ValueIterator
++java/util/IdentityHashMap$Values
++java/util/Iterator
++java/util/LinkedHashMap
++java/util/LinkedHashMap$Entry
++java/util/LinkedHashMap$LinkedEntryIterator
++java/util/LinkedHashMap$LinkedEntrySet
++java/util/LinkedHashMap$LinkedHashIterator
++java/util/LinkedHashMap$LinkedKeyIterator
++java/util/LinkedHashMap$LinkedKeySet
++java/util/LinkedList
++java/util/LinkedList$ListItr
++java/util/LinkedList$Node
++java/util/List
++java/util/ListIterator
++java/util/ListResourceBundle
++java/util/Locale
++java/util/Locale$1
++java/util/Locale$Cache
++java/util/Locale$Category
++java/util/Locale$LocaleKey
++java/util/Map
++java/util/Map$Entry
++java/util/MissingResourceException
++java/util/NavigableMap
++java/util/Objects
++java/util/PriorityQueue
++java/util/Properties
++java/util/Properties$LineReader
++java/util/PropertyResourceBundle
++java/util/Queue
++java/util/Random
++java/util/RandomAccess
++java/util/ResourceBundle
++java/util/ResourceBundle$1
++java/util/ResourceBundle$BundleReference
++java/util/ResourceBundle$CacheKey
++java/util/ResourceBundle$CacheKeyReference
++java/util/ResourceBundle$Control
++java/util/ResourceBundle$Control$1
++java/util/ResourceBundle$Control$CandidateListCache
++java/util/ResourceBundle$LoaderReference
++java/util/ResourceBundle$RBClassLoader
++java/util/ResourceBundle$RBClassLoader$1
++java/util/ResourceBundle$SingleFormatControl
++java/util/ServiceLoader
++java/util/ServiceLoader$1
++java/util/ServiceLoader$LazyIterator
++java/util/Set
++java/util/SortedMap
++java/util/Stack
++java/util/StringTokenizer
++java/util/TimSort
++java/util/TimeZone
++java/util/TimeZone$1
++java/util/TreeMap
++java/util/TreeMap$Entry
++java/util/Vector
++java/util/Vector$1
++java/util/Vector$Itr
++java/util/Vector$ListItr
++java/util/WeakHashMap
++java/util/WeakHashMap$Entry
++java/util/WeakHashMap$KeySet
++java/util/concurrent/AbstractExecutorService
++java/util/concurrent/BlockingQueue
++java/util/concurrent/ConcurrentHashMap
++java/util/concurrent/ConcurrentHashMap$BaseIterator
++java/util/concurrent/ConcurrentHashMap$CollectionView
++java/util/concurrent/ConcurrentHashMap$CounterCell
++java/util/concurrent/ConcurrentHashMap$EntrySetView
++java/util/concurrent/ConcurrentHashMap$ForwardingNode
++java/util/concurrent/ConcurrentHashMap$KeyIterator
++java/util/concurrent/ConcurrentHashMap$KeySetView
++java/util/concurrent/ConcurrentHashMap$Node
++java/util/concurrent/ConcurrentHashMap$Segment
++java/util/concurrent/ConcurrentHashMap$Traverser
++java/util/concurrent/ConcurrentHashMap$ValueIterator
++java/util/concurrent/ConcurrentHashMap$ValuesView
++java/util/concurrent/ConcurrentMap
++java/util/concurrent/CopyOnWriteArrayList
++java/util/concurrent/DelayQueue
++java/util/concurrent/Delayed
++java/util/concurrent/Executor
++java/util/concurrent/ExecutorService
++java/util/concurrent/Executors
++java/util/concurrent/RejectedExecutionHandler
++java/util/concurrent/SynchronousQueue
++java/util/concurrent/SynchronousQueue$TransferStack
++java/util/concurrent/SynchronousQueue$TransferStack$SNode
++java/util/concurrent/SynchronousQueue$Transferer
++java/util/concurrent/ThreadFactory
++java/util/concurrent/ThreadPoolExecutor
++java/util/concurrent/ThreadPoolExecutor$AbortPolicy
++java/util/concurrent/ThreadPoolExecutor$Worker
++java/util/concurrent/TimeUnit
++java/util/concurrent/TimeUnit$1
++java/util/concurrent/TimeUnit$2
++java/util/concurrent/TimeUnit$3
++java/util/concurrent/TimeUnit$4
++java/util/concurrent/TimeUnit$5
++java/util/concurrent/TimeUnit$6
++java/util/concurrent/TimeUnit$7
++java/util/concurrent/atomic/AtomicBoolean
++java/util/concurrent/atomic/AtomicInteger
++java/util/concurrent/atomic/AtomicLong
++java/util/concurrent/atomic/AtomicMarkableReference
++java/util/concurrent/atomic/AtomicMarkableReference$Pair
++java/util/concurrent/atomic/AtomicReferenceFieldUpdater
++java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl
++java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl$1
++java/util/concurrent/locks/AbstractOwnableSynchronizer
++java/util/concurrent/locks/AbstractQueuedSynchronizer
++java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
++java/util/concurrent/locks/AbstractQueuedSynchronizer$Node
++java/util/concurrent/locks/Condition
++java/util/concurrent/locks/Lock
++java/util/concurrent/locks/LockSupport
++java/util/concurrent/locks/ReentrantLock
++java/util/concurrent/locks/ReentrantLock$NonfairSync
++java/util/concurrent/locks/ReentrantLock$Sync
++java/util/function/BiFunction
++java/util/jar/Attributes
++java/util/jar/Attributes$Name
++java/util/jar/JarEntry
++java/util/jar/JarFile
++java/util/jar/JarFile$JarEntryIterator
++java/util/jar/JarFile$JarFileEntry
++java/util/jar/JarVerifier
++java/util/jar/JarVerifier$3
++java/util/jar/JavaUtilJarAccessImpl
++java/util/jar/Manifest
++java/util/jar/Manifest$FastInputStream
++java/util/logging/Handler
++java/util/logging/Level
++java/util/logging/Level$KnownLevel
++java/util/logging/LogManager
++java/util/logging/LogManager$1
++java/util/logging/LogManager$2
++java/util/logging/LogManager$3
++java/util/logging/LogManager$5
++java/util/logging/LogManager$Cleaner
++java/util/logging/LogManager$LogNode
++java/util/logging/LogManager$LoggerContext
++java/util/logging/LogManager$LoggerContext$1
++java/util/logging/LogManager$LoggerWeakRef
++java/util/logging/LogManager$RootLogger
++java/util/logging/LogManager$SystemLoggerContext
++java/util/logging/Logger
++java/util/logging/Logger$1
++java/util/logging/LoggingPermission
++java/util/logging/LoggingProxyImpl
++java/util/spi/CalendarDataProvider
++java/util/spi/CurrencyNameProvider
++java/util/spi/LocaleNameProvider
++java/util/spi/LocaleServiceProvider
++java/util/spi/ResourceBundleControlProvider
++java/util/spi/TimeZoneNameProvider
++java/util/zip/CRC32
++java/util/zip/Checksum
++java/util/zip/DeflaterOutputStream
++java/util/zip/GZIPInputStream
++java/util/zip/Inflater
++java/util/zip/InflaterInputStream
++java/util/zip/ZStreamRef
++java/util/zip/ZipCoder
++java/util/zip/ZipConstants
++java/util/zip/ZipEntry
++java/util/zip/ZipFile
++java/util/zip/ZipFile$1
++java/util/zip/ZipFile$ZipEntryIterator
++java/util/zip/ZipFile$ZipFileInflaterInputStream
++java/util/zip/ZipFile$ZipFileInputStream
++java/util/zip/ZipInputStream
++java/util/zip/ZipUtils
++javax/accessibility/Accessible
++javax/accessibility/AccessibleAction
++javax/accessibility/AccessibleBundle
++javax/accessibility/AccessibleComponent
++javax/accessibility/AccessibleContext
++javax/accessibility/AccessibleExtendedComponent
++javax/accessibility/AccessibleRelationSet
++javax/accessibility/AccessibleState
++javax/accessibility/AccessibleText
++javax/accessibility/AccessibleValue
++javax/security/auth/Destroyable
++javax/sound/sampled/Control$Type
++javax/sound/sampled/DataLine
++javax/sound/sampled/DataLine$Info
++javax/sound/sampled/FloatControl$Type
++javax/sound/sampled/Line
++javax/sound/sampled/Line$Info
++javax/sound/sampled/LineUnavailableException
++javax/sound/sampled/UnsupportedAudioFileException
++javax/swing/AbstractAction
++javax/swing/AbstractButton
++javax/swing/AbstractButton$AccessibleAbstractButton
++javax/swing/AbstractButton$Handler
++javax/swing/AbstractCellEditor
++javax/swing/AbstractListModel
++javax/swing/Action
++javax/swing/ActionMap
++javax/swing/AncestorNotifier
++javax/swing/ArrayTable
++javax/swing/BorderFactory
++javax/swing/BoundedRangeModel
++javax/swing/Box
++javax/swing/Box$Filler
++javax/swing/BoxLayout
++javax/swing/BufferStrategyPaintManager
++javax/swing/BufferStrategyPaintManager$BufferInfo
++javax/swing/ButtonGroup
++javax/swing/ButtonModel
++javax/swing/CellEditor
++javax/swing/CellRendererPane
++javax/swing/ClientPropertyKey
++javax/swing/ClientPropertyKey$1
++javax/swing/ComboBoxEditor
++javax/swing/ComboBoxModel
++javax/swing/ComponentInputMap
++javax/swing/DefaultBoundedRangeModel
++javax/swing/DefaultButtonModel
++javax/swing/DefaultCellEditor
++javax/swing/DefaultCellEditor$1
++javax/swing/DefaultCellEditor$EditorDelegate
++javax/swing/DefaultComboBoxModel
++javax/swing/DefaultListCellRenderer
++javax/swing/DefaultListCellRenderer$UIResource
++javax/swing/DefaultListModel
++javax/swing/DefaultListSelectionModel
++javax/swing/DefaultSingleSelectionModel
++javax/swing/DropMode
++javax/swing/FocusManager
++javax/swing/GrayFilter
++javax/swing/Icon
++javax/swing/ImageIcon
++javax/swing/ImageIcon$1
++javax/swing/ImageIcon$2
++javax/swing/ImageIcon$2$1
++javax/swing/ImageIcon$3
++javax/swing/InputMap
++javax/swing/InternalFrameFocusTraversalPolicy
++javax/swing/JButton
++javax/swing/JCheckBox
++javax/swing/JCheckBoxMenuItem
++javax/swing/JCheckBoxMenuItem$AccessibleJCheckBoxMenuItem
++javax/swing/JComboBox
++javax/swing/JComboBox$1
++javax/swing/JComboBox$KeySelectionManager
++javax/swing/JComponent
++javax/swing/JComponent$1
++javax/swing/JComponent$2
++javax/swing/JComponent$AccessibleJComponent
++javax/swing/JDialog
++javax/swing/JEditorPane
++javax/swing/JFrame
++javax/swing/JInternalFrame
++javax/swing/JLabel
++javax/swing/JLayer
++javax/swing/JLayeredPane
++javax/swing/JList
++javax/swing/JList$3
++javax/swing/JList$ListSelectionHandler
++javax/swing/JMenu
++javax/swing/JMenu$MenuChangeListener
++javax/swing/JMenu$WinListener
++javax/swing/JMenuBar
++javax/swing/JMenuItem
++javax/swing/JMenuItem$AccessibleJMenuItem
++javax/swing/JMenuItem$MenuItemFocusListener
++javax/swing/JPanel
++javax/swing/JPopupMenu
++javax/swing/JPopupMenu$Separator
++javax/swing/JProgressBar
++javax/swing/JProgressBar$ModelListener
++javax/swing/JRadioButton
++javax/swing/JRadioButtonMenuItem
++javax/swing/JRootPane
++javax/swing/JRootPane$1
++javax/swing/JRootPane$RootLayout
++javax/swing/JScrollBar
++javax/swing/JScrollBar$ModelListener
++javax/swing/JScrollPane
++javax/swing/JScrollPane$ScrollBar
++javax/swing/JSeparator
++javax/swing/JSlider
++javax/swing/JSlider$ModelListener
++javax/swing/JSplitPane
++javax/swing/JTabbedPane
++javax/swing/JTabbedPane$ModelListener
++javax/swing/JTabbedPane$Page
++javax/swing/JTable
++javax/swing/JTable$2
++javax/swing/JTable$5
++javax/swing/JTable$Resizable2
++javax/swing/JTable$Resizable3
++javax/swing/JTextArea
++javax/swing/JTextField
++javax/swing/JTextField$NotifyAction
++javax/swing/JTextField$ScrollRepainter
++javax/swing/JToggleButton
++javax/swing/JToggleButton$ToggleButtonModel
++javax/swing/JToolBar
++javax/swing/JToolBar$DefaultToolBarLayout
++javax/swing/JToolBar$Separator
++javax/swing/JToolTip
++javax/swing/JTree
++javax/swing/JTree$TreeModelHandler
++javax/swing/JTree$TreeSelectionRedirector
++javax/swing/JViewport
++javax/swing/JViewport$ViewListener
++javax/swing/JWindow
++javax/swing/KeyStroke
++javax/swing/KeyboardManager
++javax/swing/KeyboardManager$ComponentKeyStrokePair
++javax/swing/LayoutComparator
++javax/swing/LayoutFocusTraversalPolicy
++javax/swing/ListCellRenderer
++javax/swing/ListModel
++javax/swing/ListSelectionModel
++javax/swing/LookAndFeel
++javax/swing/MenuElement
++javax/swing/MenuSelectionManager
++javax/swing/MultiUIDefaults
++javax/swing/MutableComboBoxModel
++javax/swing/RepaintManager
++javax/swing/RepaintManager$2
++javax/swing/RepaintManager$3
++javax/swing/RepaintManager$DisplayChangedHandler
++javax/swing/RepaintManager$PaintManager
++javax/swing/RepaintManager$ProcessingRunnable
++javax/swing/RootPaneContainer
++javax/swing/ScrollPaneConstants
++javax/swing/ScrollPaneLayout
++javax/swing/ScrollPaneLayout$UIResource
++javax/swing/Scrollable
++javax/swing/SingleSelectionModel
++javax/swing/SizeRequirements
++javax/swing/SortingFocusTraversalPolicy
++javax/swing/SwingConstants
++javax/swing/SwingContainerOrderFocusTraversalPolicy
++javax/swing/SwingDefaultFocusTraversalPolicy
++javax/swing/SwingPaintEventDispatcher
++javax/swing/SwingUtilities
++javax/swing/SwingUtilities$SharedOwnerFrame
++javax/swing/Timer
++javax/swing/Timer$DoPostEvent
++javax/swing/TimerQueue
++javax/swing/TimerQueue$1
++javax/swing/TimerQueue$DelayedTimer
++javax/swing/ToolTipManager
++javax/swing/ToolTipManager$AccessibilityKeyListener
++javax/swing/ToolTipManager$MoveBeforeEnterListener
++javax/swing/ToolTipManager$insideTimerAction
++javax/swing/ToolTipManager$outsideTimerAction
++javax/swing/ToolTipManager$stillInsideTimerAction
++javax/swing/TransferHandler
++javax/swing/TransferHandler$DropHandler
++javax/swing/TransferHandler$HasGetTransferHandler
++javax/swing/TransferHandler$SwingDropTarget
++javax/swing/TransferHandler$TransferAction
++javax/swing/TransferHandler$TransferSupport
++javax/swing/UIDefaults
++javax/swing/UIDefaults$ActiveValue
++javax/swing/UIDefaults$LazyInputMap
++javax/swing/UIDefaults$LazyValue
++javax/swing/UIDefaults$TextAndMnemonicHashMap
++javax/swing/UIManager
++javax/swing/UIManager$1
++javax/swing/UIManager$2
++javax/swing/UIManager$LAFState
++javax/swing/UIManager$LookAndFeelInfo
++javax/swing/UnsupportedLookAndFeelException
++javax/swing/ViewportLayout
++javax/swing/WindowConstants
++javax/swing/border/AbstractBorder
++javax/swing/border/BevelBorder
++javax/swing/border/Border
++javax/swing/border/CompoundBorder
++javax/swing/border/EmptyBorder
++javax/swing/border/EtchedBorder
++javax/swing/border/LineBorder
++javax/swing/border/MatteBorder
++javax/swing/border/TitledBorder
++javax/swing/event/AncestorEvent
++javax/swing/event/AncestorListener
++javax/swing/event/CaretEvent
++javax/swing/event/CaretListener
++javax/swing/event/CellEditorListener
++javax/swing/event/ChangeEvent
++javax/swing/event/ChangeListener
++javax/swing/event/DocumentEvent
++javax/swing/event/DocumentEvent$ElementChange
++javax/swing/event/DocumentEvent$EventType
++javax/swing/event/DocumentListener
++javax/swing/event/EventListenerList
++javax/swing/event/ListDataEvent
++javax/swing/event/ListDataListener
++javax/swing/event/ListSelectionEvent
++javax/swing/event/ListSelectionListener
++javax/swing/event/MenuDragMouseListener
++javax/swing/event/MenuEvent
++javax/swing/event/MenuKeyListener
++javax/swing/event/MenuListener
++javax/swing/event/MouseInputAdapter
++javax/swing/event/MouseInputListener
++javax/swing/event/PopupMenuListener
++javax/swing/event/RowSorterListener
++javax/swing/event/SwingPropertyChangeSupport
++javax/swing/event/TableColumnModelEvent
++javax/swing/event/TableColumnModelListener
++javax/swing/event/TableModelEvent
++javax/swing/event/TableModelListener
++javax/swing/event/TreeExpansionListener
++javax/swing/event/TreeModelEvent
++javax/swing/event/TreeModelListener
++javax/swing/event/TreeSelectionEvent
++javax/swing/event/TreeSelectionListener
++javax/swing/event/UndoableEditEvent
++javax/swing/event/UndoableEditListener
++javax/swing/filechooser/FileFilter
++javax/swing/plaf/ActionMapUIResource
++javax/swing/plaf/BorderUIResource
++javax/swing/plaf/BorderUIResource$CompoundBorderUIResource
++javax/swing/plaf/BorderUIResource$EmptyBorderUIResource
++javax/swing/plaf/BorderUIResource$LineBorderUIResource
++javax/swing/plaf/ButtonUI
++javax/swing/plaf/ColorUIResource
++javax/swing/plaf/ComboBoxUI
++javax/swing/plaf/ComponentInputMapUIResource
++javax/swing/plaf/ComponentUI
++javax/swing/plaf/DimensionUIResource
++javax/swing/plaf/FontUIResource
++javax/swing/plaf/InputMapUIResource
++javax/swing/plaf/InsetsUIResource
++javax/swing/plaf/LabelUI
++javax/swing/plaf/ListUI
++javax/swing/plaf/MenuBarUI
++javax/swing/plaf/MenuItemUI
++javax/swing/plaf/PanelUI
++javax/swing/plaf/PopupMenuUI
++javax/swing/plaf/ProgressBarUI
++javax/swing/plaf/RootPaneUI
++javax/swing/plaf/ScrollBarUI
++javax/swing/plaf/ScrollPaneUI
++javax/swing/plaf/SeparatorUI
++javax/swing/plaf/SliderUI
++javax/swing/plaf/SplitPaneUI
++javax/swing/plaf/TabbedPaneUI
++javax/swing/plaf/TableHeaderUI
++javax/swing/plaf/TableUI
++javax/swing/plaf/TextUI
++javax/swing/plaf/ToolBarUI
++javax/swing/plaf/TreeUI
++javax/swing/plaf/UIResource
++javax/swing/plaf/ViewportUI
++javax/swing/plaf/basic/BasicArrowButton
++javax/swing/plaf/basic/BasicBorders
++javax/swing/plaf/basic/BasicBorders$ButtonBorder
++javax/swing/plaf/basic/BasicBorders$MarginBorder
++javax/swing/plaf/basic/BasicBorders$RadioButtonBorder
++javax/swing/plaf/basic/BasicBorders$RolloverMarginBorder
++javax/swing/plaf/basic/BasicBorders$SplitPaneBorder
++javax/swing/plaf/basic/BasicBorders$SplitPaneDividerBorder
++javax/swing/plaf/basic/BasicButtonListener
++javax/swing/plaf/basic/BasicButtonUI
++javax/swing/plaf/basic/BasicCheckBoxMenuItemUI
++javax/swing/plaf/basic/BasicComboBoxEditor
++javax/swing/plaf/basic/BasicComboBoxEditor$BorderlessTextField
++javax/swing/plaf/basic/BasicComboBoxEditor$UIResource
++javax/swing/plaf/basic/BasicComboBoxRenderer
++javax/swing/plaf/basic/BasicComboBoxRenderer$UIResource
++javax/swing/plaf/basic/BasicComboBoxUI
++javax/swing/plaf/basic/BasicComboBoxUI$ComboBoxLayoutManager
++javax/swing/plaf/basic/BasicComboBoxUI$DefaultKeySelectionManager
++javax/swing/plaf/basic/BasicComboBoxUI$Handler
++javax/swing/plaf/basic/BasicComboBoxUI$PropertyChangeHandler
++javax/swing/plaf/basic/BasicComboPopup
++javax/swing/plaf/basic/BasicComboPopup$1
++javax/swing/plaf/basic/BasicComboPopup$EmptyListModelClass
++javax/swing/plaf/basic/BasicComboPopup$Handler
++javax/swing/plaf/basic/BasicGraphicsUtils
++javax/swing/plaf/basic/BasicHTML
++javax/swing/plaf/basic/BasicLabelUI
++javax/swing/plaf/basic/BasicListUI
++javax/swing/plaf/basic/BasicListUI$Handler
++javax/swing/plaf/basic/BasicListUI$ListTransferHandler
++javax/swing/plaf/basic/BasicLookAndFeel
++javax/swing/plaf/basic/BasicLookAndFeel$1
++javax/swing/plaf/basic/BasicLookAndFeel$2
++javax/swing/plaf/basic/BasicLookAndFeel$AWTEventHelper
++javax/swing/plaf/basic/BasicMenuBarUI
++javax/swing/plaf/basic/BasicMenuBarUI$Handler
++javax/swing/plaf/basic/BasicMenuItemUI
++javax/swing/plaf/basic/BasicMenuItemUI$Handler
++javax/swing/plaf/basic/BasicMenuUI
++javax/swing/plaf/basic/BasicMenuUI$Handler
++javax/swing/plaf/basic/BasicPanelUI
++javax/swing/plaf/basic/BasicPopupMenuUI
++javax/swing/plaf/basic/BasicPopupMenuUI$BasicMenuKeyListener
++javax/swing/plaf/basic/BasicPopupMenuUI$BasicPopupMenuListener
++javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper
++javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper$1
++javax/swing/plaf/basic/BasicPopupMenuUI$MouseGrabber
++javax/swing/plaf/basic/BasicProgressBarUI
++javax/swing/plaf/basic/BasicProgressBarUI$Handler
++javax/swing/plaf/basic/BasicRadioButtonMenuItemUI
++javax/swing/plaf/basic/BasicRadioButtonUI
++javax/swing/plaf/basic/BasicRootPaneUI
++javax/swing/plaf/basic/BasicRootPaneUI$RootPaneInputMap
++javax/swing/plaf/basic/BasicScrollBarUI
++javax/swing/plaf/basic/BasicScrollBarUI$ArrowButtonListener
++javax/swing/plaf/basic/BasicScrollBarUI$Handler
++javax/swing/plaf/basic/BasicScrollBarUI$ModelListener
++javax/swing/plaf/basic/BasicScrollBarUI$PropertyChangeHandler
++javax/swing/plaf/basic/BasicScrollBarUI$ScrollListener
++javax/swing/plaf/basic/BasicScrollBarUI$TrackListener
++javax/swing/plaf/basic/BasicScrollPaneUI
++javax/swing/plaf/basic/BasicScrollPaneUI$Handler
++javax/swing/plaf/basic/BasicSeparatorUI
++javax/swing/plaf/basic/BasicSliderUI
++javax/swing/plaf/basic/BasicSliderUI$Actions
++javax/swing/plaf/basic/BasicSliderUI$Handler
++javax/swing/plaf/basic/BasicSliderUI$PropertyChangeHandler
++javax/swing/plaf/basic/BasicSliderUI$ScrollListener
++javax/swing/plaf/basic/BasicSliderUI$TrackListener
++javax/swing/plaf/basic/BasicSplitPaneDivider
++javax/swing/plaf/basic/BasicSplitPaneDivider$DividerLayout
++javax/swing/plaf/basic/BasicSplitPaneDivider$MouseHandler
++javax/swing/plaf/basic/BasicSplitPaneDivider$OneTouchActionHandler
++javax/swing/plaf/basic/BasicSplitPaneUI
++javax/swing/plaf/basic/BasicSplitPaneUI$1
++javax/swing/plaf/basic/BasicSplitPaneUI$BasicHorizontalLayoutManager
++javax/swing/plaf/basic/BasicSplitPaneUI$Handler
++javax/swing/plaf/basic/BasicTabbedPaneUI
++javax/swing/plaf/basic/BasicTabbedPaneUI$Handler
++javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneLayout
++javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneScrollLayout
++javax/swing/plaf/basic/BasicTableHeaderUI
++javax/swing/plaf/basic/BasicTableHeaderUI$1
++javax/swing/plaf/basic/BasicTableHeaderUI$MouseInputHandler
++javax/swing/plaf/basic/BasicTableUI
++javax/swing/plaf/basic/BasicTableUI$Handler
++javax/swing/plaf/basic/BasicTableUI$TableTransferHandler
++javax/swing/plaf/basic/BasicTextAreaUI
++javax/swing/plaf/basic/BasicTextFieldUI
++javax/swing/plaf/basic/BasicTextUI
++javax/swing/plaf/basic/BasicTextUI$BasicCaret
++javax/swing/plaf/basic/BasicTextUI$BasicCursor
++javax/swing/plaf/basic/BasicTextUI$BasicHighlighter
++javax/swing/plaf/basic/BasicTextUI$DragListener
++javax/swing/plaf/basic/BasicTextUI$FocusAction
++javax/swing/plaf/basic/BasicTextUI$RootView
++javax/swing/plaf/basic/BasicTextUI$TextActionWrapper
++javax/swing/plaf/basic/BasicTextUI$TextTransferHandler
++javax/swing/plaf/basic/BasicTextUI$UpdateHandler
++javax/swing/plaf/basic/BasicToggleButtonUI
++javax/swing/plaf/basic/BasicToolBarSeparatorUI
++javax/swing/plaf/basic/BasicToolBarUI
++javax/swing/plaf/basic/BasicToolBarUI$DockingListener
++javax/swing/plaf/basic/BasicToolBarUI$Handler
++javax/swing/plaf/basic/BasicTreeUI
++javax/swing/plaf/basic/BasicTreeUI$Actions
++javax/swing/plaf/basic/BasicTreeUI$Handler
++javax/swing/plaf/basic/BasicTreeUI$NodeDimensionsHandler
++javax/swing/plaf/basic/BasicTreeUI$TreeTransferHandler
++javax/swing/plaf/basic/BasicViewportUI
++javax/swing/plaf/basic/ComboPopup
++javax/swing/plaf/basic/DefaultMenuLayout
++javax/swing/plaf/basic/DragRecognitionSupport$BeforeDrag
++javax/swing/plaf/basic/LazyActionMap
++javax/swing/plaf/metal/DefaultMetalTheme
++javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate
++javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate$1
++javax/swing/plaf/metal/MetalBorders
++javax/swing/plaf/metal/MetalBorders$ButtonBorder
++javax/swing/plaf/metal/MetalBorders$Flush3DBorder
++javax/swing/plaf/metal/MetalBorders$MenuBarBorder
++javax/swing/plaf/metal/MetalBorders$MenuItemBorder
++javax/swing/plaf/metal/MetalBorders$PopupMenuBorder
++javax/swing/plaf/metal/MetalBorders$RolloverButtonBorder
++javax/swing/plaf/metal/MetalBorders$RolloverMarginBorder
++javax/swing/plaf/metal/MetalBorders$ScrollPaneBorder
++javax/swing/plaf/metal/MetalBorders$TextFieldBorder
++javax/swing/plaf/metal/MetalBorders$ToggleButtonBorder
++javax/swing/plaf/metal/MetalBorders$ToolBarBorder
++javax/swing/plaf/metal/MetalBumps
++javax/swing/plaf/metal/MetalButtonUI
++javax/swing/plaf/metal/MetalCheckBoxUI
++javax/swing/plaf/metal/MetalComboBoxButton
++javax/swing/plaf/metal/MetalComboBoxButton$1
++javax/swing/plaf/metal/MetalComboBoxEditor
++javax/swing/plaf/metal/MetalComboBoxEditor$1
++javax/swing/plaf/metal/MetalComboBoxEditor$EditorBorder
++javax/swing/plaf/metal/MetalComboBoxEditor$UIResource
++javax/swing/plaf/metal/MetalComboBoxIcon
++javax/swing/plaf/metal/MetalComboBoxUI
++javax/swing/plaf/metal/MetalComboBoxUI$MetalComboBoxLayoutManager
++javax/swing/plaf/metal/MetalComboBoxUI$MetalPropertyChangeListener
++javax/swing/plaf/metal/MetalIconFactory
++javax/swing/plaf/metal/MetalIconFactory$CheckBoxIcon
++javax/swing/plaf/metal/MetalIconFactory$CheckBoxMenuItemIcon
++javax/swing/plaf/metal/MetalIconFactory$FolderIcon16
++javax/swing/plaf/metal/MetalIconFactory$HorizontalSliderThumbIcon
++javax/swing/plaf/metal/MetalIconFactory$MenuArrowIcon
++javax/swing/plaf/metal/MetalIconFactory$MenuItemArrowIcon
++javax/swing/plaf/metal/MetalIconFactory$RadioButtonIcon
++javax/swing/plaf/metal/MetalIconFactory$RadioButtonMenuItemIcon
++javax/swing/plaf/metal/MetalIconFactory$TreeFolderIcon
++javax/swing/plaf/metal/MetalIconFactory$VerticalSliderThumbIcon
++javax/swing/plaf/metal/MetalLabelUI
++javax/swing/plaf/metal/MetalLookAndFeel
++javax/swing/plaf/metal/MetalLookAndFeel$AATextListener
++javax/swing/plaf/metal/MetalLookAndFeel$FontActiveValue
++javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue
++javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue$1
++javax/swing/plaf/metal/MetalPopupMenuSeparatorUI
++javax/swing/plaf/metal/MetalProgressBarUI
++javax/swing/plaf/metal/MetalRadioButtonUI
++javax/swing/plaf/metal/MetalRootPaneUI
++javax/swing/plaf/metal/MetalScrollBarUI
++javax/swing/plaf/metal/MetalScrollBarUI$ScrollBarListener
++javax/swing/plaf/metal/MetalScrollButton
++javax/swing/plaf/metal/MetalScrollPaneUI
++javax/swing/plaf/metal/MetalScrollPaneUI$1
++javax/swing/plaf/metal/MetalSeparatorUI
++javax/swing/plaf/metal/MetalSliderUI
++javax/swing/plaf/metal/MetalSliderUI$MetalPropertyListener
++javax/swing/plaf/metal/MetalSplitPaneDivider
++javax/swing/plaf/metal/MetalSplitPaneDivider$1
++javax/swing/plaf/metal/MetalSplitPaneDivider$2
++javax/swing/plaf/metal/MetalSplitPaneUI
++javax/swing/plaf/metal/MetalTabbedPaneUI
++javax/swing/plaf/metal/MetalTabbedPaneUI$TabbedPaneLayout
++javax/swing/plaf/metal/MetalTextFieldUI
++javax/swing/plaf/metal/MetalTheme
++javax/swing/plaf/metal/MetalToggleButtonUI
++javax/swing/plaf/metal/MetalToolBarUI
++javax/swing/plaf/metal/MetalToolBarUI$MetalDockingListener
++javax/swing/plaf/metal/MetalTreeUI
++javax/swing/plaf/metal/MetalTreeUI$LineListener
++javax/swing/plaf/metal/OceanTheme
++javax/swing/plaf/metal/OceanTheme$1
++javax/swing/plaf/metal/OceanTheme$2
++javax/swing/plaf/metal/OceanTheme$3
++javax/swing/plaf/metal/OceanTheme$4
++javax/swing/plaf/metal/OceanTheme$5
++javax/swing/plaf/metal/OceanTheme$6
++javax/swing/plaf/synth/SynthConstants
++javax/swing/plaf/synth/SynthUI
++javax/swing/table/AbstractTableModel
++javax/swing/table/DefaultTableCellRenderer
++javax/swing/table/DefaultTableColumnModel
++javax/swing/table/DefaultTableModel
++javax/swing/table/JTableHeader
++javax/swing/table/TableCellEditor
++javax/swing/table/TableCellRenderer
++javax/swing/table/TableColumn
++javax/swing/table/TableColumnModel
++javax/swing/table/TableModel
++javax/swing/text/AbstractDocument
++javax/swing/text/AbstractDocument$1
++javax/swing/text/AbstractDocument$AbstractElement
++javax/swing/text/AbstractDocument$AttributeContext
++javax/swing/text/AbstractDocument$BidiElement
++javax/swing/text/AbstractDocument$BidiRootElement
++javax/swing/text/AbstractDocument$BranchElement
++javax/swing/text/AbstractDocument$Content
++javax/swing/text/AbstractDocument$DefaultDocumentEvent
++javax/swing/text/AbstractDocument$ElementEdit
++javax/swing/text/AbstractDocument$InsertStringResult
++javax/swing/text/AbstractDocument$LeafElement
++javax/swing/text/AttributeSet
++javax/swing/text/AttributeSet$CharacterAttribute
++javax/swing/text/AttributeSet$ColorAttribute
++javax/swing/text/AttributeSet$FontAttribute
++javax/swing/text/AttributeSet$ParagraphAttribute
++javax/swing/text/Caret
++javax/swing/text/DefaultCaret
++javax/swing/text/DefaultCaret$Handler
++javax/swing/text/DefaultEditorKit
++javax/swing/text/DefaultEditorKit$BeepAction
++javax/swing/text/DefaultEditorKit$BeginAction
++javax/swing/text/DefaultEditorKit$BeginLineAction
++javax/swing/text/DefaultEditorKit$BeginParagraphAction
++javax/swing/text/DefaultEditorKit$BeginWordAction
++javax/swing/text/DefaultEditorKit$CopyAction
++javax/swing/text/DefaultEditorKit$CutAction
++javax/swing/text/DefaultEditorKit$DefaultKeyTypedAction
++javax/swing/text/DefaultEditorKit$DeleteNextCharAction
++javax/swing/text/DefaultEditorKit$DeletePrevCharAction
++javax/swing/text/DefaultEditorKit$DeleteWordAction
++javax/swing/text/DefaultEditorKit$DumpModelAction
++javax/swing/text/DefaultEditorKit$EndAction
++javax/swing/text/DefaultEditorKit$EndLineAction
++javax/swing/text/DefaultEditorKit$EndParagraphAction
++javax/swing/text/DefaultEditorKit$EndWordAction
++javax/swing/text/DefaultEditorKit$InsertBreakAction
++javax/swing/text/DefaultEditorKit$InsertContentAction
++javax/swing/text/DefaultEditorKit$InsertTabAction
++javax/swing/text/DefaultEditorKit$NextVisualPositionAction
++javax/swing/text/DefaultEditorKit$NextWordAction
++javax/swing/text/DefaultEditorKit$PageAction
++javax/swing/text/DefaultEditorKit$PasteAction
++javax/swing/text/DefaultEditorKit$PreviousWordAction
++javax/swing/text/DefaultEditorKit$ReadOnlyAction
++javax/swing/text/DefaultEditorKit$SelectAllAction
++javax/swing/text/DefaultEditorKit$SelectLineAction
++javax/swing/text/DefaultEditorKit$SelectParagraphAction
++javax/swing/text/DefaultEditorKit$SelectWordAction
++javax/swing/text/DefaultEditorKit$ToggleComponentOrientationAction
++javax/swing/text/DefaultEditorKit$UnselectAction
++javax/swing/text/DefaultEditorKit$VerticalPageAction
++javax/swing/text/DefaultEditorKit$WritableAction
++javax/swing/text/DefaultHighlighter
++javax/swing/text/DefaultHighlighter$DefaultHighlightPainter
++javax/swing/text/DefaultHighlighter$SafeDamager
++javax/swing/text/Document
++javax/swing/text/EditorKit
++javax/swing/text/Element
++javax/swing/text/FieldView
++javax/swing/text/GapContent
++javax/swing/text/GapContent$InsertUndo
++javax/swing/text/GapContent$MarkData
++javax/swing/text/GapContent$MarkVector
++javax/swing/text/GapContent$StickyPosition
++javax/swing/text/GapVector
++javax/swing/text/Highlighter
++javax/swing/text/Highlighter$Highlight
++javax/swing/text/Highlighter$HighlightPainter
++javax/swing/text/JTextComponent
++javax/swing/text/JTextComponent$1
++javax/swing/text/JTextComponent$DefaultKeymap
++javax/swing/text/JTextComponent$KeymapActionMap
++javax/swing/text/JTextComponent$KeymapWrapper
++javax/swing/text/JTextComponent$MutableCaretEvent
++javax/swing/text/Keymap
++javax/swing/text/LayeredHighlighter
++javax/swing/text/LayeredHighlighter$LayerPainter
++javax/swing/text/MutableAttributeSet
++javax/swing/text/PlainDocument
++javax/swing/text/PlainView
++javax/swing/text/Position
++javax/swing/text/Position$Bias
++javax/swing/text/Segment
++javax/swing/text/SegmentCache
++javax/swing/text/SegmentCache$CachedSegment
++javax/swing/text/SimpleAttributeSet
++javax/swing/text/SimpleAttributeSet$EmptyAttributeSet
++javax/swing/text/Style
++javax/swing/text/StyleConstants
++javax/swing/text/StyleConstants$CharacterConstants
++javax/swing/text/StyleConstants$ColorConstants
++javax/swing/text/StyleConstants$FontConstants
++javax/swing/text/StyleConstants$ParagraphConstants
++javax/swing/text/StyleContext
++javax/swing/text/StyleContext$FontKey
++javax/swing/text/StyleContext$KeyEnumeration
++javax/swing/text/StyleContext$NamedStyle
++javax/swing/text/StyleContext$SmallAttributeSet
++javax/swing/text/TabExpander
++javax/swing/text/TextAction
++javax/swing/text/Utilities
++javax/swing/text/View
++javax/swing/text/ViewFactory
++javax/swing/tree/AbstractLayoutCache
++javax/swing/tree/AbstractLayoutCache$NodeDimensions
++javax/swing/tree/DefaultMutableTreeNode
++javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration
++javax/swing/tree/DefaultTreeCellEditor
++javax/swing/tree/DefaultTreeCellEditor$1
++javax/swing/tree/DefaultTreeCellEditor$DefaultTextField
++javax/swing/tree/DefaultTreeCellEditor$EditorContainer
++javax/swing/tree/DefaultTreeCellRenderer
++javax/swing/tree/DefaultTreeModel
++javax/swing/tree/DefaultTreeSelectionModel
++javax/swing/tree/MutableTreeNode
++javax/swing/tree/PathPlaceHolder
++javax/swing/tree/RowMapper
++javax/swing/tree/TreeCellEditor
++javax/swing/tree/TreeCellRenderer
++javax/swing/tree/TreeModel
++javax/swing/tree/TreeNode
++javax/swing/tree/TreePath
++javax/swing/tree/TreeSelectionModel
++javax/swing/tree/VariableHeightLayoutCache
++javax/swing/tree/VariableHeightLayoutCache$TreeStateNode
++javax/swing/undo/AbstractUndoableEdit
++javax/swing/undo/CompoundEdit
++javax/swing/undo/UndoableEdit
++javax/xml/parsers/DocumentBuilder
++javax/xml/parsers/DocumentBuilderFactory
++javax/xml/parsers/FactoryFinder
++javax/xml/parsers/FactoryFinder$1
++javax/xml/parsers/ParserConfigurationException
++javax/xml/parsers/SecuritySupport
++javax/xml/parsers/SecuritySupport$2
++javax/xml/parsers/SecuritySupport$5
++org/w3c/dom/Attr
++org/w3c/dom/CDATASection
++org/w3c/dom/CharacterData
++org/w3c/dom/Comment
++org/w3c/dom/DOMException
++org/w3c/dom/Document
++org/w3c/dom/DocumentFragment
++org/w3c/dom/DocumentType
++org/w3c/dom/Element
++org/w3c/dom/Entity
++org/w3c/dom/EntityReference
++org/w3c/dom/NamedNodeMap
++org/w3c/dom/Node
++org/w3c/dom/NodeList
++org/w3c/dom/Notation
++org/w3c/dom/ProcessingInstruction
++org/w3c/dom/Text
++org/w3c/dom/events/DocumentEvent
++org/w3c/dom/events/Event
++org/w3c/dom/events/EventException
++org/w3c/dom/events/EventTarget
++org/w3c/dom/events/MutationEvent
++org/w3c/dom/ranges/DocumentRange
++org/w3c/dom/ranges/Range
++org/w3c/dom/traversal/DocumentTraversal
++org/w3c/dom/traversal/NodeIterator
++org/w3c/dom/traversal/TreeWalker
++org/xml/sax/AttributeList
++org/xml/sax/ContentHandler
++org/xml/sax/DTDHandler
++org/xml/sax/EntityResolver
++org/xml/sax/ErrorHandler
++org/xml/sax/InputSource
++org/xml/sax/Locator
++org/xml/sax/SAXException
++org/xml/sax/SAXNotRecognizedException
++org/xml/sax/SAXNotSupportedException
++org/xml/sax/SAXParseException
++org/xml/sax/helpers/DefaultHandler
++sun/awt/AWTAccessor
++sun/awt/AWTAccessor$AWTEventAccessor
++sun/awt/AWTAccessor$ClientPropertyKeyAccessor
++sun/awt/AWTAccessor$ComponentAccessor
++sun/awt/AWTAccessor$ContainerAccessor
++sun/awt/AWTAccessor$CursorAccessor
++sun/awt/AWTAccessor$DefaultKeyboardFocusManagerAccessor
++sun/awt/AWTAccessor$EventQueueAccessor
++sun/awt/AWTAccessor$FrameAccessor
++sun/awt/AWTAccessor$InputEventAccessor
++sun/awt/AWTAccessor$InvocationEventAccessor
++sun/awt/AWTAccessor$KeyEventAccessor
++sun/awt/AWTAccessor$KeyboardFocusManagerAccessor
++sun/awt/AWTAccessor$SequencedEventAccessor
++sun/awt/AWTAccessor$ToolkitAccessor
++sun/awt/AWTAccessor$WindowAccessor
++sun/awt/AWTAutoShutdown
++sun/awt/AWTIcon32_java_icon16_png
++sun/awt/AWTIcon32_java_icon24_png
++sun/awt/AWTIcon32_java_icon32_png
++sun/awt/AWTIcon32_java_icon48_png
++sun/awt/AppContext
++sun/awt/AppContext$1
++sun/awt/AppContext$2
++sun/awt/AppContext$3
++sun/awt/AppContext$6
++sun/awt/AppContext$GetAppContextLock
++sun/awt/AppContext$State
++sun/awt/CausedFocusEvent
++sun/awt/CausedFocusEvent$Cause
++sun/awt/ComponentFactory
++sun/awt/ConstrainableGraphics
++sun/awt/DisplayChangedListener
++sun/awt/EmbeddedFrame
++sun/awt/EventQueueDelegate
++sun/awt/EventQueueItem
++sun/awt/FontConfiguration
++sun/awt/FontDescriptor
++sun/awt/GlobalCursorManager
++sun/awt/GlobalCursorManager$NativeUpdater
++sun/awt/HeadlessToolkit
++sun/awt/IconInfo
++sun/awt/InputMethodSupport
++sun/awt/KeyboardFocusManagerPeerImpl
++sun/awt/KeyboardFocusManagerPeerProvider
++sun/awt/LightweightFrame
++sun/awt/ModalityListener
++sun/awt/MostRecentKeyValue
++sun/awt/NullComponentPeer
++sun/awt/OSInfo
++sun/awt/OSInfo$1
++sun/awt/OSInfo$OSType
++sun/awt/OSInfo$WindowsVersion
++sun/awt/PaintEventDispatcher
++sun/awt/PeerEvent
++sun/awt/PostEventQueue
++sun/awt/RepaintArea
++sun/awt/RequestFocusController
++sun/awt/SubRegionShowable
++sun/awt/SunDisplayChanger
++sun/awt/SunGraphicsCallback
++sun/awt/SunHints
++sun/awt/SunHints$Key
++sun/awt/SunHints$LCDContrastKey
++sun/awt/SunHints$Value
++sun/awt/SunToolkit
++sun/awt/SunToolkit$ModalityListenerList
++sun/awt/TimedWindowEvent
++sun/awt/UNIXToolkit
++sun/awt/WindowClosingListener
++sun/awt/WindowClosingSupport
++sun/awt/X11/AwtGraphicsConfigData
++sun/awt/X11/AwtScreenData
++sun/awt/X11/MotifColorUtilities
++sun/awt/X11/MotifDnDConstants
++sun/awt/X11/MotifDnDDragSourceProtocol
++sun/awt/X11/MotifDnDDropTargetProtocol
++sun/awt/X11/Native
++sun/awt/X11/Native$1
++sun/awt/X11/OwnershipListener
++sun/awt/X11/PropMwmHints
++sun/awt/X11/UnsafeXDisposerRecord
++sun/awt/X11/WindowDimensions
++sun/awt/X11/WindowPropertyGetter
++sun/awt/X11/XAWTXSettings
++sun/awt/X11/XAnyEvent
++sun/awt/X11/XAtom
++sun/awt/X11/XAtomList
++sun/awt/X11/XAwtState
++sun/awt/X11/XBaseWindow
++sun/awt/X11/XBaseWindow$1
++sun/awt/X11/XBaseWindow$InitialiseState
++sun/awt/X11/XBaseWindow$StateLock
++sun/awt/X11/XCanvasPeer
++sun/awt/X11/XClientMessageEvent
++sun/awt/X11/XClipboard
++sun/awt/X11/XComponentPeer
++sun/awt/X11/XComponentPeer$1
++sun/awt/X11/XConfigureEvent
++sun/awt/X11/XContentWindow
++sun/awt/X11/XCreateWindowParams
++sun/awt/X11/XDecoratedPeer
++sun/awt/X11/XDnDConstants
++sun/awt/X11/XDnDDragSourceProtocol
++sun/awt/X11/XDnDDropTargetProtocol
++sun/awt/X11/XDragAndDropProtocols
++sun/awt/X11/XDragSourceContextPeer
++sun/awt/X11/XDragSourceProtocol
++sun/awt/X11/XDragSourceProtocolListener
++sun/awt/X11/XDropTargetContextPeer
++sun/awt/X11/XDropTargetContextPeer$XDropTargetProtocolListenerImpl
++sun/awt/X11/XDropTargetEventProcessor
++sun/awt/X11/XDropTargetProtocol
++sun/awt/X11/XDropTargetProtocolListener
++sun/awt/X11/XDropTargetRegistry
++sun/awt/X11/XEmbeddedFramePeer
++sun/awt/X11/XErrorEvent
++sun/awt/X11/XErrorHandler
++sun/awt/X11/XErrorHandler$IgnoreBadWindowHandler
++sun/awt/X11/XErrorHandler$VerifyChangePropertyHandler
++sun/awt/X11/XErrorHandler$XBaseErrorHandler
++sun/awt/X11/XErrorHandler$XErrorHandlerWithFlag
++sun/awt/X11/XErrorHandler$XShmAttachHandler
++sun/awt/X11/XErrorHandlerUtil
++sun/awt/X11/XEvent
++sun/awt/X11/XEventDispatcher
++sun/awt/X11/XExposeEvent
++sun/awt/X11/XFocusChangeEvent
++sun/awt/X11/XFocusProxyWindow
++sun/awt/X11/XFramePeer
++sun/awt/X11/XGlobalCursorManager
++sun/awt/X11/XInputMethod
++sun/awt/X11/XInputMethodDescriptor
++sun/awt/X11/XKeyboardFocusManagerPeer
++sun/awt/X11/XLabelPeer
++sun/awt/X11/XLayerProtocol
++sun/awt/X11/XMSelection
++sun/awt/X11/XMSelection$1
++sun/awt/X11/XMSelection$3
++sun/awt/X11/XMSelectionListener
++sun/awt/X11/XModifierKeymap
++sun/awt/X11/XNETProtocol
++sun/awt/X11/XPanelPeer
++sun/awt/X11/XPropertyCache
++sun/awt/X11/XPropertyEvent
++sun/awt/X11/XProtocol
++sun/awt/X11/XRepaintArea
++sun/awt/X11/XReparentEvent
++sun/awt/X11/XRootWindow
++sun/awt/X11/XSelection
++sun/awt/X11/XSelection$IncrementalTransferHandler
++sun/awt/X11/XSelection$SelectionEventHandler
++sun/awt/X11/XSetWindowAttributes
++sun/awt/X11/XSizeHints
++sun/awt/X11/XStateProtocol
++sun/awt/X11/XSystemTrayPeer
++sun/awt/X11/XToolkit
++sun/awt/X11/XToolkit$1
++sun/awt/X11/XToolkit$2
++sun/awt/X11/XToolkit$2$1
++sun/awt/X11/XToolkit$3
++sun/awt/X11/XToolkit$4
++sun/awt/X11/XToolkit$5
++sun/awt/X11/XUnmapEvent
++sun/awt/X11/XVisibilityEvent
++sun/awt/X11/XVisualInfo
++sun/awt/X11/XWINProtocol
++sun/awt/X11/XWM
++sun/awt/X11/XWM$1
++sun/awt/X11/XWMHints
++sun/awt/X11/XWindow
++sun/awt/X11/XWindowAttributes
++sun/awt/X11/XWindowAttributesData
++sun/awt/X11/XWindowPeer
++sun/awt/X11/XWindowPeer$2
++sun/awt/X11/XWindowPeer$4
++sun/awt/X11/XWrapperBase
++sun/awt/X11/XlibUtil
++sun/awt/X11/XlibWrapper
++sun/awt/X11ComponentPeer
++sun/awt/X11FontManager
++sun/awt/X11GraphicsConfig
++sun/awt/X11GraphicsConfig$X11GCDisposerRecord
++sun/awt/X11GraphicsDevice
++sun/awt/X11GraphicsEnvironment
++sun/awt/X11GraphicsEnvironment$1
++sun/awt/X11InputMethod
++sun/awt/X11InputMethodDescriptor
++sun/awt/XSettings
++sun/awt/XSettings$Update
++sun/awt/datatransfer/SunClipboard
++sun/awt/dnd/SunDragSourceContextPeer
++sun/awt/dnd/SunDropTargetContextPeer
++sun/awt/dnd/SunDropTargetEvent
++sun/awt/event/IgnorePaintEvent
++sun/awt/geom/PathConsumer2D
++sun/awt/im/ExecutableInputMethodManager
++sun/awt/im/ExecutableInputMethodManager$3
++sun/awt/im/InputContext
++sun/awt/im/InputMethodAdapter
++sun/awt/im/InputMethodContext
++sun/awt/im/InputMethodLocator
++sun/awt/im/InputMethodManager
++sun/awt/image/BufImgSurfaceData
++sun/awt/image/BufImgSurfaceData$ICMColorData
++sun/awt/image/BufImgSurfaceManager
++sun/awt/image/BufferedImageGraphicsConfig
++sun/awt/image/ByteComponentRaster
++sun/awt/image/ByteInterleavedRaster
++sun/awt/image/BytePackedRaster
++sun/awt/image/FetcherInfo
++sun/awt/image/GifFrame
++sun/awt/image/GifImageDecoder
++sun/awt/image/ImageConsumerQueue
++sun/awt/image/ImageDecoder
++sun/awt/image/ImageDecoder$1
++sun/awt/image/ImageFetchable
++sun/awt/image/ImageFetcher
++sun/awt/image/ImageFetcher$1
++sun/awt/image/ImageRepresentation
++sun/awt/image/ImageWatched
++sun/awt/image/ImageWatched$Link
++sun/awt/image/ImageWatched$WeakLink
++sun/awt/image/InputStreamImageSource
++sun/awt/image/IntegerComponentRaster
++sun/awt/image/IntegerInterleavedRaster
++sun/awt/image/NativeLibLoader
++sun/awt/image/NativeLibLoader$1
++sun/awt/image/OffScreenImage
++sun/awt/image/PNGFilterInputStream
++sun/awt/image/PNGImageDecoder
++sun/awt/image/PixelConverter
++sun/awt/image/PixelConverter$Argb
++sun/awt/image/PixelConverter$ArgbBm
++sun/awt/image/PixelConverter$ArgbPre
++sun/awt/image/PixelConverter$Bgrx
++sun/awt/image/PixelConverter$ByteGray
++sun/awt/image/PixelConverter$Rgba
++sun/awt/image/PixelConverter$RgbaPre
++sun/awt/image/PixelConverter$Rgbx
++sun/awt/image/PixelConverter$Ushort4444Argb
++sun/awt/image/PixelConverter$Ushort555Rgb
++sun/awt/image/PixelConverter$Ushort555Rgbx
++sun/awt/image/PixelConverter$Ushort565Rgb
++sun/awt/image/PixelConverter$UshortGray
++sun/awt/image/PixelConverter$Xbgr
++sun/awt/image/PixelConverter$Xrgb
++sun/awt/image/SunVolatileImage
++sun/awt/image/SunWritableRaster
++sun/awt/image/SunWritableRaster$DataStealer
++sun/awt/image/SurfaceManager
++sun/awt/image/SurfaceManager$ImageAccessor
++sun/awt/image/SurfaceManager$ProxiedGraphicsConfig
++sun/awt/image/ToolkitImage
++sun/awt/image/URLImageSource
++sun/awt/image/VolatileSurfaceManager
++sun/awt/motif/MFontConfiguration
++sun/awt/resources/awt
++sun/awt/util/IdentityArrayList
++sun/dc/DuctusRenderingEngine
++sun/dc/path/PathConsumer
++sun/dc/pr/PathDasher
++sun/dc/pr/PathDasher$1
++sun/dc/pr/PathStroker
++sun/dc/pr/PathStroker$1
++sun/font/AttributeValues
++sun/font/CMap
++sun/font/CMap$CMapFormat12
++sun/font/CMap$NullCMapClass
++sun/font/CharToGlyphMapper
++sun/font/CompositeFont
++sun/font/CompositeFontDescriptor
++sun/font/CompositeGlyphMapper
++sun/font/CompositeStrike
++sun/font/CoreMetrics
++sun/font/EAttribute
++sun/font/FcFontConfiguration
++sun/font/FileFont
++sun/font/FileFontStrike
++sun/font/Font2D
++sun/font/Font2DHandle
++sun/font/FontAccess
++sun/font/FontConfigManager
++sun/font/FontConfigManager$FcCompFont
++sun/font/FontConfigManager$FontConfigFont
++sun/font/FontConfigManager$FontConfigInfo
++sun/font/FontDesignMetrics
++sun/font/FontDesignMetrics$KeyReference
++sun/font/FontDesignMetrics$MetricsKey
++sun/font/FontFamily
++sun/font/FontLineMetrics
++sun/font/FontManager
++sun/font/FontManagerFactory
++sun/font/FontManagerFactory$1
++sun/font/FontManagerForSGE
++sun/font/FontManagerNativeLibrary
++sun/font/FontManagerNativeLibrary$1
++sun/font/FontScaler
++sun/font/FontStrike
++sun/font/FontStrikeDesc
++sun/font/FontStrikeDisposer
++sun/font/FontUtilities
++sun/font/FontUtilities$1
++sun/font/GlyphList
++sun/font/PhysicalFont
++sun/font/PhysicalStrike
++sun/font/StandardGlyphVector
++sun/font/StandardGlyphVector$GlyphStrike
++sun/font/StrikeCache
++sun/font/StrikeCache$1
++sun/font/StrikeCache$DisposableStrike
++sun/font/StrikeCache$SoftDisposerRef
++sun/font/StrikeMetrics
++sun/font/SunFontManager
++sun/font/SunFontManager$1
++sun/font/SunFontManager$11
++sun/font/SunFontManager$2
++sun/font/SunFontManager$3
++sun/font/SunFontManager$FontRegistrationInfo
++sun/font/SunFontManager$T1Filter
++sun/font/SunFontManager$TTFilter
++sun/font/T2KFontScaler
++sun/font/T2KFontScaler$1
++sun/font/TrueTypeFont
++sun/font/TrueTypeFont$1
++sun/font/TrueTypeFont$DirectoryEntry
++sun/font/TrueTypeFont$TTDisposerRecord
++sun/font/TrueTypeGlyphMapper
++sun/font/Type1Font
++sun/font/Type1Font$1
++sun/font/X11TextRenderer
++sun/java2d/BackBufferCapsProvider
++sun/java2d/DefaultDisposerRecord
++sun/java2d/DestSurfaceProvider
++sun/java2d/Disposer
++sun/java2d/Disposer$1
++sun/java2d/Disposer$2
++sun/java2d/Disposer$PollDisposable
++sun/java2d/DisposerRecord
++sun/java2d/DisposerTarget
++sun/java2d/FontSupport
++sun/java2d/InvalidPipeException
++sun/java2d/NullSurfaceData
++sun/java2d/StateTrackable
++sun/java2d/StateTrackable$State
++sun/java2d/StateTrackableDelegate
++sun/java2d/StateTrackableDelegate$2
++sun/java2d/SunGraphics2D
++sun/java2d/SunGraphicsEnvironment
++sun/java2d/SunGraphicsEnvironment$1
++sun/java2d/Surface
++sun/java2d/SurfaceData
++sun/java2d/SurfaceData$PixelToPgramLoopConverter
++sun/java2d/SurfaceData$PixelToShapeLoopConverter
++sun/java2d/SurfaceManagerFactory
++sun/java2d/UnixSurfaceManagerFactory
++sun/java2d/cmm/CMSManager
++sun/java2d/cmm/ProfileActivator
++sun/java2d/cmm/ProfileDeferralInfo
++sun/java2d/cmm/ProfileDeferralMgr
++sun/java2d/loops/Blit
++sun/java2d/loops/BlitBg
++sun/java2d/loops/CompositeType
++sun/java2d/loops/CustomComponent
++sun/java2d/loops/DrawGlyphList
++sun/java2d/loops/DrawGlyphListAA
++sun/java2d/loops/DrawGlyphListLCD
++sun/java2d/loops/DrawLine
++sun/java2d/loops/DrawParallelogram
++sun/java2d/loops/DrawPath
++sun/java2d/loops/DrawPolygons
++sun/java2d/loops/DrawRect
++sun/java2d/loops/FillParallelogram
++sun/java2d/loops/FillPath
++sun/java2d/loops/FillRect
++sun/java2d/loops/FillSpans
++sun/java2d/loops/FontInfo
++sun/java2d/loops/GeneralRenderer
++sun/java2d/loops/GraphicsPrimitive
++sun/java2d/loops/GraphicsPrimitiveMgr
++sun/java2d/loops/GraphicsPrimitiveMgr$1
++sun/java2d/loops/GraphicsPrimitiveMgr$2
++sun/java2d/loops/GraphicsPrimitiveMgr$PrimitiveSpec
++sun/java2d/loops/GraphicsPrimitiveProxy
++sun/java2d/loops/MaskBlit
++sun/java2d/loops/MaskFill
++sun/java2d/loops/RenderCache
++sun/java2d/loops/RenderCache$Entry
++sun/java2d/loops/RenderLoops
++sun/java2d/loops/ScaledBlit
++sun/java2d/loops/SurfaceType
++sun/java2d/loops/TransformHelper
++sun/java2d/loops/XORComposite
++sun/java2d/opengl/GLXGraphicsConfig
++sun/java2d/opengl/OGLGraphicsConfig
++sun/java2d/pipe/AAShapePipe
++sun/java2d/pipe/AATextRenderer
++sun/java2d/pipe/AlphaColorPipe
++sun/java2d/pipe/AlphaPaintPipe
++sun/java2d/pipe/CompositePipe
++sun/java2d/pipe/DrawImage
++sun/java2d/pipe/DrawImagePipe
++sun/java2d/pipe/GeneralCompositePipe
++sun/java2d/pipe/GlyphListLoopPipe
++sun/java2d/pipe/GlyphListPipe
++sun/java2d/pipe/LCDTextRenderer
++sun/java2d/pipe/LoopBasedPipe
++sun/java2d/pipe/LoopPipe
++sun/java2d/pipe/NullPipe
++sun/java2d/pipe/OutlineTextRenderer
++sun/java2d/pipe/ParallelogramPipe
++sun/java2d/pipe/PixelDrawPipe
++sun/java2d/pipe/PixelFillPipe
++sun/java2d/pipe/PixelToParallelogramConverter
++sun/java2d/pipe/PixelToShapeConverter
++sun/java2d/pipe/Region
++sun/java2d/pipe/Region$ImmutableRegion
++sun/java2d/pipe/RegionIterator
++sun/java2d/pipe/RenderingEngine
++sun/java2d/pipe/RenderingEngine$1
++sun/java2d/pipe/ShapeDrawPipe
++sun/java2d/pipe/ShapeSpanIterator
++sun/java2d/pipe/SolidTextRenderer
++sun/java2d/pipe/SpanClipRenderer
++sun/java2d/pipe/SpanIterator
++sun/java2d/pipe/SpanShapeRenderer
++sun/java2d/pipe/SpanShapeRenderer$Composite
++sun/java2d/pipe/TextPipe
++sun/java2d/pipe/TextRenderer
++sun/java2d/pipe/ValidatePipe
++sun/java2d/pipe/hw/AccelGraphicsConfig
++sun/java2d/pipe/hw/BufferedContextProvider
++sun/java2d/x11/X11Renderer
++sun/java2d/x11/X11SurfaceData
++sun/java2d/x11/X11SurfaceData$LazyPipe
++sun/java2d/x11/X11SurfaceData$X11WindowSurfaceData
++sun/java2d/x11/X11VolatileSurfaceManager
++sun/java2d/x11/XSurfaceData
++sun/java2d/xr/XRGraphicsConfig
++sun/launcher/LauncherHelper
++sun/launcher/LauncherHelper$FXHelper
++sun/misc/ASCIICaseInsensitiveComparator
++sun/misc/Cleaner
++sun/misc/CompoundEnumeration
++sun/misc/ExtensionDependency
++sun/misc/FDBigInteger
++sun/misc/FileURLMapper
++sun/misc/FloatingDecimal
++sun/misc/FloatingDecimal$1
++sun/misc/FloatingDecimal$ASCIIToBinaryBuffer
++sun/misc/FloatingDecimal$ASCIIToBinaryConverter
++sun/misc/FloatingDecimal$BinaryToASCIIBuffer
++sun/misc/FloatingDecimal$BinaryToASCIIConverter
++sun/misc/FloatingDecimal$ExceptionalBinaryToASCIIBuffer
++sun/misc/FloatingDecimal$PreparedASCIIToBinaryBuffer
++sun/misc/IOUtils
++sun/misc/JarIndex
++sun/misc/JavaAWTAccess
++sun/misc/JavaIOFileDescriptorAccess
++sun/misc/JavaLangAccess
++sun/misc/JavaNetAccess
++sun/misc/JavaNioAccess
++sun/misc/JavaSecurityAccess
++sun/misc/JavaSecurityProtectionDomainAccess
++sun/misc/JavaUtilJarAccess
++sun/misc/JavaUtilZipFileAccess
++sun/misc/Launcher
++sun/misc/Launcher$AppClassLoader
++sun/misc/Launcher$AppClassLoader$1
++sun/misc/Launcher$BootClassPathHolder
++sun/misc/Launcher$BootClassPathHolder$1
++sun/misc/Launcher$ExtClassLoader
++sun/misc/Launcher$ExtClassLoader$1
++sun/misc/Launcher$Factory
++sun/misc/MetaIndex
++sun/misc/NativeSignalHandler
++sun/misc/OSEnvironment
++sun/misc/Perf
++sun/misc/Perf$GetPerfAction
++sun/misc/PerfCounter
++sun/misc/PerfCounter$CoreCounters
++sun/misc/PerformanceLogger
++sun/misc/PerformanceLogger$TimeData
++sun/misc/PostVMInitHook
++sun/misc/Resource
++sun/misc/SharedSecrets
++sun/misc/Signal
++sun/misc/SignalHandler
++sun/misc/SoftCache
++sun/misc/SoftCache$ValueCell
++sun/misc/URLClassPath
++sun/misc/URLClassPath$1
++sun/misc/URLClassPath$2
++sun/misc/URLClassPath$3
++sun/misc/URLClassPath$FileLoader
++sun/misc/URLClassPath$JarLoader
++sun/misc/URLClassPath$JarLoader$1
++sun/misc/URLClassPath$JarLoader$2
++sun/misc/URLClassPath$Loader
++sun/misc/Unsafe
++sun/misc/VM
++sun/misc/Version
++sun/net/DefaultProgressMeteringPolicy
++sun/net/InetAddressCachePolicy
++sun/net/InetAddressCachePolicy$1
++sun/net/InetAddressCachePolicy$2
++sun/net/NetHooks
++sun/net/NetHooks$Provider
++sun/net/NetProperties
++sun/net/NetProperties$1
++sun/net/ProgressMeteringPolicy
++sun/net/ProgressMonitor
++sun/net/ResourceManager
++sun/net/sdp/SdpProvider
++sun/net/spi/DefaultProxySelector
++sun/net/spi/DefaultProxySelector$1
++sun/net/spi/DefaultProxySelector$3
++sun/net/spi/DefaultProxySelector$NonProxyInfo
++sun/net/spi/nameservice/NameService
++sun/net/util/IPAddressUtil
++sun/net/util/URLUtil
++sun/net/www/MessageHeader
++sun/net/www/MimeEntry
++sun/net/www/MimeTable
++sun/net/www/MimeTable$1
++sun/net/www/MimeTable$DefaultInstanceHolder
++sun/net/www/MimeTable$DefaultInstanceHolder$1
++sun/net/www/ParseUtil
++sun/net/www/URLConnection
++sun/net/www/protocol/file/FileURLConnection
++sun/net/www/protocol/file/Handler
++sun/net/www/protocol/http/Handler
++sun/net/www/protocol/jar/Handler
++sun/net/www/protocol/jar/JarFileFactory
++sun/net/www/protocol/jar/JarURLConnection
++sun/net/www/protocol/jar/JarURLConnection$JarURLInputStream
++sun/net/www/protocol/jar/URLJarFile
++sun/net/www/protocol/jar/URLJarFile$URLJarFileCloseController
++sun/net/www/protocol/jar/URLJarFile$URLJarFileEntry
++sun/nio/ByteBuffered
++sun/nio/ch/DirectBuffer
++sun/nio/ch/FileChannelImpl
++sun/nio/ch/FileChannelImpl$Unmapper
++sun/nio/ch/FileDispatcher
++sun/nio/ch/FileDispatcherImpl
++sun/nio/ch/IOStatus
++sun/nio/ch/IOUtil
++sun/nio/ch/IOUtil$1
++sun/nio/ch/Interruptible
++sun/nio/ch/NativeDispatcher
++sun/nio/ch/NativeThread
++sun/nio/ch/NativeThreadSet
++sun/nio/ch/Util
++sun/nio/ch/Util$1
++sun/nio/ch/Util$4
++sun/nio/ch/Util$BufferCache
++sun/nio/cs/ArrayDecoder
++sun/nio/cs/ArrayEncoder
++sun/nio/cs/FastCharsetProvider
++sun/nio/cs/HistoricallyNamedCharset
++sun/nio/cs/ISO_8859_1
++sun/nio/cs/ISO_8859_1$Encoder
++sun/nio/cs/StandardCharsets
++sun/nio/cs/StandardCharsets$Aliases
++sun/nio/cs/StandardCharsets$Cache
++sun/nio/cs/StandardCharsets$Classes
++sun/nio/cs/StreamDecoder
++sun/nio/cs/StreamEncoder
++sun/nio/cs/Surrogate
++sun/nio/cs/Surrogate$Parser
++sun/nio/cs/US_ASCII
++sun/nio/cs/US_ASCII$Decoder
++sun/nio/cs/UTF_16
++sun/nio/cs/UTF_16$Decoder
++sun/nio/cs/UTF_16BE
++sun/nio/cs/UTF_16LE
++sun/nio/cs/UTF_8
++sun/nio/cs/UTF_8$Decoder
++sun/nio/cs/UTF_8$Encoder
++sun/nio/cs/Unicode
++sun/nio/cs/UnicodeDecoder
++sun/print/PrinterGraphicsConfig
++sun/reflect/AccessorGenerator
++sun/reflect/BootstrapConstructorAccessorImpl
++sun/reflect/ByteVector
++sun/reflect/ByteVectorFactory
++sun/reflect/ByteVectorImpl
++sun/reflect/CallerSensitive
++sun/reflect/ClassDefiner
++sun/reflect/ClassDefiner$1
++sun/reflect/ClassFileAssembler
++sun/reflect/ClassFileConstants
++sun/reflect/ConstantPool
++sun/reflect/ConstructorAccessor
++sun/reflect/ConstructorAccessorImpl
++sun/reflect/DelegatingClassLoader
++sun/reflect/DelegatingConstructorAccessorImpl
++sun/reflect/DelegatingMethodAccessorImpl
++sun/reflect/FieldAccessor
++sun/reflect/FieldAccessorImpl
++sun/reflect/Label
++sun/reflect/Label$PatchInfo
++sun/reflect/LangReflectAccess
++sun/reflect/MagicAccessorImpl
++sun/reflect/MethodAccessor
++sun/reflect/MethodAccessorGenerator
++sun/reflect/MethodAccessorGenerator$1
++sun/reflect/MethodAccessorImpl
++sun/reflect/NativeConstructorAccessorImpl
++sun/reflect/NativeMethodAccessorImpl
++sun/reflect/Reflection
++sun/reflect/ReflectionFactory
++sun/reflect/ReflectionFactory$1
++sun/reflect/ReflectionFactory$GetReflectionFactoryAction
++sun/reflect/SerializationConstructorAccessorImpl
++sun/reflect/UTF8
++sun/reflect/UnsafeFieldAccessorFactory
++sun/reflect/UnsafeFieldAccessorImpl
++sun/reflect/UnsafeObjectFieldAccessorImpl
++sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl
++sun/reflect/UnsafeQualifiedStaticIntegerFieldAccessorImpl
++sun/reflect/UnsafeQualifiedStaticLongFieldAccessorImpl
++sun/reflect/UnsafeQualifiedStaticObjectFieldAccessorImpl
++sun/reflect/UnsafeStaticFieldAccessorImpl
++sun/reflect/annotation/AnnotationType
++sun/reflect/generics/repository/AbstractRepository
++sun/reflect/generics/repository/ClassRepository
++sun/reflect/generics/repository/GenericDeclRepository
++sun/reflect/misc/MethodUtil
++sun/reflect/misc/MethodUtil$1
++sun/reflect/misc/ReflectUtil
++sun/security/action/GetBooleanAction
++sun/security/action/GetIntegerAction
++sun/security/action/GetPropertyAction
++sun/security/jca/GetInstance
++sun/security/jca/GetInstance$Instance
++sun/security/jca/ProviderConfig
++sun/security/jca/ProviderConfig$2
++sun/security/jca/ProviderList
++sun/security/jca/ProviderList$1
++sun/security/jca/ProviderList$2
++sun/security/jca/ProviderList$3
++sun/security/jca/ProviderList$ServiceList
++sun/security/jca/ProviderList$ServiceList$1
++sun/security/jca/Providers
++sun/security/jca/ServiceId
++sun/security/provider/ByteArrayAccess
++sun/security/provider/DSA
++sun/security/provider/DSA$LegacyDSA
++sun/security/provider/DSA$SHA1withDSA
++sun/security/provider/DSAParameters
++sun/security/provider/DSAPublicKey
++sun/security/provider/DigestBase
++sun/security/provider/NativePRNG
++sun/security/provider/NativePRNG$1
++sun/security/provider/NativePRNG$2
++sun/security/provider/NativePRNG$Blocking
++sun/security/provider/NativePRNG$NonBlocking
++sun/security/provider/NativePRNG$RandomIO
++sun/security/provider/NativePRNG$Variant
++sun/security/provider/SHA
++sun/security/provider/Sun
++sun/security/provider/SunEntries
++sun/security/provider/SunEntries$1
++sun/security/util/BitArray
++sun/security/util/ByteArrayLexOrder
++sun/security/util/Debug
++sun/security/util/DerEncoder
++sun/security/util/DerIndefLenConverter
++sun/security/util/DerInputBuffer
++sun/security/util/DerInputStream
++sun/security/util/DerOutputStream
++sun/security/util/DerValue
++sun/security/util/ManifestEntryVerifier
++sun/security/util/ObjectIdentifier
++sun/security/util/SignatureFileVerifier
++sun/security/x509/AlgorithmId
++sun/security/x509/X509Key
++sun/swing/DefaultLookup
++sun/swing/ImageIconUIResource
++sun/swing/JLightweightFrame
++sun/swing/MenuItemLayoutHelper
++sun/swing/MenuItemLayoutHelper$ColumnAlignment
++sun/swing/MenuItemLayoutHelper$LayoutResult
++sun/swing/MenuItemLayoutHelper$RectSize
++sun/swing/PrintColorUIResource
++sun/swing/StringUIClientPropertyKey
++sun/swing/SwingAccessor
++sun/swing/SwingAccessor$JTextComponentAccessor
++sun/swing/SwingLazyValue
++sun/swing/SwingLazyValue$1
++sun/swing/SwingUtilities2
++sun/swing/SwingUtilities2$2
++sun/swing/SwingUtilities2$AATextInfo
++sun/swing/SwingUtilities2$LSBCacheEntry
++sun/swing/UIAction
++sun/swing/UIClientPropertyKey
++sun/swing/table/DefaultTableCellHeaderRenderer
++sun/swing/table/DefaultTableCellHeaderRenderer$EmptyIcon
++sun/text/ComposedCharIter
++sun/text/IntHashtable
++sun/text/UCompactIntArray
++sun/text/normalizer/CharTrie
++sun/text/normalizer/CharTrie$FriendAgent
++sun/text/normalizer/ICUBinary
++sun/text/normalizer/ICUBinary$Authenticate
++sun/text/normalizer/ICUData
++sun/text/normalizer/IntTrie
++sun/text/normalizer/NormalizerDataReader
++sun/text/normalizer/NormalizerImpl
++sun/text/normalizer/NormalizerImpl$AuxTrieImpl
++sun/text/normalizer/NormalizerImpl$DecomposeArgs
++sun/text/normalizer/NormalizerImpl$FCDTrieImpl
++sun/text/normalizer/NormalizerImpl$NormTrieImpl
++sun/text/normalizer/Trie
++sun/text/normalizer/Trie$DataManipulate
++sun/text/normalizer/UTF16
++sun/text/normalizer/UnicodeMatcher
++sun/text/normalizer/UnicodeSet
++sun/text/resources/CollationData
++sun/text/resources/FormatData
++sun/text/resources/en/FormatData_en
++sun/text/resources/en/FormatData_en_US
++sun/util/CoreResourceBundleControl
++sun/util/PreHashedMap
++sun/util/ResourceBundleEnumeration
++sun/util/calendar/AbstractCalendar
++sun/util/calendar/BaseCalendar
++sun/util/calendar/BaseCalendar$Date
++sun/util/calendar/CalendarDate
++sun/util/calendar/CalendarSystem
++sun/util/calendar/CalendarUtils
++sun/util/calendar/Gregorian
++sun/util/calendar/Gregorian$Date
++sun/util/calendar/ZoneInfo
++sun/util/calendar/ZoneInfoFile
++sun/util/calendar/ZoneInfoFile$1
++sun/util/calendar/ZoneInfoFile$Checksum
++sun/util/calendar/ZoneInfoFile$ZoneOffsetTransitionRule
++sun/util/locale/BaseLocale
++sun/util/locale/BaseLocale$Cache
++sun/util/locale/BaseLocale$Key
++sun/util/locale/LanguageTag
++sun/util/locale/LocaleObjectCache
++sun/util/locale/LocaleObjectCache$CacheEntry
++sun/util/locale/LocaleUtils
++sun/util/locale/provider/AuxLocaleProviderAdapter
++sun/util/locale/provider/AuxLocaleProviderAdapter$NullProvider
++sun/util/locale/provider/AvailableLanguageTags
++sun/util/locale/provider/CalendarDataProviderImpl
++sun/util/locale/provider/CalendarDataUtility
++sun/util/locale/provider/CalendarDataUtility$CalendarWeekParameterGetter
++sun/util/locale/provider/CalendarProviderImpl
++sun/util/locale/provider/CollatorProviderImpl
++sun/util/locale/provider/CurrencyNameProviderImpl
++sun/util/locale/provider/DateFormatSymbolsProviderImpl
++sun/util/locale/provider/DecimalFormatSymbolsProviderImpl
++sun/util/locale/provider/JRELocaleProviderAdapter
++sun/util/locale/provider/JRELocaleProviderAdapter$1
++sun/util/locale/provider/LocaleDataMetaInfo
++sun/util/locale/provider/LocaleProviderAdapter
++sun/util/locale/provider/LocaleProviderAdapter$1
++sun/util/locale/provider/LocaleProviderAdapter$Type
++sun/util/locale/provider/LocaleResources
++sun/util/locale/provider/LocaleResources$ResourceReference
++sun/util/locale/provider/LocaleServiceProviderPool
++sun/util/locale/provider/LocaleServiceProviderPool$LocalizedObjectGetter
++sun/util/locale/provider/NumberFormatProviderImpl
++sun/util/locale/provider/ResourceBundleBasedAdapter
++sun/util/locale/provider/SPILocaleProviderAdapter
++sun/util/locale/provider/SPILocaleProviderAdapter$1
++sun/util/locale/provider/TimeZoneNameProviderImpl
++sun/util/locale/provider/TimeZoneNameUtility
++sun/util/locale/provider/TimeZoneNameUtility$TimeZoneNameGetter
++sun/util/logging/LoggingProxy
++sun/util/logging/LoggingSupport
++sun/util/logging/LoggingSupport$1
++sun/util/logging/LoggingSupport$2
++sun/util/logging/PlatformLogger
++sun/util/logging/PlatformLogger$1
++sun/util/logging/PlatformLogger$DefaultLoggerProxy
++sun/util/logging/PlatformLogger$JavaLoggerProxy
++sun/util/logging/PlatformLogger$Level
++sun/util/logging/PlatformLogger$LoggerProxy
++sun/util/logging/resources/logging
++sun/util/resources/CalendarData
++sun/util/resources/CurrencyNames
++sun/util/resources/LocaleData
++sun/util/resources/LocaleData$1
++sun/util/resources/LocaleData$LocaleDataResourceBundleControl
++sun/util/resources/LocaleNamesBundle
++sun/util/resources/OpenListResourceBundle
++sun/util/resources/ParallelListResourceBundle
++sun/util/resources/ParallelListResourceBundle$KeySet
++sun/util/resources/TimeZoneNames
++sun/util/resources/TimeZoneNamesBundle
++sun/util/resources/en/CalendarData_en
++sun/util/resources/en/CurrencyNames_en_US
++sun/util/resources/en/TimeZoneNames_en
++sun/util/spi/CalendarProvider
++# e4fe875988768cf5
+Index: b/jdk/make/Images.gmk
+===================================================================
+--- a/jdk/make/Images.gmk
++++ b/jdk/make/Images.gmk
+@@ -236,11 +236,11 @@ ifeq ($(PROFILE), )
+ endif
+
+ JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
+-ifeq ($(OPENJDK_TARGET_OS), linux)
++ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd),)
+ JDK_LIB_FILES += jexec
+ endif
+
+-ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris
++ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd solaris),) # If Linux, BSD or Solaris
+ JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
+ $(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
+ endif
+@@ -383,7 +383,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
+ # This variable is potentially overridden in the closed makefile.
+ MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src
+
+- ifeq ($(OPENJDK_TARGET_OS), linux)
++ ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd),)
+ MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc
+ MAN1_SUBDIR = man
+ endif
+@@ -447,7 +447,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
+ $(install-file)
+ endif
+
+- ifeq ($(OPENJDK_TARGET_OS), linux)
++ ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd),)
+ $(JRE_IMAGE_DIR)/man/ja:
+ $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+ $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+@@ -467,7 +467,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
+ $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
+ endif
+
+- ifeq ($(OPENJDK_TARGET_OS), linux)
++ ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd),)
+ JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
+ $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
+ $(JRE_IMAGE_DIR)/man/ja
+Index: b/jdk/make/mapfiles/libnio/mapfile-bsd
+===================================================================
+--- /dev/null
++++ b/jdk/make/mapfiles/libnio/mapfile-bsd
+@@ -0,0 +1,190 @@
++#
++# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation. Oracle designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Oracle in the LICENSE file that accompanied this code.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++# or visit www.oracle.com if you need additional information or have any
++# questions.
++#
++
++SUNWprivate_1.1 {
++ global:
++ Java_java_nio_MappedByteBuffer_force0;
++ Java_java_nio_MappedByteBuffer_isLoaded0;
++ Java_java_nio_MappedByteBuffer_load0;
++ Java_sun_nio_ch_DatagramChannelImpl_disconnect0;
++ Java_sun_nio_ch_DatagramChannelImpl_initIDs;
++ Java_sun_nio_ch_DatagramChannelImpl_receive0;
++ Java_sun_nio_ch_DatagramChannelImpl_send0;
++ Java_sun_nio_ch_DatagramDispatcher_read0;
++ Java_sun_nio_ch_DatagramDispatcher_readv0;
++ Java_sun_nio_ch_DatagramDispatcher_write0;
++ Java_sun_nio_ch_DatagramDispatcher_writev0;
++ Java_sun_nio_ch_EPollArrayWrapper_epollCreate;
++ Java_sun_nio_ch_EPollArrayWrapper_epollCtl;
++ Java_sun_nio_ch_EPollArrayWrapper_epollWait;
++ Java_sun_nio_ch_EPollArrayWrapper_init;
++ Java_sun_nio_ch_EPollArrayWrapper_interrupt;
++ Java_sun_nio_ch_EPollArrayWrapper_offsetofData;
++ Java_sun_nio_ch_EPollArrayWrapper_sizeofEPollEvent;
++ Java_sun_nio_ch_EPoll_eventSize;
++ Java_sun_nio_ch_EPoll_eventsOffset;
++ Java_sun_nio_ch_EPoll_dataOffset;
++ Java_sun_nio_ch_EPoll_epollCreate;
++ Java_sun_nio_ch_EPoll_epollCtl;
++ Java_sun_nio_ch_EPoll_epollWait;
++ Java_sun_nio_ch_EPollPort_close0;
++ Java_sun_nio_ch_EPollPort_drain1;
++ Java_sun_nio_ch_EPollPort_interrupt;
++ Java_sun_nio_ch_EPollPort_socketpair;
++ Java_sun_nio_ch_FileChannelImpl_close0;
++ Java_sun_nio_ch_FileChannelImpl_initIDs;
++ Java_sun_nio_ch_FileChannelImpl_map0;
++ Java_sun_nio_ch_FileChannelImpl_position0;
++ Java_sun_nio_ch_FileChannelImpl_transferTo0;
++ Java_sun_nio_ch_FileChannelImpl_unmap0;
++ Java_sun_nio_ch_FileDispatcherImpl_close0;
++ Java_sun_nio_ch_FileDispatcherImpl_closeIntFD;
++ Java_sun_nio_ch_FileDispatcherImpl_force0;
++ Java_sun_nio_ch_FileDispatcherImpl_init;
++ Java_sun_nio_ch_FileDispatcherImpl_lock0;
++ Java_sun_nio_ch_FileDispatcherImpl_preClose0;
++ Java_sun_nio_ch_FileDispatcherImpl_pread0;
++ Java_sun_nio_ch_FileDispatcherImpl_pwrite0;
++ Java_sun_nio_ch_FileDispatcherImpl_read0;
++ Java_sun_nio_ch_FileDispatcherImpl_readv0;
++ Java_sun_nio_ch_FileDispatcherImpl_release0;
++ Java_sun_nio_ch_FileDispatcherImpl_size0;
++ Java_sun_nio_ch_FileDispatcherImpl_truncate0;
++ Java_sun_nio_ch_FileDispatcherImpl_write0;
++ Java_sun_nio_ch_FileDispatcherImpl_writev0;
++ Java_sun_nio_ch_FileKey_init;
++ Java_sun_nio_ch_FileKey_initIDs;
++ Java_sun_nio_ch_InheritedChannel_close0;
++ Java_sun_nio_ch_InheritedChannel_dup;
++ Java_sun_nio_ch_InheritedChannel_dup2;
++ Java_sun_nio_ch_InheritedChannel_open0;
++ Java_sun_nio_ch_InheritedChannel_peerAddress0;
++ Java_sun_nio_ch_InheritedChannel_peerPort0;
++ Java_sun_nio_ch_InheritedChannel_soType0;
++ Java_sun_nio_ch_IOUtil_configureBlocking;
++ Java_sun_nio_ch_IOUtil_drain;
++ Java_sun_nio_ch_IOUtil_fdVal;
++ Java_sun_nio_ch_IOUtil_fdLimit;
++ Java_sun_nio_ch_IOUtil_initIDs;
++ Java_sun_nio_ch_IOUtil_iovMax;
++ Java_sun_nio_ch_IOUtil_makePipe;
++ Java_sun_nio_ch_IOUtil_randomBytes;
++ Java_sun_nio_ch_IOUtil_setfdVal;
++ Java_sun_nio_ch_NativeThread_current;
++ Java_sun_nio_ch_NativeThread_init;
++ Java_sun_nio_ch_NativeThread_signal;
++ Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0;
++ Java_sun_nio_ch_Net_canJoin6WithIPv4Group0;
++ Java_sun_nio_ch_Net_socket0;
++ Java_sun_nio_ch_Net_bind0;
++ Java_sun_nio_ch_Net_connect0;
++ Java_sun_nio_ch_Net_listen;
++ Java_sun_nio_ch_Net_localPort;
++ Java_sun_nio_ch_Net_localInetAddress;
++ Java_sun_nio_ch_Net_getIntOption0;
++ Java_sun_nio_ch_Net_setIntOption0;
++ Java_sun_nio_ch_Net_initIDs;
++ Java_sun_nio_ch_Net_isIPv6Available0;
++ Java_sun_nio_ch_Net_joinOrDrop4;
++ Java_sun_nio_ch_Net_blockOrUnblock4;
++ Java_sun_nio_ch_Net_joinOrDrop6;
++ Java_sun_nio_ch_Net_blockOrUnblock6;
++ Java_sun_nio_ch_Net_setInterface4;
++ Java_sun_nio_ch_Net_getInterface4;
++ Java_sun_nio_ch_Net_setInterface6;
++ Java_sun_nio_ch_Net_getInterface6;
++ Java_sun_nio_ch_Net_shutdown;
++ Java_sun_nio_ch_Net_poll;
++ Java_sun_nio_ch_Net_pollinValue;
++ Java_sun_nio_ch_Net_polloutValue;
++ Java_sun_nio_ch_Net_pollerrValue;
++ Java_sun_nio_ch_Net_pollhupValue;
++ Java_sun_nio_ch_Net_pollnvalValue;
++ Java_sun_nio_ch_Net_pollconnValue;
++ Java_sun_nio_ch_Net_isExclusiveBindAvailable;
++ Java_sun_nio_ch_PollArrayWrapper_interrupt;
++ Java_sun_nio_ch_PollArrayWrapper_poll0;
++ Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
++ Java_sun_nio_ch_ServerSocketChannelImpl_initIDs;
++ Java_sun_nio_ch_SocketChannelImpl_checkConnect;
++ Java_sun_nio_ch_SocketChannelImpl_sendOutOfBandData;
++ Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
++ Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
++ Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
++ Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
++ Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
++ Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
++ Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGnomeVfs;
++ Java_sun_nio_fs_UnixNativeDispatcher_init;
++ Java_sun_nio_fs_UnixNativeDispatcher_getcwd;
++ Java_sun_nio_fs_UnixNativeDispatcher_strerror;
++ Java_sun_nio_fs_UnixNativeDispatcher_dup;
++ Java_sun_nio_fs_UnixNativeDispatcher_access0;
++ Java_sun_nio_fs_UnixNativeDispatcher_stat0;
++ Java_sun_nio_fs_UnixNativeDispatcher_lstat0;
++ Java_sun_nio_fs_UnixNativeDispatcher_fstat;
++ Java_sun_nio_fs_UnixNativeDispatcher_fstatat0;
++ Java_sun_nio_fs_UnixNativeDispatcher_chmod0;
++ Java_sun_nio_fs_UnixNativeDispatcher_fchmod;
++ Java_sun_nio_fs_UnixNativeDispatcher_chown0;
++ Java_sun_nio_fs_UnixNativeDispatcher_lchown0;
++ Java_sun_nio_fs_UnixNativeDispatcher_fchown;
++ Java_sun_nio_fs_UnixNativeDispatcher_utimes0;
++ Java_sun_nio_fs_UnixNativeDispatcher_futimes;
++ Java_sun_nio_fs_UnixNativeDispatcher_open0;
++ Java_sun_nio_fs_UnixNativeDispatcher_openat0;
++ Java_sun_nio_fs_UnixNativeDispatcher_close;
++ Java_sun_nio_fs_UnixNativeDispatcher_read;
++ Java_sun_nio_fs_UnixNativeDispatcher_write;
++ Java_sun_nio_fs_UnixNativeDispatcher_fopen0;
++ Java_sun_nio_fs_UnixNativeDispatcher_fclose;
++ Java_sun_nio_fs_UnixNativeDispatcher_opendir0;
++ Java_sun_nio_fs_UnixNativeDispatcher_fdopendir;
++ Java_sun_nio_fs_UnixNativeDispatcher_readdir;
++ Java_sun_nio_fs_UnixNativeDispatcher_closedir;
++ Java_sun_nio_fs_UnixNativeDispatcher_link0;
++ Java_sun_nio_fs_UnixNativeDispatcher_unlink0;
++ Java_sun_nio_fs_UnixNativeDispatcher_unlinkat0;
++ Java_sun_nio_fs_UnixNativeDispatcher_rename0;
++ Java_sun_nio_fs_UnixNativeDispatcher_renameat0;
++ Java_sun_nio_fs_UnixNativeDispatcher_mkdir0;
++ Java_sun_nio_fs_UnixNativeDispatcher_rmdir0;
++ Java_sun_nio_fs_UnixNativeDispatcher_symlink0;
++ Java_sun_nio_fs_UnixNativeDispatcher_readlink0;
++ Java_sun_nio_fs_UnixNativeDispatcher_realpath0;
++ Java_sun_nio_fs_UnixNativeDispatcher_statvfs0;
++ Java_sun_nio_fs_UnixNativeDispatcher_pathconf0;
++ Java_sun_nio_fs_UnixNativeDispatcher_fpathconf;
++ Java_sun_nio_fs_UnixNativeDispatcher_mknod0;
++ Java_sun_nio_fs_UnixNativeDispatcher_getpwuid;
++ Java_sun_nio_fs_UnixNativeDispatcher_getgrgid;
++ Java_sun_nio_fs_UnixNativeDispatcher_getpwnam0;
++ Java_sun_nio_fs_UnixNativeDispatcher_getgrnam0;
++ Java_sun_nio_fs_UnixCopyFile_transfer;
++ handleSocketError;
++
++ local:
++ *;
++};
+Index: b/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
+===================================================================
+--- a/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
++++ b/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
+@@ -45,8 +45,12 @@
+ #define stat64 stat
+ #define flock64 flock
+ #define off64_t off_t
++#ifndef F_SETLKW64
+ #define F_SETLKW64 F_SETLKW
++#endif
++#ifndef F_SETLK64
+ #define F_SETLK64 F_SETLK
++#endif
+
+ #define pread64 pread
+ #define pwrite64 pwrite
+Index: b/jdk/make/lib/Awt2dLibraries.gmk
+===================================================================
+--- a/jdk/make/lib/Awt2dLibraries.gmk
++++ b/jdk/make/lib/Awt2dLibraries.gmk
+@@ -309,7 +309,7 @@ LIBAWT_FILES := \
+ debug_trace.c \
+ debug_util.c
+
+-ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris linux aix))
++ifneq (, $(filter $(OPENJDK_TARGET_OS), bsd solaris linux aix))
+ LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
+ endif
+
+@@ -478,7 +478,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ MAPFILE := $(LIBAWT_MAPFILE), \
+ LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_solaris := -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
+- LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
++ LDFLAGS_SUFFIX_bsd := -ljvm $(LIBM) $(LIBDL) -ljava, \
+ LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
+ LDFLAGS_SUFFIX_aix :=-ljvm $(LIBM) $(LIBDL) -ljava -lm,\
+ LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
+@@ -637,7 +637,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),
+ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS), \
+- LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN) \
++ LDFLAGS_bsd := $(call SET_SHARED_LIBRARY_ORIGIN) \
+ $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+ LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) \
+ -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) \
+@@ -687,7 +687,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
+ LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
+ LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
+- LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm -llcms2, \
++ LDFLAGS_SUFFIX_bsd := -lm -lawt -ljava -ljvm -llcms2, \
+ LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm,\
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+ RC_FLAGS := $(RC_FLAGS) \
+@@ -854,13 +854,13 @@ ifeq ($(BUILD_HEADLESS), true)
+ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+- LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
++ LDFLAGS_bsd := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
+ LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
+ -R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
+ -R$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
+ LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
+ REORDER := $(LIBAWT_HEADLESS_REORDER), \
+- LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
++ LDFLAGS_SUFFIX_bsd := -ljvm -lawt -lm $(LIBDL) -ljava, \
+ LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
+ LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
+ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
+@@ -937,7 +937,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
+- LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
++ LDFLAGS_SUFFIX_bsd := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
+ LDFLAGS_SUFFIX_solaris := -lawt -lawt_headless -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
+ LDFLAGS_SUFFIX_aix := -lawt -lawt_headless $(LIBM) $(LIBCXX) -ljava -ljvm,\
+ LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
+@@ -1088,7 +1088,7 @@ else # OPENJDK_TARGET_OS not windows
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_solaris := -L$(OPENWIN_HOME)/sfw/lib$(OPENJDK_TARGET_CPU_ISADIR) -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR), \
+- LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
++ LDFLAGS_SUFFIX_bsd := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
+ LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
+ LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
+ LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
+@@ -1144,7 +1144,7 @@ ifndef OPENJDK
+ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libkcms/mapfile-vers, \
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+- LDFLAGS_SUFFIX_linux := -lc -lpthread, \
++ LDFLAGS_SUFFIX_bsd := -lc -lpthread, \
+ LDFLAGS_SUFFIX_solaris := -lc, \
+ LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib version.lib, \
+ LDFLAGS_SUFFIX_posix := -lm -ljava -ljvm, \
+Index: b/jdk/src/share/lib/security/java.security-bsd
+===================================================================
+--- /dev/null
++++ b/jdk/src/share/lib/security/java.security-bsd
+@@ -0,0 +1,569 @@
++#
++# This is the "master security properties file".
++#
++# An alternate java.security properties file may be specified
++# from the command line via the system property
++#
++# -Djava.security.properties=<URL>
++#
++# This properties file appends to the master security properties file.
++# If both properties files specify values for the same key, the value
++# from the command-line properties file is selected, as it is the last
++# one loaded.
++#
++# Also, if you specify
++#
++# -Djava.security.properties==<URL> (2 equals),
++#
++# then that properties file completely overrides the master security
++# properties file.
++#
++# To disable the ability to specify an additional properties file from
++# the command line, set the key security.overridePropertiesFile
++# to false in the master security properties file. It is set to true
++# by default.
++
++# In this file, various security properties are set for use by
++# java.security classes. This is where users can statically register
++# Cryptography Package Providers ("providers" for short). The term
++# "provider" refers to a package or set of packages that supply a
++# concrete implementation of a subset of the cryptography aspects of
++# the Java Security API. A provider may, for example, implement one or
++# more digital signature algorithms or message digest algorithms.
++#
++# Each provider must implement a subclass of the Provider class.
++# To register a provider in this master security properties file,
++# specify the Provider subclass name and priority in the format
++#
++# security.provider.<n>=<className>
++#
++# This declares a provider, and specifies its preference
++# order n. The preference order is the order in which providers are
++# searched for requested algorithms (when no specific provider is
++# requested). The order is 1-based; 1 is the most preferred, followed
++# by 2, and so on.
++#
++# <className> must specify the subclass of the Provider class whose
++# constructor sets the values of various properties that are required
++# for the Java Security API to look up the algorithms or other
++# facilities implemented by the provider.
++#
++# There must be at least one provider specification in java.security.
++# There is a default provider that comes standard with the JDK. It
++# is called the "SUN" provider, and its Provider subclass
++# named Sun appears in the sun.security.provider package. Thus, the
++# "SUN" provider is registered via the following:
++#
++# security.provider.1=sun.security.provider.Sun
++#
++# (The number 1 is used for the default provider.)
++#
++# Note: Providers can be dynamically registered instead by calls to
++# either the addProvider or insertProviderAt method in the Security
++# class.
++
++#
++# List of providers and their preference orders (see above):
++#
++security.provider.1=sun.security.provider.Sun
++security.provider.2=sun.security.rsa.SunRsaSign
++security.provider.3=sun.security.ec.SunEC
++security.provider.4=com.sun.net.ssl.internal.ssl.Provider
++security.provider.5=com.sun.crypto.provider.SunJCE
++security.provider.6=sun.security.jgss.SunProvider
++security.provider.7=com.sun.security.sasl.Provider
++security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
++security.provider.9=sun.security.smartcardio.SunPCSC
++
++#
++# Sun Provider SecureRandom seed source.
++#
++# Select the primary source of seed data for the "SHA1PRNG" and
++# "NativePRNG" SecureRandom implementations in the "Sun" provider.
++# (Other SecureRandom implementations might also use this property.)
++#
++# On Unix-like systems (for example, Solaris/Linux/MacOS), the
++# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
++# special device files such as file:/dev/random.
++#
++# On Windows systems, specifying the URLs "file:/dev/random" or
++# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
++# mechanism for SHA1PRNG.
++#
++# By default, an attempt is made to use the entropy gathering device
++# specified by the "securerandom.source" Security property. If an
++# exception occurs while accessing the specified URL:
++#
++# SHA1PRNG:
++# the traditional system/thread activity algorithm will be used.
++#
++# NativePRNG:
++# a default value of /dev/random will be used. If neither
++# are available, the implementation will be disabled.
++# "file" is the only currently supported protocol type.
++#
++# The entropy gathering device can also be specified with the System
++# property "java.security.egd". For example:
++#
++# % java -Djava.security.egd=file:/dev/random MainClass
++#
++# Specifying this System property will override the
++# "securerandom.source" Security property.
++#
++# In addition, if "file:/dev/random" or "file:/dev/urandom" is
++# specified, the "NativePRNG" implementation will be more preferred than
++# SHA1PRNG in the Sun provider.
++#
++securerandom.source=file:/dev/random
++
++#
++# A list of known strong SecureRandom implementations.
++#
++# To help guide applications in selecting a suitable strong
++# java.security.SecureRandom implementation, Java distributions should
++# indicate a list of known strong implementations using the property.
++#
++# This is a comma-separated list of algorithm and/or algorithm:provider
++# entries.
++#
++securerandom.strongAlgorithms=NativePRNGBlocking:SUN
++
++#
++# Class to instantiate as the javax.security.auth.login.Configuration
++# provider.
++#
++login.configuration.provider=sun.security.provider.ConfigFile
++
++#
++# Default login configuration file
++#
++#login.config.url.1=file:${user.home}/.java.login.config
++
++#
++# Class to instantiate as the system Policy. This is the name of the class
++# that will be used as the Policy object.
++#
++policy.provider=sun.security.provider.PolicyFile
++
++# The default is to have a single system-wide policy file,
++# and a policy file in the user's home directory.
++policy.url.1=file:${java.home}/lib/security/java.policy
++policy.url.2=file:${user.home}/.java.policy
++
++# whether or not we expand properties in the policy file
++# if this is set to false, properties (${...}) will not be expanded in policy
++# files.
++policy.expandProperties=true
++
++# whether or not we allow an extra policy to be passed on the command line
++# with -Djava.security.policy=somefile. Comment out this line to disable
++# this feature.
++policy.allowSystemProperty=true
++
++# whether or not we look into the IdentityScope for trusted Identities
++# when encountering a 1.1 signed JAR file. If the identity is found
++# and is trusted, we grant it AllPermission.
++policy.ignoreIdentityScope=false
++
++#
++# Default keystore type.
++#
++keystore.type=jks
++
++#
++# Controls compatibility mode for the JKS keystore type.
++#
++# When set to 'true', the JKS keystore type supports loading
++# keystore files in either JKS or PKCS12 format. When set to 'false'
++# it supports loading only JKS keystore files.
++#
++keystore.type.compat=true
++
++#
++# List of comma-separated packages that start with or equal this string
++# will cause a security exception to be thrown when
++# passed to checkPackageAccess unless the
++# corresponding RuntimePermission ("accessClassInPackage."+package) has
++# been granted.
++package.access=sun.,\
++ com.sun.xml.internal.,\
++ com.sun.imageio.,\
++ com.sun.istack.internal.,\
++ com.sun.jmx.,\
++ com.sun.media.sound.,\
++ com.sun.naming.internal.,\
++ com.sun.proxy.,\
++ com.sun.corba.se.,\
++ com.sun.org.apache.bcel.internal.,\
++ com.sun.org.apache.regexp.internal.,\
++ com.sun.org.apache.xerces.internal.,\
++ com.sun.org.apache.xpath.internal.,\
++ com.sun.org.apache.xalan.internal.extensions.,\
++ com.sun.org.apache.xalan.internal.lib.,\
++ com.sun.org.apache.xalan.internal.res.,\
++ com.sun.org.apache.xalan.internal.templates.,\
++ com.sun.org.apache.xalan.internal.utils.,\
++ com.sun.org.apache.xalan.internal.xslt.,\
++ com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
++ com.sun.org.apache.xalan.internal.xsltc.compiler.,\
++ com.sun.org.apache.xalan.internal.xsltc.trax.,\
++ com.sun.org.apache.xalan.internal.xsltc.util.,\
++ com.sun.org.apache.xml.internal.res.,\
++ com.sun.org.apache.xml.internal.security.,\
++ com.sun.org.apache.xml.internal.serializer.utils.,\
++ com.sun.org.apache.xml.internal.utils.,\
++ com.sun.org.glassfish.,\
++ com.oracle.xmlns.internal.,\
++ com.oracle.webservices.internal.,\
++ oracle.jrockit.jfr.,\
++ org.jcp.xml.dsig.internal.,\
++ jdk.internal.,\
++ jdk.nashorn.internal.,\
++ jdk.nashorn.tools.,\
++ com.sun.activation.registries.
++
++#
++# List of comma-separated packages that start with or equal this string
++# will cause a security exception to be thrown when
++# passed to checkPackageDefinition unless the
++# corresponding RuntimePermission ("defineClassInPackage."+package) has
++# been granted.
++#
++# by default, none of the class loaders supplied with the JDK call
++# checkPackageDefinition.
++#
++package.definition=sun.,\
++ com.sun.xml.internal.,\
++ com.sun.imageio.,\
++ com.sun.istack.internal.,\
++ com.sun.jmx.,\
++ com.sun.media.sound.,\
++ com.sun.naming.internal.,\
++ com.sun.proxy.,\
++ com.sun.corba.se.,\
++ com.sun.org.apache.bcel.internal.,\
++ com.sun.org.apache.regexp.internal.,\
++ com.sun.org.apache.xerces.internal.,\
++ com.sun.org.apache.xpath.internal.,\
++ com.sun.org.apache.xalan.internal.extensions.,\
++ com.sun.org.apache.xalan.internal.lib.,\
++ com.sun.org.apache.xalan.internal.res.,\
++ com.sun.org.apache.xalan.internal.templates.,\
++ com.sun.org.apache.xalan.internal.utils.,\
++ com.sun.org.apache.xalan.internal.xslt.,\
++ com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
++ com.sun.org.apache.xalan.internal.xsltc.compiler.,\
++ com.sun.org.apache.xalan.internal.xsltc.trax.,\
++ com.sun.org.apache.xalan.internal.xsltc.util.,\
++ com.sun.org.apache.xml.internal.res.,\
++ com.sun.org.apache.xml.internal.security.,\
++ com.sun.org.apache.xml.internal.serializer.utils.,\
++ com.sun.org.apache.xml.internal.utils.,\
++ com.sun.org.glassfish.,\
++ com.oracle.xmlns.internal.,\
++ com.oracle.webservices.internal.,\
++ oracle.jrockit.jfr.,\
++ org.jcp.xml.dsig.internal.,\
++ jdk.internal.,\
++ jdk.nashorn.internal.,\
++ jdk.nashorn.tools.,\
++ com.sun.activation.registries.
++
++#
++# Determines whether this properties file can be appended to
++# or overridden on the command line via -Djava.security.properties
++#
++security.overridePropertiesFile=true
++
++#
++# Determines the default key and trust manager factory algorithms for
++# the javax.net.ssl package.
++#
++ssl.KeyManagerFactory.algorithm=SunX509
++ssl.TrustManagerFactory.algorithm=PKIX
++
++#
++# The Java-level namelookup cache policy for successful lookups:
++#
++# any negative value: caching forever
++# any positive value: the number of seconds to cache an address for
++# zero: do not cache
++#
++# default value is forever (FOREVER). For security reasons, this
++# caching is made forever when a security manager is set. When a security
++# manager is not set, the default behavior in this implementation
++# is to cache for 30 seconds.
++#
++# NOTE: setting this to anything other than the default value can have
++# serious security implications. Do not set it unless
++# you are sure you are not exposed to DNS spoofing attack.
++#
++#networkaddress.cache.ttl=-1
++
++# The Java-level namelookup cache policy for failed lookups:
++#
++# any negative value: cache forever
++# any positive value: the number of seconds to cache negative lookup results
++# zero: do not cache
++#
++# In some Microsoft Windows networking environments that employ
++# the WINS name service in addition to DNS, name service lookups
++# that fail may take a noticeably long time to return (approx. 5 seconds).
++# For this reason the default caching policy is to maintain these
++# results for 10 seconds.
++#
++#
++networkaddress.cache.negative.ttl=10
++
++#
++# Properties to configure OCSP for certificate revocation checking
++#
++
++# Enable OCSP
++#
++# By default, OCSP is not used for certificate revocation checking.
++# This property enables the use of OCSP when set to the value "true".
++#
++# NOTE: SocketPermission is required to connect to an OCSP responder.
++#
++# Example,
++# ocsp.enable=true
++
++#
++# Location of the OCSP responder
++#
++# By default, the location of the OCSP responder is determined implicitly
++# from the certificate being validated. This property explicitly specifies
++# the location of the OCSP responder. The property is used when the
++# Authority Information Access extension (defined in RFC 3280) is absent
++# from the certificate or when it requires overriding.
++#
++# Example,
++# ocsp.responderURL=http://ocsp.example.net:80
++
++#
++# Subject name of the OCSP responder's certificate
++#
++# By default, the certificate of the OCSP responder is that of the issuer
++# of the certificate being validated. This property identifies the certificate
++# of the OCSP responder when the default does not apply. Its value is a string
++# distinguished name (defined in RFC 2253) which identifies a certificate in
++# the set of certificates supplied during cert path validation. In cases where
++# the subject name alone is not sufficient to uniquely identify the certificate
++# then both the "ocsp.responderCertIssuerName" and
++# "ocsp.responderCertSerialNumber" properties must be used instead. When this
++# property is set then those two properties are ignored.
++#
++# Example,
++# ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"
++
++#
++# Issuer name of the OCSP responder's certificate
++#
++# By default, the certificate of the OCSP responder is that of the issuer
++# of the certificate being validated. This property identifies the certificate
++# of the OCSP responder when the default does not apply. Its value is a string
++# distinguished name (defined in RFC 2253) which identifies a certificate in
++# the set of certificates supplied during cert path validation. When this
++# property is set then the "ocsp.responderCertSerialNumber" property must also
++# be set. When the "ocsp.responderCertSubjectName" property is set then this
++# property is ignored.
++#
++# Example,
++# ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"
++
++#
++# Serial number of the OCSP responder's certificate
++#
++# By default, the certificate of the OCSP responder is that of the issuer
++# of the certificate being validated. This property identifies the certificate
++# of the OCSP responder when the default does not apply. Its value is a string
++# of hexadecimal digits (colon or space separators may be present) which
++# identifies a certificate in the set of certificates supplied during cert path
++# validation. When this property is set then the "ocsp.responderCertIssuerName"
++# property must also be set. When the "ocsp.responderCertSubjectName" property
++# is set then this property is ignored.
++#
++# Example,
++# ocsp.responderCertSerialNumber=2A:FF:00
++
++#
++# Policy for failed Kerberos KDC lookups:
++#
++# When a KDC is unavailable (network error, service failure, etc), it is
++# put inside a blacklist and accessed less often for future requests. The
++# value (case-insensitive) for this policy can be:
++#
++# tryLast
++# KDCs in the blacklist are always tried after those not on the list.
++#
++# tryLess[:max_retries,timeout]
++# KDCs in the blacklist are still tried by their order in the configuration,
++# but with smaller max_retries and timeout values. max_retries and timeout
++# are optional numerical parameters (default 1 and 5000, which means once
++# and 5 seconds). Please notes that if any of the values defined here is
++# more than what is defined in krb5.conf, it will be ignored.
++#
++# Whenever a KDC is detected as available, it is removed from the blacklist.
++# The blacklist is reset when krb5.conf is reloaded. You can add
++# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is
++# reloaded whenever a JAAS authentication is attempted.
++#
++# Example,
++# krb5.kdc.bad.policy = tryLast
++# krb5.kdc.bad.policy = tryLess:2,2000
++krb5.kdc.bad.policy = tryLast
++
++# Algorithm restrictions for certification path (CertPath) processing
++#
++# In some environments, certain algorithms or key lengths may be undesirable
++# for certification path building and validation. For example, "MD2" is
++# generally no longer considered to be a secure hash algorithm. This section
++# describes the mechanism for disabling algorithms based on algorithm name
++# and/or key length. This includes algorithms used in certificates, as well
++# as revocation information such as CRLs and signed OCSP Responses.
++#
++# The syntax of the disabled algorithm string is described as this Java
++# BNF-style:
++# DisabledAlgorithms:
++# " DisabledAlgorithm { , DisabledAlgorithm } "
++#
++# DisabledAlgorithm:
++# AlgorithmName [Constraint]
++#
++# AlgorithmName:
++# (see below)
++#
++# Constraint:
++# KeySizeConstraint
++#
++# KeySizeConstraint:
++# keySize Operator DecimalInteger
++#
++# Operator:
++# <= | < | == | != | >= | >
++#
++# DecimalInteger:
++# DecimalDigits
++#
++# DecimalDigits:
++# DecimalDigit {DecimalDigit}
++#
++# DecimalDigit: one of
++# 1 2 3 4 5 6 7 8 9 0
++#
++# The "AlgorithmName" is the standard algorithm name of the disabled
++# algorithm. See "Java Cryptography Architecture Standard Algorithm Name
++# Documentation" for information about Standard Algorithm Names. Matching
++# is performed using a case-insensitive sub-element matching rule. (For
++# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and
++# "ECDSA" for signatures.) If the assertion "AlgorithmName" is a
++# sub-element of the certificate algorithm name, the algorithm will be
++# rejected during certification path building and validation. For example,
++# the assertion algorithm name "DSA" will disable all certificate algorithms
++# that rely on DSA, such as NONEwithDSA, SHA1withDSA. However, the assertion
++# will not disable algorithms related to "ECDSA".
++#
++# A "Constraint" provides further guidance for the algorithm being specified.
++# The "KeySizeConstraint" requires a key of a valid size range if the
++# "AlgorithmName" is of a key algorithm. The "DecimalInteger" indicates the
++# key size specified in number of bits. For example, "RSA keySize <= 1024"
++# indicates that any RSA key with key size less than or equal to 1024 bits
++# should be disabled, and "RSA keySize < 1024, RSA keySize > 2048" indicates
++# that any RSA key with key size less than 1024 or greater than 2048 should
++# be disabled. Note that the "KeySizeConstraint" only makes sense to key
++# algorithms.
++#
++# Note: This property is currently used by Oracle's PKIX implementation. It
++# is not guaranteed to be examined and used by other implementations.
++#
++# Example:
++# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
++#
++#
++jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
++
++# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
++# (SSL/TLS) processing
++#
++# In some environments, certain algorithms or key lengths may be undesirable
++# when using SSL/TLS. This section describes the mechanism for disabling
++# algorithms during SSL/TLS security parameters negotiation, including
++# protocol version negotiation, cipher suites selection, peer authentication
++# and key exchange mechanisms.
++#
++# Disabled algorithms will not be negotiated for SSL/TLS connections, even
++# if they are enabled explicitly in an application.
++#
++# For PKI-based peer authentication and key exchange mechanisms, this list
++# of disabled algorithms will also be checked during certification path
++# building and validation, including algorithms used in certificates, as
++# well as revocation information such as CRLs and signed OCSP Responses.
++# This is in addition to the jdk.certpath.disabledAlgorithms property above.
++#
++# See the specification of "jdk.certpath.disabledAlgorithms" for the
++# syntax of the disabled algorithm string.
++#
++# Note: This property is currently used by Oracle's JSSE implementation.
++# It is not guaranteed to be examined and used by other implementations.
++#
++# Example:
++# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
++jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
++
++# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
++# processing in JSSE implementation.
++#
++# In some environments, a certain algorithm may be undesirable but it
++# cannot be disabled because of its use in legacy applications. Legacy
++# algorithms may still be supported, but applications should not use them
++# as the security strength of legacy algorithms are usually not strong enough
++# in practice.
++#
++# During SSL/TLS security parameters negotiation, legacy algorithms will
++# not be negotiated unless there are no other candidates.
++#
++# The syntax of the disabled algorithm string is described as this Java
++# BNF-style:
++# LegacyAlgorithms:
++# " LegacyAlgorithm { , LegacyAlgorithm } "
++#
++# LegacyAlgorithm:
++# AlgorithmName (standard JSSE algorithm name)
++#
++# See the specification of security property "jdk.certpath.disabledAlgorithms"
++# for the syntax and description of the "AlgorithmName" notation.
++#
++# Per SSL/TLS specifications, cipher suites have the form:
++# SSL_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++# or
++# TLS_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++#
++# For example, the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA uses RSA as the
++# key exchange algorithm, AES_128_CBC (128 bits AES cipher algorithm in CBC
++# mode) as the cipher (encryption) algorithm, and SHA-1 as the message digest
++# algorithm for HMAC.
++#
++# The LegacyAlgorithm can be one of the following standard algorithm names:
++# 1. JSSE cipher suite name, e.g., TLS_RSA_WITH_AES_128_CBC_SHA
++# 2. JSSE key exchange algorithm name, e.g., RSA
++# 3. JSSE cipher (encryption) algorithm name, e.g., AES_128_CBC
++# 4. JSSE message digest algorithm name, e.g., SHA
++#
++# See SSL/TLS specifications and "Java Cryptography Architecture Standard
++# Algorithm Name Documentation" for information about the algorithm names.
++#
++# Note: This property is currently used by Oracle's JSSE implementation.
++# It is not guaranteed to be examined and used by other implementations.
++# There is no guarantee the property will continue to exist or be of the
++# same syntax in future releases.
++#
++# Example:
++# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5
++#
++jdk.tls.legacyAlgorithms= \
++ K_NULL, C_NULL, M_NULL, \
++ DHE_DSS_EXPORT, DHE_RSA_EXPORT, DH_anon_EXPORT, DH_DSS_EXPORT, \
++ DH_RSA_EXPORT, RSA_EXPORT, \
++ DH_anon, ECDH_anon, \
++ RC4_128, RC4_40, DES_CBC, DES40_CBC
+Index: b/jdk/src/solaris/classes/java/lang/UNIXProcess.java
+===================================================================
+--- a/jdk/src/solaris/classes/java/lang/UNIXProcess.java
++++ b/jdk/src/solaris/classes/java/lang/UNIXProcess.java
+@@ -157,6 +157,7 @@ final class UNIXProcess extends Process
+ );
+
+ if (osName.equals("Linux")) { return LINUX; }
++ if (osName.contains("GNU")) { return BSD; } /* glibc-based, but not Linux */
+ if (osName.contains("OS X")) { return BSD; }
+ if (osName.equals("SunOS")) { return SOLARIS; }
+ if (osName.equals("AIX")) { return AIX; }
+Index: b/jdk/make/lib/NetworkingLibraries.gmk
+===================================================================
+--- a/jdk/make/lib/NetworkingLibraries.gmk
++++ b/jdk/make/lib/NetworkingLibraries.gmk
+@@ -42,7 +42,7 @@ ifneq ($(OPENJDK_TARGET_OS), linux)
+ LIBNET_EXCLUDE_FILES += linux_close.c
+ endif
+
+-ifneq ($(OPENJDK_TARGET_OS), macosx)
++ifeq (,$(findstring $(OPENJDK_TARGET_OS), bsd macosx))
+ LIBNET_EXCLUDE_FILES += bsd_close.c
+ endif
+
+@@ -72,7 +72,7 @@ $(eval $(call SetupNativeCompilation,BUI
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_SUFFIX_macosx := -ljvm -ljava, \
+ LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lnsl -lsocket $(LIBDL) -lc, \
+- LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \
++ LDFLAGS_SUFFIX_bsd := $(LIBDL) -ljvm -lpthread -ljava, \
+ LDFLAGS_SUFFIX_aix := $(LIBDL) -ljvm -ljava,\
+ LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
+ delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
diff --git a/debian/patches/ld-symbolic-functions-aarch64.diff b/debian/patches/ld-symbolic-functions-aarch64.diff
new file mode 100644
index 0000000..8f72868
--- /dev/null
+++ b/debian/patches/ld-symbolic-functions-aarch64.diff
@@ -0,0 +1,32 @@
+--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig 2014-01-27 11:43:44.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2014-01-30 15:51:23.507418895 +0000
+@@ -295,6 +295,7 @@
+
+ # Enable linker optimization
+ LFLAGS += -Xlinker -O1
++LFLAGS += -Wl,-Bsymbolic-functions
+
+ ifeq ($(USE_CLANG),)
+ # If this is a --hash-style=gnu system, use --hash-style=both
+--- openjdk/hotspot/agent/src/os/linux/Makefile.orig 2014-01-30 15:51:23.507418895 +0000
++++ openjdk/hotspot/agent/src/os/linux/Makefile 2014-01-30 15:52:15.307790918 +0000
+@@ -77,7 +77,7 @@
+ LFLAGS_LIBSA += $(LDFLAGS_HASH_STYLE)
+
+ $(LIBSA): $(ARCH) $(OBJS) mapfile
+- $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
++ $(GCC) -shared -Wl,-Bsymbolic-functions $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
+
+ test.o: test.c
+ $(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c
+--- openjdk/jdk/make/common/Defs-linux.gmk.orig 2014-01-30 15:50:28.335021361 +0000
++++ openjdk/jdk/make/common/Defs-linux.gmk 2014-01-30 15:51:23.507418895 +0000
+@@ -351,7 +351,7 @@
+
+ EXTRA_LIBS += -lc
+
+-LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs
++LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs -Wl,-Bsymbolic-functions
+ LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
+
+ #
diff --git a/debian/patches/ld-symbolic-functions-default.diff b/debian/patches/ld-symbolic-functions-default.diff
new file mode 100644
index 0000000..58df79b
--- /dev/null
+++ b/debian/patches/ld-symbolic-functions-default.diff
@@ -0,0 +1,21 @@
+--- a/hotspot/agent/src/os/linux/Makefile
++++ b/hotspot/agent/src/os/linux/Makefile
+@@ -78,7 +78,7 @@ endif
+ LFLAGS_LIBSA += $(LDFLAGS_HASH_STYLE)
+
+ $(LIBSA): $(ARCH) $(OBJS) mapfile
+- $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
++ $(GCC) -shared -Wl,-Bsymbolic-functions $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
+
+ test.o: test.c
+ $(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c
+--- a/hotspot/make/linux/makefiles/gcc.make
++++ b/hotspot/make/linux/makefiles/gcc.make
+@@ -288,6 +288,7 @@ endif
+
+ # Enable linker optimization
+ LFLAGS += -Xlinker -O1
++LFLAGS += -Wl,-Bsymbolic-functions
+
+ ifeq ($(USE_CLANG),)
+ # If this is a --hash-style=gnu system, use --hash-style=both
diff --git a/debian/patches/libjpeg-fix.diff b/debian/patches/libjpeg-fix.diff
new file mode 100644
index 0000000..1b11cae
--- /dev/null
+++ b/debian/patches/libjpeg-fix.diff
@@ -0,0 +1,13 @@
+# DP: Fix libjavajpeg build using the system jpeg library.
+
+--- a/jdk/make/lib/Awt2dLibraries.gmk
++++ b/jdk/make/lib/Awt2dLibraries.gmk
+@@ -739,7 +739,7 @@ endif
+ ifeq ($(USE_EXTERNAL_LIBJPEG), true)
+ LIBJPEG_LIBS := -ljpeg
+ BUILD_LIBJAVAJPEG_INCLUDE_FILES := \
+- imageIOJPEG.c \
++ imageioJPEG.c \
+ jpegdecoder.c
+ BUILD_LIBJAVAJPEG_HEADERS :=
+ else
diff --git a/debian/patches/libpcsclite-dlopen.diff b/debian/patches/libpcsclite-dlopen.diff
new file mode 100644
index 0000000..55c3d3f
--- /dev/null
+++ b/debian/patches/libpcsclite-dlopen.diff
@@ -0,0 +1,36 @@
+--- a/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java
++++ b/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java
+@@ -48,6 +48,7 @@ class PlatformPCSC {
+
+ private final static String PROP_NAME = "sun.security.smartcardio.library";
+
++ private final static String LIB0 = "libpcsclite.so.1";
+ private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so";
+ private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so";
+ private final static String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC";
+@@ -104,22 +105,9 @@ class PlatformPCSC {
+ if (lib.length() != 0) {
+ return lib;
+ }
+- lib = expand(LIB1);
+- if (new File(lib).isFile()) {
+- // if LIB1 exists, use that
+- return lib;
+- }
+- lib = expand(LIB2);
+- if (new File(lib).isFile()) {
+- // if LIB2 exists, use that
+- return lib;
+- }
+- lib = PCSC_FRAMEWORK;
+- if (new File(lib).isFile()) {
+- // if PCSC.framework exists, use that
+- return lib;
+- }
+- throw new IOException("No PC/SC library found on this system");
++ // let dlopen do the work
++ lib = LIB0;
++ return lib;
+ }
+
+ private static native void initialize(String libraryName);
diff --git a/debian/patches/link-with-as-needed.diff b/debian/patches/link-with-as-needed.diff
new file mode 100644
index 0000000..dab4507
--- /dev/null
+++ b/debian/patches/link-with-as-needed.diff
@@ -0,0 +1,40 @@
+# DP: Fix build failures with -Wl,--as-needed, don't explicitly link with -lc
+
+--- a/jdk/make/CompileLaunchers.gmk
++++ b/jdk/make/CompileLaunchers.gmk
+@@ -427,7 +427,7 @@ endif
+ # binary (at least on linux) which causes the size to differ between old and new build.
+ ifeq ($(USE_EXTERNAL_LIBZ), true)
+ UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
+- UNPACKEXE_ZIPOBJS := -lz
++ UNPACKEXE_LIBS := -lz
+ else
+ UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
+ UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
+@@ -483,9 +483,9 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS_posix := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
+ $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+- LDFLAGS_linux := -lc, \
++ LDFLAGS_linux := , \
+ LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
+- LDFLAGS_SUFFIX := $(LIBCXX), \
++ LDFLAGS_SUFFIX := $(UNPACKEXE_LIBS) $(LIBCXX), \
+ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
+ OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
+ PROGRAM := unpack200, \
+--- a/jdk/make/lib/Awt2dLibraries.gmk
++++ b/jdk/make/lib/Awt2dLibraries.gmk
+@@ -760,10 +760,10 @@ $(eval $(call SetupNativeCompilation,BUI
+ $(BUILD_LIBJAVAJPEG_CLOSED_INCLUDES) \
+ $(BUILD_LIBJAVAJPEG_HEADERS), \
+ MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
+- LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \
++ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
+- LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
++ LDFLAGS_SUFFIX := $(LIBJPEG_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+ RC_FLAGS := $(RC_FLAGS) \
+ -D "JDK_FNAME=javajpeg.dll" \
diff --git a/debian/patches/m68k-support.diff b/debian/patches/m68k-support.diff
new file mode 100644
index 0000000..d357f1f
--- /dev/null
+++ b/debian/patches/m68k-support.diff
@@ -0,0 +1,1255 @@
+
+--- a/common/autoconf/generated-configure.sh
++++ b/common/autoconf/generated-configure.sh
+@@ -6919,6 +6919,12 @@ test -n "$target_alias" &&
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
++ m68k)
++ VAR_CPU=m68k
++ VAR_CPU_ARCH=m68k
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=big
++ ;;
+ *)
+ as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
+ ;;
+@@ -7062,6 +7068,12 @@ $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUI
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
++ m68k)
++ VAR_CPU=m68k
++ VAR_CPU_ARCH=m68k
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=big
++ ;;
+ *)
+ as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
+ ;;
+--- a/common/autoconf/platform.m4
++++ b/common/autoconf/platform.m4
+@@ -156,6 +156,12 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=big
+ ;;
++ m68k)
++ VAR_CPU=m68k
++ VAR_CPU_ARCH=m68k
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=big
++ ;;
+ *)
+ AC_MSG_ERROR([unsupported cpu $1])
+ ;;
+--- a/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
++++ b/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
+@@ -38,7 +38,7 @@
+ * __m68k_cmpxchg
+ *
+ * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
+- * Returns newval on success and oldval if no exchange happened.
++ * Returns oldval on success and *ptr if no exchange happened.
+ * This implementation is processor specific and works on
+ * 68020 68030 68040 and 68060.
+ *
+@@ -62,40 +62,48 @@ static inline int __m68k_cmpxchg(int old
+ static inline int m68k_compare_and_swap(volatile int *ptr,
+ int oldval,
+ int newval) {
++ int prev = *ptr;
+ for (;;) {
+- int prev = *ptr;
++ int newprev;
+ if (prev != oldval)
+ return prev;
+
+- if (__m68k_cmpxchg (prev, newval, ptr) == newval)
++ newprev = __m68k_cmpxchg (prev, newval, ptr);
++ if (newprev == prev)
+ // Success.
+ return prev;
+
+ // We failed even though prev == oldval. Try again.
++ prev = newprev;
+ }
+ }
+
+ /* Atomically add an int to memory. */
+ static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) {
++ int prev = *ptr;
+ for (;;) {
+ // Loop until success.
++ int newprev;
+
+- int prev = *ptr;
+-
+- if (__m68k_cmpxchg (prev, prev + add_value, ptr) == prev + add_value)
++ newprev = __m68k_cmpxchg (prev, prev + add_value, ptr);
++ if (newprev == prev)
+ return prev + add_value;
++ prev = newprev;
+ }
+ }
+
+ /* Atomically write VALUE into `*PTR' and returns the previous
+ contents of `*PTR'. */
+ static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) {
++ int prev = *ptr;
+ for (;;) {
+ // Loop until success.
+- int prev = *ptr;
++ int newprev;
+
+- if (__m68k_cmpxchg (prev, newval, ptr) == prev)
++ newprev = __m68k_cmpxchg (prev, newval, ptr);
++ if (newprev == prev)
+ return prev;
++ prev = newprev;
+ }
+ }
+ #endif // M68K
+--- a/hotspot/src/share/vm/memory/allocation.hpp
++++ b/hotspot/src/share/vm/memory/allocation.hpp
+@@ -191,7 +191,7 @@ template <MEMFLAGS F> class CHeapObj ALL
+ throw();
+ void operator delete(void* p);
+ void operator delete [] (void* p);
+-};
++} __attribute__ ((aligned (4)));
+
+ // Base class for objects allocated on the stack only.
+ // Calling new or delete will result in fatal error.
+@@ -205,7 +205,7 @@ class StackObj ALLOCATION_SUPER_CLASS_SP
+ #endif
+ void operator delete(void* p);
+ void operator delete [](void* p);
+-};
++} __attribute__ ((aligned (4)));
+
+ // Base class for objects used as value objects.
+ // Calling new or delete will result in fatal error.
+@@ -231,7 +231,7 @@ class _ValueObj {
+ void operator delete(void* p);
+ void* operator new [](size_t size) throw();
+ void operator delete [](void* p);
+-};
++} __attribute__ ((aligned (4)));
+
+
+ // Base class for objects stored in Metaspace.
+@@ -611,7 +611,7 @@ class ResourceObj ALLOCATION_SUPER_CLASS
+
+ void operator delete(void* p);
+ void operator delete [](void* p);
+-};
++} __attribute__ ((aligned (4)));
+
+ // One of the following macros must be used when allocating an array
+ // or object to determine whether it should reside in the C heap on in
+--- a/hotspot/src/share/vm/oops/oop.hpp
++++ b/hotspot/src/share/vm/oops/oop.hpp
+@@ -374,6 +374,6 @@ class oopDesc {
+ static int mark_offset_in_bytes() { return offset_of(oopDesc, _mark); }
+ static int klass_offset_in_bytes() { return offset_of(oopDesc, _metadata._klass); }
+ static int klass_gap_offset_in_bytes();
+-};
++} __attribute__ ((aligned (4)));
+
+ #endif // SHARE_VM_OOPS_OOP_HPP
+--- a/jdk/make/gensrc/GensrcX11Wrappers.gmk
++++ b/jdk/make/gensrc/GensrcX11Wrappers.gmk
+@@ -57,12 +57,16 @@ else
+ GENSRC_X11_VERSION := 32 64
+ endif
+ endif
++GENSRC_X11_VERSION_VARIANT :=
++ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), linux-m68k)
++ GENSRC_X11_VERSION_VARIANT := -linux-m68k
++endif
+
+ GENSRC_X11_SIZES_USED := $(addprefix $(GENSRC_X11WRAPPERS_TMP)/sizes., $(GENSRC_X11_VERSION))
+
+ # Copy only the sizes.* files that are actually needed. WrapperGenerator picks up any it finds from the
+ # file prefix it is given so those not needed need to be hidden.
+-$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
++$(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%$(GENSRC_X11_VERSION_VARIANT)
+ $(MKDIR) -p $(@D)
+ $(RM) '$@'
+ $(SORT) $< > $@
+--- a/jdk/src/solaris/bin/java_md_solinux.c
++++ b/jdk/src/solaris/bin/java_md_solinux.c
+@@ -1023,12 +1023,24 @@ void SplashFreeLibrary() {
+ }
+ }
+
++struct call_continuation_args {
++ int (JNICALL *continuation)(void *);
++ void *args;
++};
++
++static void *call_continuation(void *_args)
++{
++ struct call_continuation_args *args = _args;
++ return (void *)args->continuation(args->args);
++}
++
+ /*
+ * Block current thread and continue execution in a new thread
+ */
+ int
+ ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {
+ int rslt;
++ struct call_continuation_args ccargs = { continuation, args };
+ #ifndef __solaris__
+ pthread_t tid;
+ pthread_attr_t attr;
+@@ -1039,7 +1051,7 @@ ContinueInNewThread0(int (JNICALL *conti
+ pthread_attr_setstacksize(&attr, stack_size);
+ }
+
+- if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) {
++ if (pthread_create(&tid, &attr, call_continuation, &ccargs) == 0) {
+ void * tmp;
+ pthread_join(tid, &tmp);
+ rslt = (int)tmp;
+@@ -1057,7 +1069,7 @@ ContinueInNewThread0(int (JNICALL *conti
+ #else /* __solaris__ */
+ thread_t tid;
+ long flags = 0;
+- if (thr_create(NULL, stack_size, (void *(*)(void *))continuation, args, flags, &tid) == 0) {
++ if (thr_create(NULL, stack_size, call_continuation, &ccargs, flags, &tid) == 0) {
+ void * tmp;
+ thr_join(tid, NULL, &tmp);
+ rslt = (int)tmp;
+--- /dev/null
++++ b/jdk/src/solaris/classes/sun/awt/X11/generator/sizes.32-linux-m68k
+@@ -0,0 +1,1016 @@
++long 4
++int 4
++short 2
++ptr 4
++Bool 4
++Atom 4
++Window 4
++XExtData.number 0
++XExtData.next 4
++XExtData.free_private 8
++XExtData.private_data 12
++XExtData 16
++XIMStringConversionCallbackStruct.position 0
++XIMStringConversionCallbackStruct.direction 2
++XIMStringConversionCallbackStruct.operation 6
++XIMStringConversionCallbackStruct.factor 8
++XIMStringConversionCallbackStruct.text 10
++XIMStringConversionCallbackStruct 14
++XkbNewKeyboardNotifyEvent.type 0
++XkbNewKeyboardNotifyEvent.serial 4
++XkbNewKeyboardNotifyEvent.send_event 8
++XkbNewKeyboardNotifyEvent.display 12
++XkbNewKeyboardNotifyEvent.time 16
++XkbNewKeyboardNotifyEvent.xkb_type 20
++XkbNewKeyboardNotifyEvent.device 24
++XkbNewKeyboardNotifyEvent.old_device 28
++XkbNewKeyboardNotifyEvent.min_key_code 32
++XkbNewKeyboardNotifyEvent.max_key_code 36
++XkbNewKeyboardNotifyEvent.old_min_key_code 40
++XkbNewKeyboardNotifyEvent.old_max_key_code 44
++XkbNewKeyboardNotifyEvent.changed 48
++XkbNewKeyboardNotifyEvent.req_major 52
++XkbNewKeyboardNotifyEvent.req_minor 53
++XkbNewKeyboardNotifyEvent 54
++XTimeCoord.time 0
++XTimeCoord.x 4
++XTimeCoord.y 6
++XTimeCoord 8
++XkbCompatMapNotifyEvent.type 0
++XkbCompatMapNotifyEvent.serial 4
++XkbCompatMapNotifyEvent.send_event 8
++XkbCompatMapNotifyEvent.display 12
++XkbCompatMapNotifyEvent.time 16
++XkbCompatMapNotifyEvent.xkb_type 20
++XkbCompatMapNotifyEvent.device 24
++XkbCompatMapNotifyEvent.changed_groups 28
++XkbCompatMapNotifyEvent.first_si 32
++XkbCompatMapNotifyEvent.num_si 36
++XkbCompatMapNotifyEvent.num_total_si 40
++XkbCompatMapNotifyEvent 44
++XIMStatusDrawCallbackStruct.type 0
++XIMStatusDrawCallbackStruct.data 4
++XIMStatusDrawCallbackStruct 8
++XKeyboardControl.key_click_percent 0
++XKeyboardControl.bell_percent 4
++XKeyboardControl.bell_pitch 8
++XKeyboardControl.bell_duration 12
++XKeyboardControl.led 16
++XKeyboardControl.led_mode 20
++XKeyboardControl.key 24
++XKeyboardControl.auto_repeat_mode 28
++XKeyboardControl 32
++XSelectionClearEvent.type 0
++XSelectionClearEvent.serial 4
++XSelectionClearEvent.send_event 8
++XSelectionClearEvent.display 12
++XSelectionClearEvent.window 16
++XSelectionClearEvent.selection 20
++XSelectionClearEvent.time 24
++XSelectionClearEvent 28
++XWindowChanges.x 0
++XWindowChanges.y 4
++XWindowChanges.width 8
++XWindowChanges.height 12
++XWindowChanges.border_width 16
++XWindowChanges.sibling 20
++XWindowChanges.stack_mode 24
++XWindowChanges 28
++XIMPreeditCaretCallbackStruct.position 0
++XIMPreeditCaretCallbackStruct.direction 4
++XIMPreeditCaretCallbackStruct.style 8
++XIMPreeditCaretCallbackStruct 12
++XOMCharSetList.charset_count 0
++XOMCharSetList.charset_list 4
++XOMCharSetList 8
++XOMFontInfo.num_font 0
++XOMFontInfo.font_struct_list 4
++XOMFontInfo.font_name_list 8
++XOMFontInfo 12
++AwtScreenData.numConfigs 0
++AwtScreenData.root 4
++AwtScreenData.whitepixel 8
++AwtScreenData.blackpixel 12
++AwtScreenData.defaultConfig 16
++AwtScreenData.configs 20
++AwtScreenData 24
++XIMHotKeyTrigger.keysym 0
++XIMHotKeyTrigger.modifier 4
++XIMHotKeyTrigger.modifier_mask 8
++XIMHotKeyTrigger 12
++XCirculateEvent.type 0
++XCirculateEvent.serial 4
++XCirculateEvent.send_event 8
++XCirculateEvent.display 12
++XCirculateEvent.event 16
++XCirculateEvent.window 20
++XCirculateEvent.place 24
++XCirculateEvent 28
++Screen.ext_data 0
++Screen.display 4
++Screen.root 8
++Screen.width 12
++Screen.height 16
++Screen.mwidth 20
++Screen.mheight 24
++Screen.ndepths 28
++Screen.depths 32
++Screen.root_depth 36
++Screen.root_visual 40
++Screen.default_gc 44
++Screen.cmap 48
++Screen.white_pixel 52
++Screen.black_pixel 56
++Screen.max_maps 60
++Screen.min_maps 64
++Screen.backing_store 68
++Screen.save_unders 72
++Screen.root_input_mask 76
++Screen 80
++XMapRequestEvent.type 0
++XMapRequestEvent.serial 4
++XMapRequestEvent.send_event 8
++XMapRequestEvent.display 12
++XMapRequestEvent.parent 16
++XMapRequestEvent.window 20
++XMapRequestEvent 24
++XIMText.length 0
++XIMText.feedback 2
++XIMText.encoding_is_wchar 6
++XIMText.string 10
++XIMText 14
++XGraphicsExposeEvent.type 0
++XGraphicsExposeEvent.serial 4
++XGraphicsExposeEvent.send_event 8
++XGraphicsExposeEvent.display 12
++XGraphicsExposeEvent.drawable 16
++XGraphicsExposeEvent.x 20
++XGraphicsExposeEvent.y 24
++XGraphicsExposeEvent.width 28
++XGraphicsExposeEvent.height 32
++XGraphicsExposeEvent.count 36
++XGraphicsExposeEvent.major_code 40
++XGraphicsExposeEvent.minor_code 44
++XGraphicsExposeEvent 48
++XEvent.type 0
++XEvent.xany 0
++XEvent.xkey 0
++XEvent.xbutton 0
++XEvent.xmotion 0
++XEvent.xcrossing 0
++XEvent.xfocus 0
++XEvent.xexpose 0
++XEvent.xgraphicsexpose 0
++XEvent.xnoexpose 0
++XEvent.xvisibility 0
++XEvent.xcreatewindow 0
++XEvent.xdestroywindow 0
++XEvent.xunmap 0
++XEvent.xmap 0
++XEvent.xmaprequest 0
++XEvent.xreparent 0
++XEvent.xconfigure 0
++XEvent.xgravity 0
++XEvent.xresizerequest 0
++XEvent.xconfigurerequest 0
++XEvent.xcirculate 0
++XEvent.xcirculaterequest 0
++XEvent.xproperty 0
++XEvent.xselectionclear 0
++XEvent.xselectionrequest 0
++XEvent.xselection 0
++XEvent.xcolormap 0
++XEvent.xclient 0
++XEvent.xmapping 0
++XEvent.xerror 0
++XEvent.xkeymap 0
++XEvent.pad 0
++XEvent 96
++XRenderDirectFormat.red 0
++XRenderDirectFormat.redMask 2
++XRenderDirectFormat.green 4
++XRenderDirectFormat.greenMask 6
++XRenderDirectFormat.blue 8
++XRenderDirectFormat.blueMask 10
++XRenderDirectFormat.alpha 12
++XRenderDirectFormat.alphaMask 14
++XRenderDirectFormat 16
++ColorData.awt_Colors 0
++ColorData.awt_numICMcolors 4
++ColorData.awt_icmLUT 8
++ColorData.awt_icmLUT2Colors 12
++ColorData.img_grays 16
++ColorData.img_clr_tbl 20
++ColorData.img_oda_red 24
++ColorData.img_oda_green 28
++ColorData.img_oda_blue 32
++ColorData.pGrayInverseLutData 36
++ColorData.screendata 40
++ColorData 44
++XFontStruct.ext_data 0
++XFontStruct.fid 4
++XFontStruct.direction 8
++XFontStruct.min_char_or_byte2 12
++XFontStruct.max_char_or_byte2 16
++XFontStruct.min_byte1 20
++XFontStruct.max_byte1 24
++XFontStruct.all_chars_exist 28
++XFontStruct.n_properties 36
++XFontStruct.properties 40
++XFontStruct.min_bounds 44
++XFontStruct.max_bounds 56
++XFontStruct.per_char 68
++XFontStruct.ascent 72
++XFontStruct.descent 76
++XFontStruct 80
++XExtCodes.extension 0
++XExtCodes.major_opcode 4
++XExtCodes.first_event 8
++XExtCodes.first_error 12
++XExtCodes 16
++XFontSetExtents.max_ink_extent 0
++XFontSetExtents.max_logical_extent 8
++XFontSetExtents 16
++XSelectionEvent.type 0
++XSelectionEvent.serial 4
++XSelectionEvent.send_event 8
++XSelectionEvent.display 12
++XSelectionEvent.requestor 16
++XSelectionEvent.selection 20
++XSelectionEvent.target 24
++XSelectionEvent.property 28
++XSelectionEvent.time 32
++XSelectionEvent 36
++XArc.x 0
++XArc.y 2
++XArc.width 4
++XArc.height 6
++XArc.angle1 8
++XArc.angle2 10
++XArc 12
++XErrorEvent.type 0
++XErrorEvent.display 4
++XErrorEvent.resourceid 8
++XErrorEvent.serial 12
++XErrorEvent.error_code 16
++XErrorEvent.request_code 17
++XErrorEvent.minor_code 18
++XErrorEvent 20
++XConfigureRequestEvent.type 0
++XConfigureRequestEvent.serial 4
++XConfigureRequestEvent.send_event 8
++XConfigureRequestEvent.display 12
++XConfigureRequestEvent.parent 16
++XConfigureRequestEvent.window 20
++XConfigureRequestEvent.x 24
++XConfigureRequestEvent.y 28
++XConfigureRequestEvent.width 32
++XConfigureRequestEvent.height 36
++XConfigureRequestEvent.border_width 40
++XConfigureRequestEvent.above 44
++XConfigureRequestEvent.detail 48
++XConfigureRequestEvent.value_mask 52
++XConfigureRequestEvent 56
++ScreenFormat.ext_data 0
++ScreenFormat.depth 4
++ScreenFormat.bits_per_pixel 8
++ScreenFormat.scanline_pad 12
++ScreenFormat 16
++XButtonEvent.type 0
++XButtonEvent.serial 4
++XButtonEvent.send_event 8
++XButtonEvent.display 12
++XButtonEvent.window 16
++XButtonEvent.root 20
++XButtonEvent.subwindow 24
++XButtonEvent.time 28
++XButtonEvent.x 32
++XButtonEvent.y 36
++XButtonEvent.x_root 40
++XButtonEvent.y_root 44
++XButtonEvent.state 48
++XButtonEvent.button 52
++XButtonEvent.same_screen 56
++XButtonEvent 60
++XFontProp.name 0
++XFontProp.card32 4
++XFontProp 8
++XIMValuesList.count_values 0
++XIMValuesList.supported_values 2
++XIMValuesList 6
++XKeymapEvent.type 0
++XKeymapEvent.serial 4
++XKeymapEvent.send_event 8
++XKeymapEvent.display 12
++XKeymapEvent.window 16
++XKeymapEvent.key_vector 20
++XKeymapEvent 52
++XTextItem16.chars 0
++XTextItem16.nchars 4
++XTextItem16.delta 8
++XTextItem16.font 12
++XTextItem16 16
++XIMPreeditDrawCallbackStruct.caret 0
++XIMPreeditDrawCallbackStruct.chg_first 4
++XIMPreeditDrawCallbackStruct.chg_length 8
++XIMPreeditDrawCallbackStruct.text 12
++XIMPreeditDrawCallbackStruct 16
++XVisualInfo.visual 0
++XVisualInfo.visualid 4
++XVisualInfo.screen 8
++XVisualInfo.depth 12
++XVisualInfo.class 16
++XVisualInfo.red_mask 20
++XVisualInfo.green_mask 24
++XVisualInfo.blue_mask 28
++XVisualInfo.colormap_size 32
++XVisualInfo.bits_per_rgb 36
++XVisualInfo 40
++XkbControlsNotifyEvent.type 0
++XkbControlsNotifyEvent.serial 4
++XkbControlsNotifyEvent.send_event 8
++XkbControlsNotifyEvent.display 12
++XkbControlsNotifyEvent.time 16
++XkbControlsNotifyEvent.xkb_type 20
++XkbControlsNotifyEvent.device 24
++XkbControlsNotifyEvent.changed_ctrls 28
++XkbControlsNotifyEvent.enabled_ctrls 32
++XkbControlsNotifyEvent.enabled_ctrl_changes 36
++XkbControlsNotifyEvent.num_groups 40
++XkbControlsNotifyEvent.keycode 44
++XkbControlsNotifyEvent.event_type 45
++XkbControlsNotifyEvent.req_major 46
++XkbControlsNotifyEvent.req_minor 47
++XkbControlsNotifyEvent 48
++PropMwmHints.flags 0
++PropMwmHints.functions 4
++PropMwmHints.decorations 8
++PropMwmHints.inputMode 12
++PropMwmHints.status 16
++PropMwmHints 20
++XClientMessageEvent.type 0
++XClientMessageEvent.serial 4
++XClientMessageEvent.send_event 8
++XClientMessageEvent.display 12
++XClientMessageEvent.window 16
++XClientMessageEvent.message_type 20
++XClientMessageEvent.format 24
++XClientMessageEvent.data 28
++XClientMessageEvent 48
++XAnyEvent.type 0
++XAnyEvent.serial 4
++XAnyEvent.send_event 8
++XAnyEvent.display 12
++XAnyEvent.window 16
++XAnyEvent 20
++XkbIndicatorNotifyEvent.type 0
++XkbIndicatorNotifyEvent.serial 4
++XkbIndicatorNotifyEvent.send_event 8
++XkbIndicatorNotifyEvent.display 12
++XkbIndicatorNotifyEvent.time 16
++XkbIndicatorNotifyEvent.xkb_type 20
++XkbIndicatorNotifyEvent.device 24
++XkbIndicatorNotifyEvent.changed 28
++XkbIndicatorNotifyEvent.state 32
++XkbIndicatorNotifyEvent 36
++XIMPreeditStateNotifyCallbackStruct.state 0
++XIMPreeditStateNotifyCallbackStruct 4
++XkbAnyEvent.type 0
++XkbAnyEvent.serial 4
++XkbAnyEvent.send_event 8
++XkbAnyEvent.display 12
++XkbAnyEvent.time 16
++XkbAnyEvent.xkb_type 20
++XkbAnyEvent.device 24
++XkbAnyEvent 28
++XMotionEvent.type 0
++XMotionEvent.serial 4
++XMotionEvent.send_event 8
++XMotionEvent.display 12
++XMotionEvent.window 16
++XMotionEvent.root 20
++XMotionEvent.subwindow 24
++XMotionEvent.time 28
++XMotionEvent.x 32
++XMotionEvent.y 36
++XMotionEvent.x_root 40
++XMotionEvent.y_root 44
++XMotionEvent.state 48
++XMotionEvent.is_hint 52
++XMotionEvent.same_screen 54
++XMotionEvent 58
++XIMHotKeyTriggers.num_hot_key 0
++XIMHotKeyTriggers.key 4
++XIMHotKeyTriggers 8
++XIMStyles.count_styles 0
++XIMStyles.supported_styles 2
++XIMStyles 6
++XkbExtensionDeviceNotifyEvent.type 0
++XkbExtensionDeviceNotifyEvent.serial 4
++XkbExtensionDeviceNotifyEvent.send_event 8
++XkbExtensionDeviceNotifyEvent.display 12
++XkbExtensionDeviceNotifyEvent.time 16
++XkbExtensionDeviceNotifyEvent.xkb_type 20
++XkbExtensionDeviceNotifyEvent.device 24
++XkbExtensionDeviceNotifyEvent.reason 28
++XkbExtensionDeviceNotifyEvent.supported 32
++XkbExtensionDeviceNotifyEvent.unsupported 36
++XkbExtensionDeviceNotifyEvent.first_btn 40
++XkbExtensionDeviceNotifyEvent.num_btns 44
++XkbExtensionDeviceNotifyEvent.leds_defined 48
++XkbExtensionDeviceNotifyEvent.led_state 52
++XkbExtensionDeviceNotifyEvent.led_class 56
++XkbExtensionDeviceNotifyEvent.led_id 60
++XkbExtensionDeviceNotifyEvent 64
++XwcTextItem.chars 0
++XwcTextItem.nchars 4
++XwcTextItem.delta 8
++XwcTextItem.font_set 12
++XwcTextItem 16
++XClassHint.res_name 0
++XClassHint.res_class 4
++XClassHint 8
++XChar2b.byte1 0
++XChar2b.byte2 1
++XChar2b 2
++XSetWindowAttributes.background_pixmap 0
++XSetWindowAttributes.background_pixel 4
++XSetWindowAttributes.border_pixmap 8
++XSetWindowAttributes.border_pixel 12
++XSetWindowAttributes.bit_gravity 16
++XSetWindowAttributes.win_gravity 20
++XSetWindowAttributes.backing_store 24
++XSetWindowAttributes.backing_planes 28
++XSetWindowAttributes.backing_pixel 32
++XSetWindowAttributes.save_under 36
++XSetWindowAttributes.event_mask 40
++XSetWindowAttributes.do_not_propagate_mask 44
++XSetWindowAttributes.override_redirect 48
++XSetWindowAttributes.colormap 52
++XSetWindowAttributes.cursor 56
++XSetWindowAttributes 60
++XRenderPictFormat.id 0
++XRenderPictFormat.type 4
++XRenderPictFormat.depth 8
++XRenderPictFormat.direct 12
++XRenderPictFormat.colormap 28
++XRenderPictFormat 32
++XReparentEvent.type 0
++XReparentEvent.serial 4
++XReparentEvent.send_event 8
++XReparentEvent.display 12
++XReparentEvent.event 16
++XReparentEvent.window 20
++XReparentEvent.parent 24
++XReparentEvent.x 28
++XReparentEvent.y 32
++XReparentEvent.override_redirect 36
++XReparentEvent 40
++XCirculateRequestEvent.type 0
++XCirculateRequestEvent.serial 4
++XCirculateRequestEvent.send_event 8
++XCirculateRequestEvent.display 12
++XCirculateRequestEvent.parent 16
++XCirculateRequestEvent.window 20
++XCirculateRequestEvent.place 24
++XCirculateRequestEvent 28
++XImage.width 0
++XImage.height 4
++XImage.xoffset 8
++XImage.format 12
++XImage.data 16
++XImage.byte_order 20
++XImage.bitmap_unit 24
++XImage.bitmap_bit_order 28
++XImage.bitmap_pad 32
++XImage.depth 36
++XImage.bytes_per_line 40
++XImage.bits_per_pixel 44
++XImage.red_mask 48
++XImage.green_mask 52
++XImage.blue_mask 56
++XImage.obdata 60
++XImage.f.create_image 64
++XImage.f.destroy_image 68
++XImage.f.get_pixel 72
++XImage.f.put_pixel 76
++XImage.f.sub_image 80
++XImage.f.add_pixel 84
++XImage 88
++XKeyEvent.type 0
++XKeyEvent.serial 4
++XKeyEvent.send_event 8
++XKeyEvent.display 12
++XKeyEvent.window 16
++XKeyEvent.root 20
++XKeyEvent.subwindow 24
++XKeyEvent.time 28
++XKeyEvent.x 32
++XKeyEvent.y 36
++XKeyEvent.x_root 40
++XKeyEvent.y_root 44
++XKeyEvent.state 48
++XKeyEvent.keycode 52
++XKeyEvent.same_screen 56
++XKeyEvent 60
++XkbActionMessageEvent.type 0
++XkbActionMessageEvent.serial 4
++XkbActionMessageEvent.send_event 8
++XkbActionMessageEvent.display 12
++XkbActionMessageEvent.time 16
++XkbActionMessageEvent.xkb_type 20
++XkbActionMessageEvent.device 24
++XkbActionMessageEvent.keycode 28
++XkbActionMessageEvent.press 30
++XkbActionMessageEvent.key_event_follows 34
++XkbActionMessageEvent.group 38
++XkbActionMessageEvent.mods 42
++XkbActionMessageEvent.message 46
++XkbActionMessageEvent 54
++XdbeSwapInfo.swap_window 0
++XdbeSwapInfo.swap_action 4
++XdbeSwapInfo 6
++XTextItem.chars 0
++XTextItem.nchars 4
++XTextItem.delta 8
++XTextItem.font 12
++XTextItem 16
++XModifierKeymap.max_keypermod 0
++XModifierKeymap.modifiermap 4
++XModifierKeymap 8
++XCharStruct.lbearing 0
++XCharStruct.rbearing 2
++XCharStruct.width 4
++XCharStruct.ascent 6
++XCharStruct.descent 8
++XCharStruct.attributes 10
++XCharStruct 12
++XGravityEvent.type 0
++XGravityEvent.serial 4
++XGravityEvent.send_event 8
++XGravityEvent.display 12
++XGravityEvent.event 16
++XGravityEvent.window 20
++XGravityEvent.x 24
++XGravityEvent.y 28
++XGravityEvent 32
++Visual.ext_data 0
++Visual.visualid 4
++Visual.class 8
++Visual.red_mask 12
++Visual.green_mask 16
++Visual.blue_mask 20
++Visual.bits_per_rgb 24
++Visual.map_entries 28
++Visual 32
++XOMOrientation.num_orientation 0
++XOMOrientation.orientation 4
++XOMOrientation 8
++XkbAccessXNotifyEvent.type 0
++XkbAccessXNotifyEvent.serial 4
++XkbAccessXNotifyEvent.send_event 8
++XkbAccessXNotifyEvent.display 12
++XkbAccessXNotifyEvent.time 16
++XkbAccessXNotifyEvent.xkb_type 20
++XkbAccessXNotifyEvent.device 24
++XkbAccessXNotifyEvent.detail 28
++XkbAccessXNotifyEvent.keycode 32
++XkbAccessXNotifyEvent.sk_delay 36
++XkbAccessXNotifyEvent.debounce_delay 40
++XkbAccessXNotifyEvent 44
++XWindowAttributes.x 0
++XWindowAttributes.y 4
++XWindowAttributes.width 8
++XWindowAttributes.height 12
++XWindowAttributes.border_width 16
++XWindowAttributes.depth 20
++XWindowAttributes.visual 24
++XWindowAttributes.root 28
++XWindowAttributes.class 32
++XWindowAttributes.bit_gravity 36
++XWindowAttributes.win_gravity 40
++XWindowAttributes.backing_store 44
++XWindowAttributes.backing_planes 48
++XWindowAttributes.backing_pixel 52
++XWindowAttributes.save_under 56
++XWindowAttributes.colormap 60
++XWindowAttributes.map_installed 64
++XWindowAttributes.map_state 68
++XWindowAttributes.all_event_masks 72
++XWindowAttributes.your_event_mask 76
++XWindowAttributes.do_not_propagate_mask 80
++XWindowAttributes.override_redirect 84
++XWindowAttributes.screen 88
++XWindowAttributes 92
++XmbTextItem.chars 0
++XmbTextItem.nchars 4
++XmbTextItem.delta 8
++XmbTextItem.font_set 12
++XmbTextItem 16
++XMappingEvent.type 0
++XMappingEvent.serial 4
++XMappingEvent.send_event 8
++XMappingEvent.display 12
++XMappingEvent.window 16
++XMappingEvent.request 20
++XMappingEvent.first_keycode 24
++XMappingEvent.count 28
++XMappingEvent 32
++XSizeHints.flags 0
++XSizeHints.x 4
++XSizeHints.y 8
++XSizeHints.width 12
++XSizeHints.height 16
++XSizeHints.min_width 20
++XSizeHints.min_height 24
++XSizeHints.max_width 28
++XSizeHints.max_height 32
++XSizeHints.width_inc 36
++XSizeHints.height_inc 40
++XSizeHints.min_aspect.x 44
++XSizeHints.min_aspect.y 48
++XSizeHints.max_aspect.x 52
++XSizeHints.max_aspect.y 56
++XSizeHints.base_width 60
++XSizeHints.base_height 64
++XSizeHints.win_gravity 68
++XSizeHints 72
++XUnmapEvent.type 0
++XUnmapEvent.serial 4
++XUnmapEvent.send_event 8
++XUnmapEvent.display 12
++XUnmapEvent.event 16
++XUnmapEvent.window 20
++XUnmapEvent.from_configure 24
++XUnmapEvent 28
++awtImageData.Depth 0
++awtImageData.wsImageFormat 4
++awtImageData.clrdata 16
++awtImageData.convert 48
++awtImageData 304
++XkbStateNotifyEvent.type 0
++XkbStateNotifyEvent.serial 4
++XkbStateNotifyEvent.send_event 8
++XkbStateNotifyEvent.display 12
++XkbStateNotifyEvent.time 16
++XkbStateNotifyEvent.xkb_type 20
++XkbStateNotifyEvent.device 24
++XkbStateNotifyEvent.changed 28
++XkbStateNotifyEvent.group 32
++XkbStateNotifyEvent.base_group 36
++XkbStateNotifyEvent.latched_group 40
++XkbStateNotifyEvent.locked_group 44
++XkbStateNotifyEvent.mods 48
++XkbStateNotifyEvent.base_mods 52
++XkbStateNotifyEvent.latched_mods 56
++XkbStateNotifyEvent.locked_mods 60
++XkbStateNotifyEvent.compat_state 64
++XkbStateNotifyEvent.grab_mods 68
++XkbStateNotifyEvent.compat_grab_mods 69
++XkbStateNotifyEvent.lookup_mods 70
++XkbStateNotifyEvent.compat_lookup_mods 71
++XkbStateNotifyEvent.ptr_buttons 72
++XkbStateNotifyEvent.keycode 76
++XkbStateNotifyEvent.event_type 77
++XkbStateNotifyEvent.req_major 78
++XkbStateNotifyEvent.req_minor 79
++XkbStateNotifyEvent 80
++XExposeEvent.type 0
++XExposeEvent.serial 4
++XExposeEvent.send_event 8
++XExposeEvent.display 12
++XExposeEvent.window 16
++XExposeEvent.x 20
++XExposeEvent.y 24
++XExposeEvent.width 28
++XExposeEvent.height 32
++XExposeEvent.count 36
++XExposeEvent 40
++XkbMapNotifyEvent.type 0
++XkbMapNotifyEvent.serial 4
++XkbMapNotifyEvent.send_event 8
++XkbMapNotifyEvent.display 12
++XkbMapNotifyEvent.time 16
++XkbMapNotifyEvent.xkb_type 20
++XkbMapNotifyEvent.device 24
++XkbMapNotifyEvent.changed 28
++XkbMapNotifyEvent.flags 32
++XkbMapNotifyEvent.first_type 36
++XkbMapNotifyEvent.num_types 40
++XkbMapNotifyEvent.min_key_code 44
++XkbMapNotifyEvent.max_key_code 45
++XkbMapNotifyEvent.first_key_sym 46
++XkbMapNotifyEvent.first_key_act 47
++XkbMapNotifyEvent.first_key_behavior 48
++XkbMapNotifyEvent.first_key_explicit 49
++XkbMapNotifyEvent.first_modmap_key 50
++XkbMapNotifyEvent.first_vmodmap_key 51
++XkbMapNotifyEvent.num_key_syms 52
++XkbMapNotifyEvent.num_key_acts 56
++XkbMapNotifyEvent.num_key_behaviors 60
++XkbMapNotifyEvent.num_key_explicit 64
++XkbMapNotifyEvent.num_modmap_keys 68
++XkbMapNotifyEvent.num_vmodmap_keys 72
++XkbMapNotifyEvent.vmods 76
++XkbMapNotifyEvent 80
++XGCValues.function 0
++XGCValues.plane_mask 4
++XGCValues.foreground 8
++XGCValues.background 12
++XGCValues.line_width 16
++XGCValues.line_style 20
++XGCValues.cap_style 24
++XGCValues.join_style 28
++XGCValues.fill_style 32
++XGCValues.fill_rule 36
++XGCValues.arc_mode 40
++XGCValues.tile 44
++XGCValues.stipple 48
++XGCValues.ts_x_origin 52
++XGCValues.ts_y_origin 56
++XGCValues.font 60
++XGCValues.subwindow_mode 64
++XGCValues.graphics_exposures 68
++XGCValues.clip_x_origin 72
++XGCValues.clip_y_origin 76
++XGCValues.clip_mask 80
++XGCValues.dash_offset 84
++XGCValues.dashes 88
++XGCValues 90
++XFocusChangeEvent.type 0
++XFocusChangeEvent.serial 4
++XFocusChangeEvent.send_event 8
++XFocusChangeEvent.display 12
++XFocusChangeEvent.window 16
++XFocusChangeEvent.mode 20
++XFocusChangeEvent.detail 24
++XFocusChangeEvent 28
++XPixmapFormatValues.depth 0
++XPixmapFormatValues.bits_per_pixel 4
++XPixmapFormatValues.scanline_pad 8
++XPixmapFormatValues 12
++XMapEvent.type 0
++XMapEvent.serial 4
++XMapEvent.send_event 8
++XMapEvent.display 12
++XMapEvent.event 16
++XMapEvent.window 20
++XMapEvent.override_redirect 24
++XMapEvent 28
++XkbBellNotifyEvent.type 0
++XkbBellNotifyEvent.serial 4
++XkbBellNotifyEvent.send_event 8
++XkbBellNotifyEvent.display 12
++XkbBellNotifyEvent.time 16
++XkbBellNotifyEvent.xkb_type 20
++XkbBellNotifyEvent.device 24
++XkbBellNotifyEvent.percent 28
++XkbBellNotifyEvent.pitch 32
++XkbBellNotifyEvent.duration 36
++XkbBellNotifyEvent.bell_class 40
++XkbBellNotifyEvent.bell_id 44
++XkbBellNotifyEvent.name 48
++XkbBellNotifyEvent.window 52
++XkbBellNotifyEvent.event_only 56
++XkbBellNotifyEvent 60
++XIMStringConversionText.length 0
++XIMStringConversionText.feedback 2
++XIMStringConversionText.encoding_is_wchar 6
++XIMStringConversionText.string 10
++XIMStringConversionText 14
++XKeyboardState.key_click_percent 0
++XKeyboardState.bell_percent 4
++XKeyboardState.bell_pitch 8
++XKeyboardState.bell_duration 12
++XKeyboardState.led_mask 16
++XKeyboardState.global_auto_repeat 20
++XKeyboardState.auto_repeats 24
++XKeyboardState 56
++XkbEvent.type 0
++XkbEvent.any 0
++XkbEvent.new_kbd 0
++XkbEvent.map 0
++XkbEvent.state 0
++XkbEvent.ctrls 0
++XkbEvent.indicators 0
++XkbEvent.names 0
++XkbEvent.compat 0
++XkbEvent.bell 0
++XkbEvent.message 0
++XkbEvent.accessx 0
++XkbEvent.device 0
++XkbEvent.core 0
++XkbEvent 96
++XPoint.x 0
++XPoint.y 2
++XPoint 4
++XSegment.x1 0
++XSegment.y1 2
++XSegment.x2 4
++XSegment.y2 6
++XSegment 8
++XIconSize.min_width 0
++XIconSize.min_height 4
++XIconSize.max_width 8
++XIconSize.max_height 12
++XIconSize.width_inc 16
++XIconSize.height_inc 20
++XIconSize 24
++XIMCallback.client_data 0
++XIMCallback.callback 4
++XIMCallback 8
++XConfigureEvent.type 0
++XConfigureEvent.serial 4
++XConfigureEvent.send_event 8
++XConfigureEvent.display 12
++XConfigureEvent.event 16
++XConfigureEvent.window 20
++XConfigureEvent.x 24
++XConfigureEvent.y 28
++XConfigureEvent.width 32
++XConfigureEvent.height 36
++XConfigureEvent.border_width 40
++XConfigureEvent.above 44
++XConfigureEvent.override_redirect 48
++XConfigureEvent 52
++XRectangle.x 0
++XRectangle.y 2
++XRectangle.width 4
++XRectangle.height 6
++XRectangle 8
++XkbNamesNotifyEvent.type 0
++XkbNamesNotifyEvent.serial 4
++XkbNamesNotifyEvent.send_event 8
++XkbNamesNotifyEvent.display 12
++XkbNamesNotifyEvent.time 16
++XkbNamesNotifyEvent.xkb_type 20
++XkbNamesNotifyEvent.device 24
++XkbNamesNotifyEvent.changed 28
++XkbNamesNotifyEvent.first_type 32
++XkbNamesNotifyEvent.num_types 36
++XkbNamesNotifyEvent.first_lvl 40
++XkbNamesNotifyEvent.num_lvls 44
++XkbNamesNotifyEvent.num_aliases 48
++XkbNamesNotifyEvent.num_radio_groups 52
++XkbNamesNotifyEvent.changed_vmods 56
++XkbNamesNotifyEvent.changed_groups 60
++XkbNamesNotifyEvent.changed_indicators 64
++XkbNamesNotifyEvent.first_key 68
++XkbNamesNotifyEvent.num_keys 72
++XkbNamesNotifyEvent 76
++XCreateWindowEvent.type 0
++XCreateWindowEvent.serial 4
++XCreateWindowEvent.send_event 8
++XCreateWindowEvent.display 12
++XCreateWindowEvent.parent 16
++XCreateWindowEvent.window 20
++XCreateWindowEvent.x 24
++XCreateWindowEvent.y 28
++XCreateWindowEvent.width 32
++XCreateWindowEvent.height 36
++XCreateWindowEvent.border_width 40
++XCreateWindowEvent.override_redirect 44
++XCreateWindowEvent 48
++XVisibilityEvent.type 0
++XVisibilityEvent.serial 4
++XVisibilityEvent.send_event 8
++XVisibilityEvent.display 12
++XVisibilityEvent.window 16
++XVisibilityEvent.state 20
++XVisibilityEvent 24
++XWMHints.flags 0
++XWMHints.initial_state 8
++XWMHints.icon_pixmap 12
++XWMHints.icon_window 16
++XWMHints.icon_x 20
++XWMHints.icon_y 24
++XWMHints.icon_mask 28
++XWMHints.input 4
++XWMHints.window_group 32
++XWMHints 36
++XCrossingEvent.type 0
++XCrossingEvent.serial 4
++XCrossingEvent.send_event 8
++XCrossingEvent.display 12
++XCrossingEvent.window 16
++XCrossingEvent.root 20
++XCrossingEvent.subwindow 24
++XCrossingEvent.time 28
++XCrossingEvent.x 32
++XCrossingEvent.y 36
++XCrossingEvent.x_root 40
++XCrossingEvent.y_root 44
++XCrossingEvent.mode 48
++XCrossingEvent.detail 52
++XCrossingEvent.same_screen 56
++XCrossingEvent.focus 60
++XCrossingEvent.state 64
++XCrossingEvent 68
++XSelectionRequestEvent.type 0
++XSelectionRequestEvent.serial 4
++XSelectionRequestEvent.send_event 8
++XSelectionRequestEvent.display 12
++XSelectionRequestEvent.owner 16
++XSelectionRequestEvent.requestor 20
++XSelectionRequestEvent.selection 24
++XSelectionRequestEvent.target 28
++XSelectionRequestEvent.property 32
++XSelectionRequestEvent.time 36
++XSelectionRequestEvent 40
++XNoExposeEvent.type 0
++XNoExposeEvent.serial 4
++XNoExposeEvent.send_event 8
++XNoExposeEvent.display 12
++XNoExposeEvent.drawable 16
++XNoExposeEvent.major_code 20
++XNoExposeEvent.minor_code 24
++XNoExposeEvent 28
++XHostAddress.family 0
++XHostAddress.length 4
++XHostAddress.address 8
++XHostAddress 12
++XColormapEvent.type 0
++XColormapEvent.serial 4
++XColormapEvent.send_event 8
++XColormapEvent.display 12
++XColormapEvent.window 16
++XColormapEvent.colormap 20
++XColormapEvent.new 24
++XColormapEvent.state 28
++XColormapEvent 32
++ColorEntry.r 0
++ColorEntry.g 1
++ColorEntry.b 2
++ColorEntry.flags 3
++ColorEntry 4
++XResizeRequestEvent.type 0
++XResizeRequestEvent.serial 4
++XResizeRequestEvent.send_event 8
++XResizeRequestEvent.display 12
++XResizeRequestEvent.window 16
++XResizeRequestEvent.width 20
++XResizeRequestEvent.height 24
++XResizeRequestEvent 28
++Depth.depth 0
++Depth.nvisuals 4
++Depth.visuals 8
++Depth 12
++XPropertyEvent.type 0
++XPropertyEvent.serial 4
++XPropertyEvent.send_event 8
++XPropertyEvent.display 12
++XPropertyEvent.window 16
++XPropertyEvent.atom 20
++XPropertyEvent.time 24
++XPropertyEvent.state 28
++XPropertyEvent 32
++XDestroyWindowEvent.type 0
++XDestroyWindowEvent.serial 4
++XDestroyWindowEvent.send_event 8
++XDestroyWindowEvent.display 12
++XDestroyWindowEvent.event 16
++XDestroyWindowEvent.window 20
++XDestroyWindowEvent 24
++XStandardColormap.colormap 0
++XStandardColormap.red_max 4
++XStandardColormap.red_mult 8
++XStandardColormap.green_max 12
++XStandardColormap.green_mult 16
++XStandardColormap.blue_max 20
++XStandardColormap.blue_mult 24
++XStandardColormap.base_pixel 28
++XStandardColormap.visualid 32
++XStandardColormap.killid 36
++XStandardColormap 40
++XComposeStatus.compose_ptr 0
++XComposeStatus.chars_matched 4
++XComposeStatus 8
++AwtGraphicsConfigData.awt_depth 0
++AwtGraphicsConfigData.awt_cmap 4
++AwtGraphicsConfigData.awt_visInfo 8
++AwtGraphicsConfigData.awt_num_colors 48
++AwtGraphicsConfigData.awtImage 52
++AwtGraphicsConfigData.AwtColorMatch 56
++AwtGraphicsConfigData.monoImage 60
++AwtGraphicsConfigData.monoPixmap 64
++AwtGraphicsConfigData.monoPixmapWidth 68
++AwtGraphicsConfigData.monoPixmapHeight 72
++AwtGraphicsConfigData.monoPixmapGC 76
++AwtGraphicsConfigData.pixelStride 80
++AwtGraphicsConfigData.color_data 84
++AwtGraphicsConfigData.glxInfo 88
++AwtGraphicsConfigData.isTranslucencySupported 92
++AwtGraphicsConfigData.renderPictFormat 96
++AwtGraphicsConfigData 128
++XColor.pixel 0
++XColor.red 4
++XColor.green 6
++XColor.blue 8
++XColor.flags 10
++XColor.pad 11
++XColor 12
++XTextProperty.value 0
++XTextProperty.encoding 4
++XTextProperty.format 8
++XTextProperty.nitems 12
++XTextProperty 16
+--- a/hotspot/src/share/vm/oops/constMethod.hpp
++++ b/hotspot/src/share/vm/oops/constMethod.hpp
+@@ -224,6 +224,9 @@ private:
+ u2 _max_locals; // Number of local variables used by this method
+ u2 _size_of_parameters; // size of the parameter block (receiver + arguments) in words
+ u2 _orig_method_idnum; // Original unique identification number for the method
++#ifdef __m68k__
++ u2 _padding; // pad the structure to a multiple of 32bit
++#endif
+
+ // Constructor
+ ConstMethod(int byte_code_size,
diff --git a/debian/patches/multiple-pkcs11-library-init.patch b/debian/patches/multiple-pkcs11-library-init.patch
new file mode 100644
index 0000000..cb61703
--- /dev/null
+++ b/debian/patches/multiple-pkcs11-library-init.patch
@@ -0,0 +1,72 @@
+# HG changeset patch
+# User andrew
+# Date 1352129932 0
+# Node ID e9c857dcb964dbfa5eef3a3590244cb4d999cf7a
+# Parent 1406789608b76d0906881979335d685855f44190
+Allow multiple PKCS11 library initialisation to be a non-critical error.
+
+--- a/jdk/src/share/classes/sun/security/pkcs11/Config.java
++++ b/jdk/src/share/classes/sun/security/pkcs11/Config.java
+@@ -52,6 +52,7 @@ final class Config {
+ static final int ERR_HALT = 1;
+ static final int ERR_IGNORE_ALL = 2;
+ static final int ERR_IGNORE_LIB = 3;
++ static final int ERR_IGNORE_MULTI_INIT = 4;
+
+ // same as allowSingleThreadedModules but controlled via a system property
+ // and applied to all providers. if set to false, no SunPKCS11 instances
+@@ -1000,6 +1001,8 @@ final class Config {
+ handleStartupErrors = ERR_IGNORE_LIB;
+ } else if (val.equals("halt")) {
+ handleStartupErrors = ERR_HALT;
++ } else if (val.equals("ignoreMultipleInitialisation")) {
++ handleStartupErrors = ERR_IGNORE_MULTI_INIT;
+ } else {
+ throw excToken("Invalid value for handleStartupErrors:");
+ }
+--- a/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java
++++ b/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java
+@@ -168,26 +168,37 @@ public final class SunPKCS11 extends Aut
+ String nssLibraryDirectory = config.getNssLibraryDirectory();
+ String nssSecmodDirectory = config.getNssSecmodDirectory();
+ boolean nssOptimizeSpace = config.getNssOptimizeSpace();
++ int errorHandling = config.getHandleStartupErrors();
+
+ if (secmod.isInitialized()) {
+ if (nssSecmodDirectory != null) {
+ String s = secmod.getConfigDir();
+ if ((s != null) &&
+ (s.equals(nssSecmodDirectory) == false)) {
+- throw new ProviderException("Secmod directory "
+- + nssSecmodDirectory
+- + " invalid, NSS already initialized with "
+- + s);
++ String msg = "Secmod directory " + nssSecmodDirectory
++ + " invalid, NSS already initialized with " + s;
++ if (errorHandling == Config.ERR_IGNORE_MULTI_INIT ||
++ errorHandling == Config.ERR_IGNORE_ALL) {
++ throw new UnsupportedOperationException(msg);
++ } else {
++ throw new ProviderException(msg);
++ }
+ }
+ }
+ if (nssLibraryDirectory != null) {
+ String s = secmod.getLibDir();
+ if ((s != null) &&
+ (s.equals(nssLibraryDirectory) == false)) {
+- throw new ProviderException("NSS library directory "
++ String msg = "NSS library directory "
+ + nssLibraryDirectory
+ + " invalid, NSS already initialized with "
+- + s);
++ + s;
++ if (errorHandling == Config.ERR_IGNORE_MULTI_INIT ||
++ errorHandling == Config.ERR_IGNORE_ALL) {
++ throw new UnsupportedOperationException(msg);
++ } else {
++ throw new ProviderException(msg);
++ }
+ }
+ }
+ } else {
diff --git a/debian/patches/no-pch-build.diff b/debian/patches/no-pch-build.diff
new file mode 100644
index 0000000..0e1de32
--- /dev/null
+++ b/debian/patches/no-pch-build.diff
@@ -0,0 +1,110 @@
+--- openjdk/hotspot/src/share/vm/oops/arrayKlassKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/arrayKlassKlass.cpp 2013-04-15 13:57:24.992929086 +0200
+@@ -30,6 +30,7 @@
+ #include "runtime/handles.inline.hpp"
+ #ifndef SERIALGC
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+ #include "memory/cardTableRS.hpp"
+--- openjdk/hotspot/src/share/vm/oops/constantPoolKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/constantPoolKlass.cpp 2013-04-15 14:02:52.143087149 +0200
+@@ -49,6 +49,7 @@
+ #endif
+ #ifndef SERIALGC
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+ #include "memory/cardTableRS.hpp"
+--- openjdk/hotspot/src/share/vm/oops/cpCacheKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/cpCacheKlass.cpp 2013-04-15 14:04:45.219838633 +0200
+@@ -35,6 +35,7 @@
+ #include "runtime/handles.inline.hpp"
+ #ifndef SERIALGC
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+ #include "memory/cardTableRS.hpp"
+--- openjdk/hotspot/src/share/vm/oops/instanceKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/instanceKlass.cpp 2013-04-15 14:07:55.861109867 +0200
+@@ -70,6 +70,7 @@
+ #include "gc_implementation/g1/g1RemSet.inline.hpp"
+ #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+ #include "oops/oop.pcgc.inline.hpp"
+--- openjdk/hotspot/src/share/vm/oops/instanceKlassKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/instanceKlassKlass.cpp 2013-04-15 14:08:53.541485528 +0200
+@@ -44,6 +44,7 @@
+ #include "runtime/fieldDescriptor.hpp"
+ #ifndef SERIALGC
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+ #include "memory/cardTableRS.hpp"
+--- openjdk/hotspot/src/share/vm/oops/instanceMirrorKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/instanceMirrorKlass.cpp 2013-04-15 14:10:11.162003798 +0200
+@@ -42,6 +42,7 @@
+ #include "gc_implementation/g1/g1RemSet.inline.hpp"
+ #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+ #include "oops/oop.pcgc.inline.hpp"
+--- openjdk/hotspot/src/share/vm/oops/instanceRefKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/instanceRefKlass.cpp 2013-04-15 14:11:11.726403390 +0200
+@@ -39,6 +39,7 @@
+ #include "gc_implementation/g1/g1RemSet.inline.hpp"
+ #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+ #include "oops/oop.pcgc.inline.hpp"
+--- openjdk/hotspot/src/share/vm/oops/klassKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/klassKlass.cpp 2013-04-15 14:13:01.999133769 +0200
+@@ -42,6 +42,7 @@
+ #include "runtime/handles.inline.hpp"
+ #ifndef SERIALGC
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+ #include "memory/cardTableRS.hpp"
+--- openjdk/hotspot/src/share/vm/oops/objArrayKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/objArrayKlass.cpp 2013-04-15 14:16:10.616389484 +0200
+@@ -47,6 +47,7 @@
+ #include "gc_implementation/g1/g1RemSet.inline.hpp"
+ #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+--- openjdk/hotspot/src/share/vm/oops/objArrayKlassKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/oops/objArrayKlassKlass.cpp 2013-04-15 14:17:01.800729154 +0200
+@@ -33,6 +33,7 @@
+ #include "oops/oop.inline2.hpp"
+ #ifndef SERIALGC
+ #include "gc_implementation/parNew/parOopClosures.inline.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
+ #include "memory/cardTableRS.hpp"
+--- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp~ 2013-03-04 22:51:00.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp 2013-04-15 14:20:24.782079605 +0200
+@@ -28,6 +28,7 @@
+ #include "gc_implementation/parallelScavenge/cardTableExtension.hpp"
+ #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
+ #include "gc_implementation/parallelScavenge/psMarkSweep.hpp"
++#include "gc_implementation/parallelScavenge/psOldGen.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
+ #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
+ #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
diff --git a/debian/patches/nonreparenting-wm.diff b/debian/patches/nonreparenting-wm.diff
new file mode 100644
index 0000000..24ecc7e
--- /dev/null
+++ b/debian/patches/nonreparenting-wm.diff
@@ -0,0 +1,59 @@
+--- a/jdk/src/solaris/classes/sun/awt/X11/XWM.java
++++ b/jdk/src/solaris/classes/sun/awt/X11/XWM.java
+@@ -104,7 +104,8 @@ final class XWM
+ 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 @@ final class XWM
+ 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 @@ final class XWM
+ * 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 @@ final class XWM
+ 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 @@ final class XWM
+ res = new Insets(28, 6, 6, 6);
+ break;
+ case NO_WM:
++ case OTHER_NONREPARENTING_WM:
+ case LG3D_WM:
+ res = zeroInsets;
+ break;
diff --git a/debian/patches/openjdk-ppc64el-S8170153.patch b/debian/patches/openjdk-ppc64el-S8170153.patch
new file mode 100644
index 0000000..19eff26
--- /dev/null
+++ b/debian/patches/openjdk-ppc64el-S8170153.patch
@@ -0,0 +1,37 @@
+
+# HG changeset patch
+# User gromero
+# Date 1481806659 18000
+# Node ID fddd627ea372a42b1adcd74790775ecbf0fcb88f
+# Parent d15b51f1149bd1b7e87f4ec6a1bc5678c15275ef
+8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
+Reviewed-by: mdoerr, erikj, simonis, aph
+
+diff -r d15b51f1149b -r fddd627ea372 make/common/NativeCompilation.gmk
+--- openjdk/make/common/NativeCompilation.gmk Tue Oct 25 08:38:21 2016 -0700
++++ openjdk/make/common/NativeCompilation.gmk Thu Dec 15 07:57:39 2016 -0500
+@@ -297,17 +297,21 @@
+ $$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
+ endif
+
+- # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
+- $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
++ # Pickup extra OPENJDK_TARGET_OS_API, OPENJDK_TARGET_OS, and/or OPENJDK_TARGET_OS plus
++ # OPENJDK_TARGET_CPU pair dependent variables for CFLAGS.
++ $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS)) \
++ $$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU))
+ ifneq ($(DEBUG_LEVEL),release)
+ # Pickup extra debug dependent variables for CFLAGS
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
++ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_debug)
+ else
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
++ $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_$(OPENJDK_TARGET_CPU)_release)
+ endif
+
+ # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
+
diff --git a/debian/patches/pass-extra-flags.diff b/debian/patches/pass-extra-flags.diff
new file mode 100644
index 0000000..6723f49
--- /dev/null
+++ b/debian/patches/pass-extra-flags.diff
@@ -0,0 +1,36 @@
+--- a/hotspot/make/linux/makefiles/jsig.make
++++ b/hotspot/make/linux/makefiles/jsig.make
+@@ -54,7 +54,9 @@ endif
+ $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
+ @echo Making signal interposition lib...
+ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
+- $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
++ $(LFLAGS_JSIG) $(EXTRA_LDFLAGS) \
++ $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) \
++ -o $@ $< -ldl
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
+--- a/hotspot/make/linux/makefiles/vm.make
++++ b/hotspot/make/linux/makefiles/vm.make
+@@ -122,7 +122,8 @@ CFLAGS += $(CFLAGS/NOEX)
+
+ # Extra flags from gnumake's invocation or environment
+ CFLAGS += $(EXTRA_CFLAGS)
+-LFLAGS += $(EXTRA_CFLAGS)
++CXXFLAGS += $(EXTRA_CXXFLAGS)
++LFLAGS += $(EXTRA_LDFLAGS)
+
+ # Don't set excutable bit on stack segment
+ # the same could be done by separate execstack command
+--- a/hotspot/make/linux/makefiles/saproc.make
++++ b/hotspot/make/linux/makefiles/saproc.make
+@@ -73,7 +73,7 @@ ALT_SAINCDIR=-I$(ALT_SASRCDIR) -DALT_SAS
+ else
+ ALT_SAINCDIR=
+ endif
+-SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
++SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS)
+
+ SAARCH ?= $(BUILDARCH)
+
diff --git a/debian/patches/ppc64el.diff b/debian/patches/ppc64el.diff
new file mode 100644
index 0000000..6080782
--- /dev/null
+++ b/debian/patches/ppc64el.diff
@@ -0,0 +1,53 @@
+--- a/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp
++++ b/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp
+@@ -34,9 +34,13 @@
+ define_pd_global(bool, DontYieldALot, false);
+ define_pd_global(intx, ThreadStackSize, 1536);
+ #ifdef _LP64
+-define_pd_global(intx, VMThreadStackSize, 1024);
++#if defined (_LITTLE_ENDIAN) && defined (__powerpc64__)
++define_pd_global(intx, VMThreadStackSize, 1920);
+ #else
+-define_pd_global(intx, VMThreadStackSize, 512);
++define_pd_global(intx, VMThreadStackSize, 1280);
++#endif
++#else
++define_pd_global(intx, VMThreadStackSize, 640);
+ #endif // _LP64
+ define_pd_global(intx, CompilerThreadStackSize, 0);
+ define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
+--- a/hotspot/src/os/linux/vm/os_linux.cpp
++++ b/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -4846,6 +4846,7 @@ void os::init(void) {
+
+ pthread_mutex_init(&dl_mutex, NULL);
+
++NOT_ZERO (
+ // If the pagesize of the VM is greater than 8K determine the appropriate
+ // number of initial guard pages. The user can change this with the
+ // command line arguments, if needed.
+@@ -4854,6 +4855,7 @@ void os::init(void) {
+ StackRedPages = 1;
+ StackShadowPages = round_to((StackShadowPages*Linux::vm_default_page_size()), vm_page_size()) / vm_page_size();
+ }
++)
+ }
+
+ // To install functions for atexit system call
+@@ -4904,9 +4906,16 @@ jint os::init_2(void)
+ // size. Add a page for compiler2 recursion in main thread.
+ // Add in 2*BytesPerWord times page size to account for VM stack during
+ // class initialization depending on 32 or 64 bit VM.
++NOT_ZERO (
+ os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
+ (size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() +
+ (2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size());
++)
++ZERO_ONLY (
++ os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
++ (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
++ 2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::page_size());
++)
+
+ size_t threadStackSizeInBytes = ThreadStackSize * K;
+ if (threadStackSizeInBytes != 0 &&
diff --git a/debian/patches/ppc64le-8036767.diff b/debian/patches/ppc64le-8036767.diff
new file mode 100644
index 0000000..3a89293
--- /dev/null
+++ b/debian/patches/ppc64le-8036767.diff
@@ -0,0 +1,143 @@
+# DP: Common bits to configure ppc64le support.
+
+Index: b/common/autoconf/hotspot-spec.gmk.in
+===================================================================
+--- a/common/autoconf/hotspot-spec.gmk.in
++++ b/common/autoconf/hotspot-spec.gmk.in
+@@ -71,6 +71,10 @@ ISA_DIR=$(OPENJDK_TARGET_CPU_ISADIR)
+ LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB)
+ # Set the cpu architecture
+ ARCH=$(OPENJDK_TARGET_CPU_ARCH)
++# ppc64le uses the HotSpot ppc64 build
++ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
++ ARCH=ppc64
++endif
+ # Legacy setting for building for a 64 bit machine.
+ # If yes then this expands to _LP64:=1
+ @LP64@
+Index: b/common/autoconf/jdk-options.m4
+===================================================================
+--- a/common/autoconf/jdk-options.m4
++++ b/common/autoconf/jdk-options.m4
+@@ -158,7 +158,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS
+ if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
+ INCLUDE_SA=false
+ fi
+- if test "x$VAR_CPU" = xppc64 ; then
++ if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then
+ INCLUDE_SA=false
+ fi
+ if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
+Index: b/common/autoconf/platform.m4
+===================================================================
+--- a/common/autoconf/platform.m4
++++ b/common/autoconf/platform.m4
+@@ -128,7 +128,7 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
+ VAR_CPU_ENDIAN=big
+ ;;
+ powerpc64le)
+- VAR_CPU=ppc64
++ VAR_CPU=ppc64le
+ VAR_CPU_ARCH=ppc
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+Index: b/common/autoconf/toolchain.m4
+===================================================================
+--- a/common/autoconf/toolchain.m4
++++ b/common/autoconf/toolchain.m4
+@@ -1125,6 +1125,9 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ else
+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
+ fi
++ if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
++ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
++ fi
+ if test "x$OPENJDK_TARGET_OS" = xlinux; then
+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX"
+ fi
+Index: b/jdk/make/lib/SoundLibraries.gmk
+===================================================================
+--- a/jdk/make/lib/SoundLibraries.gmk
++++ b/jdk/make/lib/SoundLibraries.gmk
+@@ -143,6 +143,10 @@ else
+ ifeq ($(OPENJDK_TARGET_CPU), aarch64)
+ LIBJSOUND_CFLAGS += -DX_ARCH=X_AARCH64
+ endif
++
++ ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
++ LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64LE
++ endif
+ endif
+
+ LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
+Index: b/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
+===================================================================
+--- a/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
++++ b/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
+@@ -43,7 +43,9 @@
+ #define X_ZERO 6
+ #define X_ARM 7
+ #define X_PPC 8
+-#define X_AARCH64 9
++#define X_PPC64 9
++#define X_PPC64LE 10
++#define X_AARCH64 11
+
+ // **********************************
+ // Make sure you set X_PLATFORM and X_ARCH defines correctly.
+Index: b/jdk/src/solaris/bin/ppc64le/jvm.cfg
+===================================================================
+--- /dev/null
++++ b/jdk/src/solaris/bin/ppc64le/jvm.cfg
+@@ -0,0 +1,33 @@
++# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation. Oracle designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Oracle in the LICENSE file that accompanied this code.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++# or visit www.oracle.com if you need additional information or have any
++# questions.
++#
++# List of JVMs that can be used as an option to java, javac, etc.
++# Order is important -- first in this list is the default JVM.
++# NOTE that this both this file and its format are UNSUPPORTED and
++# WILL GO AWAY in a future release.
++#
++# You may also select a JVM in an arbitrary location with the
++# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
++# and may not be available in a future release.
++#
++-server KNOWN
+Index: b/hotspot/make/defs.make
+===================================================================
+--- a/hotspot/make/defs.make
++++ b/hotspot/make/defs.make
+@@ -326,6 +326,13 @@ ifneq ($(OSNAME),windows)
+ LIBARCH/ppc64 = ppc64
+ LIBARCH/zero = $(ZERO_LIBARCH)
+
++ # Override LIBARCH for ppc64le
++ ifeq ($(ARCH), ppc64)
++ ifeq ($(OPENJDK_TARGET_CPU_ENDIAN), little)
++ LIBARCH = ppc64le
++ endif
++ endif
++
+ LP64_ARCH += sparcv9 amd64 ia64 ppc64 zero
+ endif
+
diff --git a/debian/patches/pr2775-cache_api.diff b/debian/patches/pr2775-cache_api.diff
new file mode 100644
index 0000000..4d79d12
--- /dev/null
+++ b/debian/patches/pr2775-cache_api.diff
@@ -0,0 +1,54 @@
+commit 25b39703b2c3468f666f6175ff94e46526d402a7
+Author: Xerxes RÃ¥nby <xerxes@gudinna.com>
+Date: Tue Dec 22 13:33:44 2015 +0100
+
+ OpenJDK 8: Add JDK8u JDK-8061651 API. IcedTea PR2775.
+
+ Implement minimal JVM functionality to tell JDK8u that the JDK-8061651 API is unsupported by JamVM
+
+ JVM_GetResourceLookupCacheURLs
+ JVM_GetResourceLookupCache
+ JVM_KnownToNotExist
+
+ Signed-off-by: Xerxes RÃ¥nby <xerxes@gudinna.com>
+
+diff --git a/src/classlib/openjdk/jvm.c b/src/classlib/openjdk/jvm.c
+index 971ac75..955621d 100644
+--- jamvm.old/jamvm/src/classlib/openjdk/jvm.c
++++ jamvm/jamvm/src/classlib/openjdk/jvm.c
+@@ -666,6 +666,35 @@ void JVM_SetClassSigners(JNIEnv *env, jclass cls, jobjectArray signers) {
+ }
+
+
++/* JVM_GetResourceLookupCacheURLs
++ is part of the
++ JDK-8061651 JDK8u API
++*/
++
++jobjectArray JVM_GetResourceLookupCacheURLs(JNIEnv *env, jobject loader) {
++ return NULL; // tell OpenJDK 8 that the lookup cache API is unavailable
++}
++
++/* JVM_GetResourceLookupCache
++ is unused however it is part of the
++ JDK-8061651 JDK8u API
++*/
++
++jintArray JVM_GetResourceLookupCache(JNIEnv *env, jobject loader, const char *resource_name) {
++ UNIMPLEMENTED("JVM_GetResourceLookupCache");
++ return NULL; // tell OpenJDK 8 that the lookup cache is unavailable
++}
++
++/* JVM_KnownToNotExist
++ is unused however it is part of the
++ JDK-8061651 JDK8u API
++*/
++
++jboolean JVM_KnownToNotExist(JNIEnv *env, jobject loader, const char *classname) {
++ UNIMPLEMENTED("JVM_KnownToNotExist");
++ return JNI_FALSE; // tell OpenJDK 8 we don't know whether it exists or not
++}
++
+ /* JVM_GetProtectionDomain */
+
+ jobject JVM_GetProtectionDomain(JNIEnv *env, jclass cls) {
diff --git a/debian/patches/s390x-thread-stack-size.diff b/debian/patches/s390x-thread-stack-size.diff
new file mode 100644
index 0000000..742c80c
--- /dev/null
+++ b/debian/patches/s390x-thread-stack-size.diff
@@ -0,0 +1,13 @@
+# DP: Set initial VMThreadStackSize to 1600 on s390x
+
+--- a/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp
++++ b/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp
+@@ -36,6 +36,8 @@ define_pd_global(intx, ThreadStackSize,
+ #ifdef _LP64
+ #if defined (_LITTLE_ENDIAN) && defined (__powerpc64__)
+ define_pd_global(intx, VMThreadStackSize, 1920);
++#elif defined(__s390x__)
++define_pd_global(intx, VMThreadStackSize, 1600);
+ #else
+ define_pd_global(intx, VMThreadStackSize, 1280);
+ #endif
diff --git a/debian/patches/set-exec-name.diff b/debian/patches/set-exec-name.diff
new file mode 100644
index 0000000..5c4d954
--- /dev/null
+++ b/debian/patches/set-exec-name.diff
@@ -0,0 +1,47 @@
+--- openjdk/jdk/src/solaris/bin/java_md.c.orig
++++ openjdk/jdk/src/solaris/bin/java_md.c
+@@ -688,8 +688,19 @@
+ char buf[PATH_MAX+1];
+ int len = readlink(self, buf, PATH_MAX);
+ if (len >= 0) {
++ const char* prefixes[] = {"/cow/", "/persistmnt/", "/rofs/", "/rwfs/", "/squashmnt/", NULL};
++ const char **prefix;
++ size_t prefix_len = 0;
+ buf[len] = '\0'; /* readlink doesn't nul terminate */
+- exec_path = JLI_StringDup(buf);
++ for (prefix = prefixes; *prefix; prefix++) {
++ prefix_len = strlen(buf) < strlen(*prefix) ? strlen(buf) : strlen(*prefix);
++ if (!strncmp(*prefix, buf, prefix_len)) {
++ prefix_len--;
++ break;
++ }
++ prefix_len = 0;
++ }
++ exec_path = JLI_StringDup(buf + prefix_len);
+ }
+ }
+ #else /* !__solaris__ && !__linux */
+--- openjdk/hotspot/src/os/posix/launcher/java_md.c.orig
++++ openjdk/hotspot/src/os/posix/launcher/java_md.c
+@@ -967,8 +967,19 @@
+ char buf[PATH_MAX+1];
+ int len = readlink(self, buf, PATH_MAX);
+ if (len >= 0) {
+- buf[len] = '\0'; /* readlink doesn't nul terminate */
+- exec_path = JLI_StringDup(buf);
++ buf[len] = '\0'; /* readlink doesn't nul terminate */
++ const char* prefixes[] = {"/cow/", "/persistmnt/", "/rofs/", "/rwfs/", "/squashmnt/", NULL};
++ const char **prefix;
++ size_t prefix_len = 0;
++ for (prefix = prefixes; *prefix; prefix++) {
++ prefix_len = strlen(buf) < strlen(*prefix) ? strlen(buf) : strlen(*prefix);
++ if (!strncmp(*prefix, buf, prefix_len)) {
++ prefix_len--;
++ break;
++ }
++ prefix_len = 0;
++ }
++ exec_path = JLI_StringDup(buf + prefix_len);
+ }
+ }
+ #else /* !__sun && !__linux */
diff --git a/debian/patches/shebang.diff b/debian/patches/shebang.diff
new file mode 100644
index 0000000..fc08ba3
--- /dev/null
+++ b/debian/patches/shebang.diff
@@ -0,0 +1,7 @@
+--- a/jdk/src/share/sample/scripting/scriptpad/src/scripts/memory.sh
++++ b/jdk/src/share/sample/scripting/scriptpad/src/scripts/memory.sh
+@@ -1,3 +1,4 @@
++#!/bin/sh
+ #
+ # Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ #
diff --git a/debian/patches/sparc-fixes.diff b/debian/patches/sparc-fixes.diff
new file mode 100644
index 0000000..2361107
--- /dev/null
+++ b/debian/patches/sparc-fixes.diff
@@ -0,0 +1,15 @@
+--- a/jdk/make/CompileDemos.gmk
++++ b/jdk/make/CompileDemos.gmk
+@@ -235,10 +235,12 @@ define SetupJVMTIDemo
+ $1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \
+ $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \
+ $(CXXFLAGS_DEBUG_SYMBOLS)
++ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH), waiters-sparc)
+ $1_FILTER := -xregs=no%appl
+ $1_CXXFLAGS := $$(filter-out $$($1_FILTER), $$($1_CXXFLAGS))
+ endif
++ endif
+
+ # Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the
+ # eval call below, the comma gets expanded too early.
diff --git a/debian/patches/sparc-stubgenerator.diff b/debian/patches/sparc-stubgenerator.diff
new file mode 100644
index 0000000..4e0ea20
--- /dev/null
+++ b/debian/patches/sparc-stubgenerator.diff
@@ -0,0 +1,44 @@
+Author: Damien Raude-Morvan <drazzib@debian.org>
+Description: Fix FTBFS on sparc on stubGenerator_sparc.cpp by using explicit class typedef.
+
+--- a/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp
++++ b/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp
+@@ -1055,7 +1055,7 @@
+ Label& L_loop, bool use_prefetch, bool use_bis);
+
+ void disjoint_copy_core(Register from, Register to, Register count, int log2_elem_size,
+- int iter_size, CopyLoopFunc copy_loop_func) {
++ int iter_size, StubGenerator::CopyLoopFunc copy_loop_func) {
+ Label L_copy;
+
+ assert(log2_elem_size <= 3, "the following code should be changed");
+@@ -1206,7 +1206,8 @@
+ __ inc(from, 8);
+ __ sllx(O3, left_shift, O3);
+
+- disjoint_copy_core(from, to, count, log2_elem_size, 16, copy_16_bytes_shift_loop);
++ StubGenerator::CopyLoopFunc aFunction = &StubGenerator::copy_16_bytes_shift_loop;
++ disjoint_copy_core(from, to, count, log2_elem_size, 16, aFunction);
+
+ __ inccc(count, count_dec>>1 ); // + 8 bytes
+ __ brx(Assembler::negative, true, Assembler::pn, L_copy_last_bytes);
+@@ -2085,7 +2086,8 @@
+ __ dec(count, 4); // The cmp at the beginning guaranty count >= 4
+ __ sllx(O3, 32, O3);
+
+- disjoint_copy_core(from, to, count, 2, 16, copy_16_bytes_loop);
++ StubGenerator::CopyLoopFunc aFunction = &StubGenerator::copy_16_bytes_loop;
++ disjoint_copy_core(from, to, count, 2, 16, aFunction);
+
+ __ br(Assembler::always, false, Assembler::pt, L_copy_4_bytes);
+ __ delayed()->inc(count, 4); // restore 'count'
+@@ -2366,7 +2368,8 @@
+ // count >= 0 (original count - 8)
+ __ mov(from, from64);
+
+- disjoint_copy_core(from64, to64, count, 3, 64, copy_64_bytes_loop);
++ StubGenerator::CopyLoopFunc aFunction = &StubGenerator::copy_64_bytes_loop;
++ disjoint_copy_core(from64, to64, count, 3, 64, aFunction);
+
+ // Restore O4(offset0), O5(offset8)
+ __ sub(from64, from, offset0);
diff --git a/debian/patches/stack-direction.diff b/debian/patches/stack-direction.diff
new file mode 100644
index 0000000..04deba3
--- /dev/null
+++ b/debian/patches/stack-direction.diff
@@ -0,0 +1,217 @@
+# unused patch (work in progress for PARISC support)
+
+--- openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp.old 2010-01-06 16:30:02.000000000 +0100
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp 2010-01-06 23:14:47.000000000 +0100
+@@ -144,8 +144,13 @@
+ address addr = (address) info->si_addr;
+
+ // check if fault address is within thread stack
++#ifdef __hppa__
++ if (addr > thread->stack_base() &&
++ addr <= thread->stack_base() + thread->stack_size()) {
++#else
+ if (addr < thread->stack_base() &&
+ addr >= thread->stack_base() - thread->stack_size()) {
++#endif
+ // stack overflow
+ if (thread->in_stack_yellow_zone(addr)) {
+ thread->disable_stack_yellow_zone();
+@@ -294,7 +299,11 @@
+ if (res != 0) {
+ fatal1("pthread_attr_getstack failed with errno = %d", res);
+ }
++#ifdef __hppa__
++ address stack_top = stack_bottom - stack_bytes;
++#else
+ address stack_top = stack_bottom + stack_bytes;
++#endif
+
+ // The block of memory returned by pthread_attr_getstack() includes
+ // guard pages where present. We need to trim these off.
+@@ -321,7 +330,11 @@
+ stack_bottom += (total_pages - guard_pages) / 2 * page_bytes;
+ #endif // IA64
+
++#ifdef __hppa__
++ stack_bottom -= guard_bytes;
++#else
+ stack_bottom += guard_bytes;
++#endif
+
+ pthread_attr_destroy(&attr);
+
+@@ -329,19 +342,36 @@
+ // by pthread_attr_getstack is the maximum size it could possibly
+ // be given what currently mapped. This can be huge, so we cap it.
+ if (os::Linux::is_initial_thread()) {
++#ifdef __hppa__
++ stack_bytes = stack_bottom - stack_top;
++#else
+ stack_bytes = stack_top - stack_bottom;
++#endif
+
+ if (stack_bytes > JavaThread::stack_size_at_create())
+ stack_bytes = JavaThread::stack_size_at_create();
+
++#ifdef __hppa__
++ stack_bottom = stack_top + stack_bytes;
++#else
+ stack_bottom = stack_top - stack_bytes;
++#endif
+ }
+
++#ifdef __hppa__
++ assert(os::current_stack_pointer() <= stack_bottom, "should do");
++ assert(os::current_stack_pointer() > stack_top, "should do");
++#else
+ assert(os::current_stack_pointer() >= stack_bottom, "should do");
+ assert(os::current_stack_pointer() < stack_top, "should do");
++#endif
+
+ *bottom = stack_bottom;
++#ifdef __hppa__
++ *size = stack_bottom - stack_top;
++#else
+ *size = stack_top - stack_bottom;
++#endif
+ }
+
+ address os::current_stack_base() {
+--- openjdk/hotspot/src/share/vm/runtime/thread.cpp.old 2009-10-02 23:16:39.000000000 +0200
++++ openjdk/hotspot/src/share/vm/runtime/thread.cpp 2010-01-06 23:31:24.000000000 +0100
+@@ -713,8 +713,13 @@
+ else if (is_ConcurrentGC_thread()) st->print("ConcurrentGCThread");
+ else st->print("Thread");
+
++#ifdef __hppa__
+ st->print(" [stack: " PTR_FORMAT "," PTR_FORMAT "]",
+ _stack_base - _stack_size, _stack_base);
++#else
++ st->print(" [stack: " PTR_FORMAT "," PTR_FORMAT "]",
++ _stack_base + _stack_size, _stack_base);
++#endif
+
+ if (osthread()) {
+ st->print(" [id=%d]", osthread()->thread_id());
+@@ -792,7 +797,11 @@
+ bool Thread::is_in_stack(address adr) const {
+ assert(Thread::current() == this, "is_in_stack can only be called from current thread");
+ address end = os::current_stack_pointer();
++#ifdef __hppa__
++ if (stack_base() <= adr && adr <= end) return true;
++#else
+ if (stack_base() >= adr && adr >= end) return true;
++#endif
+
+ return false;
+ }
+@@ -804,7 +813,11 @@
+ // should be revisited, and they should be removed if possible.
+
+ bool Thread::is_lock_owned(address adr) const {
++#ifdef __hppa__
++ return (_stack_base <= adr && adr <= (_stack_base + _stack_size));
++#else
+ return (_stack_base >= adr && adr >= (_stack_base - _stack_size));
++#endif
+ }
+
+ bool Thread::set_as_starting_thread() {
+@@ -2108,7 +2121,11 @@
+
+ void JavaThread::create_stack_guard_pages() {
+ if (! os::uses_stack_guard_pages() || _stack_guard_state != stack_guard_unused) return;
++#ifdef __hppa__
++ address low_addr = stack_base();
++#else
+ address low_addr = stack_base() - stack_size();
++#endif
+ size_t len = (StackYellowPages + StackRedPages) * os::vm_page_size();
+
+ int allocate = os::allocate_stack_guard_pages();
+@@ -2131,7 +2148,11 @@
+
+ void JavaThread::remove_stack_guard_pages() {
+ if (_stack_guard_state == stack_guard_unused) return;
++#ifdef __hppa__
++ address low_addr = stack_base();
++#else
+ address low_addr = stack_base() - stack_size();
++#endif
+ size_t len = (StackYellowPages + StackRedPages) * os::vm_page_size();
+
+ if (os::allocate_stack_guard_pages()) {
+@@ -2156,10 +2177,17 @@
+
+ // The base notation is from the stacks point of view, growing downward.
+ // We need to adjust it to work correctly with guard_memory()
++#ifdef __hppa__
++ address base = stack_yellow_zone_base() + stack_yellow_zone_size();
++
++ guarantee(base > stack_base(),"Error calculating stack yellow zone");
++ guarantee(base > os::current_stack_pointer(),"Error calculating stack yellow zone");
++#else
+ address base = stack_yellow_zone_base() - stack_yellow_zone_size();
+
+ guarantee(base < stack_base(),"Error calculating stack yellow zone");
+ guarantee(base < os::current_stack_pointer(),"Error calculating stack yellow zone");
++#endif
+
+ if (os::guard_memory((char *) base, stack_yellow_zone_size())) {
+ _stack_guard_state = stack_guard_enabled;
+@@ -2178,7 +2206,11 @@
+
+ // The base notation is from the stacks point of view, growing downward.
+ // We need to adjust it to work correctly with guard_memory()
++#ifdef __hppa__
++ address base = stack_yellow_zone_base() + stack_yellow_zone_size();
++#else
+ address base = stack_yellow_zone_base() - stack_yellow_zone_size();
++#endif
+
+ if (os::unguard_memory((char *)base, stack_yellow_zone_size())) {
+ _stack_guard_state = stack_guard_yellow_disabled;
+@@ -2192,10 +2224,17 @@
+ // The base notation is from the stacks point of view, growing downward.
+ // We need to adjust it to work correctly with guard_memory()
+ assert(_stack_guard_state != stack_guard_unused, "must be using guard pages.");
++#ifdef __hppa__
++ address base = stack_red_zone_base() + stack_red_zone_size();
++
++ guarantee(base > stack_base(),"Error calculating stack red zone");
++ guarantee(base > os::current_stack_pointer(),"Error calculating stack red zone");
++#else
+ address base = stack_red_zone_base() - stack_red_zone_size();
+
+ guarantee(base < stack_base(),"Error calculating stack red zone");
+ guarantee(base < os::current_stack_pointer(),"Error calculating stack red zone");
++#endif
+
+ if(!os::guard_memory((char *) base, stack_red_zone_size())) {
+ warning("Attempt to guard stack red zone failed.");
+@@ -2206,7 +2245,11 @@
+ // The base notation is from the stacks point of view, growing downward.
+ // We need to adjust it to work correctly with guard_memory()
+ assert(_stack_guard_state != stack_guard_unused, "must be using guard pages.");
++#ifdef __hppa__
++ address base = stack_red_zone_base() + stack_red_zone_size();
++#else
+ address base = stack_red_zone_base() - stack_red_zone_size();
++#endif
+ if (!os::unguard_memory((char *)base, stack_red_zone_size())) {
+ warning("Attempt to unguard stack red zone failed.");
+ }
+@@ -2451,8 +2494,13 @@
+ if (osthread()) {
+ st->print(", id=%d", osthread()->thread_id());
+ }
++#ifdef __hppa__
++ st->print(", stack(" PTR_FORMAT "," PTR_FORMAT ")",
++ _stack_base + _stack_size, _stack_base);
++#else
+ st->print(", stack(" PTR_FORMAT "," PTR_FORMAT ")",
+ _stack_base - _stack_size, _stack_base);
++#endif
+ st->print("]");
+ return;
+ }
diff --git a/debian/patches/system-lcms.diff b/debian/patches/system-lcms.diff
new file mode 100644
index 0000000..993bf23
--- /dev/null
+++ b/debian/patches/system-lcms.diff
@@ -0,0 +1,101 @@
+# DP: taken from http://icedtea.classpath.org/wiki/IcedTea_Patches_for_OpenJDK_8
+
+--- a/common/autoconf/libraries.m4
++++ b/common/autoconf/libraries.m4
+@@ -666,6 +666,46 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
+
+ ###############################################################################
+ #
++ # Check for the lcms2 library
++ #
++
++ AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms],
++ [use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
++
++ AC_CHECK_LIB(lcms2, cmsOpenProfileFromFile,
++ [ LCMS_FOUND=yes ],
++ [ LCMS_FOUND=no ])
++
++ AC_MSG_CHECKING([for which lcms to use])
++
++ DEFAULT_LCMS=bundled
++
++ #
++ # If user didn't specify, use DEFAULT_LCMS
++ #
++ if test "x${with_lcms}" = "x"; then
++ with_lcms=${DEFAULT_LCMS}
++ fi
++
++ if test "x${with_lcms}" = "xbundled"; then
++ USE_EXTERNAL_LCMS=false
++ AC_MSG_RESULT([bundled])
++ elif test "x${with_lcms}" = "xsystem"; then
++ if test "x${LCMS_FOUND}" = "xyes"; then
++ USE_EXTERNAL_LCMS=true
++ AC_MSG_RESULT([system])
++ else
++ AC_MSG_RESULT([system not found])
++ AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!])
++ fi
++ else
++ AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'])
++ fi
++
++ AC_SUBST(USE_EXTERNAL_LCMS)
++
++ ###############################################################################
++ #
+ # Check for the png library
+ #
+
+--- a/jdk/make/lib/Awt2dLibraries.gmk
++++ b/jdk/make/lib/Awt2dLibraries.gmk
+@@ -667,8 +667,8 @@ endif
+ ##########################################################################################
+
+ # TODO: Update awt lib path when awt is converted
+-$(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
+- LIBRARY := lcms, \
++$(eval $(call SetupNativeCompilation,BUILD_LIBJAVALCMS, \
++ LIBRARY := javalcms, \
+ OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+ SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
+ LANG := C, \
+@@ -687,19 +687,19 @@ $(eval $(call SetupNativeCompilation,BUI
+ LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
+ LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc, \
+ LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
+- LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
++ LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm -llcms2, \
+ LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm,\
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+ RC_FLAGS := $(RC_FLAGS) \
+- -D "JDK_FNAME=lcms.dll" \
+- -D "JDK_INTERNAL_NAME=lcms" \
++ -D "JDK_FNAME=javalcms.dll" \
++ -D "JDK_INTERNAL_NAME=javalcms" \
+ -D "JDK_FTYPE=0x2L", \
+- OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/liblcms, \
++ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavalcms, \
+ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+-BUILD_LIBRARIES += $(BUILD_LIBLCMS)
++BUILD_LIBRARIES += $(BUILD_LIBJAVALCMS)
+
+-$(BUILD_LIBLCMS): $(BUILD_LIBAWT)
++$(BUILD_LIBJAVALCMS): $(BUILD_LIBAWT)
+
+ ##########################################################################################
+
+--- a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java
++++ b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java
+@@ -207,7 +207,7 @@ public class LCMS implements PCMM {
+ * disposer frameworks
+ */
+ System.loadLibrary("awt");
+- System.loadLibrary("lcms");
++ System.loadLibrary("javalcms");
+ return null;
+ }
+ });
diff --git a/debian/patches/system-libjpeg.diff b/debian/patches/system-libjpeg.diff
new file mode 100644
index 0000000..e487007
--- /dev/null
+++ b/debian/patches/system-libjpeg.diff
@@ -0,0 +1,361 @@
+# DP: S8043805: Allow using a system-installed libjpeg
+# DP: http://hg.openjdk.java.net/jdk9/client/rev/bfd9a3e1aeb5
+# DP: http://hg.openjdk.java.net/jdk9/client/jdk/rev/320743f0b4fc
+
+--- a/common/autoconf/generated-configure.sh
++++ b/common/autoconf/generated-configure.sh
+@@ -1071,6 +1071,7 @@ enable_freetype_bundling
+ with_alsa
+ with_alsa_include
+ with_alsa_lib
++with_libjpeg
+ with_giflib
+ with_zlib
+ with_stdc__lib
+@@ -1844,6 +1845,8 @@ Optional Packages:
+ headers under PATH/include)
+ --with-alsa-include specify directory for the alsa include files
+ --with-alsa-lib specify directory for the alsa library
++ --with-libjpeg use libjpeg from build system or OpenJDK source
++ (system, bundled) [bundled]
+ --with-giflib use giflib from build system or OpenJDK source
+ (system, bundled) [bundled]
+ --with-zlib use zlib from build system or OpenJDK source
+@@ -7987,6 +7990,11 @@ $as_echo "$with_jvm_variants" >&6; }
+ JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
+ JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
+
++ if test "x$JVM_VARIANT_CLIENT" = xtrue; then
++ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
++ as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
++ fi
++ fi
+ if test "x$JVM_VARIANT_KERNEL" = xtrue; then
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
+ as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
+@@ -35239,10 +35247,43 @@ done
+ # Check for the jpeg library
+ #
+
+- USE_EXTERNAL_LIBJPEG=true
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
+-$as_echo_n "checking for main in -ljpeg... " >&6; }
+-if ${ac_cv_lib_jpeg_main+:} false; then :
++
++# Check whether --with-libjpeg was given.
++if test "${with_libjpeg+set}" = set; then :
++ withval=$with_libjpeg;
++fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
++$as_echo_n "checking for which libjpeg to use... " >&6; }
++
++ # default is bundled
++ DEFAULT_LIBJPEG=bundled
++
++ #
++ # if user didn't specify, use DEFAULT_LIBJPEG
++ #
++ if test "x${with_libjpeg}" = "x"; then
++ with_libjpeg=${DEFAULT_LIBJPEG}
++ fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
++$as_echo "${with_libjpeg}" >&6; }
++
++ if test "x${with_libjpeg}" = "xbundled"; then
++ USE_EXTERNAL_LIBJPEG=false
++ elif test "x${with_libjpeg}" = "xsystem"; then
++ ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
++if test "x$ac_cv_header_jpeglib_h" = xyes; then :
++
++else
++ as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
++fi
++
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
++$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
++if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+@@ -35250,27 +35291,33 @@ LIBS="-ljpeg $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+-
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char jpeg_CreateDecompress ();
+ int
+ main ()
+ {
+-return main ();
++return jpeg_CreateDecompress ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ if ac_fn_cxx_try_link "$LINENO"; then :
+- ac_cv_lib_jpeg_main=yes
++ ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
+ else
+- ac_cv_lib_jpeg_main=no
++ ac_cv_lib_jpeg_jpeg_CreateDecompress=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
+-$as_echo "$ac_cv_lib_jpeg_main" >&6; }
+-if test "x$ac_cv_lib_jpeg_main" = xyes; then :
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
++$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
++if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBJPEG 1
+ _ACEOF
+@@ -35278,13 +35325,16 @@ _ACEOF
+ LIBS="-ljpeg $LIBS"
+
+ else
+- USE_EXTERNAL_LIBJPEG=false
+- { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
+-$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
+-
++ as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
+ fi
+
+
++ USE_EXTERNAL_LIBJPEG=true
++ else
++ as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
++ fi
++
++
+
+ ###############################################################################
+ #
+--- a/common/autoconf/libraries.m4
++++ b/common/autoconf/libraries.m4
+@@ -595,11 +595,36 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
+ # Check for the jpeg library
+ #
+
+- USE_EXTERNAL_LIBJPEG=true
+- AC_CHECK_LIB(jpeg, main, [],
+- [ USE_EXTERNAL_LIBJPEG=false
+- AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
+- ])
++ AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
++ [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
++
++ AC_MSG_CHECKING([for which libjpeg to use])
++
++ # default is bundled
++ DEFAULT_LIBJPEG=bundled
++
++ #
++ # if user didn't specify, use DEFAULT_LIBJPEG
++ #
++ if test "x${with_libjpeg}" = "x"; then
++ with_libjpeg=${DEFAULT_LIBJPEG}
++ fi
++
++ AC_MSG_RESULT(${with_libjpeg})
++
++ if test "x${with_libjpeg}" = "xbundled"; then
++ USE_EXTERNAL_LIBJPEG=false
++ elif test "x${with_libjpeg}" = "xsystem"; then
++ AC_CHECK_HEADER(jpeglib.h, [],
++ [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
++ AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
++ [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
++
++ USE_EXTERNAL_LIBJPEG=true
++ else
++ AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
++ fi
++
+ AC_SUBST(USE_EXTERNAL_LIBJPEG)
+
+ ###############################################################################
+--- a/jdk/make/lib/Awt2dLibraries.gmk
++++ b/jdk/make/lib/Awt2dLibraries.gmk
+@@ -703,21 +703,24 @@ $(BUILD_LIBLCMS): $(BUILD_LIBAWT)
+
+ ##########################################################################################
+
++BUILD_LIBJAVAJPEG_DIR := $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg
++
+ ifdef OPENJDK
+- BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers
++ BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers
+ else
+- BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers-closed
+- BUILD_LIBJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
+- BUILD_LIBJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJPEG_CLOSED_SRC)
++ BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers-closed
++ BUILD_LIBJAVAJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
++ BUILD_LIBJAVAJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJAVAJPEG_CLOSED_SRC)
+ endif
+
+-BUILD_LIBJPEG_REORDER :=
++BUILD_LIBJAVAJPEG_REORDER :=
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+ ifneq ($(OPENJDK_TARGET_CPU), x86_64)
+- BUILD_LIBJPEG_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
++ BUILD_LIBJAVAJPEG_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
+ endif
+ endif
+
++
+ # Suppress gcc warnings like "variable might be clobbered by 'longjmp'
+ # or 'vfork'": this warning indicates that some variable is placed to
+ # a register by optimized compiler and it's value might be lost on longjmp().
+@@ -729,37 +732,50 @@ endif
+ # $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
+ # \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
+ # ifeq ($(CC_43_OR_NEWER), 1)
+-# BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
++# BUILD_LIBJAVAJPEG_CFLAGS_linux += -Wno-clobbered
+ # endif
+ #endif
+
+-$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG, \
+- LIBRARY := jpeg, \
++ifeq ($(USE_EXTERNAL_LIBJPEG), true)
++ LIBJPEG_LIBS := -ljpeg
++ BUILD_LIBJAVAJPEG_INCLUDE_FILES := \
++ imageIOJPEG.c \
++ jpegdecoder.c
++ BUILD_LIBJAVAJPEG_HEADERS :=
++else
++ LIBJPEG_LIBS :=
++ BUILD_LIBJAVAJPEG_INCLUDE_FILES :=
++ BUILD_LIBJAVAJPEG_HEADERS := -I$(BUILD_LIBJAVAJPEG_DIR)
++endif
++
++$(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
++ LIBRARY := javajpeg, \
+ OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+- SRC := $(BUILD_LIBJPEG_CLOSED_SRC) \
+- $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
++ SRC := $(BUILD_LIBJAVAJPEG_CLOSED_SRC) \
++ $(BUILD_LIBJAVAJPEG_DIR), \
++ INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
+ LANG := C, \
+ OPTIMIZATION := HIGHEST, \
+ CFLAGS := $(CFLAGS_JDKLIB) \
+- $(BUILD_LIBJPEG_CLOSED_INCLUDES) \
+- -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
+- MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
+- LDFLAGS := $(LDFLAGS_JDKLIB) \
++ $(BUILD_LIBJAVAJPEG_CLOSED_INCLUDES) \
++ $(BUILD_LIBJAVAJPEG_HEADERS), \
++ MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
++ LDFLAGS := $(LDFLAGS_JDKLIB) $(LIBJPEG_LIBS) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
+ LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+ RC_FLAGS := $(RC_FLAGS) \
+- -D "JDK_FNAME=jpeg.dll" \
+- -D "JDK_INTERNAL_NAME=jpeg" \
++ -D "JDK_FNAME=javajpeg.dll" \
++ -D "JDK_INTERNAL_NAME=javajpeg" \
+ -D "JDK_FTYPE=0x2L", \
+- REORDER := $(BUILD_LIBJPEG_REORDER), \
++ REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
+ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjpeg, \
+ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
+
+-$(BUILD_LIBJPEG): $(BUILD_LIBJAVA)
++$(BUILD_LIBJAVAJPEG): $(BUILD_LIBJAVA)
+
+-BUILD_LIBRARIES += $(BUILD_LIBJPEG)
++BUILD_LIBRARIES += $(BUILD_LIBJAVAJPEG)
+
+ ##########################################################################################
+
+@@ -1199,6 +1215,13 @@ ifndef BUILD_HEADLESS_ONLY
+ GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
+ endif
+
++ ifeq ($(USE_EXTERNAL_LIBJPEG), true)
++ LIBJPEG_LDFLAGS := -ljpeg
++ else
++ LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg
++ LIBJPEG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg
++ endif
++
+ ifneq ($(OPENJDK_TARGET_OS), macosx)
+ LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
+ else
+@@ -1259,11 +1282,13 @@ ifndef BUILD_HEADLESS_ONLY
+ EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
+ LANG := C, \
+ OPTIMIZATION := LOW, \
+- CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS), \
++ CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
++ $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS), \
+ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+- LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS), \
++ LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \
++ $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS), \
+ LDFLAGS_SUFFIX_solaris := -lc, \
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+ RC_FLAGS := $(RC_FLAGS) \
+--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java
++++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java
+@@ -89,7 +89,7 @@ public class JPEGImageReader extends Ima
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction<Void>() {
+ public Void run() {
+- System.loadLibrary("jpeg");
++ System.loadLibrary("javajpeg");
+ return null;
+ }
+ });
+--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java
++++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java
+@@ -177,7 +177,7 @@ public class JPEGImageWriter extends Ima
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction<Void>() {
+ public Void run() {
+- System.loadLibrary("jpeg");
++ System.loadLibrary("javajpeg");
+ return null;
+ }
+ });
+--- a/jdk/src/share/classes/sun/awt/image/JPEGImageDecoder.java
++++ b/jdk/src/share/classes/sun/awt/image/JPEGImageDecoder.java
+@@ -56,7 +56,7 @@ public class JPEGImageDecoder extends Im
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction<Void>() {
+ public Void run() {
+- System.loadLibrary("jpeg");
++ System.loadLibrary("javajpeg");
+ return null;
+ }
+ });
+--- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
++++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
+@@ -51,7 +51,7 @@
+
+ /* headers from the JPEG library */
+ #include <jpeglib.h>
+-#include "jerror.h"
++#include <jerror.h>
+
+ #undef MAX
+ #define MAX(a,b) ((a) > (b) ? (a) : (b))
diff --git a/debian/patches/system-libpng.diff b/debian/patches/system-libpng.diff
new file mode 100644
index 0000000..1c3c8cb
--- /dev/null
+++ b/debian/patches/system-libpng.diff
@@ -0,0 +1,113 @@
+# DP: taken from http://icedtea.classpath.org/wiki/IcedTea_Patches_for_OpenJDK_8
+
+--- a/common/autoconf/libraries.m4
++++ b/common/autoconf/libraries.m4
+@@ -666,6 +666,47 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
+
+ ###############################################################################
+ #
++ # Check for the png library
++ #
++
++ AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng],
++ [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
++
++ AC_CHECK_LIB(png, png_sig_cmp,
++ [ LIBPNG_FOUND=yes ],
++ [ LIBPNG_FOUND=no ])
++
++ AC_MSG_CHECKING([for which libpng to use])
++
++ # default is bundled
++ DEFAULT_LIBPNG=bundled
++
++ #
++ # if user didn't specify, use DEFAULT_LIBPNG
++ #
++ if test "x${with_libpng}" = "x"; then
++ with_libpng=${DEFAULT_libpng}
++ fi
++
++
++ if test "x${with_libpng}" = "xbundled"; then
++ USE_EXTERNAL_LIBPNG=false
++ AC_MSG_RESULT([bundled])
++ elif test "x${with_libpng}" = "xsystem"; then
++ if test "x${LIBPNG_FOUND}" = "xyes"; then
++ USE_EXTERNAL_LIBPNG=true
++ AC_MSG_RESULT([system])
++ else
++ AC_MSG_RESULT([system not found])
++ AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!])
++ fi
++ else
++ AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'])
++ fi
++ AC_SUBST(USE_EXTERNAL_LIBPNG)
++
++ ###############################################################################
++ #
+ # Check for the zlib library
+ #
+
+--- a/common/autoconf/spec.gmk.in
++++ b/common/autoconf/spec.gmk.in
+@@ -567,6 +567,7 @@ endif
+ ENABLE_JFR=@ENABLE_JFR@
+ ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
+ USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
++USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
+ USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
+ USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
+ LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
+--- a/jdk/make/lib/Awt2dLibraries.gmk
++++ b/jdk/make/lib/Awt2dLibraries.gmk
+@@ -1205,7 +1205,6 @@ endif
+ ifndef BUILD_HEADLESS_ONLY
+ LIBSPLASHSCREEN_DIRS := \
+ $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg \
+- $(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
+ $(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
+
+ ifeq ($(USE_EXTERNAL_LIBGIF), true)
+@@ -1222,6 +1221,13 @@ ifndef BUILD_HEADLESS_ONLY
+ LIBJPEG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg
+ endif
+
++ ifeq ($(USE_EXTERNAL_LIBPNG), true)
++ LIBPNG_LDFLAGS := -lpng
++ else
++ LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/image/libpng
++ LIBPNG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/libpng
++ endif
++
+ ifneq ($(OPENJDK_TARGET_OS), macosx)
+ LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
+ else
+@@ -1283,12 +1289,12 @@ ifndef BUILD_HEADLESS_ONLY
+ LANG := C, \
+ OPTIMIZATION := LOW, \
+ CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
+- $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS), \
++ $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(LIBPNG_CFLAGS), \
+ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \
+- $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS), \
++ $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS) $(LIBPNG_LDFLAGS), \
+ LDFLAGS_SUFFIX_solaris := -lc, \
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+ RC_FLAGS := $(RC_FLAGS) \
+--- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c
++++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c
+@@ -25,8 +25,7 @@
+
+ #include "splashscreen_impl.h"
+
+-#include "../libpng/png.h"
+-
++#include <png.h>
+ #include <setjmp.h>
+
+ #define SIG_BYTES 8
diff --git a/debian/patches/system-pcsclite.diff b/debian/patches/system-pcsclite.diff
new file mode 100644
index 0000000..cec60ba
--- /dev/null
+++ b/debian/patches/system-pcsclite.diff
@@ -0,0 +1,181 @@
+--- a/common/autoconf/libraries.m4
++++ b/common/autoconf/libraries.m4
+@@ -747,6 +747,53 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
+
+ ###############################################################################
+ #
++ # Check for the pcsclite library
++ #
++
++ AC_ARG_WITH(libpcsclite, [AS_HELP_STRING([--with-libpcsclite],
++ [use libpcsclite from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
++
++ AC_CHECK_LIB(pcsclite, SCardConnect,
++ [ LIBPCSCLITE_FOUND=yes ],
++ [ LIBPCSCLITE_FOUND=no ])
++
++ AC_MSG_CHECKING([for which libpcsclite to use])
++
++ DEFAULT_LIBPCSCLITE=bundled
++
++ if test "x${LIBPCSCLITE_FOUND}" != "xyes"; then
++ #
++ # If we don't find any system...set default to bundled
++ #
++ DEFAULT_LIBPCSCLITE=bundled
++ fi
++
++ #
++ # If user didn't specify, use DEFAULT_PCSC
++ #
++ if test "x${with_libpcsclite}" = "x"; then
++ with_libpcsclite=${DEFAULT_LIBPCSCLITE}
++ fi
++
++ if test "x${with_libpcsclite}" = "xbundled"; then
++ USE_EXTERNAL_LIBPCSCLITE=false
++ AC_MSG_RESULT([bundled])
++ elif test "x${with_libpcsclite}" = "xsystem"; then
++ if test "x${LIBPCSCLITE_FOUND}" = "xyes"; then
++ USE_EXTERNAL_LIBPCSCLITE=true
++ AC_MSG_RESULT([system])
++ else
++ AC_MSG_RESULT([system not found])
++ AC_MSG_ERROR([--with-libpcsclite=system specified, but no libpcsclite found!])
++ fi
++ else
++ AC_MSG_ERROR([Invalid value for --with-libpcsclite: ${with_libpcsclite}, use 'system' or 'bundled'])
++ fi
++
++ AC_SUBST(USE_EXTERNAL_LIBPCSCLITE)
++
++ ###############################################################################
++ #
+ # Check for the zlib library
+ #
+
+--- a/common/autoconf/spec.gmk.in
++++ b/common/autoconf/spec.gmk.in
+@@ -569,6 +569,7 @@ ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
+ USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
+ USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
+ USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
++USE_EXTERNAL_LIBPCSCLITE:=@USE_EXTERNAL_LIBPCSCLITE@
+ USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
+ LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
+ MSVCR_DLL:=@MSVCR_DLL@
+--- a/jdk/make/lib/SecurityLibraries.gmk
++++ b/jdk/make/lib/SecurityLibraries.gmk
+@@ -75,11 +75,11 @@ $(eval $(call SetupNativeCompilation,BUI
+ CFLAGS := $(CFLAGS_JDKLIB) \
+ -I$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
+ -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio \
+- -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio/MUSCLE, \
++ -I/usr/include/PCSC -DUSE_SYSTEM_LIBPCSCLITE, \
+ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pcsc/mapfile-vers, \
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+- LDFLAGS_SUFFIX_posix := $(LIBDL), \
++ LDFLAGS_SUFFIX_posix := -lpcsclite $(LIBDL), \
+ LDFLAGS_SUFFIX_windows := winscard.lib, \
+ LDFLAGS_SUFFIX_solaris := -lc, \
+ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
+--- a/jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c
++++ b/jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c
+@@ -36,6 +36,7 @@
+
+ #include "pcsc_md.h"
+
++#ifndef USE_SYSTEM_LIBPCSCLITE
+ void *hModule;
+ FPTR_SCardEstablishContext scardEstablishContext;
+ FPTR_SCardConnect scardConnect;
+@@ -47,6 +48,7 @@ FPTR_SCardListReaders scardListReaders;
+ FPTR_SCardBeginTransaction scardBeginTransaction;
+ FPTR_SCardEndTransaction scardEndTransaction;
+ FPTR_SCardControl scardControl;
++#endif
+
+ /*
+ * Throws a Java Exception by name
+@@ -75,7 +77,9 @@ void throwIOException(JNIEnv *env, const
+ throwByName(env, "java/io/IOException", msg);
+ }
+
++#ifndef USE_SYSTEM_LIBPCSCLITE
+ void *findFunction(JNIEnv *env, void *hModule, char *functionName) {
++ return NULL;
+ void *fAddress = dlsym(hModule, functionName);
+ if (fAddress == NULL) {
+ char errorMessage[256];
+@@ -85,9 +89,11 @@ void *findFunction(JNIEnv *env, void *hM
+ }
+ return fAddress;
+ }
++#endif
+
+ JNIEXPORT void JNICALL Java_sun_security_smartcardio_PlatformPCSC_initialize
+ (JNIEnv *env, jclass thisClass, jstring jLibName) {
++#ifndef USE_SYSTEM_LIBPCSCLITE
+ const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL);
+ if (libName == NULL) {
+ throwNullPointerException(env, "PCSC library name is null");
+@@ -141,4 +147,5 @@ JNIEXPORT void JNICALL Java_sun_security
+ #else
+ scardControl = (FPTR_SCardControl) findFunction(env, hModule, "SCardControl132");
+ #endif // __APPLE__
++#endif
+ }
+--- a/jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.h
++++ b/jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.h
+@@ -23,6 +23,8 @@
+ * questions.
+ */
+
++#ifndef USE_SYSTEM_LIBPCSCLITE
++
+ typedef LONG (*FPTR_SCardEstablishContext)(ULONG dwScope,
+ const void *pvReserved1,
+ const void *pvReserved2,
+@@ -110,3 +112,41 @@ extern FPTR_SCardListReaders scardListRe
+ extern FPTR_SCardBeginTransaction scardBeginTransaction;
+ extern FPTR_SCardEndTransaction scardEndTransaction;
+ extern FPTR_SCardControl scardControl;
++
++#else
++
++#define CALL_SCardEstablishContext(dwScope, pvReserved1, pvReserved2, phContext) \
++ (SCardEstablishContext(dwScope, pvReserved1, pvReserved2, phContext))
++
++#define CALL_SCardConnect(hContext, szReader, dwSharedMode, dwPreferredProtocols, phCard, pdwActiveProtocols) \
++ (SCardConnect(hContext, szReader, dwSharedMode, dwPreferredProtocols, phCard, pdwActiveProtocols))
++
++#define CALL_SCardDisconnect(hCard, dwDisposition) \
++ (SCardDisconnect(hCard, dwDisposition))
++
++#define CALL_SCardStatus(hCard, mszReaderNames, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen) \
++ (SCardStatus(hCard, mszReaderNames, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen))
++
++#define CALL_SCardGetStatusChange(hContext, dwTimeout, rgReaderStates, cReaders) \
++ (SCardGetStatusChange(hContext, dwTimeout, rgReaderStates, cReaders))
++
++#define CALL_SCardTransmit(hCard, pioSendPci, pbSendBuffer, cbSendLength, \
++ pioRecvPci, pbRecvBuffer, pcbRecvLength) \
++ (SCardTransmit(hCard, pioSendPci, pbSendBuffer, cbSendLength, \
++ pioRecvPci, pbRecvBuffer, pcbRecvLength))
++
++#define CALL_SCardListReaders(hContext, mszGroups, mszReaders, pcchReaders) \
++ (SCardListReaders(hContext, mszGroups, mszReaders, pcchReaders))
++
++#define CALL_SCardBeginTransaction(hCard) \
++ (SCardBeginTransaction(hCard))
++
++#define CALL_SCardEndTransaction(hCard, dwDisposition) \
++ (SCardEndTransaction(hCard, dwDisposition))
++
++#define CALL_SCardControl(hCard, dwControlCode, pbSendBuffer, cbSendLength, \
++ pbRecvBuffer, pcbRecvLength, lpBytesReturned) \
++ (SCardControl(hCard, dwControlCode, pbSendBuffer, cbSendLength, \
++ pbRecvBuffer, pcbRecvLength, lpBytesReturned))
++
++#endif
diff --git a/debian/patches/workaround_expand_exec_shield_cs_limit.diff b/debian/patches/workaround_expand_exec_shield_cs_limit.diff
new file mode 100644
index 0000000..5d5c665
--- /dev/null
+++ b/debian/patches/workaround_expand_exec_shield_cs_limit.diff
@@ -0,0 +1,22 @@
+--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
++++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+@@ -890,7 +890,7 @@ void os::verify_stack_alignment() {
+ * updates (JDK-8023956).
+ */
+ void os::workaround_expand_exec_shield_cs_limit() {
+-#if defined(IA32)
++#if defined(IA32) && !defined(ZERO)
+ size_t page_size = os::vm_page_size();
+ /*
+ * Take the highest VA the OS will give us and exec
+--- a/hotspot/src/os/linux/vm/os_linux.cpp
++++ b/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -4933,7 +4933,7 @@ ZERO_ONLY (
+
+ Linux::capture_initial_stack(JavaThread::stack_size_at_create());
+
+-#if defined(IA32)
++#if defined(IA32) && !defined(ZERO)
+ workaround_expand_exec_shield_cs_limit();
+ #endif
+
diff --git a/debian/patches/zero-architectures.diff b/debian/patches/zero-architectures.diff
new file mode 100644
index 0000000..4e6da6c
--- /dev/null
+++ b/debian/patches/zero-architectures.diff
@@ -0,0 +1,102 @@
+# DP: Add support for zero architectures alpha, m68k, mips*, sh4
+
+--- a/common/autoconf/platform.m4
++++ b/common/autoconf/platform.m4
+@@ -42,6 +42,12 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
+ ;;
++ alpha*)
++ VAR_CPU=alpha
++ VAR_CPU_ARCH=alpha
++ VAR_CPU_BITS=64
++ VAR_CPU_ENDIAN=little
++ ;;
+ arm*)
+ VAR_CPU=arm
+ VAR_CPU_ARCH=arm
+@@ -60,6 +66,48 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+ ;;
++ m68k)
++ VAR_CPU=m68k
++ VAR_CPU_ARCH=m68k
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=big
++ ;;
++ mips)
++ VAR_CPU=mips
++ VAR_CPU_ARCH=mips
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=big
++ ;;
++ mipsel)
++ VAR_CPU=mipsel
++ VAR_CPU_ARCH=mipsel
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=little
++ ;;
++ mipsn32)
++ VAR_CPU=mipsn32
++ VAR_CPU_ARCH=mipsn32
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=big
++ ;;
++ mipsn32el)
++ VAR_CPU=mipsn32el
++ VAR_CPU_ARCH=mipsn32el
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=little
++ ;;
++ mips64)
++ VAR_CPU=mips64
++ VAR_CPU_ARCH=mips64
++ VAR_CPU_BITS=64
++ VAR_CPU_ENDIAN=big
++ ;;
++ mips64el)
++ VAR_CPU=mips64el
++ VAR_CPU_ARCH=mips64el
++ VAR_CPU_BITS=64
++ VAR_CPU_ENDIAN=little
++ ;;
+ powerpc)
+ VAR_CPU=ppc
+ VAR_CPU_ARCH=ppc
+@@ -78,6 +126,12 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
+ VAR_CPU_BITS=64
+ VAR_CPU_ENDIAN=little
+ ;;
++ sh*)
++ VAR_CPU=sh
++ VAR_CPU_ARCH=sh
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=little
++ ;;
+ s390)
+ VAR_CPU=s390
+ VAR_CPU_ARCH=s390
+@@ -377,6 +431,11 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
+
+ # ZERO_ARCHDEF is used to enable architecture-specific code
+ case "${OPENJDK_TARGET_CPU}" in
++ alpha*) ZERO_ARCHDEF=ALPHA ;;
++ m68k) ZERO_ARCHDEF=M68K ;;
++ mips|mipsn32|mips64) ZERO_ARCHDEF=MIPS ;;
++ mipsel|mipsn32el|mips64el) ZERO_ARCHDEF=MIPSEL ;;
++ sh*) ZERO_ARCHDEF=ZERO_SH ;;
+ ppc) ZERO_ARCHDEF=PPC32 ;;
+ ppc64) ZERO_ARCHDEF=PPC64 ;;
+ s390*) ZERO_ARCHDEF=S390 ;;
+--- a/common/autoconf/toolchain.m4
++++ b/common/autoconf/toolchain.m4
+@@ -1354,6 +1354,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
+ *)
+ ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
+ esac
++ # use the default for the package builds
++ ZERO_ARCHFLAG=""
+ TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$ZERO_ARCHFLAG], [], [ZERO_ARCHFLAG=""])
+ AC_SUBST(ZERO_ARCHFLAG)
+
diff --git a/debian/patches/zero-fpu-control-is-noop.diff b/debian/patches/zero-fpu-control-is-noop.diff
new file mode 100644
index 0000000..c65eb57
--- /dev/null
+++ b/debian/patches/zero-fpu-control-is-noop.diff
@@ -0,0 +1,27 @@
+Description: ZeroVM fix under IA32. Actual code in
+ openjdk/hotspot/src/os/linux/vm/os_linux.cpp#safe_cond_timedwait
+ call get_fpu_control_word and set_fpu_control_word under
+ any IA32 arch.
+ In os_linux_zero.cpp, this methods throw errors with ShouldNotCallThis.
+ Just replace it with just NO-OP.
+ TODO: Maybe just add ifndef ZERO in os_linux.cpp
+Author: Damien Raude-Morvan <drazzib@debian.org>
+Last-Update: 2011-08-02
+Forwarded: http://mail.openjdk.java.net/pipermail/zero-dev/2011-August/000398.html
+--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
++++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+@@ -259,11 +259,12 @@ void os::Linux::init_thread_fpu_state(vo
+ }
+
+ int os::Linux::get_fpu_control_word() {
+- ShouldNotCallThis();
++ // Nothing to do
++ return 0;
+ }
+
+ void os::Linux::set_fpu_control_word(int fpu) {
+- ShouldNotCallThis();
++ // Nothing to do
+ }
+
+ bool os::is_allocatable(size_t bytes) {
diff --git a/debian/patches/zero-missing-headers.diff b/debian/patches/zero-missing-headers.diff
new file mode 100644
index 0000000..49aada7
--- /dev/null
+++ b/debian/patches/zero-missing-headers.diff
@@ -0,0 +1,25 @@
+Description: at least in 7b143, building without the precompiled headers doesn't work.
+ patch attached.
+Forwarded: http://mail.openjdk.java.net/pipermail/zero-dev/2011-July/000385.html
+
+--- a/hotspot/src/cpu/zero/vm/entry_zero.hpp
++++ b/hotspot/src/cpu/zero/vm/entry_zero.hpp
+@@ -26,6 +26,8 @@
+ #ifndef CPU_ZERO_VM_ENTRY_ZERO_HPP
+ #define CPU_ZERO_VM_ENTRY_ZERO_HPP
+
++#include "interpreter/cppInterpreter.hpp"
++
+ class ZeroEntry {
+ public:
+ ZeroEntry() {
+--- a/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp
++++ b/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp
+@@ -25,6 +25,7 @@
+
+ #include "precompiled.hpp"
+ #include "assembler_zero.inline.hpp"
++#include "entry_zero.hpp"
+ #include "memory/resourceArea.hpp"
+ #include "nativeInst_zero.hpp"
+ #include "oops/oop.inline.hpp"
diff --git a/debian/patches/zero-opt.diff b/debian/patches/zero-opt.diff
new file mode 100644
index 0000000..7d3d763
--- /dev/null
+++ b/debian/patches/zero-opt.diff
@@ -0,0 +1,16 @@
+# DP: Build zero with -O2 -finline-functions instead of -O3 (still needed?)
+--- openjdk/hotspot/make/linux/makefiles/gcc.make~ 2013-04-15 13:44:59.703968963 +0200
++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2013-04-15 16:22:04.124240511 +0200
+@@ -170,7 +170,11 @@
+ CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
+
+ # The flags to use for an Optimized g++ build
+-OPT_CFLAGS += -O3
++ifeq ($(ZERO_BUILD), true)
++ OPT_CFLAGS += -O2 -finline-functions
++else
++ OPT_CFLAGS += -O3
++endif
+
+ # Hotspot uses very unstrict aliasing turn this optimization off
+ OPT_CFLAGS += -fno-strict-aliasing
diff --git a/debian/patches/zero-sh.diff b/debian/patches/zero-sh.diff
new file mode 100644
index 0000000..73c4b2f
--- /dev/null
+++ b/debian/patches/zero-sh.diff
@@ -0,0 +1,29 @@
+# DP: Add support for sh
+
+Index: b/hotspot/src/os/linux/vm/os_linux.cpp
+===================================================================
+--- a/hotspot/src/os/linux/vm/os_linux.cpp
++++ b/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -1897,7 +1897,8 @@ void * os::dll_load(const char *filename
+ {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*)"Hitachi SH"}
+ };
+
+ #if (defined IA32)
+@@ -1928,9 +1929,11 @@ void * os::dll_load(const char *filename
+ static Elf32_Half running_arch_code=EM_MIPS;
+ #elif (defined M68K)
+ static Elf32_Half running_arch_code=EM_68K;
++ #elif (defined ZERO_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
diff --git a/debian/patches/zero-sparc.diff b/debian/patches/zero-sparc.diff
new file mode 100644
index 0000000..96f4080
--- /dev/null
+++ b/debian/patches/zero-sparc.diff
@@ -0,0 +1,287 @@
+--- openjdk/hotspot/src/cpu/sparc/vm/bytecodes_sparc.hpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/cpu/sparc/vm/bytecodes_sparc.hpp 2014-01-15 10:55:36.991083672 +0000
+@@ -25,7 +25,7 @@
+ #ifndef CPU_SPARC_VM_BYTECODES_SPARC_HPP
+ #define CPU_SPARC_VM_BYTECODES_SPARC_HPP
+
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ #define NLOCALS_IN_REGS 6
+ #endif
+
+--- openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp.old 2014-01-15 09:57:03.613191054 +0000
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp 2014-01-15 10:55:36.995083702 +0000
+@@ -82,7 +82,7 @@
+ // Must never look like an address returned by reserve_memory,
+ // even in its subfields (as defined by the CPU immediate fields,
+ // if the CPU splits constants across multiple instructions).
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ // On SPARC, 0 != %hi(any real address), because there is no
+ // allocation in the first 1Kb of the virtual address space.
+ return (char *) 0;
+--- openjdk/hotspot/src/share/vm/opto/output.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/opto/output.cpp 2014-01-15 10:55:37.015083849 +0000
+@@ -682,7 +682,7 @@
+ array->append(new_loc_value( _regalloc, regnum, Location::lng ));
+ }
+ #else //_LP64
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ if (t->base() == Type::Long && OptoReg::is_reg(regnum)) {
+ // For SPARC we have to swap high and low words for
+ // long values stored in a single-register (g0-g7).
+--- openjdk/hotspot/src/share/vm/opto/chaitin.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/opto/chaitin.cpp 2014-01-15 10:55:37.023083908 +0000
+@@ -723,7 +723,7 @@
+ case Op_RegFlags:
+ case 0: // not an ideal register
+ lrg.set_num_regs(1);
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ lrg.set_reg_pressure(2);
+ #else
+ lrg.set_reg_pressure(1);
+@@ -1328,7 +1328,7 @@
+
+ // Check if a color is available and if so pick the color
+ OptoReg::Name reg = choose_color( *lrg, chunk );
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ debug_only(lrg->compute_set_mask_size());
+ assert(lrg->num_regs() < 2 || lrg->is_bound() || is_even(reg-1), "allocate all doubles aligned");
+ #endif
+--- openjdk/hotspot/src/share/vm/opto/chaitin.hpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/opto/chaitin.hpp 2014-01-15 10:55:37.015083849 +0000
+@@ -293,7 +293,7 @@
+ // TEMPORARILY REPLACED WITH COMMAND LINE FLAG
+
+ //// !!!!! Magic Constants need to move into ad file
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ //#define FLOAT_PRESSURE 30 /* SFLT_REG_mask.Size() - 1 */
+ //#define INT_PRESSURE 23 /* NOTEMP_I_REG_mask.Size() - 1 */
+ #define FLOAT_INCREMENT(regs) regs
+--- openjdk/hotspot/src/share/vm/runtime/safepoint.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/safepoint.cpp 2014-01-15 10:55:37.027083937 +0000
+@@ -765,7 +765,7 @@
+ newptr, is_oop?"oop":" ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":" "));
+ }
+
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ static void print_me(intptr_t *new_sp, intptr_t *old_sp, bool *was_oops) {
+ #ifdef _LP64
+ tty->print_cr("--------+------address-----+------before-----------+-------after----------+");
+--- openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp 2014-01-15 10:55:37.031083968 +0000
+@@ -815,7 +815,7 @@
+ #ifdef _LP64
+ jlong res = (jlong)low->get_int();
+ #else
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ // For SPARC we have to swap high and low words.
+ jlong res = jlong_from((jint)low->get_int(), (jint)value->get_int());
+ #else
+@@ -866,7 +866,7 @@
+ #ifdef _LP64
+ jlong res = (jlong)low->get_int();
+ #else
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ // For SPARC we have to swap high and low words.
+ jlong res = jlong_from((jint)low->get_int(), (jint)value->get_int());
+ #else
+--- openjdk/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp 2014-01-15 10:55:37.035083997 +0000
+@@ -62,7 +62,7 @@
+ }
+ #endif
+
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ if (FLAG_IS_DEFAULT(InlineSmallCode)) {
+ FLAG_SET_DEFAULT(InlineSmallCode, 2500);
+ }
+--- openjdk/hotspot/src/share/vm/runtime/stackValue.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/stackValue.cpp 2014-01-15 10:55:37.023083908 +0000
+@@ -34,7 +34,7 @@
+ // Stack or register value
+ Location loc = ((LocationValue *)sv)->location();
+
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ // %%%%% Callee-save floats will NOT be working on a Sparc until we
+ // handle the case of a 2 floats in a single double register.
+ assert( !(loc.is_register() && loc.type() == Location::float_in_dbl), "Sparc does not handle callee-save floats yet" );
+--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp 2014-01-15 10:55:37.043084056 +0000
+@@ -1993,7 +1993,7 @@
+
+ status = status && verify_object_alignment();
+
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ if (UseConcMarkSweepGC || UseG1GC) {
+ // Issue a stern warning if the user has explicitly set
+ // UseMemSetInBOT (it is known to cause issues), but allow
+--- openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/c1/c1_Runtime1.cpp 2014-01-15 10:55:37.063084203 +0000
+@@ -1074,7 +1074,7 @@
+ RelocIterator iter(nm, (address)instr_pc, (address)(instr_pc + 1));
+ relocInfo::change_reloc_info_for_address(&iter, (address) instr_pc,
+ relocInfo::none, relocInfo::oop_type);
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ // Sparc takes two relocations for an oop so update the second one.
+ address instr_pc2 = instr_pc + NativeMovConstReg::add_offset;
+ RelocIterator iter2(nm, instr_pc2, instr_pc2 + 1);
+--- openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp 2014-01-15 10:55:37.047084085 +0000
+@@ -577,7 +577,7 @@
+ monitor_address(op->in_opr()->as_constant_ptr()->as_jint(), op->result_opr());
+ break;
+
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ case lir_pack64:
+ pack64(op->in_opr(), op->result_opr());
+ break;
+@@ -852,7 +852,7 @@
+ if (!r->is_stack()) {
+ stringStream st;
+ st.print("bad oop %s at %d", r->as_Register()->name(), _masm->offset());
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ _masm->_verify_oop(r->as_Register(), strdup(st.as_string()), __FILE__, __LINE__);
+ #else
+ _masm->verify_oop(r->as_Register());
+--- openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/c1/c1_LinearScan.cpp 2014-01-15 10:55:37.079084322 +0000
+@@ -2128,7 +2128,7 @@
+ }
+ #endif
+
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ assert(assigned_reg >= pd_first_fpu_reg && assigned_reg <= pd_last_fpu_reg, "no fpu register");
+ assert(interval->assigned_regHi() >= pd_first_fpu_reg && interval->assigned_regHi() <= pd_last_fpu_reg, "no fpu register");
+ assert(assigned_reg % 2 == 0 && assigned_reg + 1 == interval->assigned_regHi(), "must be sequential and even");
+@@ -2726,7 +2726,7 @@
+
+ assert(opr->fpu_regnrLo() == opr->fpu_regnrHi(), "assumed in calculation (only fpu_regnrLo is used)");
+ #endif
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ assert(opr->fpu_regnrLo() == opr->fpu_regnrHi() + 1, "assumed in calculation (only fpu_regnrHi is used)");
+ #endif
+ #ifdef ARM
+--- openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/c1/c1_LIR.hpp 2014-01-15 10:55:37.059084174 +0000
+@@ -595,7 +595,7 @@
+ static LIR_Opr single_softfp(int reg) { return (LIR_Opr)((reg << LIR_OprDesc::reg1_shift) | LIR_OprDesc::float_type | LIR_OprDesc::cpu_register | LIR_OprDesc::single_size); }
+ static LIR_Opr double_softfp(int reg1, int reg2) { return (LIR_Opr)((reg1 << LIR_OprDesc::reg1_shift) | (reg2 << LIR_OprDesc::reg2_shift) | LIR_OprDesc::double_type | LIR_OprDesc::cpu_register | LIR_OprDesc::double_size); }
+ #endif
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ static LIR_Opr double_fpu(int reg1, int reg2) { return (LIR_Opr)(intptr_t)((reg1 << LIR_OprDesc::reg1_shift) |
+ (reg2 << LIR_OprDesc::reg2_shift) |
+ LIR_OprDesc::double_type |
+--- openjdk/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp 2014-01-15 10:55:37.055084145 +0000
+@@ -1891,7 +1891,7 @@
+ Value recv = has_receiver ? apop() : NULL;
+ int vtable_index = methodOopDesc::invalid_vtable_index;
+
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ // Currently only supported on Sparc.
+ // The UseInlineCaches only controls dispatch to invokevirtuals for
+ // loaded classes which we weren't able to statically bind.
+--- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2014-01-15 10:55:37.083084351 +0000
+@@ -3095,7 +3095,7 @@
+ tty->print_cr("stack_base: " INTPTR_FORMAT, (uintptr_t) this->_stack_base);
+ tty->print_cr("stack_limit: " INTPTR_FORMAT, (uintptr_t) this->_stack_limit);
+ tty->print_cr("monitor_base: " INTPTR_FORMAT, (uintptr_t) this->_monitor_base);
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ tty->print_cr("last_Java_pc: " INTPTR_FORMAT, (uintptr_t) this->_last_Java_pc);
+ tty->print_cr("frame_bottom: " INTPTR_FORMAT, (uintptr_t) this->_frame_bottom);
+ tty->print_cr("&native_fresult: " INTPTR_FORMAT, (uintptr_t) &this->_native_fresult);
+--- openjdk/hotspot/src/share/vm/utilities/macros.hpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/utilities/macros.hpp 2014-01-15 10:55:37.087084380 +0000
+@@ -207,7 +207,7 @@
+ #define NOT_AMD64(code) code
+ #endif
+
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ #define SPARC_ONLY(code) code
+ #define NOT_SPARC(code)
+ #else
+--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2014-01-15 10:55:37.087084380 +0000
+@@ -243,7 +243,7 @@
+
+ // checking for nanness
+ #ifdef SOLARIS
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ inline int g_isnan(float f) { return isnanf(f); }
+ #else
+ // isnanf() broken on Intel Solaris use isnand()
+--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp 2014-01-15 10:55:37.087084380 +0000
+@@ -249,7 +249,7 @@
+
+ // checking for nanness
+ #ifdef SOLARIS
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ inline int g_isnan(float f) { return isnanf(f); }
+ #else
+ // isnanf() broken on Intel Solaris use isnand()
+--- openjdk/hotspot/src/share/vm/adlc/output_h.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/adlc/output_h.cpp 2014-01-15 10:55:37.095084439 +0000
+@@ -718,7 +718,7 @@
+ fprintf(fp_hpp, "class Pipeline_Use_Cycle_Mask {\n");
+
+ if (_pipeline->_maxcycleused <=
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ 64
+ #else
+ 32
+--- openjdk/hotspot/src/share/vm/adlc/formssel.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/adlc/formssel.cpp 2014-01-15 10:55:37.103084499 +0000
+@@ -1020,7 +1020,7 @@
+ const char *opType = NULL;
+ while (_matrule->base_operand(position, globals, result, name, opType)) {
+ if ( strcmp(opType,"ConP") == 0 ) {
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ reloc_entries += 2; // 1 for sethi + 1 for setlo
+ #else
+ ++reloc_entries;
+@@ -1058,7 +1058,7 @@
+ // Check for any component being an immediate float or double.
+ Form::DataType data_type = is_chain_of_constant(globals);
+ if( data_type==idealD || data_type==idealF ) {
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ // sparc required more relocation entries for floating constants
+ // (expires 9/98)
+ reloc_entries += 6;
+--- openjdk/hotspot/src/share/vm/adlc/output_c.cpp.old 2014-01-14 21:26:34.000000000 +0000
++++ openjdk/hotspot/src/share/vm/adlc/output_c.cpp 2014-01-15 10:55:37.111084557 +0000
+@@ -779,7 +779,7 @@
+ /* Do Nothing */;
+
+ else if (_pipeline->_maxcycleused <=
+-#ifdef SPARC
++#if defined(SPARC) && !defined(ZERO)
+ 64
+ #else
+ 32
diff --git a/debian/patches/zero-x32.diff b/debian/patches/zero-x32.diff
new file mode 100644
index 0000000..4f46f1f
--- /dev/null
+++ b/debian/patches/zero-x32.diff
@@ -0,0 +1,86 @@
+# DP: Add support for x32
+
+--- a/hotspot/src/os/linux/vm/os_linux.cpp
++++ b/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -1911,7 +1911,7 @@ void * os::dll_load(const char *filename
+
+ #if (defined IA32)
+ static Elf32_Half running_arch_code=EM_386;
+- #elif (defined AMD64)
++ #elif (defined AMD64) || (defined X32)
+ static Elf32_Half running_arch_code=EM_X86_64;
+ #elif (defined IA64)
+ static Elf32_Half running_arch_code=EM_IA_64;
+--- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+@@ -41,7 +41,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #include <sys/utsname.h>
+ #include <netinet/ip.h>
+
+--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+@@ -43,7 +43,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #endif
+
+ #include "jvm.h"
+--- a/common/autoconf/platform.m4
++++ b/common/autoconf/platform.m4
+@@ -31,10 +31,17 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
+ # First argument is the cpu name from the trip/quad
+ case "$1" in
+ x86_64)
+- VAR_CPU=x86_64
+- VAR_CPU_ARCH=x86
+- VAR_CPU_BITS=64
+- VAR_CPU_ENDIAN=little
++ if test "`dpkg-architecture -qDEB_HOST_ARCH`" = x32 ; then
++ VAR_CPU=x32
++ VAR_CPU_ARCH=x86
++ VAR_CPU_BITS=32
++ VAR_CPU_ENDIAN=little
++ else
++ VAR_CPU=x86_64
++ VAR_CPU_ARCH=x86
++ VAR_CPU_BITS=64
++ VAR_CPU_ENDIAN=little
++ fi
+ ;;
+ i?86)
+ VAR_CPU=x86
+@@ -446,7 +453,13 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
+ ppc64) ZERO_ARCHDEF=PPC64 ;;
+ s390*) ZERO_ARCHDEF=S390 ;;
+ sparc*) ZERO_ARCHDEF=SPARC ;;
+- x86_64*) ZERO_ARCHDEF=AMD64 ;;
++ x86_64*)
++ if test "`dpkg-architecture -qDEB_HOST_ARCH`" = x32 ; then
++ ZERO_ARCHDEF=X32
++ else
++ ZERO_ARCHDEF=AMD64
++ fi
++ ;;
+ x86) ZERO_ARCHDEF=IA32 ;;
+ *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
+ esac
+--- a/jdk/make/gensrc/GensrcX11Wrappers.gmk
++++ b/jdk/make/gensrc/GensrcX11Wrappers.gmk
+@@ -91,9 +91,11 @@ ifneq ($(COMPILE_TYPE), cross)
+ $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
+
+ # use -m32/-m64 only if the compiler supports it
++ ifneq ($(OPENJDK_TARGET_CPU),x32)
+ ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true)
+ MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
+ endif
++ endif
+
+ # Compile the C code into an executable.
+ $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c