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