summaryrefslogtreecommitdiff
path: root/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild')
-rw-r--r--dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild18
1 files changed, 14 insertions, 4 deletions
diff --git a/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild b/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild
index f8748a9aa6f0..e46b689bbc5d 100644
--- a/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -163,9 +163,19 @@ pkg_setup() {
[[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
[[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
- local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
- [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
- [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+ # temp fix for https://bugs.gentoo.org/768543
+ # 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}" -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 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+ fi
if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."