commit:     00b314f5b85150726978be1bde94e13e5cdb0c85
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 14 23:13:27 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Apr 14 23:42:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00b314f5

www-client/firefox: make USE=lto respect MAKEOPTS

Closes: https://bugs.gentoo.org/716758
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 www-client/firefox/firefox-68.7.0.ebuild |  8 +++++++-
 www-client/firefox/firefox-75.0.ebuild   | 11 +++++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/www-client/firefox/firefox-68.7.0.ebuild 
b/www-client/firefox/firefox-68.7.0.ebuild
index 035e41b50ae..4e8dd7c4d52 100644
--- a/www-client/firefox/firefox-68.7.0.ebuild
+++ b/www-client/firefox/firefox-68.7.0.ebuild
@@ -42,7 +42,7 @@ LLVM_MAX_SLOT=10
 
 inherit check-reqs eapi7-ver flag-o-matic toolchain-funcs eutils \
                gnome2-utils llvm mozcoreconf-v6 pax-utils xdg-utils \
-               autotools mozlinguas-v2 virtualx
+               autotools mozlinguas-v2 multiprocessing virtualx
 
 DESCRIPTION="Firefox Web Browser"
 HOMEPAGE="https://www.mozilla.com/firefox";
@@ -303,6 +303,12 @@ src_prepare() {
        # Allow user to apply any additional patches without modifing ebuild
        eapply_user
 
+       # Make LTO respect MAKEOPTS
+       sed -i \
+               -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/build/moz.configure/toolchain.configure \
+               || die "sed failed to set num_cores"
+
        # Enable gnomebreakpad
        if use debug ; then
                sed -i -e 
"s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \

diff --git a/www-client/firefox/firefox-75.0.ebuild 
b/www-client/firefox/firefox-75.0.ebuild
index 6661604f0cc..0302a4b7d3f 100644
--- a/www-client/firefox/firefox-75.0.ebuild
+++ b/www-client/firefox/firefox-75.0.ebuild
@@ -41,8 +41,9 @@ fi
 LLVM_MAX_SLOT=10
 
 inherit check-reqs eapi7-ver flag-o-matic toolchain-funcs eutils \
-               gnome2-utils llvm mozcoreconf-v6 pax-utils xdg-utils \
-               autotools mozlinguas-v2 virtualx eapi7-ver
+               gnome2-utils llvm mozcoreconf-v6 multiprocessing \
+               pax-utils xdg-utils autotools mozlinguas-v2 virtualx \
+               eapi7-ver
 
 DESCRIPTION="Firefox Web Browser"
 HOMEPAGE="https://www.mozilla.com/firefox";
@@ -315,6 +316,12 @@ src_unpack() {
 src_prepare() {
        eapply "${WORKDIR}/firefox"
 
+       # Make LTO respect MAKEOPTS
+       sed -i \
+               -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+               "${S}"/build/moz.configure/lto-pgo.configure \
+               || die "sed failed to set num_cores"
+
        # Allow user to apply any additional patches without modifing ebuild
        eapply_user
 

Reply via email to