diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2020-06-12 10:40:03 -0700 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2020-06-12 10:42:02 -0700 |
commit | 8e0668379b81eaaa034547c554b0e5ab59672e89 (patch) | |
tree | d9f19c8e53fdd01ab761ff7aedc3e667608fe2ee /dev-lang | |
parent | mail-client/s-nail: Drop old (diff) | |
download | gentoo-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>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/rust/rust-1.44.0.ebuild | 8 |
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 dba7e9ab61e7..ad573f79cdcb 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" |