svn commit: r485094 - in head/java/openjdk8: . files

Jung-uk Kim jkim at FreeBSD.org
Fri Nov 16 17:30:19 UTC 2018


Author: jkim
Date: Fri Nov 16 17:30:17 2018
New Revision: 485094
URL: https://svnweb.freebsd.org/changeset/ports/485094

Log:
  - 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 at matrix.gatewaynet.com> [1]
  Tested by:	Achilleas Mantzios <achill at matrix.gatewaynet.com> [1]

Added:
  head/java/openjdk8/files/patch-common_autoconf_build-performance.m4   (contents, props changed)
  head/java/openjdk8/files/patch-common_autoconf_generated-configure.sh   (contents, props changed)
  head/java/openjdk8/files/patch-hotspot_make_bsd_makefiles_gcc.make   (contents, props changed)
  head/java/openjdk8/files/patch-hotspot_make_bsd_makefiles_vm.make   (contents, props changed)
Modified:
  head/java/openjdk8/Makefile

Modified: head/java/openjdk8/Makefile
==============================================================================
--- head/java/openjdk8/Makefile	Fri Nov 16 17:26:15 2018	(r485093)
+++ head/java/openjdk8/Makefile	Fri Nov 16 17:30:17 2018	(r485094)
@@ -2,6 +2,7 @@
 
 PORTNAME=	openjdk
 PORTVERSION=	${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//}
+PORTREVISION=	1
 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 \
@@ -202,7 +203,6 @@ 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
@@ -219,8 +219,10 @@ CONFIGURE_ARGS+=	--with-build-number="b${JDK_BUILD_NUM
 .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} \

Added: head/java/openjdk8/files/patch-common_autoconf_build-performance.m4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/openjdk8/files/patch-common_autoconf_build-performance.m4	Fri Nov 16 17:30:17 2018	(r485094)
@@ -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

Added: head/java/openjdk8/files/patch-common_autoconf_generated-configure.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/openjdk8/files/patch-common_autoconf_generated-configure.sh	Fri Nov 16 17:30:17 2018	(r485094)
@@ -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=

Added: head/java/openjdk8/files/patch-hotspot_make_bsd_makefiles_gcc.make
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/openjdk8/files/patch-hotspot_make_bsd_makefiles_gcc.make	Fri Nov 16 17:30:17 2018	(r485094)
@@ -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
+ 

Added: head/java/openjdk8/files/patch-hotspot_make_bsd_makefiles_vm.make
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/java/openjdk8/files/patch-hotspot_make_bsd_makefiles_vm.make	Fri Nov 16 17:30:17 2018	(r485094)
@@ -0,0 +1,13 @@
+--- hotspot/make/bsd/makefiles/vm.make.orig
++++ hotspot/make/bsd/makefiles/vm.make
+@@ -132,6 +132,10 @@ LIBS += -lm
+ 
+ ifeq ($(USE_CLANG),)
+   LIBS += -pthread
++else
++  ifneq ($(OS_VENDOR), Darwin)
++    LIBS += -pthread
++  endif
+ endif
+ 
+ # By default, link the *.o into the library, not the executable.


More information about the svn-ports-all mailing list