From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E34E21580C6 for ; Thu, 6 Apr 2023 00:27:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 28F9EE077F; Thu, 6 Apr 2023 00:27:54 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 pigeon.gentoo.org (Postfix) with ESMTPS id EB6E7E077F for ; Thu, 6 Apr 2023 00:27:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D7153340F08 for ; Thu, 6 Apr 2023 00:27:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9F437A10 for ; Thu, 6 Apr 2023 00:27:49 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1680740861.970458062aa4c59f525e447cc9f7b6251acdb2d1.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/openjdk/metadata.xml dev-java/openjdk/openjdk-11.0.18_p10.ebuild dev-java/openjdk/openjdk-17.0.6_p10.ebuild dev-java/openjdk/openjdk-8.362_p09.ebuild X-VCS-Directories: dev-java/openjdk/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 970458062aa4c59f525e447cc9f7b6251acdb2d1 X-VCS-Branch: master Date: Thu, 6 Apr 2023 00:27:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8621073c-8a8f-4913-91f2-a97987f7aa89 X-Archives-Hash: 2f6059da9e48d00405d11d8ab1d1c01a commit: 970458062aa4c59f525e447cc9f7b6251acdb2d1 Author: Georgy Yakovlev gentoo org> AuthorDate: Thu Apr 6 00:22:21 2023 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Thu Apr 6 00:27:41 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97045806 dev-java/openjdk: handle lto Bug: https://bugs.gentoo.org/833098 Closes: https://bugs.gentoo.org/833097 Signed-off-by: Georgy Yakovlev gentoo.org> dev-java/openjdk/metadata.xml | 1 + dev-java/openjdk/openjdk-11.0.18_p10.ebuild | 10 +++++++++- dev-java/openjdk/openjdk-17.0.6_p10.ebuild | 10 +++++++++- dev-java/openjdk/openjdk-8.362_p09.ebuild | 6 ++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/dev-java/openjdk/metadata.xml b/dev-java/openjdk/metadata.xml index 367d2eb36d3e..201e1fe75f50 100644 --- a/dev-java/openjdk/metadata.xml +++ b/dev-java/openjdk/metadata.xml @@ -23,6 +23,7 @@ Provide JavaFX support via dev-java/openjfx Import OpenJFX modules at build time, via dev-java/openjfx Build OpenJDK twice, the second time using the result of the first + Enable Link Time Optimization (LTO) Install JVM sources Bootstrap using installed openjdk Enable SystemTAP/DTrace tracing diff --git a/dev-java/openjdk/openjdk-11.0.18_p10.ebuild b/dev-java/openjdk/openjdk-11.0.18_p10.ebuild index b2eafe9b1e68..8f67061d2ac5 100644 --- a/dev-java/openjdk/openjdk-11.0.18_p10.ebuild +++ b/dev-java/openjdk/openjdk-11.0.18_p10.ebuild @@ -51,7 +51,7 @@ SRC_URI=" LICENSE="GPL-2-with-classpath-exception" KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv x86" -IUSE="alsa big-endian cups debug doc examples headless-awt javafx +jbootstrap selinux source system-bootstrap systemtap" +IUSE="alsa big-endian cups debug doc examples headless-awt javafx +jbootstrap lto selinux source system-bootstrap systemtap" REQUIRED_USE=" javafx? ( alsa !headless-awt ) @@ -173,6 +173,12 @@ src_configure() { # Strip some flags users may set, but should not. #818502 filter-flags -fexceptions + # Strip lto related flags, we rely on USE=lto and --with-jvm-features=link-time-opt + # https://bugs.gentoo.org/833097 + # https://bugs.gentoo.org/833098 + filter-flags '-flto*' + filter-flags -fdevirtualize-at-ltrans + # Enabling full docs appears to break doc building. If not # explicitly disabled, the flag will get auto-enabled if pandoc and # graphviz are detected. pandoc has loads of dependencies anyway. @@ -207,6 +213,8 @@ src_configure() { ) ! use riscv && myconf+=( --with-jvm-features=shenandoahgc ) + use lto && myconf+=( --with-jvm-features=link-time-opt ) + if use javafx; then # this is not useful for users, just for upstream developers # build system compares mesa version in md file diff --git a/dev-java/openjdk/openjdk-17.0.6_p10.ebuild b/dev-java/openjdk/openjdk-17.0.6_p10.ebuild index a4fedb98ad08..328018b6e7c8 100644 --- a/dev-java/openjdk/openjdk-17.0.6_p10.ebuild +++ b/dev-java/openjdk/openjdk-17.0.6_p10.ebuild @@ -54,7 +54,7 @@ SRC_URI=" LICENSE="GPL-2-with-classpath-exception" KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv x86" -IUSE="alsa big-endian cups debug doc examples headless-awt javafx +jbootstrap selinux source system-bootstrap systemtap" +IUSE="alsa big-endian cups debug doc examples headless-awt javafx +jbootstrap lto selinux source system-bootstrap systemtap" REQUIRED_USE=" javafx? ( alsa !headless-awt ) @@ -191,6 +191,12 @@ src_configure() { # Strip some flags users may set, but should not. #818502 filter-flags -fexceptions + # Strip lto related flags, we rely on USE=lto and --with-jvm-features=link-time-opt + # https://bugs.gentoo.org/833097 + # https://bugs.gentoo.org/833098 + filter-flags '-flto*' + filter-flags -fdevirtualize-at-ltrans + # Enabling full docs appears to break doc building. If not # explicitly disabled, the flag will get auto-enabled if pandoc and # graphviz are detected. pandoc has loads of dependencies anyway. @@ -227,6 +233,8 @@ src_configure() { use riscv && myconf+=( --with-boot-jdk-jvmargs="-Djdk.lang.Process.launchMechanism=vfork" ) + use lto && myconf+=( --with-jvm-features=link-time-opt ) + if use javafx; then local zip="${EPREFIX}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip" if [[ -r ${zip} ]]; then diff --git a/dev-java/openjdk/openjdk-8.362_p09.ebuild b/dev-java/openjdk/openjdk-8.362_p09.ebuild index 36aa8a4c97ae..2da4bca4fce1 100644 --- a/dev-java/openjdk/openjdk-8.362_p09.ebuild +++ b/dev-java/openjdk/openjdk-8.362_p09.ebuild @@ -132,6 +132,12 @@ src_configure() { # Strip some flags users may set, but should not. #818502 filter-flags -fexceptions + # Strip lto related flags, no support in this version. + # https://bugs.gentoo.org/833097 + # https://bugs.gentoo.org/833098 + filter-flags '-flto*' + filter-flags -fdevirtualize-at-ltrans + tc-export_build_env CC CXX PKG_CONFIG STRIP local myconf=(