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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 05152138359 for ; Wed, 7 Oct 2020 01:03:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 62861E09A8; Wed, 7 Oct 2020 01:03:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4DB22E09AB for ; Wed, 7 Oct 2020 01:03:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 678E9340E30 for ; Wed, 7 Oct 2020 01:03:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 16106396 for ; Wed, 7 Oct 2020 01:03:39 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1602032612.f86cb89cde8192adfdab42ee0b69109ddc12f1bd.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/spidermonkey/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/spidermonkey/metadata.xml dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild X-VCS-Directories: dev-lang/spidermonkey/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: f86cb89cde8192adfdab42ee0b69109ddc12f1bd X-VCS-Branch: master Date: Wed, 7 Oct 2020 01:03:39 +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: db697b89-c03a-42fc-a8dc-028899b32ebe X-Archives-Hash: 8ed80728989b144a802ef7bb5bbaf9b9 commit: f86cb89cde8192adfdab42ee0b69109ddc12f1bd Author: Thomas Deutschmann gentoo org> AuthorDate: Wed Oct 7 01:01:00 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Wed Oct 7 01:03:32 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f86cb89c 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 gentoo.org> dev-lang/spidermonkey/metadata.xml | 1 + dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dev-lang/spidermonkey/metadata.xml b/dev-lang/spidermonkey/metadata.xml index fc9478d330b..c97143567bf 100644 --- a/dev-lang/spidermonkey/metadata.xml +++ b/dev-lang/spidermonkey/metadata.xml @@ -9,6 +9,7 @@ Build with user-specified compiler optimizations (-Os, -O0, -O1, -O2, -O3) from CFLAGS (unsupported) Enable assertions to allow for easier debugging of programs that link to spidermonkey -- note this will often crash software on regular end-user systems + Enable Link Time Optimization (LTO) Use the system-wide dev-libs/icu instead of bundled -- note, only takes effect when icu flag is enabled diff --git a/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild b/dev-lang/spidermonkey/spidermonkey-78.3.1.ebuild index a0ec34c118f..1694f51c184 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}" \