From owner-freebsd-ports@freebsd.org Sun Oct 11 04:41:56 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B6C3437624 for ; Sun, 11 Oct 2020 04:41:56 +0000 (UTC) (envelope-from yasu@utahime.org) Received: from maybe.home.utahime.org (gate.utahime.jp [183.180.29.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C88KZ4v1Lz3S5p for ; Sun, 11 Oct 2020 04:41:54 +0000 (UTC) (envelope-from yasu@utahime.org) Received: from eastasia.home.utahime.org (eastasia.home.utahime.org [192.168.174.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by maybe.home.utahime.org (Postfix) with ESMTPS id 0C70745AC1 for ; Sun, 11 Oct 2020 13:41:50 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=utahime.org; s=maybe2019112701; t=1602391310; bh=pKTuR7MrDF6pmsKfFE5mEQgYDmB+eUtgQAYYPiIaeXU=; h=Date:To:Subject:From:In-Reply-To:References; b=eCtyaQ5pUVFSalkwPnx+QOe5ySrQKhB3MSjq7g4M4OtZ3JcItIKZVJgd9FoMFJ/yG au6DyWuv5h1x11OZ8yNLr7jtYCe493ZpZa7GrwWW089L/L75kSaPd8fziunGJxX1BX xsHUq4dx/7EGb0Xlyt1I5dJ5A1SrO8RtlFoP6s7I48XcrnEqvvV28OZu4VpA/sYeqY HrYqVkgJNQ1gNhxT8nJlQeVsdmIYMawikMutgeX0B1C3dLz/Tl9LLLd0WhKyA1MklD 39sZr5rCasRCRy6hqaRGmibbLs168EKMYABpxZ5WmmR6gAatFooNuhLbLViQG5TirU rSlRu8aK1oc+A== Received: from localhost (rolling-vm-freebsd1.home.utahime.org [192.168.174.51]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by eastasia.home.utahime.org (Postfix) with ESMTPSA id C77E52B62E; Sun, 11 Oct 2020 13:41:48 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.0 at eastasia.home.utahime.org Date: Sun, 11 Oct 2020 13:41:33 +0900 (JST) Message-Id: <20201011.134133.2132611348164359361.yasu@utahime.org> To: freebsd-ports@freebsd.org Subject: Re: OpenJDK ports and 13-CURRENT From: Yasuhiro KIMURA In-Reply-To: <20201011.083539.2263084724392057537.yasu@utahime.org> References: <20201010194926.jnypzmbpu33wilbl@mutt-hbsd> <20201011.083539.2263084724392057537.yasu@utahime.org> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4C88KZ4v1Lz3S5p X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=utahime.org header.s=maybe2019112701 header.b=eCtyaQ5p; dmarc=none; spf=pass (mx1.freebsd.org: domain of yasu@utahime.org designates 183.180.29.210 as permitted sender) smtp.mailfrom=yasu@utahime.org X-Spamd-Result: default: False [-0.22 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[utahime.org:s=maybe2019112701]; NEURAL_HAM_MEDIUM(-0.98)[-0.984]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[utahime.org]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.96)[-0.961]; RCVD_COUNT_THREE(0.00)[3]; HFILTER_HELO_IP_A(1.00)[maybe.home.utahime.org]; R_SPF_ALLOW(-0.20)[+a:spf-authorized.utahime.org]; DKIM_TRACE(0.00)[utahime.org:+]; NEURAL_HAM_SHORT(-0.58)[-0.576]; MID_CONTAINS_FROM(1.00)[]; HFILTER_HELO_NORES_A_OR_MX(0.30)[maybe.home.utahime.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:2519, ipnet:183.180.0.0/16, country:JP]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-ports] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2020 04:41:56 -0000 From: Yasuhiro KIMURA Subject: Re: OpenJDK ports and 13-CURRENT Date: Sun, 11 Oct 2020 08:35:39 +0900 (JST) > From: Dimitry Andric > Subject: Re: OpenJDK ports and 13-CURRENT > Date: Sun, 11 Oct 2020 00:57:33 +0200 > >> Can you try the attached patch? I haven't yet looked at openjdk 13 and >> up, but I assume they will need at least the XSynchronize fix, and maybe >> the above ones, if the upstream branches were made after 2020-02-05. > > I tried your patch but it fails at patch phase as following. I modified your patch as following and now build of java/openjdk12 succeeeds on 13-CURRENT amd64 r366578. >From 5fb14c6b20c000f57ad975d79aed0072f142ec80 Mon Sep 17 00:00:00 2001 From: Yasuhiro KIMURA Date: Sun, 11 Oct 2020 10:28:47 +0900 Subject: [PATCH] java/openjdk12: Fix build with -fno-common (Clang 11/GCC 10) Fix build with -fno-common (Clang 11/GCC 10) --- java/openjdk12/files/patch-changeset-57932 | 27 +++++++++++++++++++ java/openjdk12/files/patch-changeset-57994 | 26 ++++++++++++++++++ ..._unix_classes_sun_awt_X11_XlibWrapper.java | 11 ++++++++ ...nix_native_libawt__xawt_xawt_XlibWrapper.c | 15 +++++++++++ 4 files changed, 79 insertions(+) create mode 100644 java/openjdk12/files/patch-changeset-57932 create mode 100644 java/openjdk12/files/patch-changeset-57994 create mode 100644 java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java create mode 100644 java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c diff --git a/java/openjdk12/files/patch-changeset-57932 b/java/openjdk12/files/patch-changeset-57932 new file mode 100644 index 000000000000..24b929d5ac08 --- /dev/null +++ b/java/openjdk12/files/patch-changeset-57932 @@ -0,0 +1,27 @@ +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 + +--- src/java.security.jgss/share/native/libj2gss/NativeFunc.c.orig 2020-04-17 22:35:42 UTC ++++ src/java.security.jgss/share/native/libj2gss/NativeFunc.c +@@ -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"; +--- src/java.security.jgss/share/native/libj2gss/NativeFunc.h.orig 2020-04-17 22:35:42 UTC ++++ src/java.security.jgss/share/native/libj2gss/NativeFunc.h +@@ -277,6 +277,6 @@ typedef struct GSS_FUNCTION_TABLE { + typedef GSS_FUNCTION_TABLE *GSS_FUNCTION_TABLE_PTR; + + /* global GSS function table */ +-GSS_FUNCTION_TABLE_PTR ftab; ++extern GSS_FUNCTION_TABLE_PTR ftab; + + #endif diff --git a/java/openjdk12/files/patch-changeset-57994 b/java/openjdk12/files/patch-changeset-57994 new file mode 100644 index 000000000000..ac5ef8190d89 --- /dev/null +++ b/java/openjdk12/files/patch-changeset-57994 @@ -0,0 +1,26 @@ +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 + +--- src/java.base/unix/native/libjava/childproc.c.orig 2020-04-17 22:35:42 UTC ++++ src/java.base/unix/native/libjava/childproc.c +@@ -33,6 +33,7 @@ + + #include "childproc.h" + ++const char * const *parentPathv; + + ssize_t + restartableWrite(int fd, const void *buf, size_t count) +--- src/java.base/unix/native/libjava/childproc.h.orig 2020-04-17 22:35:42 UTC ++++ src/java.base/unix/native/libjava/childproc.h +@@ -118,7 +118,7 @@ typedef struct _SpawnInfo { + * 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); diff --git a/java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java b/java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java new file mode 100644 index 000000000000..4f3913a95410 --- /dev/null +++ b/java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java @@ -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. diff --git a/java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c b/java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c new file mode 100644 index 000000000000..b4d602993ab9 --- /dev/null +++ b/java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c @@ -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 -- 2.28.0 --- Yasuhiro KIMURA