diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-10-25 20:44:26 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-10-28 09:44:52 +0100 |
commit | 6608c076f64e37fd8c2cda41c1e700f86e4e60a8 (patch) | |
tree | 7c751f8b5dc8e9192f119d71a114946bd83e6b4c /meta/lib/oe | |
parent | 8dc68c2a80c029b10b7c072b67542d188379bbfe (diff) | |
download | poky-6608c076f64e37fd8c2cda41c1e700f86e4e60a8.tar.gz |
rust-target-config: match riscv target names with what rust expects
Official rust risc-v targets are prefixed with riscv32gc- and riscv64gc-:
https://doc.rust-lang.org/nightly/rustc/platform-support.html
Particularly crossbeam-utils make important build time decisions
for atomics based on those names, and so we need to match ours
with official targets.
On the other hand, the actual definitions for those targets do not
use the 'gc' suffix in 'arch' and 'llvm-target' fields, and so we
need to follow that too, to avoid cryptic mismatch errors from rust-llvm:
https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs
(From OE-Core rev: 1cfb9c8a59d98ccc9b0510cd28fb933f72fb6b6c)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/rust.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oe/rust.py b/meta/lib/oe/rust.py index 1dc9cf150d..185553eeeb 100644 --- a/meta/lib/oe/rust.py +++ b/meta/lib/oe/rust.py | |||
@@ -8,4 +8,6 @@ | |||
8 | def arch_to_rust_arch(arch): | 8 | def arch_to_rust_arch(arch): |
9 | if arch == "ppc64le": | 9 | if arch == "ppc64le": |
10 | return "powerpc64le" | 10 | return "powerpc64le" |
11 | if arch in ('riscv32', 'riscv64'): | ||
12 | return arch + 'gc' | ||
11 | return arch | 13 | return arch |