commit:     405c1fc37a672c83f3f2c10031afa501dc5084bc
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 12 14:28:16 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Feb 12 14:32:34 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=405c1fc3

www-client/firefox: revert gcc+lto changes back

 - apparently using bfd+lto on 78 branch still causes random runtime issues,
   sorry for anyone who were fast enough to upgrade.

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...{firefox-78.7.1-r2.ebuild => firefox-78.7.1-r1.ebuild} | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/www-client/firefox/firefox-78.7.1-r2.ebuild 
b/www-client/firefox/firefox-78.7.1-r1.ebuild
similarity index 98%
rename from www-client/firefox/firefox-78.7.1-r2.ebuild
rename to www-client/firefox/firefox-78.7.1-r1.ebuild
index 15993391a0a..443b023ec8b 100644
--- a/www-client/firefox/firefox-78.7.1-r2.ebuild
+++ b/www-client/firefox/firefox-78.7.1-r1.ebuild
@@ -57,7 +57,7 @@ SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> 
${MOZ_P_DISTFILES}
 DESCRIPTION="Firefox Web Browser"
 HOMEPAGE="https://www.mozilla.com/firefox";
 
-KEYWORDS="amd64 ~arm64 ~ppc64 x86"
+KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
 
 SLOT="0/esr$(ver_cut 1)"
 LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
@@ -68,7 +68,6 @@ IUSE="+clang cpu_flags_arm_neon dbus debug eme-free 
geckodriver +gmp-autoupdate
 
 REQUIRED_USE="debug? ( !system-av1 )
        screencast? ( wayland )
-       x86? ( lto? ( clang ) )
        wifi? ( dbus )"
 
 BDEPEND="${PYTHON_DEPS}
@@ -104,6 +103,9 @@ BDEPEND="${PYTHON_DEPS}
                        )
                )
        )
+       lto? (
+               !clang? ( sys-devel/binutils[gold] )
+       )
        amd64? ( >=dev-lang/yasm-1.1 )
        x86? ( >=dev-lang/yasm-1.1 )
        !system-av1? (
@@ -407,12 +409,12 @@ pkg_setup() {
                        [[ -z ${version_lld} ]] && die "Failed to read ld.lld 
version!"
 
                        # temp fix for https://bugs.gentoo.org/768543
-                       # we can assume that rust 1.49.0 always uses llvm 11
+                       # we can assume that rust 1.{49,50}.0 always uses llvm 
11
                        local version_rust=$(rustc -Vv 2>/dev/null | grep -F -- 
'release:' | awk '{ print $2 }')
                        [[ -n ${version_rust} ]] && version_rust=$(ver_cut 1-2 
"${version_rust}")
                        [[ -z ${version_rust} ]] && die "Failed to read version 
from rustc!"
 
-                       if ver_test "${version_rust}" -eq "1.49" ; then
+                       if ver_test "${version_rust}" -ge "1.49" && ver_test 
"${version_rust}" -le "1.50" ; then
                                local version_llvm_rust="11"
                        else
                                local version_llvm_rust=$(rustc -Vv 2>/dev/null 
| grep -F -- 'LLVM version:' | awk '{ print $3 }')
@@ -717,6 +719,9 @@ src_configure() {
 
                        mozconfig_add_options_ac '+lto' --enable-lto=cross
                else
+                       # Linking only works when using ld.gold when LTO is 
enabled
+                       mozconfig_add_options_ac "forcing ld=gold due to 
USE=lto" --enable-linker=gold
+
                        # ThinLTO is currently broken, see bmo#1644409
                        mozconfig_add_options_ac '+lto' --enable-lto=full
                fi
@@ -734,6 +739,8 @@ src_configure() {
                if use clang ; then
                        # This is upstream's default
                        mozconfig_add_options_ac "forcing ld=lld due to 
USE=clang" --enable-linker=lld
+               elif tc-ld-is-gold ; then
+                       mozconfig_add_options_ac "linker is set to gold" 
--enable-linker=gold
                else
                        mozconfig_add_options_ac "linker is set to bfd" 
--enable-linker=bfd
                fi

Reply via email to