From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1250379-garchives=archives.gentoo.org@lists.gentoo.org>
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 8149F13835C
	for <garchives@archives.gentoo.org>; Fri, 12 Feb 2021 14:32:44 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BB9A2E0ACA;
	Fri, 12 Feb 2021 14:32:43 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.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 A5831E0ACA
	for <gentoo-commits@lists.gentoo.org>; Fri, 12 Feb 2021 14:32:43 +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 73C3A3410A1
	for <gentoo-commits@lists.gentoo.org>; Fri, 12 Feb 2021 14:32:42 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 1152E4C7
	for <gentoo-commits@lists.gentoo.org>; Fri, 12 Feb 2021 14:32:41 +0000 (UTC)
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" <juippis@gentoo.org>
Message-ID: <1613140355.3c447d0d45a1b47aeef61cd468e87afd7ec5a71f.juippis@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-client/thunderbird/
X-VCS-Repository: repo/gentoo
X-VCS-Files: mail-client/thunderbird/thunderbird-78.7.1-r1.ebuild mail-client/thunderbird/thunderbird-78.7.1-r2.ebuild
X-VCS-Directories: mail-client/thunderbird/
X-VCS-Committer: juippis
X-VCS-Committer-Name: Joonas Niilola
X-VCS-Revision: 3c447d0d45a1b47aeef61cd468e87afd7ec5a71f
X-VCS-Branch: master
Date: Fri, 12 Feb 2021 14:32:41 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: ec175b30-07de-4722-9130-569434d65985
X-Archives-Hash: 193f1087579417e6c96078ad2e9f67ef

commit:     3c447d0d45a1b47aeef61cd468e87afd7ec5a71f
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 12 14:30:26 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Feb 12 14:32:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c447d0d

mail-client/thunderbird: reverting back gcc+lto restrictions

 - bfd still causes random runtime issues, sorry for anyone who were fast to
   update.

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

 ...bird-78.7.1-r2.ebuild => thunderbird-78.7.1-r1.ebuild} | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/mail-client/thunderbird/thunderbird-78.7.1-r2.ebuild b/mail-client/thunderbird/thunderbird-78.7.1-r1.ebuild
similarity index 98%
rename from mail-client/thunderbird/thunderbird-78.7.1-r2.ebuild
rename to mail-client/thunderbird/thunderbird-78.7.1-r1.ebuild
index 3ed9c1011d4..4b0672cc37c 100644
--- a/mail-client/thunderbird/thunderbird-78.7.1-r2.ebuild
+++ b/mail-client/thunderbird/thunderbird-78.7.1-r1.ebuild
@@ -66,7 +66,8 @@ IUSE="+clang cpu_flags_arm_neon dbus debug eme-free
 	+system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent
 	+system-libvpx +system-webp wayland wifi"
 
-REQUIRED_USE="wifi? ( dbus )"
+REQUIRED_USE="x86? ( lto? ( clang ) )
+	wifi? ( dbus )"
 
 BDEPEND="${PYTHON_DEPS}
 	app-arch/unzip
@@ -101,6 +102,9 @@ BDEPEND="${PYTHON_DEPS}
 			)
 		)
 	)
+	lto? (
+		!clang? ( sys-devel/binutils[gold] )
+	)
 	amd64? ( >=dev-lang/yasm-1.1 )
 	x86? ( >=dev-lang/yasm-1.1 )
 	!system-av1? (
@@ -395,12 +399,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 }')
@@ -702,6 +706,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
@@ -719,6 +726,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