1 |
commit: 24b898c5ed4e1c7957ed2f1e7c612c52dfef1563 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 11 18:23:58 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 11 18:43:44 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24b898c5 |
7 |
|
8 |
mail-client/thunderbird: fail if LLVM version used by clang and rust does not match |
9 |
|
10 |
See same changes for www-client/firefox for details. |
11 |
|
12 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
13 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
14 |
|
15 |
mail-client/thunderbird/thunderbird-78.3.2.ebuild | 19 +++++++++++++++++++ |
16 |
1 file changed, 19 insertions(+) |
17 |
|
18 |
diff --git a/mail-client/thunderbird/thunderbird-78.3.2.ebuild b/mail-client/thunderbird/thunderbird-78.3.2.ebuild |
19 |
index 72378be0591..23bfc4a0438 100644 |
20 |
--- a/mail-client/thunderbird/thunderbird-78.3.2.ebuild |
21 |
+++ b/mail-client/thunderbird/thunderbird-78.3.2.ebuild |
22 |
@@ -382,6 +382,25 @@ pkg_setup() { |
23 |
|
24 |
llvm_pkg_setup |
25 |
|
26 |
+ if use clang && use lto ; then |
27 |
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') |
28 |
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") |
29 |
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" |
30 |
+ |
31 |
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') |
32 |
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") |
33 |
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" |
34 |
+ |
35 |
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then |
36 |
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." |
37 |
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" |
38 |
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" |
39 |
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" |
40 |
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto" |
41 |
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" |
42 |
+ fi |
43 |
+ fi |
44 |
+ |
45 |
python-any-r1_pkg_setup |
46 |
|
47 |
# Avoid PGO profiling problems due to enviroment leakage |