From nobody Fri Jan 26 22:23:39 2024 X-Original-To: dev-commits-ports-main@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 4TMBzv2h3Bz58yCm; Fri, 26 Jan 2024 22:23:39 +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 4TMBzv295Qz4fMS; Fri, 26 Jan 2024 22:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706307819; 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=EaFdYb7DP6PPtrQZWwEXOATlraSphjWaS1XbXu8979s=; b=VX7TQq00Gr3ju3IjZ/q461jSKlpdZzFN3BsDx6WlWtwHFobu+JQq6owLukJYHm9zYKhFFT 5BCEBluwM1nMikoa3KaeqoRw3dXZvpjBKgbjQdypyTFbipHABB7H9mn7t+CKeJSnCVftBU QfsVf+CSQ0517I0vYyvjzKCxvgtEmPzvR974pQRa4OvwouX6J+GNczQGhyHDEDWFzCElXx VpZSmQDjeeDXSwEofqNEOOmk4Wl2GLiyA3wW0Q8y+3NYk7pqG8WcT9pFi1QAW4W2ziVCmx 2rriu0l4EX2xx/j+cZy7pMFT1916XhH2f+J1slQOjXl+zbHGSO73EiREtWkL7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706307819; 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=EaFdYb7DP6PPtrQZWwEXOATlraSphjWaS1XbXu8979s=; b=ZEt38ZFFCRUlIfg45zsMEM/7QsGExfWXYk0UkqhJpoJZnkmPwH9TvcoEbo/ylV1CacnA0m cK2ESUPUmJSnwSShN9UUiEK4t/n8CNn2VViAU80wHnVYhtUbaK6vs09dkWoNDzcWIfbkvn gNzGCN5lflprTYAfbJi1QpNyEY5/uXXTQn2aYVnuKdlHDrDLDBGNidKQ1NwUeZxFf/D86N 1gnLzfekYyqVGYtLVSvAs0lnjpEn1rmngnMpuBIz2SXTbAWxKsYaxGD3dmFQ7wNF+yA7l1 V+DNuxrsGRUmsZPIpqlwa3Drn3DNK9VABuAB1uMFauHBA/Fp8xne3RAsodq+fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706307819; a=rsa-sha256; cv=none; b=pxiT6QoP2UXlK7GKJfQt+mBmoPQ2dDE/zJwxsCPnRiw/2OiGpU6ZDJi2L4omo73YrdS74C nVFXcqJi3r248RVGHhqT12SoKvEtdKhnHLK1iBxVUOT37v31WoXsXfQmcQsWcMls7l3Tkg J98GktgLw/Awko167IS/82MIOM6FLYGDeiDAbMBeeVqcpb1rKteBEro9acX/Vy/XddrBLq BDvWcvzqD6ofCXfi6lssPTuoDTTnMRRkfcwFeuGnlWt2XNVwIfgG335V6aURssT5N6usQC 13fQMNz5+WkBOh0sP9H6wkKS44BllJb+pP1mU9unCDoPs2VYGwaHOJZj4qPewg== 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 4TMBzv1DNqz10Vq; Fri, 26 Jan 2024 22:23:39 +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 40QMNdCC017893; Fri, 26 Jan 2024 22:23:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QMNdpj017890; Fri, 26 Jan 2024 22:23:39 GMT (envelope-from git) Date: Fri, 26 Jan 2024 22:23:39 GMT Message-Id: <202401262223.40QMNdpj017890@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Michael Osipov Subject: git: a1f91b22f1fc - main - java/openjdk{19,20,21}: fix build with lld 17 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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/main X-Git-Reftype: branch X-Git-Commit: a1f91b22f1fc8ada691c47864c6365731cf8ef86 Auto-Submitted: auto-generated The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/ports/commit/?id=a1f91b22f1fc8ada691c47864c6365731cf8ef86 commit a1f91b22f1fc8ada691c47864c6365731cf8ef86 Author: Dimitry Andric AuthorDate: 2023-11-12 20:00:48 +0000 Commit: Michael Osipov CommitDate: 2024-01-26 22:23:12 +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 --- .../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; \