summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-10-07 03:01:00 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-10-07 03:03:32 +0200
commitf86cb89cde8192adfdab42ee0b69109ddc12f1bd (patch)
tree4b9ba30c211e036c82f9ebd097f6b9c6d8bada0f /dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild
parentdev-lang/spidermonkey: enable SIMD in Rust code (diff)
downloadgentoo-f86cb89cde8192adfdab42ee0b69109ddc12f1bd.tar.gz
gentoo-f86cb89cde8192adfdab42ee0b69109ddc12f1bd.tar.bz2
gentoo-f86cb89cde8192adfdab42ee0b69109ddc12f1bd.zip
dev-lang/spidermonkey: add USE=lto
Forcing LTO via CFLAGS is not enough -- we need to tell build system that we want to use LTO. Closes: https://bugs.gentoo.org/746947 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild')
-rw-r--r--dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild14
1 files changed, 12 insertions, 2 deletions
diff --git a/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild b/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild
index a0ec34c118fe..1694f51c1847 100644
--- a/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{6..9} )
WANT_AUTOCONF="2.1"
-inherit autotools check-reqs multiprocessing python-any-r1 toolchain-funcs
+inherit autotools check-reqs flag-o-matic multiprocessing python-any-r1 toolchain-funcs
MY_PN="mozjs"
MY_PV="${PV/_pre*}" # Handle Gentoo pre-releases
@@ -53,7 +53,7 @@ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~s390 ~x86"
SLOT="78"
LICENSE="MPL-2.0"
-IUSE="cpu_flags_arm_neon debug +jit test"
+IUSE="cpu_flags_arm_neon debug +jit lto test"
RESTRICT="!test? ( test )"
@@ -107,6 +107,8 @@ pkg_setup() {
src_prepare() {
pushd ../.. &>/dev/null || die
+ use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
+
eapply "${WORKDIR}"/firefox-patches
eapply "${WORKDIR}"/spidermonkey-patches
@@ -175,6 +177,14 @@ src_configure() {
fi
fi
+ # Tell build system that we want to use LTO
+ if use lto ; then
+ myeconfargs+=( --enable-lto )
+ fi
+
+ # LTO flag was handled via configure
+ filter-flags '-flto*'
+
# Forcing system-icu allows us to skip patching bundled ICU for PPC
# and other minor arches
ECONF_SOURCE="${S}" \