diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-04-29 05:25:45 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-04-29 05:25:45 +0000 |
commit | 50649382a2d77c8f90d14bbc0d392a4165c31b82 (patch) | |
tree | 5e9421f78abf0408f479e77ad28a79061a727d38 /java | |
parent | - Support CC/CFLAGS properly (diff) |
- Unbreak libnet. Obviously, bsd_close.c must not be excluded for BSD.
- Move jspawnhelper to jre/lib/<arch> directory as Solaris does. [1]
- Add sigset(2) wrapper for libsig.so.
- Disable UseMembar by default.
Inspired by: Kurt Miller (kurt at intricatesoftware dot com) [1]
Notes
Notes:
svn path=/head/; revision=352573
Diffstat (limited to 'java')
-rw-r--r-- | java/openjdk8/Makefile | 14 | ||||
-rw-r--r-- | java/openjdk8/files/patch-bsd | 79 |
2 files changed, 70 insertions, 23 deletions
diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile index 96e85131830e..8c33f0e40f95 100644 --- a/java/openjdk8/Makefile +++ b/java/openjdk8/Makefile @@ -2,7 +2,7 @@ PORTNAME= openjdk PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= java devel MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/:jdk \ https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \ @@ -160,6 +160,8 @@ post-extract: @${RMDIR} ${WRKSRC}/jdk/src/macosx/classes/java/net \ ${WRKSRC}/jdk/src/macosx/native/sun/nio/ch \ ${WRKSRC}/jdk/src/macosx/native/sun/nio + @${CP} -f ${WRKSRC}/jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd \ + ${WRKSRC}/jdk/src/solaris/classes/java/lang/UNIXProcess.java.macosx post-patch: @${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ @@ -200,14 +202,10 @@ do-install: "-not ( -type d -name bin -prune )" @cd ${JDK_IMAGEDIR} && \ ${COPYTREE_BIN} "bin jre/bin" ${STAGEDIR}${INSTALLDIR} - @cd ${JDK_IMAGEDIR} && \ - ${INSTALL_PROGRAM} jre/lib/jspawnhelper \ - ${STAGEDIR}${INSTALLDIR}/jre/lib - @cd ${JDK_IMAGEDIR} && \ - ${INSTALL_PROGRAM} jre/lib/${ARCH}/jexec \ + @${INSTALL_PROGRAM} ${JDK_IMAGEDIR}/jre/lib/${ARCH}/jexec \ + ${JDK_IMAGEDIR}/jre/lib/${ARCH}/jspawnhelper \ ${STAGEDIR}${INSTALLDIR}/jre/lib/${ARCH} - @cd ${JDK_IMAGEDIR} && \ - ${INSTALL_PROGRAM} lib/${ARCH}/jexec \ + @${INSTALL_PROGRAM} ${JDK_IMAGEDIR}/lib/${ARCH}/jexec \ ${STAGEDIR}${INSTALLDIR}/lib/${ARCH} @${ECHO} "@unexec ${LOCALBASE}/bin/unregistervm ${INSTALLDIR}/bin/java" >> ${TMPPLIST} @${FIND} -s ${STAGEDIR}${INSTALLDIR} -not -type d | ${SORT} | \ diff --git a/java/openjdk8/files/patch-bsd b/java/openjdk8/files/patch-bsd index 0c03b76dc6a2..455f612f29fd 100644 --- a/java/openjdk8/files/patch-bsd +++ b/java/openjdk8/files/patch-bsd @@ -1285,6 +1285,20 @@ COMPILE.CC = $(CC_COMPILE) -c GENASM.CC = $(CC_COMPILE) -S +--- hotspot/src/cpu/x86/vm/globals_x86.hpp ++++ hotspot/src/cpu/x86/vm/globals_x86.hpp +@@ -70,11 +70,7 @@ + define_pd_global(bool, RewriteBytecodes, true); + define_pd_global(bool, RewriteFrequentPairs, true); + +-#ifdef _ALLBSD_SOURCE +-define_pd_global(bool, UseMembar, true); +-#else + define_pd_global(bool, UseMembar, false); +-#endif + + // GC Ergo Flags + define_pd_global(uintx, CMSYoungGenPerWorker, 64*M); // default max size of CMS young gen, per GC worker thread --- hotspot/src/cpu/x86/vm/jni_x86.h +++ hotspot/src/cpu/x86/vm/jni_x86.h @@ -34,7 +34,7 @@ @@ -1372,6 +1386,23 @@ + return false; +} +#endif +--- hotspot/src/os/bsd/vm/jsig.c ++++ hotspot/src/os/bsd/vm/jsig.c +@@ -140,9 +140,13 @@ + } + + sa_handler_t sigset(int sig, sa_handler_t disp) { ++#ifdef __FreeBSD__ ++ return set_signal(sig, disp, true); ++#else + printf("sigset() is not supported by BSD"); + exit(0); +- } ++#endif ++} + + static int call_os_sigaction(int sig, const struct sigaction *act, + struct sigaction *oact) { --- hotspot/src/os/bsd/vm/osThread_bsd.cpp +++ hotspot/src/os/bsd/vm/osThread_bsd.cpp @@ -30,7 +30,7 @@ @@ -1853,7 +1884,7 @@ # TODO: # On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all -@@ -601,11 +615,11 @@ +@@ -601,7 +615,7 @@ LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o LINK_JSPAWNHELPER_FLAGS := @@ -1862,11 +1893,6 @@ BUILD_JSPAWNHELPER := 1 endif --ifeq ($(OPENJDK_TARGET_OS), macosx) -+ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx bsd), ) - BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib - endif - --- jdk/make/CopyFiles.gmk +++ jdk/make/CopyFiles.gmk @@ -31,6 +31,8 @@ @@ -4793,6 +4819,18 @@ ### $(GENDATA_FONT_CONFIG_DST)/%.src: \ +--- jdk/make/gensrc/GensrcMisc.gmk ++++ jdk/make/gensrc/GensrcMisc.gmk +@@ -64,9 +64,6 @@ + + ifeq ($(OPENJDK_TARGET_OS_API), posix) + UPSUFFIX := $(OPENJDK_TARGET_OS) +- ifeq ($(OPENJDK_TARGET_OS), macosx) +- UPSUFFIX := bsd +- endif + # UNIXProcess.java is different for solaris and linux. We need to copy + # the correct UNIXProcess.java over to $(JDK_OUTPUTDIR)/gensrc/java/lang/. + --- jdk/make/lib/Awt2dLibraries.gmk +++ jdk/make/lib/Awt2dLibraries.gmk @@ -305,7 +305,7 @@ @@ -4963,18 +5001,16 @@ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ --- jdk/make/lib/NetworkingLibraries.gmk +++ jdk/make/lib/NetworkingLibraries.gmk -@@ -46,6 +46,10 @@ +@@ -42,7 +42,7 @@ + LIBNET_EXCLUDE_FILES += linux_close.c + endif + +-ifneq ($(OPENJDK_TARGET_OS), macosx) ++ifeq (,$(findstring $(OPENJDK_TARGET_OS), bsd macosx)) LIBNET_EXCLUDE_FILES += bsd_close.c endif -+ifneq ($(OPENJDK_TARGET_OS), bsd) -+ LIBNET_EXCLUDE_FILES += bsd_close.c -+endif -+ - ifeq ($(OPENJDK_TARGET_OS), windows) - LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c - else -@@ -69,6 +73,7 @@ +@@ -69,6 +69,7 @@ LDFLAGS_SUFFIX_macosx := -ljvm -ljava, \ LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lnsl -lsocket $(LIBDL) -lc, \ LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \ @@ -8884,6 +8920,19 @@ #endif #define JVM_DLL "libjvm.so" +--- jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd ++++ jdk/src/solaris/classes/java/lang/UNIXProcess.java.bsd +@@ -94,8 +94,9 @@ + { + public LaunchMechanism run() { + String javahome = System.getProperty("java.home"); ++ String osArch = System.getProperty("os.arch"); + +- helperpath = toCString(javahome + "/lib/jspawnhelper"); ++ helperpath = toCString(javahome + "/lib/" + osArch + "/jspawnhelper"); + String s = System.getProperty( + "jdk.lang.Process.launchMechanism", "posix_spawn"); + --- jdk/src/solaris/classes/sun/awt/X11FontManager.java +++ jdk/src/solaris/classes/sun/awt/X11FontManager.java @@ -213,7 +213,7 @@ |