MFH: r485094 r486973 r486983 r487219 r488521
- Fix reversed ccache version detection logic. Enable ccache support. - Use '-pthread' for Clang. Clang supports '-pthread' on all BSDs except for Darwin. [1] Reported by: Achilleas Mantzios <achill@matrix.gatewaynet.com> [1] Tested by: Achilleas Mantzios <achill@matrix.gatewaynet.com> [1] . Update to 8u192. PR: 230364 . Fix SCTP support. PR: 230321 Submitted by: Timo Voelker <timo.voelker@fh-muenster.de> . Fix build on gcc based architectures (e.g. powerpc64) PR: 233883 Submitted by: Piotr Kubaj <pkubaj@anongoth.pl> Add support for millisecond resolution to get/setLastModifiedTime in both Java IO and NIO. Approved by: portmgr (bapt)
This commit is contained in:
parent
257df56f97
commit
7473f9316b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q4/; revision=488531
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= openjdk
|
||||
PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//}
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= java devel
|
||||
MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${DIST_BUILD_NUMBER}/:jdk \
|
||||
https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \
|
||||
@ -33,7 +34,8 @@ PATCHFILES= patch-8u05-b13.xz \
|
||||
patch-8u152-b16.xz \
|
||||
patch-8u162-b12.xz \
|
||||
patch-8u172-b11.xz \
|
||||
patch-8u181-b13.xz
|
||||
patch-8u181-b13.xz \
|
||||
patch-8u192-b26.xz
|
||||
|
||||
MAINTAINER= java@FreeBSD.org
|
||||
COMMENT?= Java Development Kit ${JDK_MAJOR_VERSION}
|
||||
@ -202,12 +204,11 @@ JDK_JVMDIR= lib/${ARCH:C/armv.*/arm/:S/powerpc64/ppc64/}
|
||||
JDK_OSARCH= bsd-${ARCH:S/amd64/x86_64/:C/armv.*/arm/:S/i386/x86/:S/powerpc64/ppc64/}
|
||||
INSTALLDIR= ${PREFIX}/${PKGBASE}
|
||||
|
||||
NO_CCACHE= yes
|
||||
NOPRECIOUSMAKEVARS= yes
|
||||
|
||||
JDK_MAJOR_VERSION= 8
|
||||
JDK_UPDATE_VERSION= 181
|
||||
JDK_BUILD_NUMBER= 13
|
||||
JDK_UPDATE_VERSION= 192
|
||||
JDK_BUILD_NUMBER= 26
|
||||
DIST_BUILD_NUMBER= 132
|
||||
JTREG_VERSION= 4.1
|
||||
JTREG_BUILD_NUMBER= b08
|
||||
@ -219,8 +220,10 @@ CONFIGURE_ARGS+= --with-build-number="b${JDK_BUILD_NUMBER}"
|
||||
.if ${JDK_UPDATE_VERSION} > 0
|
||||
CONFIGURE_ARGS+= --with-update-version=${JDK_UPDATE_VERSION}
|
||||
.endif
|
||||
CONFIGURE_ARGS+= --disable-ccache \
|
||||
--disable-freetype-bundling \
|
||||
.if defined(NO_CCACHE)
|
||||
CONFIGURE_ARGS+= --disable-ccache
|
||||
.endif
|
||||
CONFIGURE_ARGS+= --disable-freetype-bundling \
|
||||
--disable-zip-debug-info \
|
||||
--with-cacerts-file=${FILESDIR}/cacerts \
|
||||
--with-cups=${LOCALBASE} \
|
||||
@ -359,6 +362,7 @@ CONFIGURE_ENV+= LIBCXX="-lc++"
|
||||
|
||||
# GCC is broken with PCH: https://lists.freebsd.org/pipermail/svn-src-all/2015-March/101722.html
|
||||
.if ${COMPILER_TYPE} == gcc
|
||||
CONFIGURE_ARGS+= --with-toolchain-type=gcc
|
||||
.if ${ARCH} == "powerpc64"
|
||||
MAKE_ARGS+= USE_PRECOMPILED_HEADER=1
|
||||
.else
|
||||
|
@ -49,3 +49,5 @@ SHA256 (patch-8u172-b11.xz) = e338a1dc63cc08f9227d685e350e60609e43612f18773213b8
|
||||
SIZE (patch-8u172-b11.xz) = 146716
|
||||
SHA256 (patch-8u181-b13.xz) = 4cd0f5a04b72ad6c4ef73807d6a42e141394f5c38cee8ce11c0159a080073839
|
||||
SIZE (patch-8u181-b13.xz) = 69096
|
||||
SHA256 (patch-8u192-b26.xz) = 5bfa782ec2af8ddc6aed3e8de81cc37c7f375ebad650341d1ce74956c82a411e
|
||||
SIZE (patch-8u192-b26.xz) = 284164
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
||||
--- common/autoconf/build-performance.m4.orig
|
||||
+++ common/autoconf/build-performance.m4
|
||||
@@ -213,7 +213,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
|
||||
# precompiled headers.
|
||||
AC_MSG_CHECKING([if ccache supports precompiled headers])
|
||||
HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | awk '{ split(@S|@3, a, "."); if (a@<:@1@:>@ >= 3 && (a@<:@2@:>@ > 1 || (a@<:@2@:>@ == 1 && a@<:@3@:>@ >= 4))) print "yes"; else print "no"; }') 2> /dev/null`
|
||||
- if test "x$HAS_GOOD_CCACHE" = xyes; then
|
||||
+ if test "x$HAS_GOOD_CCACHE" != xyes; then
|
||||
AC_MSG_RESULT([no, disabling ccache])
|
||||
CCACHE=
|
||||
else
|
@ -0,0 +1,11 @@
|
||||
--- common/autoconf/generated-configure.sh.orig
|
||||
+++ common/autoconf/generated-configure.sh
|
||||
@@ -36760,7 +36760,7 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
|
||||
$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
|
||||
HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | awk '{ split($3, a, "."); if (a[1] >= 3 && (a[2] > 1 || (a[2] == 1 && a[3] >= 4))) print "yes"; else print "no"; }') 2> /dev/null`
|
||||
- if test "x$HAS_GOOD_CCACHE" = xyes; then
|
||||
+ if test "x$HAS_GOOD_CCACHE" != xyes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
|
||||
$as_echo "no, disabling ccache" >&6; }
|
||||
CCACHE=
|
@ -1,11 +1,14 @@
|
||||
--- configure
|
||||
+++ configure
|
||||
@@ -26,4 +26,7 @@
|
||||
# make sure that is called using bash.
|
||||
|
||||
--- configure.orig 2018-12-02 13:45:44.142931000 -0800
|
||||
+++ configure 2018-12-02 15:16:05.112400000 -0800
|
||||
@@ -29,6 +29,10 @@
|
||||
this_script_dir=`dirname $0`
|
||||
-bash $this_script_dir/common/autoconf/configure "$@"
|
||||
this_script_dir=`cd $this_script_dir > /dev/null && pwd`
|
||||
|
||||
+export CONFIG_SHELL=%%LOCALBASE%%/bin/bash
|
||||
+export MAKE=%%LOCALBASE%%/bin/gmake
|
||||
+export OBJCOPY=%%OBJCOPY%%
|
||||
+%%LOCALBASE%%/bin/bash $this_script_dir/common/autoconf/configure "$@"
|
||||
+
|
||||
# Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c.
|
||||
# This trick is needed to get autoconf to co-operate properly.
|
||||
-bash -c ". $this_script_dir/common/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@"
|
||||
+%%LOCALBASE%%/bin/bash -c ". $this_script_dir/common/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@"
|
||||
|
@ -0,0 +1,12 @@
|
||||
--- hotspot/make/bsd/makefiles/gcc.make.orig
|
||||
+++ hotspot/make/bsd/makefiles/gcc.make
|
||||
@@ -200,6 +200,9 @@ ifeq ($(USE_CLANG),)
|
||||
CFLAGS += -fvisibility=hidden
|
||||
endif
|
||||
else
|
||||
+ ifneq ($(OS_VENDOR), Darwin)
|
||||
+ CFLAGS += -pthread
|
||||
+ endif
|
||||
CFLAGS += -fvisibility=hidden
|
||||
endif
|
||||
|
@ -1,20 +1,23 @@
|
||||
--- jdk/make/lib/Awt2dLibraries.gmk.orig 2015-07-18 14:30:01.000000000 -0700
|
||||
+++ jdk/make/lib/Awt2dLibraries.gmk 2015-07-18 14:30:08.000000000 -0700
|
||||
@@ -1259,7 +1259,7 @@
|
||||
else ifeq ($(OPENJDK_TARGET_OS), bsd)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS) -I$(PACKAGE_PATH)/include
|
||||
ifneq ($(OPENJDK_TARGET_OS_VENDOR), openbsd)
|
||||
- LIBSPLASHSCREEN_CFLAGS += -DLIBICONV_PLUG
|
||||
--- jdk/make/lib/Awt2dLibraries.gmk.orig 2018-12-02 16:06:28.335527000 -0800
|
||||
+++ jdk/make/lib/Awt2dLibraries.gmk 2018-12-02 16:29:22.253979000 -0800
|
||||
@@ -1236,6 +1236,11 @@
|
||||
LIBSPLASHSCREEN_splashscreen_png.c_CFLAGS := -x objective-c -O0
|
||||
LIBSPLASHSCREEN_splashscreen_sys.m_CFLAGS := -O0
|
||||
|
||||
+ else ifeq ($(OPENJDK_TARGET_OS), bsd)
|
||||
+ LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS) -I$(PACKAGE_PATH)/include
|
||||
+ ifneq ($(OPENJDK_TARGET_OS_VENDOR), openbsd)
|
||||
+ LIBSPLASHSCREEN_CFLAGS += %%ICONV_CPPFLAGS%%
|
||||
endif
|
||||
+ endif
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
|
||||
else
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
|
||||
@@ -1285,7 +1285,7 @@
|
||||
# Solaris still uses OPENWIN_LIB ..
|
||||
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
|
||||
else ifeq ($(OPENJDK_TARGET_OS), bsd)
|
||||
- LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -L$(PACKAGE_PATH)/lib -liconv -pthread
|
||||
+ LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) %%ICONV_LDFLAGS%% -pthread
|
||||
@@ -1257,6 +1262,8 @@
|
||||
-framework JavaNativeFoundation
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll
|
||||
+ else ifeq ($(OPENJDK_TARGET_OS), bsd)
|
||||
+ LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) %%ICONV_LDFLAGS%% -pthread
|
||||
else # .. all other Unixes can use X_LIBS
|
||||
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
|
||||
endif
|
||||
|
@ -0,0 +1,23 @@
|
||||
--- jdk/src/solaris/native/java/io/UnixFileSystem_md.c.orig 2018-12-12 23:07:51.229721000 +0100
|
||||
+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2018-12-12 23:12:21.847169000 +0100
|
||||
@@ -208,7 +208,8 @@
|
||||
WITH_FIELD_PLATFORM_STRING(env, file, ids.path, path) {
|
||||
struct stat64 sb;
|
||||
if (stat64(path, &sb) == 0) {
|
||||
- rv = 1000 * (jlong)sb.st_mtime;
|
||||
+ rv = (jlong)sb.st_mtim.tv_sec * 1000;
|
||||
+ rv += (jlong)sb.st_mtim.tv_nsec / 1000000;
|
||||
}
|
||||
} END_PLATFORM_STRING(env, path);
|
||||
return rv;
|
||||
@@ -392,8 +393,8 @@
|
||||
struct timeval tv[2];
|
||||
|
||||
/* Preserve access time */
|
||||
- tv[0].tv_sec = sb.st_atime;
|
||||
- tv[0].tv_usec = 0;
|
||||
+ tv[0].tv_sec = sb.st_atim.tv_sec;
|
||||
+ tv[0].tv_usec = sb.st_atim.tv_nsec / 1000;
|
||||
|
||||
/* Change last-modified time */
|
||||
tv[1].tv_sec = time / 1000;
|
@ -0,0 +1,41 @@
|
||||
--- jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c.org 2018-07-26 09:56:49.897172000 +0200
|
||||
+++ jdk/src/solaris/native/sun/nio/ch/sctp/SctpChannelImpl.c 2018-07-30 16:13:19.116935000 +0200
|
||||
@@ -330,11 +330,11 @@
|
||||
break;
|
||||
case SCTP_ADDR_MADE_PRIM :
|
||||
event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_MADE_PRIM;
|
||||
-#ifdef __linux__ /* Solaris currently doesn't support SCTP_ADDR_CONFIRMED */
|
||||
+#ifndef __solaris__ /* Solaris currently doesn't support SCTP_ADDR_CONFIRMED */
|
||||
break;
|
||||
case SCTP_ADDR_CONFIRMED :
|
||||
event = sun_nio_ch_sctp_PeerAddrChange_SCTP_ADDR_CONFIRMED;
|
||||
-#endif /* __linux__ */
|
||||
+#endif /* __solaris__ */
|
||||
}
|
||||
|
||||
addressObj = SockAddrToInetSocketAddress(env, (struct sockaddr*)&spc->spc_aaddr);
|
||||
@@ -445,13 +445,13 @@
|
||||
} else if (errno == EINTR) {
|
||||
return IOS_INTERRUPTED;
|
||||
|
||||
-#ifdef __linux__
|
||||
+#ifndef __solaris__
|
||||
} else if (errno == ENOTCONN) {
|
||||
/* ENOTCONN when EOF reached */
|
||||
rv = 0;
|
||||
/* there will be no control data */
|
||||
msg->msg_controllen = 0;
|
||||
-#endif /* __linux__ */
|
||||
+#endif /* __solaris__ */
|
||||
|
||||
} else {
|
||||
handleSocketError(env, errno);
|
||||
@@ -568,7 +568,7 @@
|
||||
/* Set up the msghdr structure for sending */
|
||||
memset(msg, 0, sizeof (*msg));
|
||||
memset(cbuf, 0, cbuf_size);
|
||||
- msg->msg_name = &sa;
|
||||
+ msg->msg_name = (sa_len == 0 ? NULL : &sa);
|
||||
msg->msg_namelen = sa_len;
|
||||
iov->iov_base = addr;
|
||||
iov->iov_len = length;
|
@ -0,0 +1,11 @@
|
||||
--- ./jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c.orig 2018-12-13 10:02:37.501082000 +0100
|
||||
+++ ./jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c 2018-12-13 10:06:26.825382000 +0100
|
||||
@@ -453,7 +453,7 @@
|
||||
(*env)->SetLongField(env, attrs, attrs_st_birthtime_sec, (jlong)buf->st_birthtime);
|
||||
#endif
|
||||
|
||||
-#if (_POSIX_C_SOURCE >= 200809L) || defined(__solaris__)
|
||||
+#if (_POSIX_C_SOURCE >= 200809L) || defined(__solaris__) || defined(__FreeBSD__)
|
||||
(*env)->SetLongField(env, attrs, attrs_st_atime_nsec, (jlong)buf->st_atim.tv_nsec);
|
||||
(*env)->SetLongField(env, attrs, attrs_st_mtime_nsec, (jlong)buf->st_mtim.tv_nsec);
|
||||
(*env)->SetLongField(env, attrs, attrs_st_ctime_nsec, (jlong)buf->st_ctim.tv_nsec);
|
Loading…
Reference in New Issue
Block a user