summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorfhajny <fhajny@pkgsrc.org>2015-07-03 20:40:59 +0000
committerfhajny <fhajny@pkgsrc.org>2015-07-03 20:40:59 +0000
commit0c86b5003e0481c0aa33104be14303fe8382c21b (patch)
tree72f551af8234afb2bc26de703240933b59f4a317 /lang
parent76073c28f6c52635e35f5a50391458bceaf7a9f5 (diff)
downloadpkgsrc-0c86b5003e0481c0aa33104be14303fe8382c21b.tar.gz
Add support for building with GCC on SunOS, largely based on openjdk7
patches by jesse et al. Fixes build on SunOS.
Diffstat (limited to 'lang')
-rw-r--r--lang/openjdk8/Makefile52
-rw-r--r--lang/openjdk8/PLIST.SunOS28
-rw-r--r--lang/openjdk8/PLIST.debug4
-rw-r--r--lang/openjdk8/bootstrap.mk8
-rw-r--r--lang/openjdk8/distinfo44
-rw-r--r--lang/openjdk8/patches/patch-common_autoconf_generated-configure.sh83
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_adlc.make18
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_build__vm__def.sh14
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_debug.make19
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_dtrace.make56
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_fastdebug.make19
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_gcc.make136
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_jsig.make33
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER1.gcc53
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER2.gcc56
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-TIERED.gcc55
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_optimized.make19
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_product.make25
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_saproc.make23
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_vm.make41
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_atomic__solaris__x86.inline.hpp92
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_orderAccess__solaris__x86.inline.hpp18
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_os__solaris__x86.cpp63
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp35
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_threadLS__solaris__x86.hpp18
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os_bsd_vm_osThread__bsd.cpp13
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os_posix_vm_os__posix.cpp14
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os_solaris_dtrace_jhelper.d81
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_decoder__solaris.cpp18
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_os__solaris.cpp137
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_perfMemory__solaris.cpp24
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp13
-rw-r--r--lang/openjdk8/patches/patch-hotspot_src_share_vm_utilities_hashtable.cpp15
-rw-r--r--lang/openjdk8/patches/patch-jdk_make_CompileDemos.gmk49
-rw-r--r--lang/openjdk8/patches/patch-jdk_make_CompileLaunchers.gmk16
-rw-r--r--lang/openjdk8/patches/patch-jdk_make_Images.gmk22
-rw-r--r--lang/openjdk8/patches/patch-jdk_make_lib_Awt2dLibraries.gmk14
-rw-r--r--lang/openjdk8/patches/patch-jdk_make_lib_NioLibraries.gmk25
-rw-r--r--lang/openjdk8/patches/patch-jdk_make_lib_SoundLibraries.gmk13
-rw-r--r--lang/openjdk8/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecc__impl.h33
-rw-r--r--lang/openjdk8/patches/patch-jdk_src_solaris_bin_ergo__i586.c50
41 files changed, 1512 insertions, 37 deletions
diff --git a/lang/openjdk8/Makefile b/lang/openjdk8/Makefile
index ea0923692cc..ee6517a04b4 100644
--- a/lang/openjdk8/Makefile
+++ b/lang/openjdk8/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2015/06/13 14:55:52 tnn Exp $
+# $NetBSD: Makefile,v 1.17 2015/07/03 20:40:59 fhajny Exp $
DISTNAME= openjdk-1.8.45-20150610
PKGNAME= openjdk8-1.8.45
@@ -71,7 +71,7 @@ MAKE_ENV+= LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
BUILDLINK_PASSTHRU_RPATHDIRS+= ${PREFIX}/java/openjdk8/jre/lib/${LIBDIR_ARCH}
PLIST_SUBST+= ARCH=${LIBDIR_ARCH}
-PLIST_SUBST+= LOWER_OPSYS=${LOWER_OPSYS}
+PLIST_SUBST+= LOWER_OPSYS=${LOWER_OPSYS:S/sunos/solaris/}
.include "../../mk/compiler.mk"
@@ -83,6 +83,37 @@ SUBST_VARS.libpath= PREFIX
CFLAGS+= -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
CXXFLAGS+= -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
+.if ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc)
+MAKE_ENV+= USE_GCC=1
+MAKE_ENV+= ARCH_DATA_MODEL=${ABI:Q}
+.endif
+
+# SmartOS has ccs tools in /usr/bin
+.if ${OS_VARIANT} == "SmartOS"
+SUBST_CLASSES+= ccspath
+SUBST_STAGE.ccspath= pre-build
+SUBST_FILES.ccspath= jdk/make/common/shared/Defs-utils.gmk
+SUBST_FILES.ccspath+= hotspot/make/solaris/makefiles/build_vm_def.sh
+SUBST_SED.ccspath= -e 's/UNIXCCS_PATH/UNIXCOMMAND_PATH/g'
+SUBST_SED.ccspath+= -e 's,/usr/ccs/bin,/usr/bin,g'
+.endif
+
+.if ${OPSYS} == "SunOS"
+SUBST_CLASSES+= mapfix
+SUBST_STAGE.mapfix= pre-build
+SUBST_FILES.mapfix= jdk/make/com/sun/java/pack/mapfile-vers
+SUBST_FILES.mapfix+= jdk/make/java/main/java/mapfile-amd64
+SUBST_FILES.mapfix+= jdk/make/java/main/java/mapfile-i586
+SUBST_SED.mapfix= -e '/__fsr_init_value/d'
+SUBST_SED.mapfix+= -e '/__progname/d'
+
+# environ should only be removed from this file (added by patches)
+SUBST_CLASSES+= mapfix2
+SUBST_STAGE.mapfix2= pre-build
+SUBST_FILES.mapfix2= jdk/make/com/sun/java/pack/mapfile-vers
+SUBST_SED.mapfix2= -e '/environ/d'
+.endif
+
.if !empty(PKGSRC_COMPILER:Mclang)
_WRAP_EXTRA_ARGS.CC+= -Wno-return-type
CWRAPPERS_APPEND.cc+= -Wno-return-type
@@ -125,8 +156,13 @@ SUBST_FILES.fontpaths+= jdk/src/solaris/native/sun/awt/fontpath.c
SUBST_SED.fontpaths= -e 's|@PREFIX@|${PREFIX}|g'
SUBST_SED.fontpaths+= -e 's|@BUILDLINK_PREFIX.fontconfig@|${BUILDLINK_PREFIX.fontconfig}|g'
+PLIST_VARS+= i386
+.if ${MACHINE_ARCH} == "i386"
+PLIST.i386= yes
+.endif
+
PLIST_VARS+= sctp
-.if ${OPSYS} == "FreeBSD"
+.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "SunOS"
PLIST.sctp= yes
.endif
@@ -192,13 +228,21 @@ do-install:
${INSTALL_DATA} ${WRKDIR}/cacerts.out \
${DESTDIR}${JAVA_HOME}/jre/lib/security/cacerts
rm -f ${DESTDIR}${JAVA_HOME}/include/jni_md.h
- ln -s ${LOWER_OPSYS}/jni_md.h \
+ ln -s ${LOWER_OPSYS:S/sunos/solaris/}/jni_md.h \
${DESTDIR}${JAVA_HOME}/include/jni_md.h
.if ${OPSYS} == "NetBSD"
TOOLS_PLATFORM.unzip=
.endif
+# Include binutils for objcopy and GNU strip on SmartOS
+.if ${OS_VARIANT} == "SmartOS"
+.include "../../devel/binutils/buildlink3.mk"
+BUILDLINK_DEPMETHOD.binutils?= build
+MAKE_ENV+= ALT_OBJCOPY=${PREFIX}/bin/gobjcopy
+MAKE_ENV+= STRIP=${PREFIX}/bin/gstrip
+.endif
+
# disabled the ALSA support for now on BSDs via patch
#.include "../../audio/alsa-lib/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
diff --git a/lang/openjdk8/PLIST.SunOS b/lang/openjdk8/PLIST.SunOS
new file mode 100644
index 00000000000..5dc781783ab
--- /dev/null
+++ b/lang/openjdk8/PLIST.SunOS
@@ -0,0 +1,28 @@
+@comment $NetBSD: PLIST.SunOS,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+java/openjdk8/demo/jni/Poller/Poller.jar
+java/openjdk8/demo/jni/Poller/README.txt
+java/openjdk8/demo/jni/Poller/lib/libPoller.so
+java/openjdk8/demo/jni/Poller/src.zip
+${PLIST.i386}java/openjdk8/jre/lib/${ARCH}/server/64/libjvm_db.so
+${PLIST.i386}java/openjdk8/jre/lib/${ARCH}/server/64/libjvm_dtrace.so
+java/openjdk8/jre/lib/${ARCH}/server/libjvm_db.so
+java/openjdk8/jre/lib/${ARCH}/server/libjvm_dtrace.so
+java/openjdk8/jre/lib/sdp/sdp.conf.template
+java/openjdk8/jre/lib/security/sunpkcs11-solaris.cfg
+java/openjdk8/sample/dtrace/README.txt
+java/openjdk8/sample/dtrace/helpers/dtrace_helper.d
+java/openjdk8/sample/dtrace/hotspot/README.txt
+java/openjdk8/sample/dtrace/hotspot/class_loading_stat.d
+java/openjdk8/sample/dtrace/hotspot/gc_time_stat.d
+java/openjdk8/sample/dtrace/hotspot/hotspot_calls_tree.d
+java/openjdk8/sample/dtrace/hotspot/method_compile_stat.d
+java/openjdk8/sample/dtrace/hotspot/method_invocation_stat.d
+java/openjdk8/sample/dtrace/hotspot/method_invocation_stat_filter.d
+java/openjdk8/sample/dtrace/hotspot/method_invocation_tree.d
+java/openjdk8/sample/dtrace/hotspot/monitors.d
+java/openjdk8/sample/dtrace/hotspot/object_allocation_stat.d
+java/openjdk8/sample/dtrace/hotspot_jni/CriticalSection.d
+java/openjdk8/sample/dtrace/hotspot_jni/CriticalSection_slow.d
+java/openjdk8/sample/dtrace/hotspot_jni/README.txt
+java/openjdk8/sample/dtrace/hotspot_jni/hotspot_jni_calls_stat.d
+java/openjdk8/sample/dtrace/hotspot_jni/hotspot_jni_calls_tree.d
diff --git a/lang/openjdk8/PLIST.debug b/lang/openjdk8/PLIST.debug
index f9d8618b22e..911a4205b9a 100644
--- a/lang/openjdk8/PLIST.debug
+++ b/lang/openjdk8/PLIST.debug
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.debug,v 1.1 2015/02/08 08:41:25 tnn Exp $
+@comment $NetBSD: PLIST.debug,v 1.2 2015/07/03 20:40:59 fhajny Exp $
java/openjdk8/jre/lib/${ARCH}/jexec.debuginfo
java/openjdk8/jre/lib/${ARCH}/jli/libjli.debuginfo
java/openjdk8/jre/lib/${ARCH}/libattach.debuginfo
@@ -28,7 +28,7 @@ java/openjdk8/jre/lib/${ARCH}/libnet.debuginfo
java/openjdk8/jre/lib/${ARCH}/libnio.debuginfo
java/openjdk8/jre/lib/${ARCH}/libnpt.debuginfo
${PLIST.native}java/openjdk8/jre/lib/${ARCH}/libsaproc.debuginfo
-java/openjdk8/jre/lib/${ARCH}/libsctp.debuginfo
+${PLIST.sctp}java/openjdk8/jre/lib/${ARCH}/libsctp.debuginfo
${PLIST.x11}java/openjdk8/jre/lib/${ARCH}/libsplashscreen.debuginfo
java/openjdk8/jre/lib/${ARCH}/libsunec.debuginfo
java/openjdk8/jre/lib/${ARCH}/libunpack.debuginfo
diff --git a/lang/openjdk8/bootstrap.mk b/lang/openjdk8/bootstrap.mk
index ab3547863ec..7bfdaac02aa 100644
--- a/lang/openjdk8/bootstrap.mk
+++ b/lang/openjdk8/bootstrap.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.6 2015/03/06 12:11:54 tnn Exp $
+# $NetBSD: bootstrap.mk,v 1.7 2015/07/03 20:40:59 fhajny Exp $
#
# This file contains a map of available binary bootstrap toolchains
# and which kit to use for each supported platform.
@@ -51,6 +51,12 @@ DISTFILES+= ${BOOT.nb5-amd64}
EXTRACT_ONLY+= ${BOOT.nb5-amd64}
.endif
+.if ${OPSYS} == "SunOS"
+BUILD_DEPENDS+= sun-jdk7-[0-9]*:../../lang/sun-jdk7
+JDK_BOOTDIR= ${PREFIX}/java/sun-7
+MAKE_ENV+= ALT_JDK_IMPORT_PATH=${JDK_BOOTDIR}
+.endif
+
.if !empty(MACHINE_PLATFORM:MNetBSD-6.[0-8]*-i386) || make(distinfo)
DISTFILES+= ${BOOT.nb6-i386}
EXTRACT_ONLY+= ${BOOT.nb6-i386}
diff --git a/lang/openjdk8/distinfo b/lang/openjdk8/distinfo
index e19b6cfa1f3..b4ef68f097c 100644
--- a/lang/openjdk8/distinfo
+++ b/lang/openjdk8/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.21 2015/06/27 22:37:42 joerg Exp $
+$NetBSD: distinfo,v 1.22 2015/07/03 20:40:59 fhajny Exp $
SHA1 (openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz) = 7408f52d3bbe35c2b14bbd3215cbf60f1335d334
RMD160 (openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz) = 24f1577b5fc86d137f070aedb4610c8c89e45815
@@ -47,28 +47,58 @@ SHA1 (patch-bh) = 6194a7c319a496f8ff7df173912cf87118f26a63
SHA1 (patch-bi) = 190056b3d4c42986ae0a600668b02711598361b8
SHA1 (patch-bn) = a50dbe17236a90d60d4bbb852ae447e51a279892
SHA1 (patch-common_autoconf_boot-jdk.m4) = b7f8722a25c1c7ab489a9fd65cf60fb4af9530eb
-SHA1 (patch-common_autoconf_generated-configure.sh) = 44eb643c3741500bb1ad1c5c5a7806ac7aa4e9e2
+SHA1 (patch-common_autoconf_generated-configure.sh) = 51e5dc909058b8ea26833a66c1d7eb0dafc3042d
SHA1 (patch-common_autoconf_spec.gmk.in) = e98bc4c8a09f49c6a26447e6f78abf4709ee694b
SHA1 (patch-hotspot_agent_src_share_classes_sun_jvm_hotspot_utilities_PlatformInfo.java) = 893f3b7ad0839a75be49ddd0f5eefcff2dbd2928
SHA1 (patch-hotspot_make_bsd_makefiles_defs.make) = 6b3e2f769c754b3ee5de8c07444964414136fa81
+SHA1 (patch-hotspot_make_solaris_makefiles_adlc.make) = 1d1be862ed0d8fc3da4710da169ad5a965d9df14
+SHA1 (patch-hotspot_make_solaris_makefiles_build__vm__def.sh) = 54d197a94d27406f2957b5c2a7a7982866f99239
+SHA1 (patch-hotspot_make_solaris_makefiles_debug.make) = 7195c97c4f559b2e9410028315de351c5047d59d
+SHA1 (patch-hotspot_make_solaris_makefiles_dtrace.make) = 0c9dc2b97d49cf557dc57071fd7c312b9cb8e598
+SHA1 (patch-hotspot_make_solaris_makefiles_fastdebug.make) = 632f96a322f1568df6f49bf31716bafe1d324976
+SHA1 (patch-hotspot_make_solaris_makefiles_gcc.make) = 9aef5948efd9ef11f862c00d14b4d6dfec019be4
+SHA1 (patch-hotspot_make_solaris_makefiles_jsig.make) = 10ecc1bd24d6d555e4730041c9dce1d3258bcab0
+SHA1 (patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER1.gcc) = 58965fe7c142b67be35cab8b30f84dcee2096e39
+SHA1 (patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER2.gcc) = 2dfd843c450971ee0857cbd81b946a4d7c86ee3b
+SHA1 (patch-hotspot_make_solaris_makefiles_mapfile-vers-TIERED.gcc) = 82ac550f4c342f657834f30f87b7b359e2b7b41b
+SHA1 (patch-hotspot_make_solaris_makefiles_optimized.make) = 78d64fe6cb7c3420889884a450c0803d56e44850
+SHA1 (patch-hotspot_make_solaris_makefiles_product.make) = c41b360302bffd9fbfaa34ee7a4d5d1a756ae0e2
+SHA1 (patch-hotspot_make_solaris_makefiles_saproc.make) = 0ca85ba72d154643b934815a0a2deb1e77371ff9
+SHA1 (patch-hotspot_make_solaris_makefiles_vm.make) = 787e0c68cf976fc0df3e19fb2a22b1b7e3662c07
SHA1 (patch-hotspot_src_cpu_zero_vm_methodHandles__zero.cpp) = 9f7acf1eff3baba430880be9fd0f6148056dd088
SHA1 (patch-hotspot_src_cpu_zero_vm_nativeInst__zero.cpp) = dcd83b65a7d74e153a3e1c44f8c7980827ec20c7
SHA1 (patch-hotspot_src_os__cpu_bsd__zero_vm_atomic__bsd__zero.inline.hpp) = e87224f8b67dc78fa411d30beff82ce5ccbb4cc5
SHA1 (patch-hotspot_src_os__cpu_bsd__zero_vm_orderAccess__bsd__zero.inline.hpp) = 6311d68db9064afc470f1d9fd37e63011899659a
SHA1 (patch-hotspot_src_os__cpu_bsd__zero_vm_os__bsd__zero.cpp) = 4fa018be66fad39aa0a922dfb86c79661a7379f2
-SHA1 (patch-hotspot_src_os_posix_vm_os__posix.cpp) = 69a4ff639488bec525cb5bbccaca10dae0d7dc4d
+SHA1 (patch-hotspot_src_os__cpu_solaris__x86_vm_atomic__solaris__x86.inline.hpp) = 2bf9147643be4ac711d1bf94eb0e6ae4abad20c6
+SHA1 (patch-hotspot_src_os__cpu_solaris__x86_vm_orderAccess__solaris__x86.inline.hpp) = 82818bc8d8fee46403b88cf52a7c978b5ea0005c
+SHA1 (patch-hotspot_src_os__cpu_solaris__x86_vm_os__solaris__x86.cpp) = 6a6b719a52408e88b27d3f2a5a41789dc15ef39d
+SHA1 (patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp) = 92377183e9b9f232dfd7161bf37a8856441f3977
+SHA1 (patch-hotspot_src_os__cpu_solaris__x86_vm_threadLS__solaris__x86.hpp) = 062a3cf87793867b68d497b75f5fef55ed6e1666
+SHA1 (patch-hotspot_src_os_bsd_vm_osThread__bsd.cpp) = b56cfc0abb53f9ec79005d9169566aadeecc51e7
+SHA1 (patch-hotspot_src_os_posix_vm_os__posix.cpp) = bb1d9b46b43b61e29e9bdf1e4311a486a81dc6f4
+SHA1 (patch-hotspot_src_os_solaris_dtrace_jhelper.d) = e4321382dc95fe9e363abc8c8a740e9f3f23c170
+SHA1 (patch-hotspot_src_os_solaris_vm_decoder__solaris.cpp) = 3be8a96525ead1df18a40b18dccfad4ef2765d47
+SHA1 (patch-hotspot_src_os_solaris_vm_os__solaris.cpp) = c8840633681c01d4a911e32e8d79060fbbdc506e
+SHA1 (patch-hotspot_src_os_solaris_vm_perfMemory__solaris.cpp) = 589bf0707023b9f799caf2cafe5aeba89af46b05
SHA1 (patch-hotspot_src_share_vm_ci_ciTypeFlow.cpp) = 2d827ade6fcf0ba08fcd0390472cda17772bc0c5
SHA1 (patch-hotspot_src_share_vm_interpreter_interpreterRuntime.cpp) = d2eaaae414810ab460ced512fdfc07385d60f4b8
SHA1 (patch-hotspot_src_share_vm_opto_node.cpp) = aacb4e03f62f1a6f9b38de39a966c318b70b1293
-SHA1 (patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp) = cab48bc272fc67f3326e663dc6feb94fe56ec79f
-SHA1 (patch-jdk_make_CompileLaunchers.gmk) = 76bae0aab5528a6c020d2fdd5ba7c1ffa132aca2
+SHA1 (patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp) = f35b8c1a1841f1239aa25d58d0b8749bb7b29ad2
+SHA1 (patch-hotspot_src_share_vm_utilities_hashtable.cpp) = 83b90d951ce3aa9e913a36d792ac7376fb3d8bc7
+SHA1 (patch-jdk_make_CompileDemos.gmk) = 4d5e2e9b0e35e373e6246408c775c25094b6f1c7
+SHA1 (patch-jdk_make_CompileLaunchers.gmk) = 48427d0ff3f29781d2beabf564e8bf55fa52dfdb
SHA1 (patch-jdk_make_CreateJars.gmk) = 0f49c8ec33121d7878ea4b6bd06d2e4e4af9a1d5
SHA1 (patch-jdk_make_GenerateSources.gmk) = ec1b64805afb6edca637d87529b1d3fa59d20828
-SHA1 (patch-jdk_make_Images.gmk) = 7f3374554fa889ca2820f91f9dc1d34f2f39df0b
-SHA1 (patch-jdk_make_lib_SoundLibraries.gmk) = 1da8abd48754289f24aaeb610f05e58ad829123b
+SHA1 (patch-jdk_make_Images.gmk) = e6643dcb25ad5457efe610f6ab7fd0ccc9b5ed41
+SHA1 (patch-jdk_make_lib_Awt2dLibraries.gmk) = 5fed2c4036080dd5230941bbb76025859e936267
+SHA1 (patch-jdk_make_lib_NioLibraries.gmk) = 2f87fe9f0dd5a9298954d4da21938d147c368d42
+SHA1 (patch-jdk_make_lib_SoundLibraries.gmk) = b63cf0ebe204acf7264704916df875a31de84393
SHA1 (patch-jdk_src_share_native_sun_awt_image_jpeg_imageioJPEG.c) = fe58fe992521c0ef8b7b60f8213bfcd714790c1e
SHA1 (patch-jdk_src_share_native_sun_awt_image_jpeg_jpegdecoder.c) = 5986de69be2eb36546274a8242b8d13ed7599b50
+SHA1 (patch-jdk_src_share_native_sun_security_ec_impl_ecc__impl.h) = 18e79e74dc8ec2b24ab91ad8af2195bfd508d1b4
SHA1 (patch-jdk_src_solaris_bin_ergo.c) = 0e2e496a0d596cc9de546c722b3387ad5a08bc21
+SHA1 (patch-jdk_src_solaris_bin_ergo__i586.c) = f6fd4c1e0627867ba8d5071da7c53697177805dd
SHA1 (patch-jdk_src_solaris_classes_sun_net_PortConfig.java) = ea9f74b654ddc7ab977daff6c9176d78657145a9
SHA1 (patch-jdk_src_solaris_classes_sun_nio_ch_DefaultAsynchronousChannelProvider.java) = f11483cb75ab5cad5a5b749cab287d5dbaaefe63
SHA1 (patch-jdk_src_solaris_native_com_sun_media_sound_PLATFORM__API__BsdOS__ALSA__PCM.c) = 7fab23dce20b4ff18123ea65841589ae673f5675
diff --git a/lang/openjdk8/patches/patch-common_autoconf_generated-configure.sh b/lang/openjdk8/patches/patch-common_autoconf_generated-configure.sh
index 6587bd18fda..a17946ba6b2 100644
--- a/lang/openjdk8/patches/patch-common_autoconf_generated-configure.sh
+++ b/lang/openjdk8/patches/patch-common_autoconf_generated-configure.sh
@@ -1,4 +1,8 @@
-$NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42 joerg Exp $
+$NetBSD: patch-common_autoconf_generated-configure.sh,v 1.6 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support on SunOS.
+Fix max heap.
+Avoid requiring ALSA.
--- common/autoconf/generated-configure.sh.orig 2015-06-10 10:29:06.000000000 +0000
+++ common/autoconf/generated-configure.sh
@@ -42,7 +46,7 @@ $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42
# This is not a symbolic link! We are done!
break
fi
-@@ -16217,16 +16217,15 @@ $as_echo_n "checking flags for boot jdk
+@@ -16217,16 +16217,15 @@ $as_echo_n "checking flags for boot jdk
# Maximum amount of heap memory.
# Maximum stack size.
if test "x$BUILD_NUM_BITS" = x32; then
@@ -60,6 +64,15 @@ $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42
$ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
$ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
+@@ -19320,7 +19319,7 @@ $as_echo "$as_me: Downloading build depe
+ elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+ COMPILER_CHECK_LIST="cl"
+ elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+- COMPILER_CHECK_LIST="cc gcc"
++ COMPILER_CHECK_LIST="gcc cc"
+ elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
+ # Do not probe for cc on AIX.
+ COMPILER_CHECK_LIST="xlc_r"
@@ -19774,7 +19773,7 @@ $as_echo_n "checking resolved symbolic l
# Resolve file symlinks
while test $COUNTER -lt 20; do
@@ -78,6 +91,15 @@ $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42
# This is not a symbolic link! We are done!
break
fi
+@@ -20240,7 +20239,7 @@ $as_echo "no, keeping CC" >&6; }
+ COMPILER=$CC
+ COMPILER_NAME=$COMPILER_NAME
+
+- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
++ if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$GCC" = xno; then
+ # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
+ COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
+ $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
@@ -21375,7 +21374,7 @@ $as_echo_n "checking resolved symbolic l
# Resolve file symlinks
while test $COUNTER -lt 20; do
@@ -96,7 +118,45 @@ $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42
# This is not a symbolic link! We are done!
break
fi
-@@ -29862,7 +29861,7 @@ fi
+@@ -21841,7 +21840,7 @@ $as_echo "no, keeping CXX" >&6; }
+ COMPILER=$CXX
+ COMPILER_NAME=$COMPILER_NAME
+
+- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
++ if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$GCC" = xno; then
+ # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
+ COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
+ $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
+@@ -29520,6 +29519,14 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
+ if test "x$OPENJDK_TARGET_OS" = xbsd || test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
+ fi
++ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
++ SET_SHARED_LIBRARY_NAME=''
++ SET_SHARED_LIBRARY_MAPFILE=''
++ SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
++ SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
++ CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
++ CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
++ fi
+ else
+ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
+ # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
+@@ -29661,6 +29668,13 @@ rm -f core conftest.err conftest.$ac_obj
+ C_O_FLAG_NORM="-Os"
+ C_O_FLAG_NONE=""
+ ;;
++ solaris )
++ # libverify currently crashes in 32-bit builds with
++ # alignment faults, temporary workaround with -O2
++ C_O_FLAG_HI="-O2"
++ C_O_FLAG_NORM="-O2"
++ C_O_FLAG_NONE="-O0"
++ ;;
+ *)
+ C_O_FLAG_HI="-O3"
+ C_O_FLAG_NORM="-O2"
+@@ -29862,7 +29875,7 @@ fi
#
case $COMPILER_NAME in
gcc )
@@ -105,7 +165,7 @@ $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42
-pipe \
-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
case $OPENJDK_TARGET_CPU_ARCH in
-@@ -30475,7 +30474,8 @@ $as_echo "alsa pulse x11" >&6; }
+@@ -30475,7 +30488,8 @@ $as_echo "alsa pulse x11" >&6; }
if test "x$OPENJDK_TARGET_OS" = xbsd; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on BSD?" >&5
$as_echo_n "checking what is not needed on BSD?... " >&6; }
@@ -115,7 +175,7 @@ $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42
ALSA_NOT_NEEDED=yes
PULSE_NOT_NEEDED=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
-@@ -31701,7 +31701,11 @@ $as_echo "$as_me: WARNING: freetype not
+@@ -31701,7 +31715,11 @@ $as_echo "$as_me: WARNING: freetype not
# Allow --with-freetype-lib and --with-freetype-include to override
if test "x$with_freetype_include" != x; then
@@ -128,7 +188,7 @@ $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42
fi
if test "x$with_freetype_lib" != x; then
POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
-@@ -34519,7 +34523,7 @@ $as_echo "$as_me: The path of FREETYPE_I
+@@ -34519,7 +34537,7 @@ $as_echo "$as_me: The path of FREETYPE_I
FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
fi
@@ -137,7 +197,7 @@ $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
else
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
-@@ -34652,7 +34656,7 @@ $as_echo "$as_me: The path of FREETYPE_L
+@@ -34652,7 +34670,7 @@ $as_echo "$as_me: The path of FREETYPE_L
if test "x$OPENJDK_TARGET_OS" = xwindows; then
FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
else
@@ -146,3 +206,12 @@ $NetBSD: patch-common_autoconf_generated-configure.sh,v 1.5 2015/06/27 22:37:42
fi
fi
+@@ -35923,7 +35941,7 @@ fi
+ fi
+
+ # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
+- if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
++ if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x && test "x$GCC" = "xno"; then
+ LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
+ fi
+
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_adlc.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_adlc.make
new file mode 100644
index 00000000000..9b7cbabdef3
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_adlc.make
@@ -0,0 +1,18 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_adlc.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/adlc.make.orig 2013-02-19 23:21:59.000000000 +0000
++++ hotspot/make/solaris/makefiles/adlc.make
+@@ -75,9 +75,11 @@ endif
+
+ # CFLAGS_WARN holds compiler options to suppress/enable warnings.
+ # Compiler warnings are treated as errors
++ifeq ("${Platform_compiler}", "sparcWorks")
+ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
+ CFLAGS_WARN = +w -errwarn
+ endif
++endif
+ CFLAGS += $(CFLAGS_WARN)
+
+ ifeq ("${Platform_compiler}", "sparcWorks")
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_build__vm__def.sh b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_build__vm__def.sh
new file mode 100644
index 00000000000..1efcdd62b3c
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_build__vm__def.sh
@@ -0,0 +1,14 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_build__vm__def.sh,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+Fix path to nm.
+
+--- hotspot/make/solaris/makefiles/build_vm_def.sh.orig 2013-02-19 23:21:59.000000000 +0000
++++ hotspot/make/solaris/makefiles/build_vm_def.sh
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-/usr/ccs/bin/nm -p $* \
++/usr/bin/nm -p $* \
+ | awk '{
+ if ($2 == "U") next
+ if ($3 ~ /^__1c.*__vtbl_$/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_debug.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_debug.make
new file mode 100644
index 00000000000..97a6ecfa485
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_debug.make
@@ -0,0 +1,19 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_debug.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/debug.make.orig 2015-02-02 15:32:37.000000000 +0000
++++ hotspot/make/solaris/makefiles/debug.make
+@@ -49,7 +49,11 @@ MAPFILE = $(GAMMADIR)/make/solaris/makef
+
+ # This mapfile is only needed when compiling with dtrace support,
+ # and mustn't be otherwise.
+-MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE)
++ifdef USE_GCC
++ MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE).gcc
++else
++ MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE)
++endif # USE_GCC
+
+ VERSION = debug
+ SYSDEFS += -DASSERT
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_dtrace.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_dtrace.make
new file mode 100644
index 00000000000..0e1fe2eb9d6
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_dtrace.make
@@ -0,0 +1,56 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_dtrace.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+Enable DTrace support with GCC.
+
+--- hotspot/make/solaris/makefiles/dtrace.make.orig 2015-06-10 10:31:44.000000000 +0000
++++ hotspot/make/solaris/makefiles/dtrace.make
+@@ -29,13 +29,6 @@
+
+ ifneq ("${TYPE}", "CORE")
+
+-ifdef USE_GCC
+-
+-dtraceCheck:
+- $(QUIETLY) echo "**NOTICE** Dtrace support disabled for gcc builds"
+-
+-else
+-
+ JVM_DB = libjvm_db
+ LIBJVM_DB = libjvm_db.so
+
+@@ -56,14 +49,23 @@ DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Pla
+ DTRACE = dtrace
+ DTRACE.o = $(DTRACE).o
+
+-# to remove '-g' option which causes link problems
+-# also '-z nodefs' is used as workaround
+-GENOFFS_CFLAGS = $(shell echo $(CFLAGS) | sed -e 's/ -g / /g' -e 's/ -g0 / /g';)
++ifdef USE_GCC
++ # solaris linker does not like gcc and -fvisibility=hidden without mapfiles
++ GENOFFS_CFLAGS = $(shell echo $(CFLAGS) | sed -e 's/ -g / /g' -e 's/ -g0 / /g' -e 's/ -fvisibility=hidden / /g';)
++else
++ # to remove '-g' option which causes link problems
++ # also '-z nodefs' is used as workaround
++ GENOFFS_CFLAGS = $(shell echo $(CFLAGS) | sed -e 's/ -g / /g' -e 's/ -g0 / /g';)
++endif
+
+ ifdef LP64
+ DTRACE_OPTS = -64 -D_LP64
+ endif
+
++ifdef USE_GCC
++ DTRACE_OPTS = -D_GNU_SOURCE
++endif # USE_GCC
++
+ # making libjvm_db
+
+ # Use mapfile with libjvm_db.so
+@@ -352,8 +354,6 @@ dtraceCheck:
+
+ endif # ifneq ("${dtraceFound}", "")
+
+-endif # ifdef USE_GCC
+-
+ else # CORE build
+
+ dtraceCheck:
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_fastdebug.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_fastdebug.make
new file mode 100644
index 00000000000..b5f7fd9ed47
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_fastdebug.make
@@ -0,0 +1,19 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_fastdebug.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/fastdebug.make.orig 2015-02-02 15:32:37.000000000 +0000
++++ hotspot/make/solaris/makefiles/fastdebug.make
+@@ -120,7 +120,11 @@ MAPFILE = $(GAMMADIR)/make/solaris/makef
+
+ # This mapfile is only needed when compiling with dtrace support,
+ # and mustn't be otherwise.
+-MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE)
++ifdef USE_GCC
++ MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE).gcc
++else
++ MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE)
++endif # USE_GCC
+
+ VERSION = optimized
+ SYSDEFS += -DASSERT -DCHECK_UNHANDLED_OOPS
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_gcc.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_gcc.make
new file mode 100644
index 00000000000..3ab5e8e4627
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_gcc.make
@@ -0,0 +1,136 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_gcc.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/gcc.make.orig 2015-02-02 15:32:37.000000000 +0000
++++ hotspot/make/solaris/makefiles/gcc.make
+@@ -70,11 +70,23 @@ VM_PICFLAG/LIBJVM = $(PICFLAG)
+ VM_PICFLAG/AOUT =
+ VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
+
++ifeq ($(JVM_VARIANT_ZERO), true)
++ CFLAGS += $(LIBFFI_CFLAGS)
++endif
++ifeq ($(JVM_VARIANT_ZEROSHARK), true)
++ CFLAGS += $(LIBFFI_CFLAGS)
++ CFLAGS += $(LLVM_CFLAGS)
++endif
+ CFLAGS += $(VM_PICFLAG)
+ CFLAGS += -fno-rtti
+ CFLAGS += -fno-exceptions
+ CFLAGS += -D_REENTRANT
+ CFLAGS += -fcheck-new
++# version 4 and above support fvisibility=hidden (matches jni_x86.h file)
++# except 4.1.2 gives pointless warnings that can't be disabled (afaik)
++ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
++ CFLAGS += -fvisibility=hidden
++endif
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+
+@@ -86,7 +98,8 @@ ARCHFLAG/amd64 = -m64 -march=k8
+
+ # Optional sub-directory in /usr/lib where BUILDARCH libraries are kept.
+ ISA_DIR=$(ISA_DIR/$(BUILDARCH))
+-ISA_DIR/amd64=/amd64
++ISA_DIR/amd64=
++NOMULTIARCHISA_DIR/amd64=/amd64
+ ISA_DIR/i486=
+ ISA_DIR/sparcv9=/64
+
+@@ -94,7 +107,6 @@
+ CFLAGS += $(ARCHFLAG)
+ AOUT_FLAGS += $(ARCHFLAG)
+ LFLAGS += $(ARCHFLAG)
+-ASFLAGS += $(ARCHFLAG)
+
+ ifeq ($(BUILDARCH), amd64)
+ ASFLAGS += -march=k8 -march=amd64
+@@ -107,6 +119,11 @@ ifdef CC_INTERP
+ CFLAGS += -DCC_INTERP
+ endif
+
++# Build for embedded targets
++ifdef JAVASE_EMBEDDED
++ CFLAGS += -DJAVASE_EMBEDDED
++endif
++
+ # Keep temporary files (.ii, .s)
+ ifdef NEED_ASM
+ CFLAGS += -save-temps
+@@ -117,9 +134,18 @@ endif
+
+ # Compiler warnings are treated as errors
+ WARNINGS_ARE_ERRORS = -Werror
+-# Enable these warnings. See 'info gcc' about details on these options
+-WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef
+-CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
++
++# Except for a few acceptable ones
++# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
++# conversions which might affect the values. To avoid that, we need to turn
++# it off explicitly.
++ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
++ ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare
++else
++ ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef
++endif
++
++CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
+ # Special cases
+ CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
+
+@@ -177,7 +203,7 @@ MAPFLAG = -Xlinker -M -Xlinker FILENAME
+ endif
+
+ # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
+-SONAMEFLAG = -Xlinker -soname=SONAME
++SONAMEFLAG = -Wl,-soname=SONAME
+
+ # Build shared library
+ SHARED_FLAG = -shared
+@@ -185,15 +211,32 @@ SHARED_FLAG = -shared
+ #------------------------------------------------------------------------
+ # Debug flags
+
+-# Use the stabs format for debugging information (this is the default
+-# on gcc-2.91). It's good enough, has all the information about line
+-# numbers and local variables, and libjvm.so is only about 16M.
+-# Change this back to "-g" if you want the most expressive format.
+-# (warning: that could easily inflate libjvm.so to 150M!)
+-# Note: The Itanium gcc compiler crashes when using -gstabs.
+-DEBUG_CFLAGS/ia64 = -g
+-DEBUG_CFLAGS/amd64 = -g
+-DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
+-ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
+-DEBUG_CFLAGS += -gstabs
+-endif
++# DEBUG_BINARIES uses full -g debug information for all configs
++ifeq ($(DEBUG_BINARIES), true)
++ CFLAGS += -g
++else
++# Use the stabs format for debugging information (this is the default
++# on gcc-2.91). It's good enough, has all the information about line
++# numbers and local variables, and libjvm_g.so is only about 16M.
++# Change this back to "-g" if you want the most expressive format.
++# (warning: that could easily inflate libjvm_g.so to 150M!)
++# Note: The Itanium gcc compiler crashes when using -gstabs.
++DEBUG_CFLAGS/ia64 = -g
++DEBUG_CFLAGS/amd64 = -g
++DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
++ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),)
++DEBUG_CFLAGS += -gstabs
++endif
++endif
++
++# If we are building HEADLESS, pass on to VM
++# so it can set the java.awt.headless property
++ifdef HEADLESS
++ CFLAGS += -DHEADLESS
++endif
++
++# We are building Embedded for a small device
++# favor code space over speed
++ifdef MINIMIZE_RAM_USAGE
++ CFLAGS += -DMINIMIZE_RAM_USAGE
++endif
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_jsig.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_jsig.make
new file mode 100644
index 00000000000..ba35aea8e81
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_jsig.make
@@ -0,0 +1,33 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_jsig.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/jsig.make.orig 2015-06-10 10:31:44.000000000 +0000
++++ hotspot/make/solaris/makefiles/jsig.make
+@@ -42,15 +42,25 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfi
+ LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
+
+ ifdef USE_GCC
+-LFLAGS_JSIG += -D_REENTRANT
++LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT
+ else
+ LFLAGS_JSIG += -mt -xnolib
+ endif
+
++# DEBUG_BINARIES overrides everything, use full -g debug information
++ifeq ($(DEBUG_BINARIES), true)
++JSIG_DEBUG_CFLAGS = -g
++endif
++
+ $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
+ @echo Making signal interposition lib...
++ifdef USE_GCC
++ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
++ $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $(JSIGSRCDIR)/jsig.c -ldl
++else
+ $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
+ $(LFLAGS_JSIG) -o $@ $(JSIGSRCDIR)/jsig.c -ldl
++endif
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER1.gcc b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER1.gcc
new file mode 100644
index 00000000000..c3edd864295
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER1.gcc
@@ -0,0 +1,53 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER1.gcc,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/mapfile-vers-COMPILER1.gcc.orig 2013-03-10 22:22:12.895432470 +0000
++++ hotspot/make/solaris/makefiles/mapfile-vers-COMPILER1.gcc
+@@ -0,0 +1,46 @@
++#
++
++#
++# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++# or visit www.oracle.com if you need additional information or have any
++# questions.
++#
++#
++
++# Define public interface.
++
++SUNWprivate_1.1 {
++ global:
++ # Dtrace support
++ _Z7madvisePcmi;
++ _Z7memcntlPcmiS_ii;
++ _ZN8Universe15_methodKlassObjE;
++ _ZN9CodeCache5_heapE;
++ _ZN8Universe14_collectedHeapE;
++ _ZTV6Method;
++ _ZTV7nmethod;
++ _ZTV8CodeBlob;
++ _ZTV10BufferBlob;
++ _ZTV11RuntimeStub;
++ _ZTV13SafepointBlob;
++ _ZTV18DeoptimizationBlob;
++
++ __JvmOffsets;
++};
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER2.gcc b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER2.gcc
new file mode 100644
index 00000000000..5a0d506a807
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER2.gcc
@@ -0,0 +1,56 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_mapfile-vers-COMPILER2.gcc,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/mapfile-vers-COMPILER2.gcc.orig 2015-07-01 10:10:20.072415621 +0000
++++ hotspot/make/solaris/makefiles/mapfile-vers-COMPILER2.gcc
+@@ -0,0 +1,49 @@
++#
++
++#
++# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++# or visit www.oracle.com if you need additional information or have any
++# questions.
++#
++#
++
++# Define public interface.
++
++SUNWprivate_1.1 {
++ global:
++ # Dtrace support
++ _Z7madvisePcmi;
++ _Z7memcntlPcmiS_ii;
++ _ZN8Universe15_methodKlassObjE;
++ _ZN9CodeCache5_heapE;
++ _ZN8Universe14_collectedHeapE;
++ _ZTV6Method;
++ _ZTV7nmethod;
++ _ZTV8CodeBlob;
++ _ZTV10BufferBlob;
++ _ZTV11RuntimeStub;
++ _ZTV13SafepointBlob;
++ _ZTV18DeoptimizationBlob;
++
++ _ZTV13ExceptionBlob;
++ _ZTV16UncommonTrapBlob;
++
++ __JvmOffsets;
++};
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-TIERED.gcc b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-TIERED.gcc
new file mode 100644
index 00000000000..893dc2cdb93
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_mapfile-vers-TIERED.gcc
@@ -0,0 +1,55 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_mapfile-vers-TIERED.gcc,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/mapfile-vers-TIERED.gcc.orig 2015-07-01 10:10:20.142891086 +0000
++++ hotspot/make/solaris/makefiles/mapfile-vers-TIERED.gcc
+@@ -0,0 +1,48 @@
++#
++
++#
++# Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
++# or visit www.oracle.com if you need additional information or have any
++# questions.
++#
++#
++
++# Define public interface.
++
++SUNWprivate_1.1 {
++ global:
++ # Dtrace support
++ _Z7madvisePcmi;
++ _Z7memcntlPcmiS_ii;
++ _ZN8Universe15_methodKlassObjE;
++ _ZN9CodeCache5_heapE;
++ _ZN8Universe14_collectedHeapE;
++ _ZTV6Method;
++ _ZTV7nmethod;
++ _ZTV8CodeBlob;
++ _ZTV10BufferBlob;
++ _ZTV11RuntimeStub;
++ _ZTV13SafepointBlob;
++ _ZTV18DeoptimizationBlob;
++ _ZTV13ExceptionBlob;
++ _ZTV16UncommonTrapBlob;
++
++ __JvmOffsets;
++};
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_optimized.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_optimized.make
new file mode 100644
index 00000000000..9adf0c04d24
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_optimized.make
@@ -0,0 +1,19 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_optimized.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/optimized.make.orig 2013-02-19 23:21:59.000000000 +0000
++++ hotspot/make/solaris/makefiles/optimized.make
+@@ -57,7 +57,11 @@ MAPFILE = $(GAMMADIR)/make/solaris/makef
+
+ # This mapfile is only needed when compiling with dtrace support,
+ # and mustn't be otherwise.
+-MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE)
++ifdef USE_GCC
++ MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE).gcc
++else
++ MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE)
++endif # USE_GCC
+
+ # Set the environment variable HOTSPARC_GENERIC to "true"
+ # to inhibit the effect of the previous line on CFLAGS.
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_product.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_product.make
new file mode 100644
index 00000000000..9b34dd47d6d
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_product.make
@@ -0,0 +1,25 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_product.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/product.make.orig 2015-02-02 15:32:37.000000000 +0000
++++ hotspot/make/solaris/makefiles/product.make
+@@ -67,10 +67,16 @@ CFLAGS$(HOTSPARC_GENERIC) += $(OPT_CFLAG
+ # Linker mapfiles
+ MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers
+
+-ifndef USE_GCC
+ # This mapfile is only needed when compiling with dtrace support,
+ # and mustn't be otherwise.
+-MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE)
++ifdef USE_GCC
++ MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE).gcc
++else
++ MAPFILE_DTRACE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-$(TYPE)
++endif # USE_GCC
++
++# reorder is not used with gcc
++ifndef USE_GCC
+
+ endif
+
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_saproc.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_saproc.make
new file mode 100644
index 00000000000..9f27d52767f
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_saproc.make
@@ -0,0 +1,23 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_saproc.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+Only use libdemangle for Sun Studio builds.
+
+--- hotspot/make/solaris/makefiles/saproc.make.orig 2015-02-02 15:32:37.000000000 +0000
++++ hotspot/make/solaris/makefiles/saproc.make
+@@ -60,6 +60,7 @@ ifdef USE_GCC
+ SA_LFLAGS += -D_REENTRANT
+ else
+ SA_LFLAGS += -mt -xnolib -norunpath
++LIBDEMANGLE = -ldemangle
+ endif
+
+ # The libproc Pstack_iter() interface changed in Nevada-B159.
+@@ -107,7 +108,7 @@ $(LIBSAPROC): $(ADD_GNU_DEBUGLINK) $(FIX
+ $(SADISOBJ) \
+ $(SA_LFLAGS) \
+ -o $@ \
+- -ldl -ldemangle -lthread -lc
++ -ldl ${LIBDEMANGLE} -lthread -lc
+
+ $(SADISOBJ): $(SADISSRCFILES)
+ $(QUIETLY) $(CC) \
diff --git a/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_vm.make b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_vm.make
new file mode 100644
index 00000000000..d9e6e518f5a
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_solaris_makefiles_vm.make
@@ -0,0 +1,41 @@
+$NetBSD: patch-hotspot_make_solaris_makefiles_vm.make,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/make/solaris/makefiles/vm.make.orig 2015-02-02 15:32:37.000000000 +0000
++++ hotspot/make/solaris/makefiles/vm.make
+@@ -59,7 +59,11 @@ INCLUDES += $(Src_Dirs_I:%=-I%)
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ # always build with debug info when we can create .debuginfo files
+ # and disable 'lazy debug info' so the .so has everything.
+- SYMFLAG = -g -xs
++ ifdef USE_GCC
++ SYMFLAG = -g
++ else
++ SYMFLAG = -g -xs
++ endif
+ else
+ ifeq (${VERSION}, debug)
+ SYMFLAG = -g
+@@ -271,16 +275,19 @@ ifeq ($(LINK_INTO),AOUT)
+ LIBS_VM = $(LIBS)
+ else
+ LIBJVM.o = $(JVM_OBJ_FILES)
+- LIBJVM_MAPFILE$(LDNOMAP) = mapfile_extended
+- LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
+ LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
+ ifndef USE_GCC
+ LIBS_VM = $(LIBS)
++ LIBJVM_MAPFILE$(LDNOMAP) = mapfile_extended
++ LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
+ else
+ # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
+ # get around library dependency and compatibility issues. Must use gcc not
+ # g++ to link.
+ LFLAGS_VM += $(STATIC_LIBGCC)
++ ifeq ($(BUILDARCH),i486)
++ LFLAGS_VM += -mimpure-text
++ endif
+ LIBS_VM += $(STATIC_STDCXX) $(LIBS)
+ endif
+ endif
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_atomic__solaris__x86.inline.hpp b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_atomic__solaris__x86.inline.hpp
new file mode 100644
index 00000000000..acece86d787
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_atomic__solaris__x86.inline.hpp
@@ -0,0 +1,92 @@
+$NetBSD: patch-hotspot_src_os__cpu_solaris__x86_vm_atomic__solaris__x86.inline.hpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp.orig 2013-02-19 23:21:59.000000000 +0000
++++ hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp
+@@ -59,6 +59,8 @@ inline void Atomic::dec_ptr(volatile voi
+ // facilitate this, os::is_MP() is passed as an additional argument. 64-bit
+ // processors are assumed to be multi-threaded and/or multi-core, so the extra
+ // argument is unnecessary.
++// This needs cleaning up - gcc always requires is_mp due to laziness of porter.
++#ifndef _GNU_SOURCE
+ #ifndef _LP64
+ #define IS_MP_DECL() , int is_mp
+ #define IS_MP_ARG() , (int) os::is_MP()
+@@ -66,6 +68,11 @@ inline void Atomic::dec_ptr(volatile voi
+ #define IS_MP_DECL()
+ #define IS_MP_ARG()
+ #endif // _LP64
++#else
++#define IS_MP_DECL() , int is_mp
++#define IS_MP_ARG() , (int) os::is_MP()
++#endif // _GNU_SOURCE
++
+
+ extern "C" {
+ jint _Atomic_add(jint add_value, volatile jint* dest IS_MP_DECL());
+@@ -96,15 +103,27 @@ inline jlong Atomic::cmpxchg (jlon
+ #ifdef AMD64
+ inline void Atomic::store (jlong store_value, jlong* dest) { *dest = store_value; }
+ inline void Atomic::store (jlong store_value, volatile jlong* dest) { *dest = store_value; }
++#ifndef _GNU_SOURCE
+ extern "C" jlong _Atomic_add_long(jlong add_value, volatile jlong* dest);
++#else
++extern "C" jlong _Atomic_add_long(jlong add_value, volatile jlong* dest IS_MP_DECL());
++#endif // _GNU_SOURCE
+ extern "C" jlong _Atomic_xchg_long(jlong exchange_value, volatile jlong* dest);
+
+ inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
++#ifndef _GNU_SOURCE
+ return (intptr_t)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest);
++#else
++ return (intptr_t)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest IS_MP_ARG());
++#endif // _GNU_SOURCE
+ }
+
+ inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) {
++#ifndef _GNU_SOURCE
+ return (void*)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest);
++#else
++ return (void*)_Atomic_add_long((jlong)add_value, (volatile jlong*)dest IS_MP_ARG());
++#endif // _GNU_SOURCE
+ }
+
+ inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
+@@ -116,11 +135,19 @@ inline void* Atomic::xchg_ptr(void*
+ }
+
+ inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value) {
++#ifndef _GNU_SOURCE
+ return (intptr_t)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value);
++#else
++ return (intptr_t)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value IS_MP_ARG());
++#endif // _GNU_SOURCE
+ }
+
+ inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value) {
++#ifndef _GNU_SOURCE
+ return (void*)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value);
++#else
++ return (void*)_Atomic_cmpxchg_long((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value IS_MP_ARG());
++#endif // _GNU_SOURCE
+ }
+
+ inline jlong Atomic::load(volatile jlong* src) { return *src; }
+@@ -257,6 +284,16 @@ extern "C" {
+ #endif // if 0
+ #endif // AMD64
+ }
++
++ inline void _Atomic_move_long(volatile jlong* src, volatile jlong* dst) {
++ __asm__ volatile (
++ "fildll (%0)" "\n\t"
++ "fistpll (%1)"
++ :
++ :"r" (src), "r" (dst)
++ :"memory");
++ }
++
+ }
+ #undef LOCK_IF_MP
+
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_orderAccess__solaris__x86.inline.hpp b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_orderAccess__solaris__x86.inline.hpp
new file mode 100644
index 00000000000..3717a33feda
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_orderAccess__solaris__x86.inline.hpp
@@ -0,0 +1,18 @@
+$NetBSD: patch-hotspot_src_os__cpu_solaris__x86_vm_orderAccess__solaris__x86.inline.hpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp.orig 2013-02-19 23:21:59.000000000 +0000
++++ hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp
+@@ -71,7 +71,11 @@ extern "C" {
+ }
+ inline void _OrderAccess_fence() {
+ // Always use locked addl since mfence is sometimes expensive
++#ifdef AMD64
++ __asm__ volatile ("lock; addl $0,0(%%rsp)" : : : "cc", "memory");
++#else
+ __asm__ volatile ("lock; addl $0,0(%%esp)" : : : "cc", "memory");
++#endif // AMD64
+ }
+
+ }
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_os__solaris__x86.cpp b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_os__solaris__x86.cpp
new file mode 100644
index 00000000000..aebaaf766ee
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_os__solaris__x86.cpp
@@ -0,0 +1,63 @@
+$NetBSD: patch-hotspot_src_os__cpu_solaris__x86_vm_os__solaris__x86.cpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp.orig 2015-06-10 10:31:53.000000000 +0000
++++ hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
+@@ -234,13 +234,43 @@ frame os::get_sender_for_C_frame(frame*
+ return frame(fr->sender_sp(), fr->link(), fr->sender_pc());
+ }
+
++#ifdef AMD64
++#define SPELL_REG_SP "rsp"
++#else
++#define SPELL_REG_SP "esp"
++#endif
++
++#ifdef SPARC_WORKS
+ extern "C" intptr_t *_get_current_sp(); // in .il file
++#else
++#ifdef _GNU_SOURCE
++extern "C" intptr_t *_get_current_sp() {
++ register intptr_t *rsp __asm__ (SPELL_REG_SP);
++ return rsp;
++}
++#endif // _GNU_SOURCE
++#endif // SPARC_WORKS
+
+ address os::current_stack_pointer() {
+ return (address)_get_current_sp();
+ }
+
++#ifdef AMD64
++#define SPELL_REG_FP "rbp"
++#else
++#define SPELL_REG_FP "ebp"
++#endif
++
++#ifdef SPARC_WORKS
+ extern "C" intptr_t *_get_current_fp(); // in .il file
++#else
++#ifdef _GNU_SOURCE
++extern "C" intptr_t *_get_current_fp() {
++ register intptr_t **rbp __asm__ (SPELL_REG_FP);
++ return (intptr_t*) *rbp; // we want what it points to.
++}
++#endif // _GNU_SOURCE
++#endif // SPARC_WORKS
+
+ frame os::current_frame() {
+ intptr_t* fp = _get_current_fp(); // it's inlined so want current fp
+@@ -930,7 +960,12 @@ add_func_t* os::atomic_add_func
+ extern "C" void _solaris_raw_setup_fpu(address ptr);
+ void os::setup_fpu() {
+ address fpu_cntrl = StubRoutines::addr_fpu_cntrl_wrd_std();
++#ifndef _GNU_SOURCE
+ _solaris_raw_setup_fpu(fpu_cntrl);
++#else
++ // same as hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp : os::setup_fpu()
++ __asm__ volatile("fldcw (%0)"::"r"(fpu_cntrl):"memory");
++#endif
+ }
+ #endif // AMD64
+
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp
new file mode 100644
index 00000000000..1b7ec050c45
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp
@@ -0,0 +1,35 @@
+$NetBSD: patch-hotspot_src_os__cpu_solaris__x86_vm_prefetch__solaris__x86.inline.hpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/src/os_cpu/solaris_x86/vm/prefetch_solaris_x86.inline.hpp.orig 2013-02-19 23:21:59.000000000 +0000
++++ hotspot/src/os_cpu/solaris_x86/vm/prefetch_solaris_x86.inline.hpp
+@@ -34,14 +34,28 @@ extern "C" {
+
+ inline void Prefetch::read (void *loc, intx interval) {
+ #ifdef AMD64
++#ifdef SPARC_WORKS
+ _Prefetch_read(loc, interval);
++#else
++#ifdef _GNU_SOURCE
++ __asm__ ("prefetcht0 (%0,%1,1)" : : "r" (loc), "r" (interval));
++#endif // _GNU_SOURCE
++#endif // SPARC_WORKS
+ #endif // AMD64
+ }
+
+ // Use of this method should be gated by VM_Version::has_prefetchw.
+ inline void Prefetch::write(void *loc, intx interval) {
+ #ifdef AMD64
++#ifdef SPARC_WORKS
+ _Prefetch_write(loc, interval);
++#else
++#ifdef _GNU_SOURCE
++ // Do not use the 3dnow prefetchw instruction. It isn't supported on em64t.
++ // __asm__ ("prefetchw (%0,%1,1)" : : "r" (loc), "r" (interval));
++ __asm__ ("prefetcht0 (%0,%1,1)" : : "r" (loc), "r" (interval));
++#endif // _GNU_SOURCE
++#endif // SPARC_WORKS
+ #endif // AMD64
+ }
+
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_threadLS__solaris__x86.hpp b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_threadLS__solaris__x86.hpp
new file mode 100644
index 00000000000..b8679a6e609
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os__cpu_solaris__x86_vm_threadLS__solaris__x86.hpp
@@ -0,0 +1,18 @@
+$NetBSD: patch-hotspot_src_os__cpu_solaris__x86_vm_threadLS__solaris__x86.hpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/src/os_cpu/solaris_x86/vm/threadLS_solaris_x86.hpp.orig 2013-02-19 23:21:59.000000000 +0000
++++ hotspot/src/os_cpu/solaris_x86/vm/threadLS_solaris_x86.hpp
+@@ -65,7 +65,10 @@ public:
+ __asm__ __volatile__ ("movq %%fs:0, %0" : "=r"(rv));
+ return rv;
+ #else
+- return gs_thread();
++ uintptr_t rv;
++ __asm__ __volatile__ ("movl %%gs:0, %0" : "=r"(rv));
++ return rv;
++// return gs_thread();
+ #endif // AMD64
+ #else //_GNU_SOURCE
+ return _raw_thread_id();
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os_bsd_vm_osThread__bsd.cpp b/lang/openjdk8/patches/patch-hotspot_src_os_bsd_vm_osThread__bsd.cpp
new file mode 100644
index 00000000000..7cdf1d9b9ac
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os_bsd_vm_osThread__bsd.cpp
@@ -0,0 +1,13 @@
+$NetBSD: patch-hotspot_src_os_bsd_vm_osThread__bsd.cpp,v 1.3 2015/07/03 20:40:59 fhajny Exp $
+
+--- hotspot/src/os/bsd/vm/osThread_bsd.cpp.orig 2015-06-10 10:31:51.000000000 +0000
++++ hotspot/src/os/bsd/vm/osThread_bsd.cpp
+@@ -30,7 +30,7 @@
+
+ void OSThread::pd_initialize() {
+ assert(this != NULL, "check");
+-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++#if defined(_ALLBSD_SOURCE)
+ _thread_id = 0;
+ #else
+ _thread_id = NULL;
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os_posix_vm_os__posix.cpp b/lang/openjdk8/patches/patch-hotspot_src_os_posix_vm_os__posix.cpp
index 2d2f4ffd86f..67cd330a40a 100644
--- a/lang/openjdk8/patches/patch-hotspot_src_os_posix_vm_os__posix.cpp
+++ b/lang/openjdk8/patches/patch-hotspot_src_os_posix_vm_os__posix.cpp
@@ -1,10 +1,10 @@
-$NetBSD: patch-hotspot_src_os_posix_vm_os__posix.cpp,v 1.2 2015/06/10 11:38:51 tnn Exp $
+$NetBSD: patch-hotspot_src_os_posix_vm_os__posix.cpp,v 1.3 2015/07/03 20:40:59 fhajny Exp $
rlim_t fixes.
---- hotspot/src/os/posix/vm/os_posix.cpp.orig 2015-06-09 13:49:55.000000000 +0000
+--- hotspot/src/os/posix/vm/os_posix.cpp.orig 2015-06-10 10:31:52.000000000 +0000
+++ hotspot/src/os/posix/vm/os_posix.cpp
-@@ -180,12 +180,12 @@ void os::Posix::print_rlimit_info(output
+@@ -180,25 +180,25 @@ void os::Posix::print_rlimit_info(output
st->print(" STACK ");
getrlimit(RLIMIT_STACK, &rlim);
@@ -19,7 +19,13 @@ rlim_t fixes.
else st->print("%uk", rlim.rlim_cur >> 10);
// Isn't there on solaris
-@@ -198,7 +198,7 @@ void os::Posix::print_rlimit_info(output
+ #if !defined(TARGET_OS_FAMILY_solaris) && !defined(TARGET_OS_FAMILY_aix)
+ st->print(", NPROC ");
+ getrlimit(RLIMIT_NPROC, &rlim);
+- if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
++ if (rlim.rlim_cur == (rlim_t)RLIM_INFINITY) st->print("infinity");
+ else st->print("%d", rlim.rlim_cur);
+ #endif
st->print(", NOFILE ");
getrlimit(RLIMIT_NOFILE, &rlim);
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os_solaris_dtrace_jhelper.d b/lang/openjdk8/patches/patch-hotspot_src_os_solaris_dtrace_jhelper.d
new file mode 100644
index 00000000000..dde73fb92e3
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os_solaris_dtrace_jhelper.d
@@ -0,0 +1,81 @@
+$NetBSD: patch-hotspot_src_os_solaris_dtrace_jhelper.d,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- hotspot/src/os/solaris/dtrace/jhelper.d.orig 2015-06-10 10:31:52.000000000 +0000
++++ hotspot/src/os/solaris/dtrace/jhelper.d
+@@ -43,12 +43,33 @@
+
+ extern pointer __JvmOffsets;
+
+-extern pointer __1cJCodeCacheF_heap_;
+-extern pointer __1cIUniverseO_collectedHeap_;
+-
+-extern pointer __1cHnmethodG__vtbl_;
+-extern pointer __1cGMethodG__vtbl_;
+-extern pointer __1cKBufferBlobG__vtbl_;
++/* name mangling depends on the compiler used */
++#ifndef _GNU_SOURCE
++#define SYMBOL_JCODECACHE_HEAP __1cJCodeCacheF_heap_
++#define SYMBOL_UNIVERSE_METHODKLASSOBJ __1cIUniverseP_methodKlassObj_
++#define SYMBOL_UNIVERSE_COLLECTEDHEAP __1cIUniverseO_collectedHeap_
++#define SYMBOL_UNIVERSE_NARROW_OOP __1cIUniverseL_narrow_oop_
++#define SYMBOL_NMETHOD_VTBL __1cHnmethodG__vtbl_
++#define SYMBOL_METHOD_VTBL __1cGMethodG__vtbl_
++#define SYMBOL_BUFFERBLOB_VTBL __1cKBufferBlobG__vtbl_
++#else
++#define SYMBOL_JCODECACHE_HEAP _ZN9CodeCache5_heapE
++#define SYMBOL_UNIVERSE_METHODKLASSOBJ _ZN8Universe15_methodKlassObjE
++#define SYMBOL_UNIVERSE_COLLECTEDHEAP _ZN8Universe14_collectedHeapE
++#define SYMBOL_UNIVERSE_NARROW_OOP _ZN8Universe11_narrow_oopE
++#define SYMBOL_NMETHOD_VTBL _ZTV7nmethod
++#define SYMBOL_METHOD_VTBL _ZTV6Method
++#define SYMBOL_BUFFERBLOB_VTBL _ZTV10BufferBlob
++#endif /* ! _GNU_SOURCE */
++
++extern pointer SYMBOL_JCODECACHE_HEAP;
++extern pointer SYMBOL_UNIVERSE_METHODKLASSOBJ;
++extern pointer SYMBOL_UNIVERSE_COLLECTEDHEAP;
++extern pointer SYMBOL_UNIVERSE_NARROW_OOP;
++
++extern pointer SYMBOL_NMETHOD_VTBL;
++extern pointer SYMBOL_METHOD_VTBL;
++extern pointer SYMBOL_BUFFERBLOB_VTBL;
+
+ #define copyin_ptr(ADDR) *(pointer*) copyin((pointer) (ADDR), sizeof(pointer))
+ #define copyin_uchar(ADDR) *(uchar_t*) copyin((pointer) (ADDR), sizeof(uchar_t))
+@@ -152,7 +173,7 @@ dtrace:helper:ustack:
+ #error "Don't know architecture"
+ #endif
+
+- this->CodeCache_heap_address = copyin_ptr(&``__1cJCodeCacheF_heap_);
++ this->CodeCache_heap_address = copyin_ptr(&``SYMBOL_JCODECACHE_HEAP);
+
+ this->CodeCache_low = copyin_ptr(this->CodeCache_heap_address +
+ OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
+@@ -169,12 +190,12 @@ dtrace:helper:ustack:
+ this->CodeHeap_log2_segment_size = copyin_uint32(
+ this->CodeCache_heap_address + OFFSET_CodeHeap_log2_segment_size);
+
+- this->Method_vtbl = (pointer) &``__1cGMethodG__vtbl_;
++ this->Method_vtbl = (pointer) &``SYMBOL_METHOD_VTBL;
+
+ /*
+ * Get Java heap bounds
+ */
+- this->Universe_collectedHeap = copyin_ptr(&``__1cIUniverseO_collectedHeap_);
++ this->Universe_collectedHeap = copyin_ptr(&``SYMBOL_UNIVERSE_COLLECTEDHEAP);
+ this->heap_start = copyin_ptr(this->Universe_collectedHeap +
+ OFFSET_CollectedHeap_reserved +
+ OFFSET_MemRegion_start);
+@@ -275,8 +296,8 @@ dtrace:helper:ustack:
+ this->start = this->block + SIZE_HeapBlockHeader;
+ this->vtbl = copyin_ptr(this->start);
+
+- this->nmethod_vtbl = (pointer) &``__1cHnmethodG__vtbl_;
+- this->BufferBlob_vtbl = (pointer) &``__1cKBufferBlobG__vtbl_;
++ this->nmethod_vtbl = (pointer) &``SYMBOL_NMETHOD_VTBL;
++ this->BufferBlob_vtbl = (pointer) &``SYMBOL_BUFFERBLOB_VTBL;
+ }
+
+ dtrace:helper:ustack:
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_decoder__solaris.cpp b/lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_decoder__solaris.cpp
new file mode 100644
index 00000000000..c0527213f8d
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_decoder__solaris.cpp
@@ -0,0 +1,18 @@
+$NetBSD: patch-hotspot_src_os_solaris_vm_decoder__solaris.cpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+Avoid libdemangle with GCC.
+
+--- hotspot/src/os/solaris/vm/decoder_solaris.cpp.orig 2013-02-19 23:21:59.000000000 +0000
++++ hotspot/src/os/solaris/vm/decoder_solaris.cpp
+@@ -27,6 +27,11 @@
+ #include <demangle.h>
+
+ bool ElfDecoder::demangle(const char* symbol, char *buf, int buflen) {
++#ifdef SPARC_WORKS
+ return !cplus_demangle(symbol, buf, (size_t)buflen);
++#else
++ memcpy(buf, symbol, (size_t)buflen);
++ return 0;
++#endif
+ }
+
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_os__solaris.cpp b/lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_os__solaris.cpp
new file mode 100644
index 00000000000..c19a7ec2a86
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_os__solaris.cpp
@@ -0,0 +1,137 @@
+$NetBSD: patch-hotspot_src_os_solaris_vm_os__solaris.cpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+Misc SunOS casts.
+
+--- hotspot/src/os/solaris/vm/os_solaris.cpp.orig 2015-06-10 10:31:52.000000000 +0000
++++ hotspot/src/os/solaris/vm/os_solaris.cpp
+@@ -113,6 +113,12 @@
+
+ #define MAX_PATH (2 * K)
+
++/* Declare madvise where it is not declared for C++, like Solaris */
++#if defined(__sun) && defined(_XOPEN_SOURCE)
++extern "C" int memcntl(caddr_t, size_t, int, caddr_t, int, int);
++extern "C" int madvise(caddr_t, size_t, int);
++#endif
++
+ // for timer info max values which include all bits
+ #define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF)
+
+@@ -534,7 +540,7 @@ static bool assign_distribution(processo
+ const processorid_t limit_id = max_id + 1;
+ // Make up markers for available processors.
+ bool* available_id = NEW_C_HEAP_ARRAY(bool, limit_id, mtInternal);
+- for (uint c = 0; c < limit_id; c += 1) {
++ for (processorid_t c = 0; c < limit_id; c += 1) {
+ available_id[c] = false;
+ }
+ for (uint a = 0; a < id_length; a += 1) {
+@@ -557,7 +563,7 @@ static bool assign_distribution(processo
+ // ... find the next available processor in the board.
+ for (uint slot = 0; slot < processors_per_board; slot += 1) {
+ uint try_id = board * processors_per_board + slot;
+- if ((try_id < limit_id) && (available_id[try_id] == true)) {
++ if ((try_id < (uint)limit_id) && (available_id[try_id] == true)) {
+ distribution[assigned] = try_id;
+ available_id[try_id] = false;
+ assigned += 1;
+@@ -565,7 +571,7 @@ static bool assign_distribution(processo
+ }
+ }
+ board += 1;
+- if (board * processors_per_board + 0 >= limit_id) {
++ if (board * processors_per_board + 0 >= (uint)limit_id) {
+ board = 0;
+ }
+ }
+@@ -622,7 +628,7 @@ bool os::bind_to_processor(uint processo
+ bool os::getenv(const char* name, char* buffer, int len) {
+ char* val = ::getenv( name );
+ if ( val == NULL
+- || strlen(val) + 1 > len ) {
++ || strlen(val) + 1 > (size_t)len ) {
+ if (len > 0) buffer[0] = 0; // return a null string
+ return false;
+ }
+@@ -801,7 +807,7 @@ void os::init_system_properties_values()
+ } else {
+ int inserted = 0;
+ int i;
+- for (i = 0; i < info->dls_cnt; i++, path++) {
++ for (i = 0; (uint_t)i < info->dls_cnt; i++, path++) {
+ uint_t flags = path->dls_flags & LA_SER_MASK;
+ if (((flags & LA_SER_LIBPATH) == 0) && !inserted) {
+ strcat(library_path, common_path);
+@@ -907,7 +913,8 @@ extern "C" void* java_start(void* thread
+ // in java_to_os_priority. So we save the native priority
+ // in the osThread and recall it here.
+
+- if ( osthr->thread_id() != -1 ) {
++ // thread_id_t ("osThread_solaris.hpp") == thread_t (<thread.h>) == unsigned int
++ if ( osthr->thread_id() != (unsigned int)-1 ) {
+ if ( UseThreadPriorities ) {
+ int prio = osthr->native_priority();
+ if (ThreadPriorityVerbose) {
+@@ -2786,7 +2793,7 @@ void os::numa_make_global(char *addr, si
+ // Get the number of the locality groups.
+ size_t os::numa_get_groups_num() {
+ size_t n = Solaris::lgrp_nlgrps(Solaris::lgrp_cookie());
+- return n != -1 ? n : 1;
++ return n != (size_t) -1 ? n : 1;
+ }
+
+ // Get a list of leaf locality groups. A leaf lgroup is group that
+@@ -2798,7 +2805,7 @@ size_t os::numa_get_leaf_groups(int *ids
+ return 1;
+ }
+ int result_size = 0, top = 1, bottom = 0, cur = 0;
+- for (int k = 0; k < size; k++) {
++ for (size_t k = 0; k < size; k++) {
+ int r = Solaris::lgrp_children(Solaris::lgrp_cookie(), ids[cur],
+ (Solaris::lgrp_id_t*)&ids[top], size - top);
+ if (r == -1) {
+@@ -2918,7 +2925,7 @@ char *os::scan_pages(char *start, char*
+ }
+
+ if ((validity[i] & 2) != 0 && page_expected->lgrp_id > 0) {
+- if (outdata[types * i] != page_expected->lgrp_id) {
++ if (outdata[types * i] != (uint64_t)page_expected->lgrp_id) {
+ break;
+ }
+ }
+@@ -4685,7 +4692,7 @@ const char * signames[] = {
+ const char* os::exception_name(int exception_code, char* buf, size_t size) {
+ if (0 < exception_code && exception_code <= SIGRTMAX) {
+ // signal
+- if (exception_code < sizeof(signames)/sizeof(const char*)) {
++ if ((size_t)exception_code < sizeof(signames)/sizeof(const char*)) {
+ jio_snprintf(buf, size, "%s", signames[exception_code]);
+ } else {
+ jio_snprintf(buf, size, "SIG%d", exception_code);
+@@ -5017,7 +5024,7 @@ void os::init(void) {
+ // If the pagesize of the VM is greater than 8K determine the appropriate
+ // number of initial guard pages. The user can change this with the
+ // command line arguments, if needed.
+- if (vm_page_size() > 8*K) {
++ if ((size_t)vm_page_size() > 8*K) {
+ StackYellowPages = 1;
+ StackRedPages = 1;
+ StackShadowPages = round_to((StackShadowPages*8*K), vm_page_size()) / vm_page_size();
+@@ -5038,7 +5045,7 @@ jint os::init_2(void) {
+
+ // Allocate a single page and mark it as readable for safepoint polling. Also
+ // use this first mmap call to check support for MAP_ALIGN.
+- address polling_page = (address)Solaris::mmap_chunk((char*)page_size,
++ address polling_page = (address)Solaris::mmap_chunk((char*)(uintptr_t)page_size,
+ page_size,
+ MAP_PRIVATE | MAP_ALIGN,
+ PROT_READ);
+@@ -5090,7 +5097,7 @@ jint os::init_2(void) {
+ // stack on a power of 2 boundary. The real fix for this
+ // should be to fix the guard page mechanism.
+
+- if (vm_page_size() > 8*K) {
++ if ((size_t)vm_page_size() > 8*K) {
+ threadStackSizeInBytes = (threadStackSizeInBytes != 0)
+ ? threadStackSizeInBytes +
+ ((StackYellowPages + StackRedPages) * vm_page_size())
diff --git a/lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_perfMemory__solaris.cpp b/lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_perfMemory__solaris.cpp
new file mode 100644
index 00000000000..98cb31fa907
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_os_solaris_vm_perfMemory__solaris.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-hotspot_src_os_solaris_vm_perfMemory__solaris.cpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+dirent->dd_fd is legacy, dirent->d_fd is POSIX, dirfd(dirent) is better.
+
+--- hotspot/src/os/solaris/vm/perfMemory_solaris.cpp.orig 2015-06-10 10:31:52.000000000 +0000
++++ hotspot/src/os/solaris/vm/perfMemory_solaris.cpp
+@@ -334,7 +334,7 @@ static DIR *open_directory_secure(const
+ }
+
+ // Check to make sure fd and dirp are referencing the same file system object.
+- if (!is_same_fsobject(fd, dirp->dd_fd)) {
++ if (!is_same_fsobject(fd, dirfd(dirp))) {
+ // The directory is not secure.
+ os::close(fd);
+ os::closedir(dirp);
+@@ -366,7 +366,7 @@ static DIR *open_directory_secure_cwd(co
+ // Directory doesn't exist or is insecure, so there is nothing to cleanup.
+ return dirp;
+ }
+- int fd = dirp->dd_fd;
++ int fd = dirfd(dirp);
+
+ // Open a fd to the cwd and save it off.
+ int result;
diff --git a/lang/openjdk8/patches/patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp b/lang/openjdk8/patches/patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp
index 78f956f1296..f4a3c12320e 100644
--- a/lang/openjdk8/patches/patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp
+++ b/lang/openjdk8/patches/patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp
@@ -1,7 +1,18 @@
-$NetBSD: patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp,v 1.2 2015/03/02 03:53:26 tnn Exp $
+$NetBSD: patch-hotspot_src_share_vm_utilities_globalDefinitions__gcc.hpp,v 1.3 2015/07/03 20:40:59 fhajny Exp $
--- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp.orig 2015-02-02 15:32:37.000000000 +0000
+++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
+@@ -31,6 +31,10 @@
+ // globally used constants & types, class (forward)
+ // declarations and a few frequently used utility functions.
+
++#ifdef SOLARIS
++#include <inttypes.h>
++#endif // SOLARIS
++
+ #include <ctype.h>
+ #include <string.h>
+ #include <stdarg.h>
@@ -76,7 +76,7 @@
# include <sys/procfs.h>
# endif
diff --git a/lang/openjdk8/patches/patch-hotspot_src_share_vm_utilities_hashtable.cpp b/lang/openjdk8/patches/patch-hotspot_src_share_vm_utilities_hashtable.cpp
new file mode 100644
index 00000000000..b7a9300cdeb
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_src_share_vm_utilities_hashtable.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-hotspot_src_share_vm_utilities_hashtable.cpp,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+Delete obsolete (and now harmful) SunOS code.
+
+--- hotspot/src/share/vm/utilities/hashtable.cpp.orig 2015-06-10 10:31:47.000000000 +0000
++++ hotspot/src/share/vm/utilities/hashtable.cpp
+@@ -364,7 +364,7 @@ template class RehashableHashtable<oopDe
+ template class Hashtable<Symbol*, mtSymbol>;
+ template class Hashtable<Klass*, mtClass>;
+ template class Hashtable<oop, mtClass>;
+-#if defined(SOLARIS) || defined(CHECK_UNHANDLED_OOPS)
++#if defined(CHECK_UNHANDLED_OOPS)
+ template class Hashtable<oop, mtSymbol>;
+ template class RehashableHashtable<oop, mtSymbol>;
+ #endif // SOLARIS || CHECK_UNHANDLED_OOPS
diff --git a/lang/openjdk8/patches/patch-jdk_make_CompileDemos.gmk b/lang/openjdk8/patches/patch-jdk_make_CompileDemos.gmk
new file mode 100644
index 00000000000..58b42e868f4
--- /dev/null
+++ b/lang/openjdk8/patches/patch-jdk_make_CompileDemos.gmk
@@ -0,0 +1,49 @@
+$NetBSD: patch-jdk_make_CompileDemos.gmk,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+--- jdk/make/CompileDemos.gmk.orig 2015-06-10 10:36:15.000000000 +0000
++++ jdk/make/CompileDemos.gmk
+@@ -56,7 +56,6 @@ define SetupAppletDemo
+ BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1)
+ endef
+
+-ifneq ($(OPENJDK_TARGET_OS), solaris)
+ $(eval $(call SetupAppletDemo,ArcTest))
+ $(eval $(call SetupAppletDemo,BarChart))
+ $(eval $(call SetupAppletDemo,Blink))
+@@ -77,7 +76,6 @@ ifneq ($(OPENJDK_TARGET_OS), solaris)
+ $(eval $(call SetupAppletDemo,JumpingBox,,closed/))
+ $(eval $(call SetupAppletDemo,TicTacToe,,closed/))
+ endif
+-endif
+
+ ##################################################################################################
+
+@@ -159,11 +157,9 @@ $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_t
+
+ BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
+
+-ifneq ($(OPENJDK_TARGET_OS), solaris)
+ $(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java))
+ $(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html *.java))
+ $(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html))
+-endif
+ $(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*))
+ $(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt))
+ $(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*))
+@@ -375,16 +371,9 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/man
+ ##################################################################################################
+
+ # The netbeans project files are copied into the demo directory.
+-ifeq ($(OPENJDK_TARGET_OS), solaris)
+- BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%, \
+- $(JDK_OUTPUTDIR)/demo/nbproject/%, \
+- $(filter-out $(JDK_TOPDIR)/src/share/demo/nbproject/jfc/SwingApplet%, \
+- $(call CacheFind, $(JDK_TOPDIR)/src/share/demo/nbproject)))
+-else
+ BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%, \
+ $(JDK_OUTPUTDIR)/demo/nbproject/%, \
+ $(call CacheFind, $(JDK_TOPDIR)/src/share/demo/nbproject))
+-endif
+
+ $(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/share/demo/nbproject/%
+ $(call install-file)
diff --git a/lang/openjdk8/patches/patch-jdk_make_CompileLaunchers.gmk b/lang/openjdk8/patches/patch-jdk_make_CompileLaunchers.gmk
index 35e6c341dec..fd34921d43a 100644
--- a/lang/openjdk8/patches/patch-jdk_make_CompileLaunchers.gmk
+++ b/lang/openjdk8/patches/patch-jdk_make_CompileLaunchers.gmk
@@ -1,11 +1,11 @@
-$NetBSD: patch-jdk_make_CompileLaunchers.gmk,v 1.1 2015/02/12 06:20:00 tnn Exp $
+$NetBSD: patch-jdk_make_CompileLaunchers.gmk,v 1.2 2015/07/03 20:40:59 fhajny Exp $
Change Sun Studio compiler flag to GCC equivalent.
(it is probably safe to remove the flag since we use the Zero port.)
---- jdk/make/CompileLaunchers.gmk.orig 2015-02-02 15:37:11.000000000 +0000
+--- jdk/make/CompileLaunchers.gmk.orig 2015-06-10 10:36:15.000000000 +0000
+++ jdk/make/CompileLaunchers.gmk
-@@ -452,7 +452,7 @@ else
+@@ -458,7 +458,7 @@ else
endif
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
@@ -14,3 +14,13 @@ Change Sun Studio compiler flag to GCC equivalent.
UNPACKEXE_LDFLAGS_solaris += -xmemalign=4s
endif
+@@ -553,9 +553,7 @@ BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/
+ # jdk/make/java/Makefile
+ #
+ ifeq ($(OPENJDK_TARGET_OS), solaris)
+- ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+ BUILD_JEXEC := 1
+- endif
+ endif
+
+ ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd), )
diff --git a/lang/openjdk8/patches/patch-jdk_make_Images.gmk b/lang/openjdk8/patches/patch-jdk_make_Images.gmk
index 0e7fb17c71a..9a03ee18a52 100644
--- a/lang/openjdk8/patches/patch-jdk_make_Images.gmk
+++ b/lang/openjdk8/patches/patch-jdk_make_Images.gmk
@@ -1,9 +1,27 @@
-$NetBSD: patch-jdk_make_Images.gmk,v 1.2 2015/02/21 10:13:50 tnn Exp $
+$NetBSD: patch-jdk_make_Images.gmk,v 1.3 2015/07/03 20:40:59 fhajny Exp $
Building ja_JP.UTF-8 manpages crashes the bootstrap JVM.
---- jdk/make/Images.gmk.orig 2015-02-02 15:37:11.000000000 +0000
+--- jdk/make/Images.gmk.orig 2015-06-10 10:36:15.000000000 +0000
+++ jdk/make/Images.gmk
+@@ -190,7 +190,7 @@ $(foreach f,$(filter $(OVERLAY_FILTER),$
+ $(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \
+ $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS)))
+
+-ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64)
++ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),NOMULTIARCHsolaris-64)
+ define AddIsadirLink
+ # Param 1 - src file
+ # Param 2 - variable to add targets to
+@@ -234,7 +234,7 @@ ifeq ($(PROFILE), )
+ endif
+
+ JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
+-ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd),)
++ifneq ($(findstring $(OPENJDK_TARGET_OS), linux bsd solaris),)
+ JDK_LIB_FILES += jexec
+ endif
+
@@ -454,25 +454,15 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
diff --git a/lang/openjdk8/patches/patch-jdk_make_lib_Awt2dLibraries.gmk b/lang/openjdk8/patches/patch-jdk_make_lib_Awt2dLibraries.gmk
new file mode 100644
index 00000000000..a200a3e131d
--- /dev/null
+++ b/lang/openjdk8/patches/patch-jdk_make_lib_Awt2dLibraries.gmk
@@ -0,0 +1,14 @@
+$NetBSD: patch-jdk_make_lib_Awt2dLibraries.gmk,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC support.
+
+--- jdk/make/lib/Awt2dLibraries.gmk.orig 2015-06-10 10:36:24.000000000 +0000
++++ jdk/make/lib/Awt2dLibraries.gmk
+@@ -695,7 +695,6 @@ $(eval $(call SetupNativeCompilation,BUI
+ $(SHARED_LIBRARY_FLAGS) \
+ -I$(JDK_TOPDIR)/src/share/native/sun/java2d \
+ -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug, \
+- CFLAGS_solaris := -xc99=no_lib, \
+ CFLAGS_windows := -DCMS_IS_WINDOWS_, \
+ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
diff --git a/lang/openjdk8/patches/patch-jdk_make_lib_NioLibraries.gmk b/lang/openjdk8/patches/patch-jdk_make_lib_NioLibraries.gmk
new file mode 100644
index 00000000000..6b16fa9f81e
--- /dev/null
+++ b/lang/openjdk8/patches/patch-jdk_make_lib_NioLibraries.gmk
@@ -0,0 +1,25 @@
+$NetBSD: patch-jdk_make_lib_NioLibraries.gmk,v 1.3 2015/07/03 20:40:59 fhajny Exp $
+
+--- jdk/make/lib/NioLibraries.gmk.orig 2015-06-10 10:36:24.000000000 +0000
++++ jdk/make/lib/NioLibraries.gmk
+@@ -185,10 +185,12 @@ $(BUILD_LIBNIO): $(BUILD_LIBNET)
+
+ ##########################################################################################
+
++ifeq (, $(OS_VENDOR))
++OS_VENDOR:= $(shell uname -s)
++endif
+ ifeq ($(OPENJDK_TARGET_OS_API), posix)
+
+- ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix))
+- ifeq (, $(filter $(OPENJDK_TARGET_OS_VENDOR), netbsd openbsd))
++ ifeq (, $(filter $(OS_VENDOR), AIX Darwin NetBSD OpenBSD DragonFly))
+
+ # Suppress unused parameters required by exported JNI functions.
+ SCTP_WERROR := -Werror -Wno-error=unused-parameter
+@@ -224,5 +226,4 @@ ifeq ($(OPENJDK_TARGET_OS_API), posix)
+
+ $(BUILD_LIBSCTP): $(BUILD_LIBNIO)
+ endif
+- endif
+ endif
diff --git a/lang/openjdk8/patches/patch-jdk_make_lib_SoundLibraries.gmk b/lang/openjdk8/patches/patch-jdk_make_lib_SoundLibraries.gmk
index 3c4bf88cfc1..ef9a77c7522 100644
--- a/lang/openjdk8/patches/patch-jdk_make_lib_SoundLibraries.gmk
+++ b/lang/openjdk8/patches/patch-jdk_make_lib_SoundLibraries.gmk
@@ -1,13 +1,14 @@
-$NetBSD: patch-jdk_make_lib_SoundLibraries.gmk,v 1.2 2015/06/10 11:38:51 tnn Exp $
+$NetBSD: patch-jdk_make_lib_SoundLibraries.gmk,v 1.3 2015/07/03 20:40:59 fhajny Exp $
---- jdk/make/lib/SoundLibraries.gmk.orig 2015-06-09 13:56:39.000000000 +0000
+--- jdk/make/lib/SoundLibraries.gmk.orig 2015-06-10 10:36:24.000000000 +0000
+++ jdk/make/lib/SoundLibraries.gmk
-@@ -76,7 +76,7 @@ ifeq ($(OPENJDK_TARGET_OS), aix)
+@@ -76,9 +76,6 @@ ifeq ($(OPENJDK_TARGET_OS), aix)
endif # OPENJDK_TARGET_OS aix
ifeq ($(OPENJDK_TARGET_OS), bsd)
- ifneq ($(OPENJDK_TARGET_OS_VENDOR), openbsd)
-+ ifeq (, $(filter $(OPENJDK_TARGET_OS_VENDOR), netbsd openbsd))
- EXTRA_SOUND_JNI_LIBS += jsoundalsa
- endif # OPENJDK_TARGET_OS_VENDOR openbsd
+- EXTRA_SOUND_JNI_LIBS += jsoundalsa
+- endif # OPENJDK_TARGET_OS_VENDOR openbsd
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_BSD
+ endif # OPENJDK_TARGET_OS bsd
+
diff --git a/lang/openjdk8/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecc__impl.h b/lang/openjdk8/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecc__impl.h
new file mode 100644
index 00000000000..cc647a8e858
--- /dev/null
+++ b/lang/openjdk8/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecc__impl.h
@@ -0,0 +1,33 @@
+$NetBSD: patch-jdk_src_share_native_sun_security_ec_impl_ecc__impl.h,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC compatability.
+
+--- jdk/src/share/native/sun/security/ec/impl/ecc_impl.h.orig 2015-06-10 10:36:26.000000000 +0000
++++ jdk/src/share/native/sun/security/ec/impl/ecc_impl.h
+@@ -38,12 +38,13 @@
+
+ #ifndef _ECC_IMPL_H
+ #define _ECC_IMPL_H
++
++#include <sys/types.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+-#include <sys/types.h>
+ #include "ecl-exp.h"
+
+ /*
+@@ -57,6 +58,11 @@ typedef unsigned long ulong_t;
+ typedef enum { B_FALSE, B_TRUE } boolean_t;
+ #endif /* __linux__ */
+
++#if defined(__solaris__) && defined(_GNU_SOURCE) && defined(_XOPEN_SOURCE)
++#define B_FALSE _B_FALSE
++#define B_TRUE _B_TRUE
++#endif /* __solaris__ && _GNU_SOURCE */
++
+ #ifdef _ALLBSD_SOURCE
+ #include <stdint.h>
+ #define B_FALSE FALSE
diff --git a/lang/openjdk8/patches/patch-jdk_src_solaris_bin_ergo__i586.c b/lang/openjdk8/patches/patch-jdk_src_solaris_bin_ergo__i586.c
new file mode 100644
index 00000000000..0afca2cef34
--- /dev/null
+++ b/lang/openjdk8/patches/patch-jdk_src_solaris_bin_ergo__i586.c
@@ -0,0 +1,50 @@
+$NetBSD: patch-jdk_src_solaris_bin_ergo__i586.c,v 1.1 2015/07/03 20:40:59 fhajny Exp $
+
+GCC compatability.
+
+--- jdk/src/solaris/bin/ergo_i586.c.orig 2015-02-02 15:37:12.000000000 +0000
++++ jdk/src/solaris/bin/ergo_i586.c
+@@ -27,7 +27,7 @@
+
+ static unsigned long physical_processors(void);
+
+-#ifdef __solaris__
++#if defined(__solaris__) && !defined(_GNU_SOURCE)
+
+ /*
+ * A utility method for asking the CPU about itself.
+@@ -76,7 +76,9 @@ get_cpuid(uint32_t arg,
+ asm(" popl %ebx");
+ #endif /* LP64 */
+ }
++#endif /* __solaris__ && !_GNU_SOURCE */
+
++#ifdef __solaris__
+ /* The definition of a server-class machine for solaris-i586/amd64 */
+ jboolean
+ ServerClassMachineImpl(void) {
+@@ -106,7 +108,7 @@ ServerClassMachineImpl(void) {
+
+ #endif /* __solaris__ */
+
+-#if defined(__linux__) || defined(_ALLBSD_SOURCE)
++#if (defined(__linux__) || defined(_ALLBSD_SOURCE)) || (defined(__solaris__) && defined(_GNU_SOURCE))
+
+ /*
+ * A utility method for asking the CPU about itself.
+@@ -171,6 +173,7 @@ get_cpuid(uint32_t arg,
+ #endif /* _LP64 */
+ }
+
++#ifndef __solaris__
+ /* The definition of a server-class machine for linux-i586 */
+ jboolean
+ ServerClassMachineImpl(void) {
+@@ -197,6 +200,7 @@ ServerClassMachineImpl(void) {
+ (result == JNI_TRUE ? "true" : "false"));
+ return result;
+ }
++#endif /* !__solaris__ */
+ #endif /* __linux__ || _ALLBSD_SOURCE */
+
+ /*