Index: branches/2021Q1/java/openjdk14/Makefile =================================================================== --- branches/2021Q1/java/openjdk14/Makefile (revision 564169) +++ branches/2021Q1/java/openjdk14/Makefile (revision 564170) @@ -1,183 +1,184 @@ # $FreeBSD$ PORTNAME= openjdk DISTVERSIONPREFIX= jdk- DISTVERSION= ${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION} +PORTREVISION= 1 CATEGORIES= java devel PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION} MAINTAINER= java@FreeBSD.org COMMENT= Java Development Kit ${JDK_MAJOR_VERSION} LICENSE= GPLv2 ONLY_FOR_ARCHS= amd64 i386 powerpc64 BUILD_DEPENDS= zip:archivers/zip \ autoconf>0:devel/autoconf \ ${LOCALBASE}/include/cups/cups.h:print/cups \ bash:shells/bash \ gsed:textproc/gsed LIB_DEPENDS= libasound.so:audio/alsa-lib \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libgif.so:graphics/giflib \ liblcms2.so:graphics/lcms2 \ libpng.so:graphics/png RUN_DEPENDS= javavm:java/javavmwrapper \ xorg-fonts-truetype>0:x11-fonts/xorg-fonts-truetype USES= compiler:features gmake iconv jpeg pkgconfig xorg USE_XORG= x11 xext xi xrandr xrender xt xtst USE_GITHUB= yes GH_ACCOUNT= battleblow GH_PROJECT= jdk14u NO_CCACHE= yes _MAKE_JOBS= # MAKE_ENV= LANG="C" \ LC_ALL="C" \ CLASSPATH="" \ JAVA_HOME="" \ LD_LIBRARY_PATH="" \ CC=${CC} \ CXX=${CXX} \ CPP=${CPP} \ MAKEFLAGS="" JDK_OSARCH= bsd-${ARCH:S/amd64/x86_64/:S/i386/x86/:S/powerpc64/ppc64/} JDK_BUILDDIR= ${WRKSRC}/build/${JDK_OSARCH}-${JDK_BUILD_JVM}-${JDK_BUILD_TYPE} JDK_IMAGEDIR= ${JDK_BUILDDIR}/images/jdk INSTALLDIR= ${PREFIX}/${PKGBASE} NOPRECIOUSMAKEVARS= yes JDK_MAJOR_VERSION= 14 JDK_MINOR_VERSION= 0 JDK_PATCH_VERSION= 2 JDK_BUILD_NUMBER= 12 BSD_JDK_VERSION= 1 JDK_BUG_URL= https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Ports%20%26%20Packages&component=Individual%20Port(s)&short_desc=java/${PORTNAME}${JDK_MAJOR_VERSION}%3A%20 GNU_CONFIGURE= yes CONFIGURE_ENV= CC=${CC} \ CXX=${CXX} \ CPP=${CPP} \ ac_cv_path_SED=${LOCALBASE}/bin/gsed CONFIGURE_ARGS= --with-boot-jdk=${BOOTSTRAPJDKDIR} \ --disable-ccache \ --disable-javac-server \ --disable-hotspot-gtest \ --with-alsa=${LOCALBASE} \ --with-cups=${LOCALBASE} \ --with-fontconfig=${LOCALBASE} \ --with-freetype=system \ --with-freetype-include=${LOCALBASE}/include/freetype2 \ --with-freetype-lib=${LOCALBASE}/lib \ --with-libjpeg=system \ --with-giflib=system \ --with-giflib-include=${LOCALBASE}/include \ --with-giflib-lib=${LOCALBASE}/lib \ --with-libpng=system \ --with-zlib=system \ --with-lcms=system \ --x-includes=${LOCALBASE}/include \ --x-libraries=${LOCALBASE}/lib \ --with-cacerts-file=${FILESDIR}/cacerts \ --with-version-string=${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION} \ --with-native-debug-symbols=none \ --with-debug-level=release \ --with-vendor-name="OpenJDK BSD Porting Team" \ --with-vendor-url="https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/" \ --with-vendor-bug-url="${JDK_BUG_URL}" \ --with-vendor-vm-bug-url="${JDK_BUG_URL}" JAVAVMS_COMMENT= OpenJDK${JDK_MAJOR_VERSION} ALL_TARGET= images JDK_BUILD_TYPE= release .include # Support aarch64 on FreeBSD 12 and up .if ${OSVERSION} >= 1200500 ONLY_FOR_ARCHS+=aarch64 .endif BOOTSTRAP_JDKS= ${LOCALBASE}/openjdk14 \ ${LOCALBASE}/openjdk13 # do we have valid native jdk installed? .for BJDK in ${BOOTSTRAP_JDKS} . if !defined(BOOTSTRAPJDKDIR) && exists(${BJDK}/bin/javac) BOOTSTRAPJDKDIR= ${BJDK} . endif .endfor # if no valid jdk found, set dependency .if !defined(BOOTSTRAPJDKDIR) BOOTSTRAPJDKDIR?= ${LOCALBASE}/openjdk13 BUILD_DEPENDS+= ${BOOTSTRAPJDKDIR}/bin/javac:java/openjdk13 .endif JDK_BUILD_JVM= server MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE} CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE} .if ${COMPILER_TYPE} == gcc USE_GCC= yes CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} -L/usr/local/lib/gcc${GCC_DEFAULT}" \ --with-extra-cflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}" \ --with-extra-cxxflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}" .else MAKE_ENV+= USE_CLANG=true .endif .if ${ARCH} == aarch64 || ${ARCH} == powerpc64 CONFIGURE_ARGS+= --disable-warnings-as-errors \ --disable-dtrace .endif .if defined(PPC_ABI) && ${PPC_ABI} == ELFv2 CONFIGURE_ARGS+= --disable-precompiled-headers .endif .if ${ARCH} != amd64 CONFIGURE_ARGS+= --enable-aot=no .endif .if ${ARCH} == powerpc64 && ${OSREL:C/\.[0-9]//} == 12 EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_hotspot_cpu_ppc_vm__version__ppc.hpp .endif .if empty(ICONV_LIB) ICONV_CFLAGS= -DLIBICONV_PLUG .else ICONV_CFLAGS= -I${LOCALBASE}/include ICONV_LDFLAGS= -L${LOCALBASE}/lib ICONV_LIBS= ${ICONV_LIB} .endif post-patch: @${FIND} ${WRKSRC} -name '*.orig' -delete @${CHMOD} 755 ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ ${WRKSRC}/configure \ ${WRKSRC}/src/hotspot/os/bsd/os_bsd.cpp @${REINPLACE_CMD} -e 's|%%ICONV_CFLAGS%%|${ICONV_CFLAGS}|' \ -e 's|%%ICONV_LDFLAGS%%|${ICONV_LDFLAGS}|' \ -e 's|%%ICONV_LIBS%%|${ICONV_LIBS}|' \ ${WRKSRC}/make/autoconf/libraries.m4 do-install: @${MKDIR} ${STAGEDIR}${INSTALLDIR} @cd ${JDK_IMAGEDIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${INSTALLDIR} @cd ${STAGEDIR}${INSTALLDIR} && \ ${FIND} bin -type f -exec ${CHMOD} ${BINMODE} {} \; @${CHMOD} ${BINMODE} ${STAGEDIR}${INSTALLDIR}/lib/jspawnhelper @${ECHO} "@javavm ${INSTALLDIR}/bin/java" >> ${TMPPLIST} @${FIND} ${STAGEDIR}${INSTALLDIR} -not -type d | ${SORT} | \ ${SED} -e 's|^${STAGEDIR}${PREFIX}/||' >> ${TMPPLIST} .include Index: branches/2021Q1/java/openjdk14/files/patch-changeset-57932 =================================================================== --- branches/2021Q1/java/openjdk14/files/patch-changeset-57932 (nonexistent) +++ branches/2021Q1/java/openjdk14/files/patch-changeset-57932 (revision 564170) @@ -0,0 +1,44 @@ +changeset: 57932:9e54ea7d9cd9 +user: qpzhang +date: Wed Feb 05 20:31:09 2020 +0800 +summary: 8238388: libj2gss/NativeFunc.o "multiple definition" link errors with GCC10 + +diff -r 932418820c80 -r 9e54ea7d9cd9 src/java.security.jgss/share/native/libj2gss/NativeFunc.c +--- src/java.security.jgss/share/native/libj2gss/NativeFunc.c Wed Feb 05 10:45:39 2020 +0100 ++++ src/java.security.jgss/share/native/libj2gss/NativeFunc.c Wed Feb 05 20:31:09 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2020, 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 +@@ -27,6 +27,9 @@ + #include + #include "NativeFunc.h" + ++/* global GSS function table */ ++GSS_FUNCTION_TABLE_PTR ftab; ++ + /* standard GSS method names (ordering is from mapfile) */ + static const char RELEASE_NAME[] = "gss_release_name"; + static const char IMPORT_NAME[] = "gss_import_name"; +diff -r 932418820c80 -r 9e54ea7d9cd9 src/java.security.jgss/share/native/libj2gss/NativeFunc.h +--- src/java.security.jgss/share/native/libj2gss/NativeFunc.h Wed Feb 05 10:45:39 2020 +0100 ++++ src/java.security.jgss/share/native/libj2gss/NativeFunc.h Wed Feb 05 20:31:09 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2005, 2020, 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 +@@ -277,6 +277,6 @@ + typedef GSS_FUNCTION_TABLE *GSS_FUNCTION_TABLE_PTR; + + /* global GSS function table */ +-GSS_FUNCTION_TABLE_PTR ftab; ++extern GSS_FUNCTION_TABLE_PTR ftab; + + #endif + Property changes on: branches/2021Q1/java/openjdk14/files/patch-changeset-57932 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2021Q1/java/openjdk14/files/patch-changeset-57994 =================================================================== --- branches/2021Q1/java/openjdk14/files/patch-changeset-57994 (nonexistent) +++ branches/2021Q1/java/openjdk14/files/patch-changeset-57994 (revision 564170) @@ -0,0 +1,43 @@ +changeset: 57994:6925fca95959 +user: qpzhang +date: Tue Feb 04 21:27:10 2020 +0800 +summary: 8238380: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10 + +diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.c +--- src/java.base/unix/native/libjava/childproc.c Tue Feb 11 11:17:37 2020 +0800 ++++ src/java.base/unix/native/libjava/childproc.c Tue Feb 04 21:27:10 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, 2020, 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 +@@ -34,6 +34,7 @@ + + #include "childproc.h" + ++const char * const *parentPathv; + + ssize_t + restartableWrite(int fd, const void *buf, size_t count) +diff -r 8f6ffa575f63 -r 6925fca95959 src/java.base/unix/native/libjava/childproc.h +--- src/java.base/unix/native/libjava/childproc.h Tue Feb 11 11:17:37 2020 +0800 ++++ src/java.base/unix/native/libjava/childproc.h Tue Feb 04 21:27:10 2020 +0800 +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2013, 2020, 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 +@@ -126,7 +126,7 @@ + * The cached and split version of the JDK's effective PATH. + * (We don't support putenv("PATH=...") in native code) + */ +-const char * const *parentPathv; ++extern const char * const *parentPathv; + + ssize_t restartableWrite(int fd, const void *buf, size_t count); + int restartableDup2(int fd_from, int fd_to); + Property changes on: branches/2021Q1/java/openjdk14/files/patch-changeset-57994 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java =================================================================== --- branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java (nonexistent) +++ branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java (revision 564170) @@ -0,0 +1,11 @@ +--- src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java.orig 2020-04-17 22:35:42 UTC ++++ src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java +@@ -529,7 +529,7 @@ static native String XSetLocaleModifiers(String modifi + display Specifies the connection to the X server. + onoff Specifies a Boolean value that indicates whether to enable or disable synchronization. + */ +- static native int XSynchronize(long display, boolean onoff); ++ static native long XSynchronize(long display, boolean onoff); + + /** + * Extracts an X event that can be processed in a secondary loop. Property changes on: branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c =================================================================== --- branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c (nonexistent) +++ branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c (revision 564170) @@ -0,0 +1,15 @@ +--- src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c.orig 2020-04-17 22:35:42 UTC ++++ src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c +@@ -2180,10 +2180,10 @@ Java_sun_awt_X11_XlibWrapper_copyLongArray(JNIEnv *env + } + } + +-JNIEXPORT jint JNICALL ++JNIEXPORT jlong JNICALL + Java_sun_awt_X11_XlibWrapper_XSynchronize(JNIEnv *env, jclass clazz, jlong display, jboolean onoff) + { +- return (jint) XSynchronize((Display*)jlong_to_ptr(display), (onoff == JNI_TRUE ? True : False)); ++ return ptr_to_jlong(XSynchronize((Display*)jlong_to_ptr(display), (onoff == JNI_TRUE ? True : False))); + } + + JNIEXPORT jboolean JNICALL Property changes on: branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2021Q1 =================================================================== --- branches/2021Q1 (revision 564169) +++ branches/2021Q1 (revision 564170) Property changes on: branches/2021Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r564085