[SCM] jigsaw packaging branch, master, updated. 69c2a67a8e7ed77dcc1968d842d691db59b9a7cd

Guillaume Mazoyer gmazoyer-guest at alioth.debian.org
Sat Aug 6 13:03:56 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "jigsaw packaging".

The branch, master has been updated
       via  69c2a67a8e7ed77dcc1968d842d691db59b9a7cd (commit)
      from  7f08618518ff1864593ecce82a8f5e518530fa9f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 69c2a67a8e7ed77dcc1968d842d691db59b9a7cd
Author: Guillaume Mazoyer <respawneral at gmail.com>
Date:   Sat Aug 6 14:54:36 2011 +0200

    Update debian directory to match the latest used for openjdk 7 packages.

-----------------------------------------------------------------------

Summary of changes:
 debian/JB-jdk.overrides.in                   |    2 +-
 debian/README.Debian                         |    4 +-
 debian/changelog                             |   35 ++
 debian/control                               |    6 +-
 debian/control.in                            |    2 +-
 debian/generate-debian-orig.sh               |    4 +-
 debian/icedtea-7-jre-jamvm.overrides         |    2 +
 debian/patches/jexec.diff                    |    2 +-
 debian/patches/kfreebsd-support-corba.diff   |    4 +-
 debian/patches/kfreebsd-support-hotspot.diff |  523 +++++++++++++++++++---
 debian/patches/kfreebsd-support-jamvm.diff   |    6 +-
 debian/patches/kfreebsd-support-jdk.diff     |  608 +++++++++++++++++---------
 debian/patches/kfreebsd-sync-issues.diff     |  102 +++++
 debian/patches/zero-fpu-control-is-noop.diff |   29 ++
 debian/rules                                 |  113 +++--
 15 files changed, 1118 insertions(+), 324 deletions(-)

diff --git a/debian/JB-jdk.overrides.in b/debian/JB-jdk.overrides.in
index c09b830..dcd4fe2 100644
--- a/debian/JB-jdk.overrides.in
+++ b/debian/JB-jdk.overrides.in
@@ -4,4 +4,4 @@
 @basename at -jdk binary: binary-or-shlib-defines-rpath
 
 # this is in @basename at -jre
- at basename@-jdk binary: menu-icon-missing /usr/share/pixmaps/@basename at .xpm
+ at basename@-jdk binary: menu-icon-missing usr/share/pixmaps/@basename at .xpm
diff --git a/debian/README.Debian b/debian/README.Debian
index d00f06e..579fef0 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -26,7 +26,7 @@ On some architectures (currently armel and powerpc, when built against
 llvm-2.6) which use ther zero vm as the default, the openjdk-7-jre-zero
 package contains the shark vm.
 
