From nobody Sun Nov 12 20:05:20 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ST3Sw3B90z511ws; Sun, 12 Nov 2023 20:05:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ST3Sw2kdHz3XP4; Sun, 12 Nov 2023 20:05:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699819520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OyYKO2+51xVZhI9A7H17hmnEXj04egaOdXCjw8DvXqo=; b=CPQ+OuSeVzzGszRg6hhRoXxqFBMGYoWoIR/GO2HL6ipve51GF6jdT++wx2T4HGxTpr46/1 b1qXD42q7vRIYrtu8lzsDaNwt6HjdpUJrlulmWhVYgAsmwZWrE6Tkw1YpMIrnO/8hFaOLi NoKBPpe33l1mRWNb/JoiAqib/jC5aZDAmQy7YPo87exXfz8+GNCuRC49Vi8h4ATnkfy2Cq dOYhXrHvf1pkHx0jgFI5GDvpG4J75Sysu8l0zObTtzlB6SsFzLMqgPUL4Ezl+tPpXW7Cq8 lV8wUd2kqvzdw9mSUpYqANQ7IN85kRHKxKPyI2UX2NRQnNLbfoiF40oUOFg/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699819520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OyYKO2+51xVZhI9A7H17hmnEXj04egaOdXCjw8DvXqo=; b=Yq7NwIOKDrNWkmZFonS0jDu39rzWryuHoDYkjmBhdKFKNMjSld5HVK6VgrvPXDO0TIziVl 3t5MAS1MJ/8AkXzYtJ9PUtBeth1o7nkk//p8RBsh14763E6d8h87bHwf6tKg21NmRO13I5 i+80z4vpDaTNfSe6+qLKJ1wS1BGcLGbuyISHzlwGqjtbWoYXI8BQQwmgqyYQu3wWQV+HJu CO5aJI95O9y7tye3LYtb1mAsxIYCf77nzoWawU2BzaPLro5GHVRO2cXxQ5CwDc1dNsypDv W/zNbDUnyzEVN1lycEadnUWR+nUmJudys8jPAasrsAtGM/osHK0sdQwK/hkj2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699819520; a=rsa-sha256; cv=none; b=MZfgO7jizg23UivfEDjpjv3yokhoyOrXI1ed3wbF+urwQes9ZaFZcSo9cMv65pNSOaX256 ANWkPBixmkhlANoVSosYf2C9QmDBM61q/3ITV2QlPJfiRETt3zplr/JI0ueGdUTZ1bRixR QrHRXJX83AI5ckAEca7YuGWiLplrgxLt15z+GNwroGOrqrfoMWd5s9v472XKvhHsNlGWma uccTrRE8PHVKfAtBVO8UoiMYZyZB0FPyanjS6mSw+pRza/bvht4uJ1itlSjoTI7a4RPCim 6Vs0yz7p3gBL5wsYw2RvE3U8m2Aklx9m3LrpJ/pcuDg3BQlcOH+bUAEj8ovc1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ST3Sw1r1nzc6R; Sun, 12 Nov 2023 20:05:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ACK5Kds026270; Sun, 12 Nov 2023 20:05:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ACK5KfD026267; Sun, 12 Nov 2023 20:05:20 GMT (envelope-from git) Date: Sun, 12 Nov 2023 20:05:20 GMT Message-Id: <202311122005.3ACK5KfD026267@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: b8ff2feb5df7 - main - java/openjdk18: fix build with lld 17 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8ff2feb5df79c0f6c3ac3d8746cc19567a1903b Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=b8ff2feb5df79c0f6c3ac3d8746cc19567a1903b commit b8ff2feb5df79c0f6c3ac3d8746cc19567a1903b Author: Dimitry Andric AuthorDate: 2023-11-12 20:00:48 +0000 Commit: Dimitry Andric CommitDate: 2023-11-12 20:04:01 +0000 java/openjdk18: fix build with lld 17 Building java/openjdk18 with lld 17 results in the following link errors: ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ21WB_HandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ24WB_HandshakeReadMonitorsE19ReadMonitorsClosure' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZ26WB_AsyncHandshakeWalkStackE16TraceSelfClosure' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZL20reinitialize_itablesvE18ReinitTableClosure' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN12JvmtiEnvBase27check_for_periodic_clean_upEvE28ThreadInsideIterationClosure' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN15G1RemSetSummary6updateEvE11CollectData' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet22set_active_all_threadsEbbE22SetThreadActiveClosure' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN16SATBMarkQueueSet23abandon_partial_markingEvE25AbandonThreadQueueClosure' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN18G1ConcurrentRefine30get_and_reset_refinement_statsEvE12CollectStats' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet12abandon_logsEvE23AbandonThreadLogClosure' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet16concatenate_logsEvE27ConcatenateThreadLogClosure' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN19G1DirtyCardQueueSet30get_and_reset_refinement_statsEvE12CollectStats' failed: symbol not defined ld: error: version script assignment of 'SUNWprivate_1.1' to symbol '_ZTVZN7Threads25change_thread_claim_tokenEvE11ResetClaims' failed: symbol not defined This is because lld 17 defaults to errors when undefined symbols are referenced in linker version scripts. The problem is due to the Makefile JvmMapfile.gmk, which generates a linker version script. It uses "nm --defined-only" to dump symbols in object files, but this also includes local (hidden) symbols. Add "--extern-only" to make it only dump global symbols. PR: 273753 MFH: 2023Q4 --- .../files/patch-make_hotspot_lib_JvmMapfile.gmk | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/java/openjdk18/files/patch-make_hotspot_lib_JvmMapfile.gmk b/java/openjdk18/files/patch-make_hotspot_lib_JvmMapfile.gmk new file mode 100644 index 000000000000..9ae03810886e --- /dev/null +++ b/java/openjdk18/files/patch-make_hotspot_lib_JvmMapfile.gmk @@ -0,0 +1,20 @@ +--- make/hotspot/lib/JvmMapfile.gmk.orig 2022-07-20 22:54:48 UTC ++++ make/hotspot/lib/JvmMapfile.gmk +@@ -53,7 +53,7 @@ ifeq ($(call isTargetOs, linux), true) + # platform dependent. + + ifeq ($(call isTargetOs, linux), true) +- DUMP_SYMBOLS_CMD := $(NM) --defined-only *.o ++ DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *.o + ifneq ($(FILTER_SYMBOLS_PATTERN), ) + FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)| + endif +@@ -134,7 +134,7 @@ else ifeq ($(call isTargetOs, bsd), true) + if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \ + }' + else +- DUMP_SYMBOLS_CMD := $(NM) --defined-only *.o ++ DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *.o + FILTER_SYMBOLS_AWK_SCRIPT := \ + '{ \ + if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \