summaryrefslogtreecommitdiff
path: root/dev-java/openjdk/openjdk-17.0.6_p10.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/openjdk/openjdk-17.0.6_p10.ebuild')
-rw-r--r--dev-java/openjdk/openjdk-17.0.6_p10.ebuild10
1 files changed, 9 insertions, 1 deletions
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