mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-09 06:37:10 -08:00
dev-java/openjdk: handle lto
Bug: https://bugs.gentoo.org/833098 Closes: https://bugs.gentoo.org/833097 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
<flag name="javafx" restrict="<=dev-java/openjdk-9">Provide JavaFX support via <pkg>dev-java/openjfx</pkg></flag>
|
||||
<flag name="javafx" restrict=">=dev-java/openjdk-11">Import OpenJFX modules at build time, via <pkg>dev-java/openjfx</pkg></flag>
|
||||
<flag name="jbootstrap">Build OpenJDK twice, the second time using the result of the first</flag>
|
||||
<flag name="lto">Enable Link Time Optimization (LTO)</flag>
|
||||
<flag name="source">Install JVM sources</flag>
|
||||
<flag name="system-bootstrap">Bootstrap using installed openjdk</flag>
|
||||
<flag name="systemtap" restrict=">=dev-java/openjdk-11">Enable SystemTAP/DTrace tracing</flag>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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=(
|
||||
|
||||
Reference in New Issue
Block a user