-To change the default permanently, edit /etc/java-6-openjdk/jvm.cfg.
+To change the default permanently, edit /etc/java-7-openjdk/jvm.cfg.
 
 The CACAO VM can be found in the icedtea-7-jre-cacao package, the Zero/Shark
 VM can be found in the openjdk-7-jre-zero package (on the architectures
@@ -36,7 +36,7 @@ Please look for further documentation in the directory
 /usr/share/doc/openjdk-7-jre/ .
 
 The package openjdk-7-jre-headless ships a cgi script
-/usr/lib/jvm/java-6-openjdk/bin/java-rmi.cgi that you must integrate
+/usr/lib/jvm/java-7-openjdk/bin/java-rmi.cgi that you must integrate
 into your webserver setup manually if you need it. It is not activated
 automatically.
 
diff --git a/debian/changelog b/debian/changelog
index 7b0cf20..98ef08f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,38 @@
+openjdk-7 (7~b147-2.0~pre2-1) experimental; urgency=low
+
+  * Update to icedtea7-forest snapshot (20110804):
+    - d/patches/pr753.diff: drop, merged in icedtea7-forest.
+    - d/patches/pr757.diff: drop, merged in icedtea7-forest.
+    - d/patches/zero-jsr292-fixes.diff: drop, merged in icedtea7-forest.
+    - d/patches/no-compiler-path.diff: drop, now handled correctly icedtea7's
+      configure and openjdk's Makefile (by CC and CXX environment variables).
+    - Updated JamVM to the 2011-08-01 revision.
+
+  [ Damien Raude-Morvan ]
+  * d/patches/zero-fpu-control-is-noop.diff: Remove ShouldNotCallThis from
+    os_linux_zero.cpp (fix crash under i386).
+  * d/rules: Enable support for GNU/kFreeBSD arch:
+    - d/patches/kfreebsd-support-*: Update with latest fixes.
+    - d/patches/kfreebsd-sync-issues.diff: hack to force some wait
+      until we fix sync issues.
+    - d/rules: Enable shark for GNU/kFreeBSD.
+  * d/rules: Use DEB_HOST_ARCH_CPU for jvmarch/archdir. Thanks to
+    Jérémie Koenig <jk at jk.fr.eu.org> for patch.
+  * d/patches/jexec.diff: Update for openjdk-7.
+  * d/JB-jdk.overrides.in: Fix override for new Lintian 2.5.0 path handling.
+  * d/icedtea-7-jre-jamvm.overrides: As for others libjvm.so, we use
+    --strip-debug instead of --strip-unneeded.
+  * d/source.lintian-overrides: Drop, not used anymore in openjdk-7.
+
+  [ Matthias Klose ]
+  * Merge debian packaging r472:482 from openjdk-6:
+    - openjdk-6-jre-headless: Depend on icedtea-6-jre-jamvm, if it's
+      the default VM.
+    - Use gcj-4.4 as the stage1 java VM on mips and mipsel.
+    - Make JamVM the default VM on Ubuntu oneiric/ARM.
+
+ -- Matthias Klose <doko at ubuntu.com>  Thu, 04 Aug 2011 11:38:01 +0200
+
 openjdk-7 (7~b147-2.0~pre1-1) experimental; urgency=low
 
   * New b147 code drop (OpenJDK7 RC1).
diff --git a/debian/control b/debian/control
index 961b555..fd9a30f 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: java
 Priority: optional
 Maintainer: OpenJDK Team <openjdk at lists.launchpad.net>
 Uploaders: Torsten Werner <twerner at debian.org>, Matthias Klose <doko at ubuntu.com>, Damien Raude-Morvan <drazzib at debian.org>
-Build-Depends: debhelper (>= 5), m4, lsb-release, wget, zip, unzip, sharutils, gawk, cpio, pkg-config, procps, time, fastjar (>= 2:0.96-0ubuntu2),  autoconf, automake, autotools-dev, ant, ant-optional,  libtool, g++-4.6,  ecj-gcj [amd64 hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 kfreebsd-i386 kfreebsd-amd64], gcj-jdk [amd64 hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 kfreebsd-i386 kfreebsd-amd64], openjdk-6-jdk (>= 6b18) [alpha armel], libxtst-dev, libxi-dev, libxt-dev, libxp-dev, libxaw7-dev, libxrender-dev, libcups2-dev, libasound2-dev, liblcms2-dev, libfreetype6-dev (>= 2.2.1), libgtk2.0-dev, libxinerama-dev, xsltproc, rhino (>= 1.7R3~), libffi-dev, llvm-2.9-dev [amd64 i386 lpia], libpng12-dev, zlib1g-dev, libjpeg8-dev, libgif-dev, libpulse-dev (>= 0.9.12), libnss3-dev (>= 3.12.3),  mauve, xvfb, xauth, xfonts-base, libgl1-mesa-dri, metacity | twm, dbus-x11 | twm, x11-xkb-utils,
+Build-Depends: debhelper (>= 5), m4, lsb-release, wget, zip, unzip, sharutils, gawk, cpio, pkg-config, procps, time, fastjar (>= 2:0.96-0ubuntu2),  autoconf, automake, autotools-dev, ant, ant-optional,  libtool, g++-4.6,  ecj-gcj [amd64 hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 kfreebsd-i386 kfreebsd-amd64], gcj-jdk [amd64 hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 kfreebsd-i386 kfreebsd-amd64], gcj-4.4-jdk [mips mipsel], openjdk-6-jdk (>= 6b18) [alpha armel], libxtst-dev, libxi-dev, libxt-dev, libxp-dev, libxaw7-dev, libxrender-dev, libcups2-dev, libasound2-dev, liblcms2-dev, libfreetype6-dev (>= 2.2.1), libgtk2.0-dev, libxinerama-dev, xsltproc, rhino (>= 1.7R3~), libffi-dev, llvm-2.9-dev [amd64 i386 lpia kfreebsd-amd64 kfreebsd-i386 powerpc ppc64], libpng12-dev, zlib1g-dev, libjpeg8-dev, libgif-dev, libpulse-dev (>= 0.9.12), libnss3-dev (>= 3.12.3),  mauve, xvfb, xauth, xfonts-base, libgl1-mesa-dri, metacity | twm, dbus-x11 | twm, x11-xkb-utils,
 Standards-Version: 3.9.2
 Homepage: http://openjdk.java.net/
 Vcs-Bzr: http://bazaar.launchpad.net/~openjdk/openjdk/openjdk7
@@ -26,7 +26,7 @@ Description: OpenJDK Development Kit (JDK)
 Package: openjdk-7-jre-headless
 Architecture: any
 Pre-Depends: ${dpkg:Depends}
-Depends: openjdk-7-jre-lib (>= ${source:Version}), ${cacert:Depends}, ${tzdata:Depends}, ${jcommon:Depends}, ${dlopenhl:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Depends: openjdk-7-jre-lib (>= ${source:Version}), ${jredefault:Depends}, ${cacert:Depends}, ${tzdata:Depends}, ${jcommon:Depends}, ${dlopenhl:Depends}, ${shlibs:Depends}, ${misc:Depends}
 Recommends: ${dlopenjl:Recommends}, ${cacao:Recommends}, ${jamvm:Recommends}
 Suggests: libnss-mdns, sun-java6-fonts, ttf-dejavu-extra, ttf-baekmuk | ttf-unfonts | ttf-unfonts-core, ttf-sazanami-gothic | ttf-kochi-gothic, ttf-sazanami-mincho | ttf-kochi-mincho, ttf-wqy-microhei | ttf-wqy-zenhei, ttf-indic-fonts,
 Provides: java-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, ${defaultvm:Provides}, ${jvm:Provides}
@@ -135,7 +135,7 @@ Description: Alternative JVM for OpenJDK, using JamVM
  The VM is started with the option `-jamvm'. See the README.Debian for details.
 
 Package: openjdk-7-jre-zero
-Architecture: amd64 i386 lpia 
+Architecture: amd64 i386 lpia kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
 Priority: extra
 Pre-Depends: ${dpkg:Depends}
 Depends: openjdk-7-jre-headless (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
diff --git a/debian/control.in b/debian/control.in
index 1538431..4808634 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -26,7 +26,7 @@ Description: OpenJDK Development Kit (JDK)
 Package: @basename at -jre-headless
 Architecture: any
 Pre-Depends: ${dpkg:Depends}
-Depends: @basename at -jre-lib (>= @pkg_sversion@), ${cacert:Depends}, ${tzdata:Depends}, ${jcommon:Depends}, ${dlopenhl:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Depends: @basename at -jre-lib (>= @pkg_sversion@), ${jredefault:Depends}, ${cacert:Depends}, ${tzdata:Depends}, ${jcommon:Depends}, ${dlopenhl:Depends}, ${shlibs:Depends}, ${misc:Depends}
 Recommends: ${dlopenjl:Recommends}, ${cacao:Recommends}, ${jamvm:Recommends}
 Suggests: libnss-mdns, sun-java6-fonts, @core_fonts@, @cjk_fonts@
 Provides: java-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, ${defaultvm:Provides}, ${jvm:Provides}
diff --git a/debian/generate-debian-orig.sh b/debian/generate-debian-orig.sh
index 1695394..42215a8 100644
--- a/debian/generate-debian-orig.sh
+++ b/debian/generate-debian-orig.sh
@@ -2,9 +2,9 @@
 
 tarballs="corba.tar.gz hotspot.tar.gz jaxp.tar.gz jaxws.tar.gz jdk-dfsg.tar.gz langtools.tar.gz openjdk.tar.gz"
 #tarballs="corba.tar.gz hotspot.tar.gz jaxp.tar.gz jaxws.tar.gz jdk.tar.gz langtools.tar.gz openjdk.tar.gz"
-jamvmtb=jamvm-f8b8e8e78ec057a5852ff8c0f3386b48f3eca907.tar.gz
+jamvmtb=jamvm-3e473008c66db345d71e3503179d4b73f0ba66da.tar.gz
 tarballdir=b147
-version=7~b147-2.0~pre1
+version=7~b147-2.0~pre2
 base=openjdk-7
 pkgdir=$base-$version
 origtar=${base}_${version}.orig.tar.gz
diff --git a/debian/icedtea-7-jre-jamvm.overrides b/debian/icedtea-7-jre-jamvm.overrides
new file mode 100644
index 0000000..6c9cbcb
--- /dev/null
+++ b/debian/icedtea-7-jre-jamvm.overrides
@@ -0,0 +1,2 @@
+# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997.
+icedtea-7-jre-jamvm binary: unstripped-binary-or-object
diff --git a/debian/patches/jexec.diff b/debian/patches/jexec.diff
index 27a3a5a..53d5ee2 100644
--- a/debian/patches/jexec.diff
+++ b/debian/patches/jexec.diff
@@ -6,7 +6,7 @@ diff -ru openjdk-6-6b08.bak/jdk/src/solaris/bin/jexec.c openjdk-6-6b08.orig/jdk/
      /* 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("/usr/lib/jvm/java-6-openjdk/jre/lib/jexec", java, RELATIVE_DEPTH) != 0) {
++    if (getJavaPath("/usr/lib/jvm/java-7-openjdk/jre/lib/jexec", java, RELATIVE_DEPTH) != 0) {
          errorExit(errno, MISSING_JAVA_MSG);
      }
 +    argi++;
diff --git a/debian/patches/kfreebsd-support-corba.diff b/debian/patches/kfreebsd-support-corba.diff
index 623c8a9..da3e796 100644
--- a/debian/patches/kfreebsd-support-corba.diff
+++ b/debian/patches/kfreebsd-support-corba.diff
@@ -7,8 +7,8 @@ Last-Update: 2011-06-28
 Forwarded: no
 Index: openjdk/corba/make/common/shared/Platform.gmk
 ===================================================================
---- openjdk/corba/make/common/shared/Platform.gmk.orig	2011-07-16 01:48:27.000000000 +0200
-+++ openjdk/corba/make/common/shared/Platform.gmk	2011-07-16 01:49:37.000000000 +0200
+--- openjdk/corba/make/common/shared/Platform.gmk.orig
++++ openjdk/corba/make/common/shared/Platform.gmk
 @@ -147,7 +147,7 @@
  endif
  
diff --git a/debian/patches/kfreebsd-support-hotspot.diff b/debian/patches/kfreebsd-support-hotspot.diff
index 2ff93fc..c5e16de 100644
--- a/debian/patches/kfreebsd-support-hotspot.diff
+++ b/debian/patches/kfreebsd-support-hotspot.diff
@@ -9,17 +9,311 @@ Description: Initial GNU/kFreeBSD support for openjdk-7 (Hotspot part)
    openjdk/hotspot/src/os/linux/vm/os_linux.cpp
  - Change access to CPU register
    openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+   openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+   openjdk/hotspot/agent/src/os/linux/libproc.h
+   openjdk/hotspot/agent/src/os/linux/ps_core.c
    (from bsd-port)
+ - Fix ptrace usage under freebsd kernel
+   openjdk/hotspot/agent/src/os/linux/ps_proc.c
  Should not be keep like this :
  - Undefined UINTPTR_MAX
    openjdk/hotspot/src/share/vm/memory/allocation.hpp
+   openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp
 Author: Damien Raude-Morvan <drazzib at debian.org>
 Last-Update: 2011-06-28
 Forwarded: no
+Index: openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+===================================================================
+--- openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c.orig
++++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+@@ -316,7 +316,7 @@
+ 
+ #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;
+@@ -332,7 +332,23 @@
+   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 */
+ 
+ #if ia64
+@@ -344,7 +360,7 @@
+ 
+ #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;
+@@ -370,7 +386,33 @@
+   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;
++//  regs[REG_INDEX(FSBASE)] = gregs.fs_base;
++//  regs[REG_INDEX(GSBASE)] = gregs.gs_base;
++//  regs[REG_INDEX(DS)] = gregs.ds;
++//  regs[REG_INDEX(ES)] = gregs.es;
++//  regs[REG_INDEX(FS)] = gregs.fs;
++//  regs[REG_INDEX(GS)] = gregs.gs;
++#endif
+ #endif /* amd64 */
+ 
+ #if defined(sparc) || defined(sparcv9)
+Index: openjdk/hotspot/agent/src/os/linux/libproc.h
+===================================================================
+--- openjdk/hotspot/agent/src/os/linux/libproc.h.orig
++++ openjdk/hotspot/agent/src/os/linux/libproc.h
+@@ -27,6 +27,9 @@
+ 
+ #include <unistd.h>
+ #include <stdint.h>
++#if defined(__FreeBSD_kernel__)
++#include <machine/reg.h>
++#endif
+ #include "proc_service.h"
+ 
+ #if defined(sparc) || defined(sparcv9)
+@@ -87,6 +90,10 @@
+ #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: openjdk/hotspot/agent/src/os/linux/ps_core.c
+===================================================================
+--- openjdk/hotspot/agent/src/os/linux/ps_core.c.orig
++++ openjdk/hotspot/agent/src/os/linux/ps_core.c
+@@ -539,11 +539,12 @@
+       return false;
+ 
+    // copy regs
+-   memcpy(&newthr->regs, prstat->pr_reg, sizeof(struct user_regs_struct));
++   memcpy(&newthr->regs, &prstat->pr_reg, sizeof(struct user_regs_struct));
+ 
+    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);
+@@ -554,9 +555,21 @@
+       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);
+@@ -585,6 +598,35 @@
+       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("\torig_rax = 0x%lx\n", newthr->regs.orig_rax);
++      print_debug("\trip = 0x%lx\n", newthr->regs.r_rip);
++      print_debug("\tcs = 0x%lx\n", newthr->regs.r_cs);
++      //print_debug("\teflags = 0x%lx\n", newthr->regs.eflags);
++      print_debug("\trsp = 0x%lx\n", newthr->regs.r_rsp);
++      print_debug("\tss = 0x%lx\n", newthr->regs.r_ss);
++      //print_debug("\tfs_base = 0x%lx\n", newthr->regs.fs_base);
++      //print_debug("\tgs_base = 0x%lx\n", newthr->regs.gs_base);
++      //print_debug("\tds = 0x%lx\n", newthr->regs.ds);
++      //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);
++#endif
+ #endif
+    }
+ 
+Index: openjdk/hotspot/agent/src/os/linux/ps_proc.c
+===================================================================
+--- openjdk/hotspot/agent/src/os/linux/ps_proc.c.orig
++++ openjdk/hotspot/agent/src/os/linux/ps_proc.c
+@@ -37,6 +37,18 @@
+ #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
++
+ // This file has the libproc implementation specific to live process
+ // For core files, refer to ps_core.c
+ 
+@@ -54,7 +66,7 @@
+ // before calling process_read_data.
+ 
+ static bool process_read_data(struct ps_prochandle* ph, uintptr_t addr, char *buf, size_t size) {
+-  long rslt;
++  int rslt;
+   size_t i, words;
+   uintptr_t end_addr = addr + size;
+   uintptr_t aligned_addr = align(addr, sizeof(long));
+@@ -62,36 +74,36 @@
+   if (aligned_addr != addr) {
+     char *ptr = (char *)&rslt;
+     errno = 0;
+-    rslt = ptrace(PTRACE_PEEKDATA, ph->pid, aligned_addr, 0);
++    rslt = ptrace(PTRACE_PEEKDATA, ph->pid, (caddr_t) aligned_addr, 0);
+     if (errno) {
+       print_debug("ptrace(PTRACE_PEEKDATA, ..) failed for %d bytes @ %lx\n", size, addr);
+       return false;
+     }
+     for (; aligned_addr != addr; aligned_addr++, ptr++);
+-    for (; ((intptr_t)aligned_addr % sizeof(long)) && aligned_addr < end_addr;
++    for (; ((intptr_t)aligned_addr % sizeof(int)) && aligned_addr < end_addr;
+         aligned_addr++)
+        *(buf++) = *(ptr++);
+   }
+ 
+-  words = (end_addr - aligned_addr) / sizeof(long);
++  words = (end_addr - aligned_addr) / sizeof(int);
+ 
+-  // assert((intptr_t)aligned_addr % sizeof(long) == 0);
++  // assert((intptr_t)aligned_addr % sizeof(int) == 0);
+   for (i = 0; i < words; i++) {
+     errno = 0;
+-    rslt = ptrace(PTRACE_PEEKDATA, ph->pid, aligned_addr, 0);
++    rslt = ptrace(PTRACE_PEEKDATA, ph->pid, (caddr_t) aligned_addr, 0);
+     if (errno) {
+       print_debug("ptrace(PTRACE_PEEKDATA, ..) failed for %d bytes @ %lx\n", size, addr);
+       return false;
+     }
+-    *(long *)buf = rslt;
+-    buf += sizeof(long);
+-    aligned_addr += sizeof(long);
++    *(int *)buf = rslt;
++    buf += sizeof(int);
++    aligned_addr += sizeof(int);
+   }
+ 
+   if (aligned_addr != end_addr) {
+     char *ptr = (char *)&rslt;
+     errno = 0;
+-    rslt = ptrace(PTRACE_PEEKDATA, ph->pid, aligned_addr, 0);
++    rslt = ptrace(PTRACE_PEEKDATA, ph->pid, (caddr_t) aligned_addr, 0);
+     if (errno) {
+       print_debug("ptrace(PTRACE_PEEKDATA, ..) failed for %d bytes @ %lx\n", size, addr);
+       return false;
+@@ -130,7 +142,7 @@
+ #endif
+ 
+ #ifdef PTRACE_GETREGS_REQ
+- if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, user, NULL) < 0) {
++ if (ptrace_getregs(PTRACE_GETREGS_REQ, pid, (caddr_t) user, 0) < 0) {
+    print_debug("ptrace(PTRACE_GETREGS, ...) failed for lwp %d\n", pid);
+    return false;
+  }
+@@ -144,7 +156,7 @@
+ 
+ // attach to a process/thread specified by "pid"
+ static bool ptrace_attach(pid_t pid) {
+-  if (ptrace(PTRACE_ATTACH, pid, NULL, NULL) < 0) {
++  if (ptrace(PTRACE_ATTACH, pid, NULL, 0) < 0) {
+     print_debug("ptrace(PTRACE_ATTACH, ..) failed for %d\n", pid);
+     return false;
+   } else {
+@@ -271,7 +283,7 @@
+ 
+ // detach a given pid
+ static bool ptrace_detach(pid_t pid) {
+-  if (pid && ptrace(PTRACE_DETACH, pid, NULL, NULL) < 0) {
++  if (pid && ptrace(PTRACE_DETACH, pid, NULL, 0) < 0) {
+     print_debug("ptrace(PTRACE_DETACH, ..) failed for %d\n", pid);
+     return false;
+   } else {
 Index: openjdk/hotspot/make/defs.make
 ===================================================================
---- openjdk/hotspot/make/defs.make.orig	2011-07-16 01:49:43.000000000 +0200
-+++ openjdk/hotspot/make/defs.make	2011-07-16 02:13:04.000000000 +0200
+--- openjdk/hotspot/make/defs.make.orig
++++ openjdk/hotspot/make/defs.make
 @@ -132,6 +132,10 @@
    OSNAME=linux
  endif
@@ -33,8 +327,8 @@ Index: openjdk/hotspot/make/defs.make
  
 Index: openjdk/hotspot/make/linux/Makefile
 ===================================================================
---- openjdk/hotspot/make/linux/Makefile.orig	2011-07-16 01:49:43.000000000 +0200
-+++ openjdk/hotspot/make/linux/Makefile	2011-07-16 02:13:04.000000000 +0200
+--- openjdk/hotspot/make/linux/Makefile.orig
++++ openjdk/hotspot/make/linux/Makefile
 @@ -233,6 +233,9 @@
  SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3%
  OS_VERSION := $(shell uname -r)
@@ -47,8 +341,8 @@ Index: openjdk/hotspot/make/linux/Makefile
  ifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
 Index: openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp
 ===================================================================
---- openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp.orig	2011-07-16 01:49:43.000000000 +0200
-+++ openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp	2011-07-16 02:13:04.000000000 +0200
+--- openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp.orig
++++ openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp
 @@ -39,6 +39,10 @@
  #define UNIX_PATH_MAX   sizeof(((struct sockaddr_un *)0)->sun_path)
  #endif
@@ -95,8 +389,8 @@ Index: openjdk/hotspot/src/os/linux/vm/attachListener_linux.cpp
      // peer credential look okay so we read the request
 Index: openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp
 ===================================================================
---- openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp.orig	2011-07-16 01:49:43.000000000 +0200
-+++ openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp	2011-07-16 02:13:04.000000000 +0200
+--- openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp.orig
++++ openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp
 @@ -169,7 +169,9 @@
    "WINCH",      SIGWINCH,       /* Window size change (4.3 BSD, Sun).  */
    "POLL",       SIGPOLL,        /* Pollable event occurred (System V).  */
@@ -109,8 +403,8 @@ Index: openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp
  #endif
 Index: openjdk/hotspot/src/os/linux/vm/os_linux.cpp
 ===================================================================
---- openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig	2011-07-16 01:49:43.000000000 +0200
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2011-07-16 02:13:04.000000000 +0200
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
 @@ -115,8 +115,13 @@
  # include <semaphore.h>
  # include <fcntl.h>
@@ -159,7 +453,7 @@ Index: openjdk/hotspot/src/os/linux/vm/os_linux.cpp
  }
  
  julong os::physical_memory() {
-@@ -2125,18 +2145,22 @@
+@@ -2090,18 +2110,22 @@
    st->print("Memory:");
    st->print(" %dk page", os::vm_page_size()>>10);
  
@@ -182,28 +476,7 @@ Index: openjdk/hotspot/src/os/linux/vm/os_linux.cpp
    st->cr();
  }
  
-@@ -4334,9 +4358,8 @@
- 
- int os::Linux::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime)
- {
--   if (is_NPTL()) {
--      return pthread_cond_timedwait(_cond, _mutex, _abstime);
--   } else {
-+#if defined(__linux__)
-+   if (!is_NPTL()) {
- #ifndef IA64
-       // 6292965: LinuxThreads pthread_cond_timedwait() resets FPU control
-       // word back to default 64bit precision if condvar is signaled. Java
-@@ -4349,6 +4372,8 @@
- #endif // IA64
-       return status;
-    }
-+#endif
-+   return pthread_cond_timedwait(_cond, _mutex, _abstime);
- }
- 
- ////////////////////////////////////////////////////////////////////////////////
-@@ -5295,6 +5320,7 @@
+@@ -5260,6 +5284,7 @@
  int os::fork_and_exec(char* cmd) {
    const char * argv[4] = {"sh", "-c", cmd, NULL};
  
@@ -211,7 +484,7 @@ Index: openjdk/hotspot/src/os/linux/vm/os_linux.cpp
    // fork() in LinuxThreads/NPTL is not async-safe. It needs to run
    // pthread_atfork handlers and reset pthread library. All we need is a
    // separate process to execve. Make a direct syscall to fork process.
-@@ -5302,6 +5328,9 @@
+@@ -5267,6 +5292,9 @@
    // the best...
    pid_t pid = NOT_IA64(syscall(__NR_fork);)
                IA64_ONLY(fork();)
@@ -221,7 +494,7 @@ Index: openjdk/hotspot/src/os/linux/vm/os_linux.cpp
  
    if (pid < 0) {
      // fork failed
-@@ -5310,6 +5339,7 @@
+@@ -5275,6 +5303,7 @@
    } else if (pid == 0) {
      // child process
  
@@ -229,7 +502,7 @@ Index: openjdk/hotspot/src/os/linux/vm/os_linux.cpp
      // execve() in LinuxThreads will call pthread_kill_other_threads_np()
      // first to kill every thread on the thread list. Because this list is
      // not reset by fork() (see notes above), execve() will instead kill
-@@ -5319,6 +5349,9 @@
+@@ -5284,6 +5313,9 @@
      // above.
      NOT_IA64(syscall(__NR_execve, "/bin/sh", argv, environ);)
      IA64_ONLY(execve("/bin/sh", (char* const*)argv, environ);)
@@ -241,8 +514,8 @@ Index: openjdk/hotspot/src/os/linux/vm/os_linux.cpp
      _exit(-1);
 Index: openjdk/hotspot/src/os/posix/launcher/java_md.c
 ===================================================================
---- openjdk/hotspot/src/os/posix/launcher/java_md.c.orig	2011-07-16 01:49:43.000000000 +0200
-+++ openjdk/hotspot/src/os/posix/launcher/java_md.c	2011-07-16 02:13:04.000000000 +0200
+--- openjdk/hotspot/src/os/posix/launcher/java_md.c.orig
++++ openjdk/hotspot/src/os/posix/launcher/java_md.c
 @@ -41,7 +41,7 @@
  #include "version_comp.h"
  #endif
@@ -288,7 +561,7 @@ Index: openjdk/hotspot/src/os/posix/launcher/java_md.c
      {
          const char* self = "/proc/self/exe";
          char buf[PATH_MAX+1];
-@@ -1832,7 +1832,7 @@
+@@ -1821,7 +1821,7 @@
  int
  ContinueInNewThread(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {
      int rslt;
@@ -297,27 +570,10 @@ Index: openjdk/hotspot/src/os/posix/launcher/java_md.c
      pthread_t tid;
      pthread_attr_t attr;
      pthread_attr_init(&attr);
-Index: openjdk/hotspot/src/share/vm/memory/allocation.hpp
-===================================================================
---- openjdk/hotspot/src/share/vm/memory/allocation.hpp.orig	2011-07-16 01:49:43.000000000 +0200
-+++ openjdk/hotspot/src/share/vm/memory/allocation.hpp	2011-07-16 02:13:04.000000000 +0200
-@@ -214,9 +214,9 @@
-   void signal_out_of_memory(size_t request, const char* whence) const;
- 
-   void check_for_overflow(size_t request, const char* whence) const {
--    if (UINTPTR_MAX - request < (uintptr_t)_hwm) {
--      signal_out_of_memory(request, whence);
--    }
-+//    if (UINTPTR_MAX - request < (uintptr_t)_hwm) {
-+//      signal_out_of_memory(request, whence);
-+//    }
-  }
- 
-  public:
 Index: openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
 ===================================================================
---- openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp.orig	2011-07-16 01:49:43.000000000 +0200
-+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	2011-07-16 02:13:04.000000000 +0200
+--- openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp.orig
++++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
 @@ -81,6 +81,7 @@
  # include <ucontext.h>
  # include <fpu_control.h>
@@ -326,7 +582,7 @@ Index: openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
  #ifdef AMD64
  #define REG_SP REG_RSP
  #define REG_PC REG_RIP
-@@ -94,6 +95,33 @@
+@@ -94,6 +95,40 @@
  #define SPELL_REG_SP "esp"
  #define SPELL_REG_FP "ebp"
  #endif // AMD64
@@ -353,6 +609,13 @@ Index: openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
 +#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
@@ -360,14 +623,14 @@ Index: openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
  
  address os::current_stack_pointer() {
  #ifdef SPARC_WORKS
-@@ -119,15 +147,27 @@
+@@ -119,15 +154,27 @@
  }
  
  address os::Linux::ucontext_get_pc(ucontext_t * uc) {
 +#ifdef __linux__
    return (address)uc->uc_mcontext.gregs[REG_PC];
 +#elif defined(__FreeBSD_kernel__)
-+  return (intptr_t*)uc->context_pc;
++  return (address)uc->context_pc;
 +#endif
  }
  
@@ -388,7 +651,7 @@ Index: openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
  }
  
  // For Forte Analyzer AsyncGetCallTrace profiling support - thread
-@@ -279,12 +319,20 @@
+@@ -279,12 +326,20 @@
      pc = (address) os::Linux::ucontext_get_pc(uc);
  
      if (pc == (address) Fetch32PFI) {
@@ -409,7 +672,7 @@ Index: openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
         return 1 ;
      }
  #endif // AMD64
-@@ -430,7 +478,11 @@
+@@ -430,7 +485,11 @@
    // Furthermore, a false-positive should be harmless.
    if (UnguardOnExecutionViolation > 0 &&
        (sig == SIGSEGV || sig == SIGBUS) &&
@@ -421,10 +684,140 @@ Index: openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
      int page_size = os::vm_page_size();
      address addr = (address) info->si_addr;
      address pc = os::Linux::ucontext_get_pc(uc);
+@@ -500,7 +559,11 @@
+     // save all thread context in case we need to restore it
+     if (thread != NULL) thread->set_saved_exception_pc(pc);
+ 
++#ifdef __linux__
+     uc->uc_mcontext.gregs[REG_PC] = (greg_t)stub;
++#elif defined(__FreeBSD_kernel__)
++    uc->context_pc = (intptr_t)stub;
++#endif
+     return true;
+   }
+ 
+@@ -752,6 +815,7 @@
+ 
+   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]);
+@@ -794,6 +858,48 @@
+   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();
+ 
+@@ -824,6 +930,7 @@
+ 
+   // 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]);
+@@ -851,6 +958,35 @@
+   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: openjdk/hotspot/src/share/vm/memory/allocation.hpp
+===================================================================
+--- openjdk/hotspot/src/share/vm/memory/allocation.hpp.orig
++++ openjdk/hotspot/src/share/vm/memory/allocation.hpp
+@@ -214,9 +214,9 @@
+   void signal_out_of_memory(size_t request, const char* whence) const;
+ 
+   void check_for_overflow(size_t request, const char* whence) const {
+-    if (UINTPTR_MAX - request < (uintptr_t)_hwm) {
+-      signal_out_of_memory(request, whence);
+-    }
++//    if (UINTPTR_MAX - request < (uintptr_t)_hwm) {
++//      signal_out_of_memory(request, whence);
++//    }
+  }
+ 
+  public:
 Index: openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp
 ===================================================================
---- openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp.orig	2011-07-16 02:13:26.000000000 +0200
-+++ openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp	2011-07-16 02:13:52.000000000 +0200
+--- openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp.orig
++++ openjdk/hotspot/src/share/vm/oops/generateOopMap.cpp
 @@ -970,11 +970,11 @@
    // The product of bbNo and _state_len can get large if there are lots of
    // basic blocks and stack/locals/monitors.  Need to check to make sure
diff --git a/debian/patches/kfreebsd-support-jamvm.diff b/debian/patches/kfreebsd-support-jamvm.diff
index 60ed963..9c85870 100644
--- a/debian/patches/kfreebsd-support-jamvm.diff
+++ b/debian/patches/kfreebsd-support-jamvm.diff
@@ -6,9 +6,9 @@ Last-Update: 2011-06-28
 Forwarded: no
 Index: jamvm/jamvm/src/classlib/openjdk/jvm.c
 ===================================================================
---- jamvm/jamvm/src/classlib/openjdk/jvm.c.orig	2011-05-28 02:45:54.000000000 +0200
-+++ jamvm/jamvm/src/classlib/openjdk/jvm.c	2011-06-28 23:12:11.000000000 +0200
-@@ -58,6 +58,10 @@ static int have_monotonic_clock;
+--- jamvm/jamvm/src/classlib/openjdk/jvm.c.orig
++++ jamvm/jamvm/src/classlib/openjdk/jvm.c
+@@ -63,6 +63,10 @@
  #define have_monotonic_clock FALSE
  #endif
  
diff --git a/debian/patches/kfreebsd-support-jdk.diff b/debian/patches/kfreebsd-support-jdk.diff
index 0c39a3b..edb20db 100644
--- a/debian/patches/kfreebsd-support-jdk.diff
+++ b/debian/patches/kfreebsd-support-jdk.diff
@@ -15,13 +15,50 @@ Description: Initial GNU/kFreeBSD support for openjdk-7 (JDK part)
    openjdk/jdk/make/com/sun/nio/Makefile
  - Don't build jsoundala
    openjdk/jdk/make/javax/sound/Makefile
+ - Disable epoll feature and so LinuxWatchService
+   openjdk/jdk/make/java/nio/Makefile
 Author: Damien Raude-Morvan <drazzib at debian.org>
 Last-Update: 2011-06-28
 Forwarded: no
+Index: openjdk/jdk/make/com/sun/nio/Makefile
+===================================================================
+--- openjdk/jdk/make/com/sun/nio/Makefile.orig
++++ openjdk/jdk/make/com/sun/nio/Makefile
+@@ -30,11 +30,11 @@
+ BUILDDIR = ../../..
+ include $(BUILDDIR)/common/Defs.gmk
+ 
+-SUBDIRS = sctp
+-include $(BUILDDIR)/common/Subdirs.gmk
++#SUBDIRS = sctp
++#include $(BUILDDIR)/common/Subdirs.gmk
+ 
+ all build clean clobber::
+-	$(SUBDIRS-loop)
++#	$(SUBDIRS-loop)
+ 
+ clean clobber::
+-	$(RM) -r $(CLASSDESTDIR)/com/sun/nio
++#	$(RM) -r $(CLASSDESTDIR)/com/sun/nio
+Index: openjdk/jdk/make/common/shared/Defs-versions.gmk
+===================================================================
+--- openjdk/jdk/make/common/shared/Defs-versions.gmk.orig
++++ openjdk/jdk/make/common/shared/Defs-versions.gmk
+@@ -148,7 +148,9 @@
+   REQUIRED_OS_VERSION         = 2.6
+   REQUIRED_OS_VARIANT_NAME    = Fedora
+   REQUIRED_OS_VARIANT_VERSION = 9
+-  REQUIRED_ALSA_VERSION       = 0.9.1
++ifneq ($(SYSTEM_UNAME),GNU/kFreeBSD)
++   REQUIRED_ALSA_VERSION       = 0.9.1
++endif
+   REQUIRED_COMPILER_NAME      = GCC4
+   REQUIRED_COMPILER_VERSION   = GCC4
+   REQUIRED_GCC_VER            = 2.95
 Index: openjdk/jdk/make/common/shared/Platform.gmk
 ===================================================================
---- openjdk/jdk/make/common/shared/Platform.gmk.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/make/common/shared/Platform.gmk	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/make/common/shared/Platform.gmk.orig
++++ openjdk/jdk/make/common/shared/Platform.gmk
 @@ -152,7 +152,7 @@
  endif
  
@@ -31,10 +68,25 @@ Index: openjdk/jdk/make/common/shared/Platform.gmk
    PLATFORM = linux
    # Arch and OS name/version
    ifdef CROSS_COMPILE_ARCH
+Index: openjdk/jdk/make/common/shared/Sanity-Settings.gmk
+===================================================================
+--- openjdk/jdk/make/common/shared/Sanity-Settings.gmk.orig
++++ openjdk/jdk/make/common/shared/Sanity-Settings.gmk
+@@ -186,8 +186,10 @@
+ endif
+ ifeq ($(PLATFORM),linux)
+   ifdef REQUIRED_ALSA_VERSION
++  ifneq ($(SYSTEM_UNAME),GNU/kFreeBSD)
+     ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION)
+   endif
++  endif
+ endif
+ ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION)
+ ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_NAME)
 Index: openjdk/jdk/make/common/shared/Sanity.gmk
 ===================================================================
---- openjdk/jdk/make/common/shared/Sanity.gmk.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/make/common/shared/Sanity.gmk	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/make/common/shared/Sanity.gmk.orig
++++ openjdk/jdk/make/common/shared/Sanity.gmk
 @@ -114,12 +114,14 @@
      elif [ -f /etc/lsb-release ] ; then \
        $(EGREP) DISTRIB_RELEASE /etc/lsb-release | $(SED) -e 's at .*DISTRIB_RELEASE=\(.*\)@\1@'; \
@@ -50,10 +102,68 @@ Index: openjdk/jdk/make/common/shared/Sanity.gmk
  
  ifeq ($(PLATFORM), windows)
    # Windows 2000 is 5.0, Windows XP is 5.1, Windows 2003 is 5.2
+Index: openjdk/jdk/make/java/nio/Makefile
+===================================================================
+--- openjdk/jdk/make/java/nio/Makefile.orig
++++ openjdk/jdk/make/java/nio/Makefile
+@@ -186,11 +186,6 @@
+ 	sun/nio/ch/DevPollArrayWrapper.java \
+ 	sun/nio/ch/DevPollSelectorImpl.java \
+ 	sun/nio/ch/DevPollSelectorProvider.java \
+-	sun/nio/ch/EPoll.java \
+-	sun/nio/ch/EPollArrayWrapper.java \
+-	sun/nio/ch/EPollPort.java \
+-	sun/nio/ch/EPollSelectorProvider.java \
+-	sun/nio/ch/EPollSelectorImpl.java \
+ 	sun/nio/ch/InheritedChannel.java \
+ 	sun/nio/ch/LinuxAsynchronousChannelProvider.java \
+         sun/nio/ch/PollSelectorProvider.java \
+@@ -207,7 +202,6 @@
+ 	sun/nio/fs/LinuxFileSystemProvider.java \
+ 	sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
+ 	sun/nio/fs/LinuxNativeDispatcher.java \
+-	sun/nio/fs/LinuxWatchService.java \
+ 	sun/nio/fs/PollingWatchService.java \
+ 	sun/nio/fs/UnixChannelFactory.java \
+ 	sun/nio/fs/UnixCopyFile.java \
+@@ -229,9 +223,6 @@
+ 	sun/nio/fs/UnixUserPrincipals.java
+ 
+ FILES_c += \
+-	EPoll.c \
+-	EPollArrayWrapper.c \
+-	EPollPort.c \
+ 	InheritedChannel.c \
+ 	NativeThread.c \
+         PollArrayWrapper.c \
+@@ -240,15 +231,11 @@
+ 	\
+ 	GnomeFileTypeDetector.c \
+ 	LinuxNativeDispatcher.c \
+-	LinuxWatchService.c \
+ 	UnixCopyFile.c \
+ 	UnixNativeDispatcher.c
+ 
+ FILES_export += \
+  	sun/nio/ch/DevPollArrayWrapper.java \
+-	sun/nio/ch/EPoll.java \
+-        sun/nio/ch/EPollArrayWrapper.java \
+-	sun/nio/ch/EPollPort.java \
+ 	sun/nio/ch/InheritedChannel.java \
+ 	sun/nio/ch/NativeThread.java \
+ 	sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java \
+@@ -256,7 +243,6 @@
+ 	\
+ 	sun/nio/fs/GnomeFileTypeDetector.java \
+ 	sun/nio/fs/LinuxNativeDispatcher.java \
+-	sun/nio/fs/LinuxWatchService.java \
+ 	sun/nio/fs/UnixCopyFile.java \
+ 	sun/nio/fs/UnixNativeDispatcher.java
+ 	
 Index: openjdk/jdk/make/javax/sound/Makefile
 ===================================================================
---- openjdk/jdk/make/javax/sound/Makefile.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/make/javax/sound/Makefile	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/make/javax/sound/Makefile.orig
++++ openjdk/jdk/make/javax/sound/Makefile
 @@ -100,8 +100,8 @@
  
  ifeq ($(PLATFORM), linux)
@@ -65,10 +175,125 @@ Index: openjdk/jdk/make/javax/sound/Makefile
    #MXSPP_ADD = $(PLATFORM)-$(ARCH)/
  endif # PLATFORM linux
  
+Index: openjdk/jdk/src/share/classes/com/sun/servicetag/Installer.java
+===================================================================
+--- openjdk/jdk/src/share/classes/com/sun/servicetag/Installer.java.orig
++++ openjdk/jdk/src/share/classes/com/sun/servicetag/Installer.java
+@@ -549,7 +549,7 @@
+         Set<String> archs = new HashSet<String>();
+ 
+         String os = System.getProperty("os.name");
+-        if (os.equals("SunOS") || os.equals("Linux")) {
++        if (os.equals("SunOS") || os.equals("Linux") || os.equals("GNU/kFreeBSD")) {
+             // Traverse the directories under <JRE>/lib.
+             // If <JRE>/lib/<arch>/libjava.so exists, add <arch>
+             // to the product defined ID
+Index: openjdk/jdk/src/share/classes/com/sun/servicetag/Registry.java
+===================================================================
+--- openjdk/jdk/src/share/classes/com/sun/servicetag/Registry.java.orig
++++ openjdk/jdk/src/share/classes/com/sun/servicetag/Registry.java
+@@ -84,7 +84,7 @@
+             String os = System.getProperty("os.name");
+             if (os.equals("SunOS")) {
+                 stclient = new File(STCLIENT_SOLARIS);
+-            } else if (os.equals("Linux")) {
++            } else if (os.equals("Linux") || os.equals("GNU/kFreeBSD")) {
+                 stclient = new File(STCLIENT_LINUX);
+             } else if (os.startsWith("Windows")) {
+                 stclient = getWindowsStClientFile();
+Index: openjdk/jdk/src/share/classes/com/sun/servicetag/SystemEnvironment.java
+===================================================================
+--- openjdk/jdk/src/share/classes/com/sun/servicetag/SystemEnvironment.java.orig
++++ openjdk/jdk/src/share/classes/com/sun/servicetag/SystemEnvironment.java
+@@ -61,7 +61,7 @@
+             String os = System.getProperty("os.name");
+             if (os.equals("SunOS")) {
+                 sysEnv = new SolarisSystemEnvironment();
+-            } else if (os.equals("Linux")) {
++            } else if (os.equals("Linux") || os.equals("GNU/kFreeBSD")) {
+                 sysEnv = new LinuxSystemEnvironment();
+             } else if (os.startsWith("Windows")) {
+                 sysEnv = new WindowsSystemEnvironment();
+Index: openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
+===================================================================
+--- openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java.orig
++++ openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
+@@ -172,7 +172,7 @@
+                         } else {
+                             String osName = System.getProperty("os.name");
+                             headless = defaultHeadless =
+-                                Boolean.valueOf(("Linux".equals(osName) || "SunOS".equals(osName)) &&
++                                Boolean.valueOf(("Linux".equals(osName) || "SunOS".equals(osName) || "GNU/kFreeBSD".equals(osName)) &&
+                                                 (System.getenv("DISPLAY") == null));
+                         }
+                     } else if (nm.equals("true")) {
+Index: openjdk/jdk/src/share/classes/sun/font/FontUtilities.java
+===================================================================
+--- openjdk/jdk/src/share/classes/sun/font/FontUtilities.java.orig
++++ openjdk/jdk/src/share/classes/sun/font/FontUtilities.java
+@@ -74,7 +74,7 @@
+                 String osName = System.getProperty("os.name", "unknownOS");
+                 isSolaris = osName.startsWith("SunOS");
+ 
+-                isLinux = osName.startsWith("Linux");
++                isLinux = osName.startsWith("Linux") || osName.equals("GNU/kFreeBSD");
+ 
+                 String t2kStr = System.getProperty("sun.java2d.font.scaler");
+                 if (t2kStr != null) {
+Index: openjdk/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java
+===================================================================
+--- openjdk/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java.orig
++++ openjdk/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java
+@@ -1279,7 +1279,7 @@
+         }
+         String osName = AccessController.doPrivileged(
+             new GetPropertyAction("os.name"));
+-        if ("SunOS".equals(osName) || "Linux".equals(osName)) {
++        if ("SunOS".equals(osName) || "Linux".equals(osName) || "GNU/kFreeBSD".equals(osName)) {
+             charset("x-COMPOUND_TEXT", "COMPOUND_TEXT",
+                     new String[] {
+                         "COMPOUND_TEXT",        // JDK historical
+Index: openjdk/jdk/src/share/classes/sun/print/PSPrinterJob.java
+===================================================================
+--- openjdk/jdk/src/share/classes/sun/print/PSPrinterJob.java.orig
++++ openjdk/jdk/src/share/classes/sun/print/PSPrinterJob.java
+@@ -1534,7 +1534,7 @@
+             pFlags |= NOSHEET;
+             ncomps+=1;
+         }
+-       if (System.getProperty("os.name").equals("Linux")) {
++       if (System.getProperty("os.name").equals("Linux") || System.getProperty("os.name").equals("GNU/kFreeBSD")) {
+             execCmd = new String[ncomps];
+             execCmd[n++] = "/usr/bin/lpr";
+             if ((pFlags & PRINTER) != 0) {
+Index: openjdk/jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java
+===================================================================
+--- openjdk/jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java.orig
++++ openjdk/jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java
+@@ -48,6 +48,7 @@
+                     public Boolean run() {
+                             String osname = System.getProperty("os.name");
+                             if (osname.startsWith("SunOS") ||
++                                osname.startsWith("GNU/kFreeBSD") ||
+                                 osname.startsWith("Linux")) {
+                                 return new Boolean(System.getProperty
+                                     (USE_NATIVE_PROP));
+Index: openjdk/jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java
+===================================================================
+--- openjdk/jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java.orig
++++ openjdk/jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java
+@@ -403,6 +403,7 @@
+             long uid = 0;
+ 
+             if (osname.startsWith("SunOS") ||
++                osname.startsWith("GNU/kFreeBSD") ||
+                 (osname.startsWith("Linux"))) {
+                 try {
+                     Class<?> c = Class.forName
 Index: openjdk/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h
 ===================================================================
---- openjdk/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h.orig
++++ openjdk/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h
 @@ -61,7 +61,7 @@
  #define log1p   jlog1p
  #define expm1   jexpm1
@@ -80,8 +305,8 @@ Index: openjdk/jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h
  #define __ieee754_acosh         __j__ieee754_acosh
 Index: openjdk/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h
 ===================================================================
---- openjdk/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h.orig
++++ openjdk/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h
 @@ -49,7 +49,7 @@
  /*
   * Multi-platform definitions
@@ -93,8 +318,8 @@ Index: openjdk/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h
  typedef unsigned char uint8_t;
 Index: openjdk/jdk/src/solaris/bin/ergo_i586.c
 ===================================================================
---- openjdk/jdk/src/solaris/bin/ergo_i586.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/bin/ergo_i586.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/bin/ergo_i586.c.orig
++++ openjdk/jdk/src/solaris/bin/ergo_i586.c
 @@ -106,7 +106,7 @@
  
  #endif /* __solaris__ */
@@ -106,8 +331,8 @@ Index: openjdk/jdk/src/solaris/bin/ergo_i586.c
   * A utility method for asking the CPU about itself.
 Index: openjdk/jdk/src/solaris/bin/java_md.c
 ===================================================================
---- openjdk/jdk/src/solaris/bin/java_md.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/bin/java_md.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/bin/java_md.c.orig
++++ openjdk/jdk/src/solaris/bin/java_md.c
 @@ -37,7 +37,7 @@
  #include "manifest_info.h"
  #include "version_comp.h"
@@ -135,7 +360,7 @@ Index: openjdk/jdk/src/solaris/bin/java_md.c
      {
          const char* self = "/proc/self/exe";
          char buf[PATH_MAX+1];
-@@ -1446,7 +1446,7 @@
+@@ -1435,7 +1435,7 @@
  int
  ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {
      int rslt;
@@ -144,7 +369,7 @@ Index: openjdk/jdk/src/solaris/bin/java_md.c
      pthread_t tid;
      pthread_attr_t attr;
      pthread_attr_init(&attr);
-@@ -1491,7 +1491,7 @@
+@@ -1480,7 +1480,7 @@
  
  void SetJavaLauncherPlatformProps() {
     /* Linux only */
@@ -155,8 +380,8 @@ Index: openjdk/jdk/src/solaris/bin/java_md.c
      sprintf(pid_prop_str, "%s%d", substr, getpid());
 Index: openjdk/jdk/src/solaris/bin/jexec.c
 ===================================================================
---- openjdk/jdk/src/solaris/bin/jexec.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/bin/jexec.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/bin/jexec.c.orig
++++ openjdk/jdk/src/solaris/bin/jexec.c
 @@ -76,7 +76,7 @@
  #include <string.h>
  #include <limits.h>
@@ -202,7 +427,7 @@ Index: openjdk/jdk/src/solaris/bin/jexec.c
  const char * isJar(const char * path);
  #endif
  
-@@ -172,7 +172,7 @@
+@@ -171,7 +171,7 @@
      nargv = (const char **) malloc((argc + 2) * (sizeof (const char *)));
      nargv[nargc++] = java;
  
@@ -211,7 +436,7 @@ Index: openjdk/jdk/src/solaris/bin/jexec.c
      /* 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;
-@@ -182,7 +182,7 @@
+@@ -181,7 +181,7 @@
          const char * jarfile = argv[argi++];
          const char * message = NULL;
  
@@ -220,7 +445,7 @@ Index: openjdk/jdk/src/solaris/bin/jexec.c
          /* 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];
-@@ -291,7 +291,7 @@
+@@ -290,7 +290,7 @@
  }
  
  
@@ -229,10 +454,62 @@ Index: openjdk/jdk/src/solaris/bin/jexec.c
  /*
   * Check if the given file is a JAR file.
   *
+Index: openjdk/jdk/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java
+===================================================================
+--- openjdk/jdk/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java.orig
++++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XScrollbarPeer.java
+@@ -74,7 +74,7 @@
+      * 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: openjdk/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java
+===================================================================
+--- openjdk/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java.orig
++++ openjdk/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java
+@@ -294,7 +294,7 @@
+ 
+         super.setOsNameAndVersion();
+ 
+-        if (!osName.equals("Linux")) {
++        if (!(osName.equals("Linux") || osName.equals("GNU/kFreeBSD"))) {
+             return;
+         }
+         try {
+Index: openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java
+===================================================================
+--- openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java.orig
++++ openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java
+@@ -48,7 +48,7 @@
+             .doPrivileged(new GetPropertyAction("os.name"));
+         if (osname.equals("SunOS"))
+             return new SolarisAsynchronousChannelProvider();
+-        if (osname.equals("Linux"))
++        if (osname.equals("Linux") || osname.equals("GNU/kFreeBSD"))
+             return new LinuxAsynchronousChannelProvider();
+         throw new InternalError("platform not recognized");
+     }
+Index: openjdk/jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java
+===================================================================
+--- openjdk/jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java.orig
++++ openjdk/jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java
+@@ -66,7 +66,7 @@
+             .doPrivileged(new GetPropertyAction("os.name"));
+         if (osname.equals("SunOS"))
+             return createProvider("sun.nio.fs.SolarisFileSystemProvider");
+-        if (osname.equals("Linux"))
++        if (osname.equals("Linux") || osname.equals("GNU/kFreeBSD"))
+             return createProvider("sun.nio.fs.LinuxFileSystemProvider");
+         throw new AssertionError("Platform not recognized");
+     }
 Index: openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java
 ===================================================================
---- openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java.orig
++++ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java
 @@ -238,9 +238,6 @@
              }
              throw new UnixException("Value of " + DOS_XATTR_NAME + " attribute is invalid");
@@ -245,8 +522,8 @@ Index: openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java
              buffer.release();
 Index: openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
 ===================================================================
---- openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java.orig
++++ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
 @@ -101,9 +101,7 @@
                  LinuxNativeDispatcher.fgetxattr(fd, "user.java".getBytes(), 0L, 0);
                  return true;
@@ -258,10 +535,23 @@ Index: openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
              } finally {
                  UnixNativeDispatcher.close(fd);
              }
+Index: openjdk/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java
+===================================================================
+--- openjdk/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java.orig
++++ openjdk/jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java
+@@ -119,7 +119,7 @@
+     }
+ 
+     static boolean isBSD() {
+-        return osname.equals("Linux");
++        return osname.equals("Linux") || osname.equals("GNU/kFreeBSD");
+     }
+ 
+     static final int UNINITIALIZED = -1;
 Index: openjdk/jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c.orig
++++ openjdk/jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c
 @@ -35,7 +35,9 @@
  #include <sys/swap.h>
  #include <sys/resource.h>
@@ -297,8 +587,8 @@ Index: openjdk/jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.
  
 Index: openjdk/jdk/src/solaris/native/java/io/io_util_md.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/io/io_util_md.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/io/io_util_md.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/io/io_util_md.c.orig
++++ openjdk/jdk/src/solaris/native/java/io/io_util_md.c
 @@ -36,7 +36,7 @@
      WITH_PLATFORM_STRING(env, path, ps) {
          FD fd;
@@ -310,8 +600,8 @@ Index: openjdk/jdk/src/solaris/native/java/io/io_util_md.c
          while ((p > ps) && (*p == '/'))
 Index: openjdk/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/lang/UNIXProcess_md.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/lang/UNIXProcess_md.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/lang/UNIXProcess_md.c.orig
++++ openjdk/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
 @@ -93,7 +93,7 @@
  #define START_CHILD_USE_CLONE 0  /* clone() currently disabled; see above. */
  
@@ -332,8 +622,8 @@ Index: openjdk/jdk/src/solaris/native/java/lang/UNIXProcess_md.c
      #define START_CHILD_USE_VFORK 0
 Index: openjdk/jdk/src/solaris/native/java/lang/java_props_md.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/lang/java_props_md.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/lang/java_props_md.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/lang/java_props_md.c.orig
++++ openjdk/jdk/src/solaris/native/java/lang/java_props_md.c
 @@ -23,7 +23,7 @@
   * questions.
   */
@@ -357,11 +647,11 @@ Index: openjdk/jdk/src/solaris/native/java/lang/java_props_md.c
      lc = setlocale(cat, NULL);
  
 -#ifndef __linux__
-+#if !defined(__linux__) && !defined(__GLIBC)
++#if !defined(__linux__) && !defined(__GLIBC__)
      if (lc == NULL) {
          return 0;
      }
-@@ -273,7 +273,7 @@
+@@ -272,7 +272,7 @@
           * in order to use optimizations. */
          *std_encoding = (*p != '\0') ? p : "ISO8859-1";
  
@@ -370,7 +660,7 @@ Index: openjdk/jdk/src/solaris/native/java/lang/java_props_md.c
          /*
           * Remap the encoding string to a different value for japanese
           * locales on linux so that customized converters are used instead
-@@ -442,7 +442,7 @@
+@@ -437,7 +437,7 @@
      sprops.display_variant = sprops.variant;
      sprops.sun_jnu_encoding = sprops.encoding;
  
@@ -381,8 +671,8 @@ Index: openjdk/jdk/src/solaris/native/java/lang/java_props_md.c
  #else
 Index: openjdk/jdk/src/solaris/native/java/lang/locale_str.h
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/lang/locale_str.h.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/lang/locale_str.h	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/lang/locale_str.h.orig
++++ openjdk/jdk/src/solaris/native/java/lang/locale_str.h
 @@ -48,7 +48,7 @@
      "gl", "gl_ES",
      "he", "iw_IL",
@@ -445,8 +735,8 @@ Index: openjdk/jdk/src/solaris/native/java/lang/locale_str.h
      "YU", "CS", // YU has been removed from ISO 3166
 Index: openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c.orig
++++ openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
 @@ -64,7 +64,7 @@
          /* Something went wrong, maybe networking is not setup? */
          strcpy(hostname, "localhost");
@@ -476,8 +766,8 @@ Index: openjdk/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
             * On some Linuxes, when bound to the loopback interface, connect
 Index: openjdk/jdk/src/solaris/native/java/net/Inet6AddressImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/net/Inet6AddressImpl.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/net/Inet6AddressImpl.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/net/Inet6AddressImpl.c.orig
++++ openjdk/jdk/src/solaris/native/java/net/Inet6AddressImpl.c
 @@ -70,7 +70,7 @@
      } else {
          // ensure null-terminated
@@ -507,8 +797,8 @@ Index: openjdk/jdk/src/solaris/native/java/net/Inet6AddressImpl.c
             * On some Linuxes, when bound to the loopback interface, connect
 Index: openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c.orig
++++ openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c
 @@ -53,6 +53,17 @@
  #define _PATH_PROCNET_IFINET6           "/proc/net/if_inet6"
  #endif
@@ -844,8 +1134,8 @@ Index: openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c
  
 Index: openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c.orig
++++ openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
 @@ -33,7 +33,7 @@
  #ifdef __solaris__
  #include <fcntl.h>
@@ -912,8 +1202,8 @@ Index: openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
  #endif
 Index: openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c.orig
++++ openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c
 @@ -32,7 +32,7 @@
  #endif
  #include <netinet/tcp.h>        /* Defines TCP_NODELAY, needed for 2.6 */
@@ -943,8 +1233,8 @@ Index: openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c
           * InetAddress.getLocalHost gets back the loopback address
 Index: openjdk/jdk/src/solaris/native/java/net/net_util_md.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/net/net_util_md.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/net/net_util_md.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/net/net_util_md.c.orig
++++ openjdk/jdk/src/solaris/native/java/net/net_util_md.c
 @@ -46,6 +46,11 @@
  #include <net/route.h>
  #include <sys/utsname.h>
@@ -959,8 +1249,8 @@ Index: openjdk/jdk/src/solaris/native/java/net/net_util_md.c
  #endif
 Index: openjdk/jdk/src/solaris/native/java/net/net_util_md.h
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/net/net_util_md.h.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/net/net_util_md.h	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/net/net_util_md.h.orig
++++ openjdk/jdk/src/solaris/native/java/net/net_util_md.h
 @@ -37,7 +37,7 @@
  #endif
  
@@ -981,8 +1271,8 @@ Index: openjdk/jdk/src/solaris/native/java/net/net_util_md.h
  #endif
 Index: openjdk/jdk/src/solaris/native/java/nio/MappedByteBuffer.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/nio/MappedByteBuffer.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/nio/MappedByteBuffer.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/nio/MappedByteBuffer.c.orig
++++ openjdk/jdk/src/solaris/native/java/nio/MappedByteBuffer.c
 @@ -40,7 +40,7 @@
      int result = 0;
      int i = 0;
@@ -994,8 +1284,8 @@ Index: openjdk/jdk/src/solaris/native/java/nio/MappedByteBuffer.c
      char *vec = (char *)malloc(numPages * sizeof(char));
 Index: openjdk/jdk/src/solaris/native/java/util/TimeZone_md.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/java/util/TimeZone_md.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/util/TimeZone_md.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/java/util/TimeZone_md.c.orig
++++ openjdk/jdk/src/solaris/native/java/util/TimeZone_md.c
 @@ -31,7 +31,7 @@
  #include <errno.h>
  #include <stddef.h>
@@ -1034,8 +1324,8 @@ Index: openjdk/jdk/src/solaris/native/java/util/TimeZone_md.c
           */
 Index: openjdk/jdk/src/solaris/native/sun/awt/VDrawingArea.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/VDrawingArea.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/VDrawingArea.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/VDrawingArea.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/VDrawingArea.c
 @@ -33,7 +33,7 @@
  #include <stdio.h>
  #include <malloc.h>
@@ -1047,8 +1337,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/VDrawingArea.c
  #endif /* __linux__ */
 Index: openjdk/jdk/src/solaris/native/sun/awt/awt_Font.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/awt_Font.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/awt_Font.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/awt_Font.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_Font.c
 @@ -334,7 +334,7 @@
              if (strcmp(style, "regular") == 0) {
                  altstyle = "roman";
@@ -1060,8 +1350,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/awt_Font.c
              }
 Index: openjdk/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
 @@ -122,7 +122,7 @@
   */
  
@@ -1118,8 +1408,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c
      AWT_LOCK();
 Index: openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c	2011-07-16 09:52:18.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
 @@ -67,7 +67,7 @@
                                  XIMPreeditDrawCallbackStruct *);
  static void PreeditCaretCallback(XIC, XPointer,
@@ -1299,8 +1589,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
      AWT_UNLOCK();
 Index: openjdk/jdk/src/solaris/native/sun/awt/awt_MToolkit.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/awt_MToolkit.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/awt_MToolkit.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/awt_MToolkit.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_MToolkit.c
 @@ -63,7 +63,7 @@
  extern JavaVM *jvm;
  
@@ -1321,8 +1611,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/awt_MToolkit.c
                xembed_eventHandler(&xev);
 Index: openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c
 @@ -45,7 +45,7 @@
  #include "wsutils.h"
  #include "list.h"
@@ -1334,8 +1624,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/awt_Robot.c
  
 Index: openjdk/jdk/src/solaris/native/sun/awt/awt_util.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/awt_util.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/awt_util.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/awt_util.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_util.c
 @@ -605,7 +605,7 @@
  
    return answer;
@@ -1356,8 +1646,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/awt_util.c
  {
 Index: openjdk/jdk/src/solaris/native/sun/awt/awt_util.h
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/awt_util.h.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/awt_util.h	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/awt_util.h.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_util.h
 @@ -195,7 +195,7 @@
  
  
@@ -1369,8 +1659,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/awt_util.h
    Cardinal      max_refs;       /* Maximum length of refs array. */
 Index: openjdk/jdk/src/solaris/native/sun/awt/awt_xembed_server.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/awt_xembed_server.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/awt_xembed_server.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/awt_xembed_server.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/awt_xembed_server.c
 @@ -35,7 +35,7 @@
  #include <X11/Xlib.h>
  #include <X11/Xatom.h>
@@ -1391,8 +1681,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/awt_xembed_server.c
  {
 Index: openjdk/jdk/src/solaris/native/sun/awt/extutil.h
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/extutil.h.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/extutil.h	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/extutil.h.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/extutil.h
 @@ -58,7 +58,7 @@
   */
  /* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */
@@ -1404,8 +1694,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/extutil.h
  #define _EXTUTIL_H_
 Index: openjdk/jdk/src/solaris/native/sun/awt/fontpath.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/fontpath.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/fontpath.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/fontpath.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/fontpath.c
 @@ -23,7 +23,7 @@
   * questions.
   */
@@ -1480,8 +1770,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/fontpath.c
  
 Index: openjdk/jdk/src/solaris/native/sun/awt/multi_font.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/awt/multi_font.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/awt/multi_font.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/awt/multi_font.c.orig
++++ openjdk/jdk/src/solaris/native/sun/awt/multi_font.c
 @@ -348,7 +348,7 @@
      return JNI_TRUE;
  }
@@ -1502,8 +1792,8 @@ Index: openjdk/jdk/src/solaris/native/sun/awt/multi_font.c
                 string" and its implementation uses "strlen()" to calculate the length
 Index: openjdk/jdk/src/solaris/native/sun/java2d/j2d_md.h
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/java2d/j2d_md.h.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/java2d/j2d_md.h	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/java2d/j2d_md.h.orig
++++ openjdk/jdk/src/solaris/native/sun/java2d/j2d_md.h
 @@ -30,7 +30,7 @@
  /*
   * Linux version of <sys/types.h> does not define intptr_t
@@ -1515,8 +1805,8 @@ Index: openjdk/jdk/src/solaris/native/sun/java2d/j2d_md.h
  
 Index: openjdk/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c.orig
++++ openjdk/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c
 @@ -804,7 +804,7 @@
  static int initialized;
  static int usevis = JNI_TRUE;
@@ -1528,8 +1818,8 @@ Index: openjdk/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c
  #   define ULTRA_CHIP   "sun4u"
 Index: openjdk/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c.orig
++++ openjdk/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c
 @@ -33,7 +33,7 @@
  #include <strings.h>
  #endif
@@ -1541,8 +1831,8 @@ Index: openjdk/jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c
  
 Index: openjdk/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c.orig
++++ openjdk/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c
 @@ -30,7 +30,7 @@
  #include "sun_net_spi_DefaultProxySelector.h"
  #include <dlfcn.h>
@@ -1554,8 +1844,8 @@ Index: openjdk/jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c
  #include <strings.h>
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c
 @@ -35,7 +35,7 @@
  #include <string.h>
  #include <errno.h>
@@ -1576,8 +1866,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c
          SOCKADDR sa;
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c
 @@ -73,7 +73,7 @@
      m.msg_accrightslen = 0;
  #endif
@@ -1598,8 +1888,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c
  #endif
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
 @@ -37,6 +37,12 @@
  
  #if defined(__linux__) || defined(__solaris__)
@@ -1647,8 +1937,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
  #endif
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
 @@ -33,7 +33,7 @@
  #include "nio_util.h"
  
@@ -1687,8 +1977,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
  #endif
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/Net.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/Net.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/Net.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/Net.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/Net.c
 @@ -86,7 +86,7 @@
  #endif  /* __solaris__ */
  
@@ -1718,8 +2008,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/Net.c
  #else
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/Sctp.h
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/Sctp.h.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/Sctp.h	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/Sctp.h.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/Sctp.h
 @@ -67,7 +67,7 @@
  
  
@@ -1769,8 +2059,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/Sctp.h
  #endif /* !SUN_NIO_CH_SCTP_H */
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c
 @@ -337,7 +337,7 @@
              break;
          case SCTP_ADDR_MADE_PRIM :
@@ -1791,8 +2081,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/SctpChannelImpl.c
                  rv = 0;
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/SctpNet.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/SctpNet.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/SctpNet.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/SctpNet.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/SctpNet.c
 @@ -58,6 +58,7 @@
   */
  jboolean loadSocketExtensionFuncs
@@ -1811,8 +2101,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/SctpNet.c
      return JNI_TRUE;
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c
 @@ -28,7 +28,7 @@
  #include <sys/types.h>
  #include <sys/socket.h>
@@ -1824,8 +2114,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c
  
 Index: openjdk/jdk/src/solaris/native/sun/nio/ch/SocketChannelImpl.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/ch/SocketChannelImpl.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/ch/SocketChannelImpl.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/ch/SocketChannelImpl.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/ch/SocketChannelImpl.c
 @@ -31,7 +31,7 @@
  #include <string.h>
  #include <poll.h>
@@ -1837,8 +2127,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/ch/SocketChannelImpl.c
  
 Index: openjdk/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c
 @@ -36,7 +36,7 @@
  #include <strings.h>
  #endif
@@ -1850,8 +2140,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/fs/GnomeFileTypeDetector.c
  
 Index: openjdk/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
 @@ -26,7 +26,7 @@
  /**
   * fstatat in glibc requires _ATFILE_SOURCE to be defined.
@@ -1872,8 +2162,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c
  #endif
 Index: openjdk/jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c.orig
++++ openjdk/jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c
 @@ -106,7 +106,9 @@
      DEF(ENOSYS);
      DEF(ELOOP);
@@ -1886,8 +2176,8 @@ Index: openjdk/jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c
      // flags used with openat/unlinkat/etc.
 Index: openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
 ===================================================================
---- openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c.orig
++++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
 @@ -27,7 +27,7 @@
  #include <X11/Xutil.h>
  #include <X11/Xos.h>
@@ -1908,8 +2198,8 @@ Index: openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
    void *array[10];
 Index: openjdk/jdk/src/solaris/transport/socket/socket_md.c
 ===================================================================
---- openjdk/jdk/src/solaris/transport/socket/socket_md.c.orig	2011-07-16 02:14:10.000000000 +0200
-+++ openjdk/jdk/src/solaris/transport/socket/socket_md.c	2011-07-16 09:52:19.000000000 +0200
+--- openjdk/jdk/src/solaris/transport/socket/socket_md.c.orig
++++ openjdk/jdk/src/solaris/transport/socket/socket_md.c
 @@ -36,7 +36,7 @@
  #ifdef __solaris__
  #include <thread.h>
@@ -1928,85 +2218,3 @@ Index: openjdk/jdk/src/solaris/transport/socket/socket_md.c
  int
  dbgsysTlsAlloc() {
      pthread_key_t key;
-Index: openjdk/jdk/make/com/sun/nio/Makefile
-===================================================================
---- openjdk/jdk/make/com/sun/nio/Makefile.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/make/com/sun/nio/Makefile	2011-07-16 09:52:19.000000000 +0200
-@@ -30,11 +30,11 @@
- BUILDDIR = ../../..
- include $(BUILDDIR)/common/Defs.gmk
- 
--SUBDIRS = sctp
--include $(BUILDDIR)/common/Subdirs.gmk
-+#SUBDIRS = sctp
-+#include $(BUILDDIR)/common/Subdirs.gmk
- 
- all build clean clobber::
--	$(SUBDIRS-loop)
-+#	$(SUBDIRS-loop)
- 
- clean clobber::
--	$(RM) -r $(CLASSDESTDIR)/com/sun/nio
-+#	$(RM) -r $(CLASSDESTDIR)/com/sun/nio
-Index: openjdk/jdk/src/share/bin/java.c
-===================================================================
---- openjdk/jdk/src/share/bin/java.c.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/src/share/bin/java.c	2011-07-16 09:52:19.000000000 +0200
-@@ -1898,6 +1898,10 @@
-       args.what = what;
-       args.ifn = *ifn;
- 
-+      //DEBUG ContinueInNewThread java.c
-+      DumpState();
-+      //DEBUG
-+
-       rslt = ContinueInNewThread0(JavaMain, threadStackSize, (void*)&args);
-       /* If the caller has deemed there is an error we
-        * simply return that, otherwise we return the value of
-Index: openjdk/jdk/make/common/shared/Defs-versions.gmk
-===================================================================
---- openjdk/jdk/make/common/shared/Defs-versions.gmk.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/make/common/shared/Defs-versions.gmk	2011-07-16 09:52:19.000000000 +0200
-@@ -148,7 +148,9 @@
-   REQUIRED_OS_VERSION         = 2.6
-   REQUIRED_OS_VARIANT_NAME    = Fedora
-   REQUIRED_OS_VARIANT_VERSION = 9
--  REQUIRED_ALSA_VERSION       = 0.9.1
-+ifneq ($(SYSTEM_UNAME),GNU/kFreeBSD)
-+   REQUIRED_ALSA_VERSION       = 0.9.1
-+endif
-   REQUIRED_COMPILER_NAME      = GCC4
-   REQUIRED_COMPILER_VERSION   = GCC4
-   REQUIRED_GCC_VER            = 2.95
-Index: openjdk/jdk/make/common/shared/Sanity-Settings.gmk
-===================================================================
---- openjdk/jdk/make/common/shared/Sanity-Settings.gmk.orig	2011-07-16 02:14:09.000000000 +0200
-+++ openjdk/jdk/make/common/shared/Sanity-Settings.gmk	2011-07-16 09:52:19.000000000 +0200
-@@ -186,8 +186,10 @@
- endif
- ifeq ($(PLATFORM),linux)
-   ifdef REQUIRED_ALSA_VERSION
-+  ifneq ($(SYSTEM_UNAME),GNU/kFreeBSD)
-     ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION)
-   endif
-+  endif
- endif
- ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION)
- ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_NAME)
-Index: openjdk/jdk/make/java/nio/Makefile
-===================================================================
---- openjdk/jdk/make/java/nio/Makefile.orig	2011-07-16 10:04:04.000000000 +0200
-+++ openjdk/jdk/make/java/nio/Makefile	2011-07-16 10:06:34.000000000 +0200
-@@ -229,9 +229,9 @@
- 	sun/nio/fs/UnixUserPrincipals.java
- 
- FILES_c += \
--	EPoll.c \
--	EPollArrayWrapper.c \
--	EPollPort.c \
-+#	EPoll.c \
-+#	EPollArrayWrapper.c \
-+#	EPollPort.c \
- 	InheritedChannel.c \
- 	NativeThread.c \
-         PollArrayWrapper.c \
diff --git a/debian/patches/kfreebsd-sync-issues.diff b/debian/patches/kfreebsd-sync-issues.diff
new file mode 100644
index 0000000..5e83e21
--- /dev/null
+++ b/debian/patches/kfreebsd-sync-issues.diff
@@ -0,0 +1,102 @@
+Description: Hack for GNU/kFreeBSD platform: add some sleep during build.
+ We add some <sleep/> call in jaxp/jaxws/langtool ANT build.xml to get
+ a build of those JAR archives with *all* classes.
+ Without this hack, JAR contains only part of expected classes and so
+ we have many random/unexpected build failures.
+ TODO: I suspect some issue with jar tool and/or jar Ant task which might
+ not handle correctly timestamp on UFS filesystem ?!
+ <http://ant.apache.org/manual/Tasks/jar.html>
+ TODO: We should drop this patch and found a proper fix.
+Author: Damien Raude-Morvan <drazzib at debian.org>
+Last-Update: 2011-08-02
+Forwarded: no
+Index: openjdk/jaxp/build.xml
+===================================================================
+--- openjdk/jaxp/build.xml.orig
++++ openjdk/jaxp/build.xml
+@@ -108,7 +108,13 @@
+ 	    depends="init, -init-src-dirs, -dist-classes-jar-uptodate"
+             unless="dist.classes.jar.uptodate">
+         <delete file="${dist.classes.jar}"/>
++
++<sleep seconds="70"/>
++
+         <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
++
++<sleep seconds="70"/>
++
+     </target>
+ 
+     <target name="-build-setup"
+@@ -136,6 +142,9 @@
+             <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/>
+             <src refid="src.dir.id"/>
+         </javac>
++
++<sleep seconds="70"/>
++
+     </target>
+ 
+     <!-- Test. (FIXME: Need to know how to run tests.) -->
+Index: openjdk/jaxws/build.xml
+===================================================================
+--- openjdk/jaxws/build.xml.orig
++++ openjdk/jaxws/build.xml
+@@ -108,7 +108,13 @@
+ 	    depends="init, -init-src-dirs, -dist-classes-jar-uptodate"
+             unless="dist.classes.jar.uptodate">
+         <delete file="${dist.classes.jar}"/>
++
++<sleep seconds="70"/>
++
+         <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
++
++<sleep seconds="70"/>
++
+     </target>
+ 
+     <target name="-build-setup"
+@@ -136,6 +142,9 @@
+             <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/>
+             <src refid="src.dir.id"/>
+         </javac>
++
++<sleep seconds="70"/>
++
+     </target>
+ 
+     <!-- Test. (FIXME: Need to know how to run tests.) -->
+Index: openjdk/langtools/make/build.xml
+===================================================================
+--- openjdk/langtools/make/build.xml.orig
++++ openjdk/langtools/make/build.xml
+@@ -234,6 +234,9 @@
+             <include name="*"/>
+         </chmod>
+         <mkdir dir="${dist.lib.dir}"/>
++
++<sleep seconds="70"/>
++
+         <jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/>
+         <zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/>
+     </target>
+@@ -731,6 +734,9 @@
+             <attribute name="jarclasspath" default=""/>
+             <sequential>
+                 <mkdir dir="@{lib.dir}"/>
++
++<sleep seconds="70"/>
++
+                 <jar destfile="@{lib.dir}/@{name}.jar"
+                      basedir="@{classes.dir}"
+                      includes="@{includes}">
+@@ -858,6 +864,9 @@
+                destdir="${build.toolclasses.dir}/"
+                classpath="${ant.core.lib}"
+                includeantruntime="false"/>
++
++<sleep seconds="70"/>
++
+         <taskdef name="pcompile"
+                  classname="CompilePropertiesTask"
+                  classpath="${build.toolclasses.dir}/"/>
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..6bb1640
--- /dev/null
+++ b/debian/patches/zero-fpu-control-is-noop.diff
@@ -0,0 +1,29 @@
+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 at debian.org>
+Last-Update: 2011-08-02
+Forwarded: no
+Index: openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+===================================================================
+--- openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp.orig
++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+@@ -265,11 +265,12 @@
+ }
+ 
+ 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/rules b/debian/rules
index 5f179b9..95ca47f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,6 +14,7 @@ DPKG_VARS		:= $(shell dpkg-architecture)
 DEB_HOST_GNU_TYPE	?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE	?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE)
 DEB_HOST_ARCH		?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH)
+DEB_HOST_ARCH_CPU	?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH_CPU)
 
 PATH := $(CURDIR)/bin:$(PATH)
 export PATH
@@ -28,10 +29,10 @@ ifeq ($(distrel),n/a)
   distrel := sid
 endif
 
-hotspot_archs	= amd64 i386 lpia sparc sparc64
+hotspot_archs	= amd64 i386 lpia sparc sparc64 kfreebsd-amd64 kfreebsd-i386
 # requires llvm; llvm in jaunty is recent enough, but in universe
 ifeq (,$(filter $(distrel),lenny jaunty intrepid hardy gutsy feisty edgy dapper))
-  shark_archs	= amd64 i386 lpia
+  shark_archs	= amd64 i386 lpia kfreebsd-amd64 kfreebsd-i386
 endif
 no_bootstrap_archs = alpha armel
 
@@ -86,18 +87,15 @@ with_wgy_zenhai = $(if $(filter $(distrel),lenny gutsy feisty edgy dapper),,yes)
 arch_map	:= alpha=alpha arm=arm armel=arm amd64=amd64 hppa=parisc i386=i586 lpia=i586 m68k=m68k mips=mips mipsel=mipsel powerpc=ppc powerpcspe=ppc ppc64=ppc64 sparc=sparc sparc64=sparc64 sh4=sh s390=s390 ia64=ia64
 archdir_map	:= alpha=alpha arm=arm armel=arm amd64=amd64 hppa=parisc i386=i386 lpia=i386 m68k=m68k mips=mips mipsel=mipsel powerpc=ppc powerpcspe=ppc ppc64=ppc64 sparc=sparc sparc64=sparcv9 sh4=sh s390=s390 ia64=ia64
 
-jvmarch		:= $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
-			$(filter $(DEB_HOST_ARCH)=%, $(arch_map))))
-archdir		:= $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
-			$(filter $(DEB_HOST_ARCH)=%, $(archdir_map))))
+jvmarch		:= $(strip $(patsubst $(DEB_HOST_ARCH_CPU)=%, %, \
+			$(filter $(DEB_HOST_ARCH_CPU)=%, $(arch_map))))
+archdir		:= $(strip $(patsubst $(DEB_HOST_ARCH_CPU)=%, %, \
+			$(filter $(DEB_HOST_ARCH_CPU)=%, $(archdir_map))))
 
 default_vm = $(if $(filter $(DEB_HOST_ARCH), $(hotspot_archs)),hotspot,zero)
 
 stage1_gcj_archs = amd64 hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 kfreebsd-i386 kfreebsd-amd64
 stage1_openjdk_archs = alpha armel
-# FIXME, gcj issues
-#stage1_gcj_archs = hppa ia64 lpia m68k mips mipsel sh4 sparc sparc64 s390
-#stage1_openjdk_archs = alpha armel amd64 i386 powerpc powerpcspe ppc64
 stage1_cacao_archs =
 ifneq (,$(filter nobootstrap, $(DEB_BUILD_OPTIONS)))
   stage1_openjdk_archs := $(stage1_openjdk_archs) $(stage1_gcj_archs)
@@ -120,6 +118,9 @@ ifeq (,$(filter $(distrel),squeeze lenny karmic hardy dapper))
   # Keep this in sync with Architecture: of icedtea-7-jre-jamvm
   jamvm_archs = amd64 armel armhf i386 lpia mips mipsel kfreebsd-i386 kfreebsd-amd64
 endif
+ifeq (,$(filter $(distrel),wheezy sid squeeze lenny maverick natty maverick lucid karmic hardy dapper))
+  jamvm_defaults = armel armhf
+endif
 
 # requires patched llvm-2.6
 ifeq (,$(filter $(distrel),lenny jaunty intrepid hardy gutsy feisty edgy dapper))
@@ -131,8 +132,6 @@ ifneq (,$(filter $(distrel),lenny dapper hardy intrepid))
   altzero_archs =
   altshark_archs =
 endif
-# shark currently broken in 7
-altshark_archs =
 
 ifeq (,$(filter noaltcacao, $(DEB_BUILD_OPTIONS)))
   ifneq (,$(filter $(DEB_HOST_ARCH), $(cacao_archs)))
@@ -187,31 +186,45 @@ unexport CFLAGS CXXFLAGS CPPFLAGS FFLAGS LDFLAGS
 ifneq (,$(filter $(distrel),dapper))
   #GCJ_SUFFIX = -4.4
   #ifneq (,$(filter $(DEB_HOST_ARCH), i386 lpia))
-  #  export GCC_SUFFIX = -4.0
+  #  export CC = gcc-4.0
+  #  export CXX = g++-4.0
   #endif
   #ifneq (,$(filter $(DEB_HOST_ARCH), amd64 powerpc sparc))
-  #  export GCC_SUFFIX = -4.0
+  #  export CC = gcc-4.0
+  #  export CXX = g++-4.0
   #endif
 else ifneq (,$(filter $(distrel),hardy gutsy feisty edgy dapper))
   ifneq (,$(filter $(DEB_HOST_ARCH), i386 lpia))
-    export GCC_SUFFIX = -4.1
+    export CC = gcc-4.1
+    export CXX = g++-4.1
     GCJ_SUFFIX = -4.2
   endif
   ifneq (,$(filter $(DEB_HOST_ARCH), amd64 powerpc sparc))
-    export GCC_SUFFIX = -4.2
+    export CC = gcc-4.2
+    export CXX = g++-4.2
   endif
 else ifneq (,$(filter $(distrel),lenny intrepid jaunty))
-  export GCC_SUFFIX = -4.3
-  export GCJ_SUFFIX = -4.3
+  export CC = gcc-4.3
+  export CXX = g++-4.3
+  GCJ_SUFFIX = -4.3
 else ifneq (,$(filter $(distrel),squeeze karmic lucid maverick))
-  export GCC_SUFFIX = -4.4
-  export GCJ_SUFFIX = -4.4
+  export CC = gcc-4.4
+  export CXX = g++-4.4
+  GCJ_SUFFIX = -4.4
 else ifneq (,$(filter $(distrel),natty))
-  export GCC_SUFFIX = -4.5
-  export GCJ_SUFFIX = -4.5
+  export CC = gcc-4.5
+  export CXX = g++-4.5
+  GCJ_SUFFIX = -4.5
+else ifneq (,$(filter $(distrel),wheezy sid))
+  export CC = gcc-4.6
+  export CXX = g++-4.6
+  ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
+    GCJ_SUFFIX = -4.4
+  endif
 else
-  export GCC_SUFFIX = -4.6
-#  export GCJ_SUFFIX = -4.6
+  export CC = gcc-4.6
+  export CXX = g++-4.6
+# GCJ_SUFFIX = -4.6
 endif
 
 ifeq ($(distribution),Ubuntu)
@@ -289,7 +302,6 @@ DISTRIBUTION_PATCHES += \
 	debian/patches/set-exec-name.diff \
 	debian/patches/shebang.diff \
 	debian/patches/jexec.diff \
-	debian/patches/no-compiler-path.diff \
 	debian/patches/jdk-freetypeScaler-crash.diff \
 	debian/patches/icedtea-pretend-memory.diff \
 	debian/patches/default-jvm-cfg.diff \
@@ -300,14 +312,12 @@ DISTRIBUTION_PATCHES += \
 	debian/patches/icedtea-4953367.patch \
 	debian/patches/fontconfig-wqy-microhei.patch \
 	$(if $(filter $(DEB_HOST_ARCH), amd64 i386),,debian/patches/hotspot-no-werror.diff) \
-	debian/patches/pr753.diff \
-	debian/patches/pr757.diff \
 	debian/patches/hotspot-s390.diff \
 	debian/patches/hotspot-sparc.diff \
 	debian/patches/jdk-no-mapfile.diff \
 	debian/patches/hotspot-sparc-arch.diff \
 	debian/patches/sparc-trapsfix.patch \
-	debian/patches/zero-jsr292-fixes.diff \
+	debian/patches/zero-fpu-control-is-noop.diff
 
 # FIXME needs an update:
 #	$(if $(with_wgy_zenhai),,debian/patches/fontconfig-arphic-uming.diff) \
@@ -317,7 +327,7 @@ DISTRIBUTION_PATCHES += \
 
   DISTRIBUTION_PATCHES += \
 	debian/patches/default-libpath-original.diff \
-	debian/patches/deb-multiarch.diff \
+	debian/patches/deb-multiarch.diff
 
 #	debian/patches/hotspot-warn-no-errformat.diff \
 #	debian/patches/gcc-mtune-generic.diff \
@@ -350,18 +360,19 @@ ifneq (,$(filter $(DEB_HOST_ARCH), alpha))
 	debian/patches/alpha-float-const.diff
 endif
 
-#ifneq (,$(filter $(DEB_HOST_ARCH), kfreebsd-amd64 kfreebsd-i386))
-#  DISTRIBUTION_PATCHES += \
-#        debian/patches/kfreebsd-support-jdk.diff \
-#        debian/patches/kfreebsd-support-hotspot.diff \
-#        debian/patches/kfreebsd-support-corba.diff
-#        
-#  ifeq (,$(filter noaltjamvm, $(DEB_BUILD_OPTIONS)))
-#    ifneq (,$(filter $(DEB_HOST_ARCH), $(jamvm_archs)))
-#      DISTRIBUTION_PATCHES += debian/patches/kfreebsd-support-jamvm.diff
-#    endif
-#  endif    
-#endif
+ifneq (,$(filter $(DEB_HOST_ARCH), kfreebsd-amd64 kfreebsd-i386))
+  DISTRIBUTION_PATCHES += \
+        debian/patches/kfreebsd-support-jdk.diff \
+        debian/patches/kfreebsd-support-hotspot.diff \
+        debian/patches/kfreebsd-support-corba.diff \
+        debian/patches/kfreebsd-sync-issues.diff
+        
+  ifeq (,$(filter noaltjamvm, $(DEB_BUILD_OPTIONS)))
+    ifneq (,$(filter $(DEB_HOST_ARCH), $(jamvm_archs)))
+      DISTRIBUTION_PATCHES += debian/patches/kfreebsd-support-jamvm.diff
+    endif
+  endif    
+endif
 
 export DISTRIBUTION_PATCHES DISTRIBUTION_ECJ_PATCHES
 
@@ -432,8 +443,6 @@ CONFIGURE_ARGS += \
 	--with-jaf-drop-zip=$(CURDIR)/drops/jdk7-jaf-2010_08_19.zip \
 	--with-jaxws-drop-zip=$(CURDIR)/drops/jdk7-jaxws2_2_4-b03-2011_05_27.zip
 
-#	--with-jdk-src-zip=$(CURDIR)/jdk-dfsg.tar.gz \
-
 ifneq (,$(filter $(DEB_HOST_ARCH), hppa))
 CONFIGURE_ARGS += \
 	--without-rhino
@@ -554,6 +563,9 @@ ifneq (,$(stage1_gcj_archs))
 	gcj (>= 4:4.2.1) [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], \
 	java-gcj-compat-dev (>= 1.0.76-2ubuntu3) [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))],
   endif
+  ifneq (,$(filter $(distrel),wheezy sid))
+    bd_bootstrap += gcj-4.4-jdk [mips mipsel],
+  endif
 endif
 ifneq (,$(stage1_openjdk_archs))
   bd_bootstrap += \
@@ -564,7 +576,7 @@ ifneq (,$(stage1_cacao_archs))
 	cacao-oj6-jdk [$(strip $(foreach a,$(stage1_cacao_archs), $(a)))],
 endif
 
-# This section should be in sync with "GCC_SUFFIX" definition
+# This section should be in sync with "CC/CXX" definition
 ifneq (,$(filter $(distrel),dapper))
   bd_gcc = g++-4.0,
 else ifneq (,$(filter $(distrel),hardy gutsy feisty edgy))
@@ -772,7 +784,11 @@ ifneq (,$(filter-out $(hotspot_archs), $(cacao_archs)))
   control_vars += '-Vcacao:Recommends=$(p_jrec) (= $${binary:Version})'
 endif
 ifneq (,$(filter-out $(hotspot_archs), $(jamvm_archs)))
-  control_vars += '-Vjamvm:Recommends=$(p_jrej) (= $${binary:Version})'
+  ifneq (,$(filter $(DEB_HOST_ARCH),$(jamvm_defaults)))
+    control_vars += '-Vjredefault:Depends=$(p_jrej) (= $${binary:Version})'
+  else
+    control_vars += '-Vjamvm:Recommends=$(p_jrej) (= $${binary:Version})'
+  endif
 endif
 
 ifeq ($(with_bridge),yes)
@@ -1391,6 +1407,15 @@ endif
 	done
 	mv $(d)/$(basedir)/jre/lib/$(archdir)/jvm.cfg \
 		$(d)/etc/$(jdiralias)/
+ifneq (,$(filter $(DEB_HOST_ARCH),$(jamvm_defaults)))
+	grep '^[# ]' $(d)/etc/$(jdiralias)/jvm.cfg \
+		> $(d)/etc/$(jdiralias)/jvm.cfg.new
+	grep 'jamvm' $(d)/etc/$(jdiralias)/jvm.cfg \
+		>> $(d)/etc/$(jdiralias)/jvm.cfg.new
+	egrep -v '^[# ]|jamvm' $(d)/etc/$(jdiralias)/jvm.cfg \
+		>> $(d)/etc/$(jdiralias)/jvm.cfg.new
+	mv $(d)/etc/$(jdiralias)/jvm.cfg.new $(d)/etc/$(jdiralias)/jvm.cfg
+endif
 
 	mv $(d)/$(basedir)/jre/lib/fontconfig.Ubuntu.properties.src \
 		$(d)/etc/$(jdiralias)/fontconfig.properties


hooks/post-receive
-- 
jigsaw packaging



More information about the pkg-java-commits mailing list