summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-06-12 10:40:03 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-06-12 10:42:02 -0700
commit8e0668379b81eaaa034547c554b0e5ab59672e89 (patch)
treed9f19c8e53fdd01ab761ff7aedc3e667608fe2ee
parentmail-client/s-nail: Drop old (diff)
downloadgentoo-8e0668379b81eaaa034547c554b0e5ab59672e89.tar.gz
gentoo-8e0668379b81eaaa034547c554b0e5ab59672e89.tar.bz2
gentoo-8e0668379b81eaaa034547c554b0e5ab59672e89.zip
dev-lang/rust: more cross triple fixes
Bug: https://bugs.gentoo.org/679878 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
-rw-r--r--dev-lang/rust/rust-1.44.0.ebuild8
1 files changed, 6 insertions, 2 deletions
diff --git a/dev-lang/rust/rust-1.44.0.ebuild b/dev-lang/rust/rust-1.44.0.ebuild
index dba7e9ab61e..ad573f79cdc 100644
--- a/dev-lang/rust/rust-1.44.0.ebuild
+++ b/dev-lang/rust/rust-1.44.0.ebuild
@@ -324,10 +324,14 @@ src_configure() {
local cross_target_spec
for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
+ # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
local cross_llvm_target="${cross_target_spec%%:*}"
+ # extracts toolchain triples, <rust-target>:<CTARGET>
local cross_triples="${cross_target_spec#*:}"
- local cross_rust_target="${cross_triples#*:}"
- local cross_toolchain="${cross_triples#:*}"
+ # extracts first element after before : separator
+ local cross_rust_target="${cross_triples%%:*}"
+ # extracts last element after : separator
+ local cross_toolchain="${cross_triples##*:}"
use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"