]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
rust-target-config: match riscv target names with what rust expects
authorAlexander Kanavin <alex.kanavin@gmail.com>
Tue, 25 Oct 2022 18:44:26 +0000 (20:44 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Oct 2022 08:44:48 +0000 (09:44 +0100)
commit1cfb9c8a59d98ccc9b0510cd28fb933f72fb6b6c
tree91f22179e45cb750f4e12be7ca65d45e779d5667
parentd820389728b0f5e085954b4f995da2b2014acedf
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

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>
meta/classes-recipe/rust-target-config.bbclass
meta/lib/oe/rust.py