From nobody Fri Jan 26 22:25:57 2024 X-Original-To: dev-commits-ports-branches@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 4TMC2Y44BLz58yJr; Fri, 26 Jan 2024 22:25:57 +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 4TMC2Y3XSQz4fRW; Fri, 26 Jan 2024 22:25:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706307957; 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=ah4fP/OVU1TS8NCm1Z9Fysm2kNbBBNrsogmY4HJDJH0=; b=Or8fwectxxLkriiDFkokL1wTzSwNM6BDOG/UM8YsE6GhW/Pnoli3Cy9n+Le1g3mfiJbvKB +pHNBlluZo+fxsq23ER8ZOcEjjNDtEzY2Zah1PLi+Ee1VuKoUHDG2qOfdRjcTAxJlXk4Dm 6fwvRNT1d8s/KEnVi3z9ynTSItn0msgXpop9m/TzcuMgiz3DwCB60zrLgCfWGS+t/UGUjD fIJmyOvOR6GO414j70kBUUahnzH0s8Mv52mFDl665CKdXtsEGhPvQmsvxVgU7qNBH1ltkO dD8dPWk+W2NF6xKH+RRumHp8Xxg34l2x2/6DzxsXNu8C9JHpRe/7tyiUBpi1lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706307957; 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=ah4fP/OVU1TS8NCm1Z9Fysm2kNbBBNrsogmY4HJDJH0=; b=NcjtPk3fdlGi5zXC7iU7oMoroXHYfoni4D4DDO5WYO6ppxbSbevdqDCgMqRdueKAgPleQ9 9oHor3lpM2fwGVEuDtgnhsqPGkZ3S862/aUO7WEIk4AqBd0SOG05EMEhWdmatMarDxNd6/ 7+iJWiZgipt+W6BGBog9UB5hAy3AGIMnu8BeqljnkkwGG+0vnRJiBx/HTAcR5bIrJFFz2d tii+r2ZOfwwvw5En0NtQMP/fKnaxp9hvef8FHhZHBuPYpy/B1Evl2LIofleFC33cKZMyWi qw6oXfZC38xJLqSjIooF8J4Jm10WUpbF4beTo3y6kVb62AOPSd9nmvbDYQkBHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706307957; a=rsa-sha256; cv=none; b=hv1qxDihDEumeGZ34rX/LGD+qXIp9kMnNLK6/QxfKEEJRUlUG+gy+XLUVsTuuA5hZvt6kt 6xlUwmpNKsfEA9e+z4spor02Rs7wk+yx2f3iLywRNLUww7K6XCVRG8qcTVrVF7KYHvCYgS H9qRQYIsnb9c1w0PnDT10LERW40NNcTHDTju1INgWh3ziHlKlElEDmIN4OWC5q618v4Q7K szSmNOXJyP51EUqt1bsyX//0mMawVzv/gfBU2e6Ipx7kNm58DtslkImUi0Q0hMiKcs7GRf BjDalatrUAhzp8N15ew2aGsS/rI7Z6HTXpej2ojLCsppMzAJlysrNMCjx561EQ== 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 4TMC2Y2b94z10YK; Fri, 26 Jan 2024 22:25:57 +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 40QMPvAe018366; Fri, 26 Jan 2024 22:25:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QMPvGl018363; Fri, 26 Jan 2024 22:25:57 GMT (envelope-from git) Date: Fri, 26 Jan 2024 22:25:57 GMT Message-Id: <202401262225.40QMPvGl018363@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Michael Osipov Subject: git: cfb52bd42c00 - 2024Q1 - java/openjdk{19,20,21}: fix build with lld 17 List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: ports X-Git-Refname: refs/heads/2024Q1 X-Git-Reftype: branch X-Git-Commit: cfb52bd42c007e6e909bc915f8081a1b033a7bfd Auto-Submitted: auto-generated The branch 2024Q1 has been updated by michaelo: URL: https://cgit.FreeBSD.org/ports/commit/?id=cfb52bd42c007e6e909bc915f8081a1b033a7bfd commit cfb52bd42c007e6e909bc915f8081a1b033a7bfd Author: Dimitry Andric AuthorDate: 2023-11-12 20:00:48 +0000 Commit: Michael Osipov CommitDate: 2024-01-26 22:25:04 +0000 java/openjdk{19,20,21}: fix build with lld 17 Building java/openjdk{19,20,21} 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: 276425 Approved by: otis (mentor), dim MFH: 2024Q1 Differential Revision: https://reviews.freebsd.org/D43620 (cherry picked from commit a1f91b22f1fc8ada691c47864c6365731cf8ef86) --- .../files/patch-make_hotspot_lib_JvmMapfile.gmk | 20 ++++++++++++++++++++ .../files/patch-make_hotspot_lib_JvmMapfile.gmk | 20 ++++++++++++++++++++ .../files/patch-make_hotspot_lib_JvmMapfile.gmk | 20 ++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/java/openjdk19/files/patch-make_hotspot_lib_JvmMapfile.gmk b/java/openjdk19/files/patch-make_hotspot_lib_JvmMapfile.gmk new file mode 100644 index 000000000000..9ae03810886e --- /dev/null +++ b/java/openjdk19/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; \ diff --git a/java/openjdk20/files/patch-make_hotspot_lib_JvmMapfile.gmk b/java/openjdk20/files/patch-make_hotspot_lib_JvmMapfile.gmk new file mode 100644 index 000000000000..12bd16b87198 --- /dev/null +++ b/java/openjdk20/files/patch-make_hotspot_lib_JvmMapfile.gmk @@ -0,0 +1,20 @@ +--- make/hotspot/lib/JvmMapfile.gmk.orig 2024-01-26 16:33:03 UTC ++++ make/hotspot/lib/JvmMapfile.gmk +@@ -53,7 +53,7 @@ endif + # platform dependent. + + ifeq ($(call isTargetOs, linux), true) +- DUMP_SYMBOLS_CMD := $(NM) --defined-only *$(OBJ_SUFFIX) ++ DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *$(OBJ_SUFFIX) + 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 *$(OBJ_SUFFIX) ++ DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *$(OBJ_SUFFIX) + FILTER_SYMBOLS_AWK_SCRIPT := \ + '{ \ + if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \ diff --git a/java/openjdk21/files/patch-make_hotspot_lib_JvmMapfile.gmk b/java/openjdk21/files/patch-make_hotspot_lib_JvmMapfile.gmk new file mode 100644 index 000000000000..12bd16b87198 --- /dev/null +++ b/java/openjdk21/files/patch-make_hotspot_lib_JvmMapfile.gmk @@ -0,0 +1,20 @@ +--- make/hotspot/lib/JvmMapfile.gmk.orig 2024-01-26 16:33:03 UTC ++++ make/hotspot/lib/JvmMapfile.gmk +@@ -53,7 +53,7 @@ endif + # platform dependent. + + ifeq ($(call isTargetOs, linux), true) +- DUMP_SYMBOLS_CMD := $(NM) --defined-only *$(OBJ_SUFFIX) ++ DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *$(OBJ_SUFFIX) + 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 *$(OBJ_SUFFIX) ++ DUMP_SYMBOLS_CMD := $(NM) --extern-only --defined-only *$(OBJ_SUFFIX) + FILTER_SYMBOLS_AWK_SCRIPT := \ + '{ \ + if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \