rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.19k stars 12.7k forks source link

riscv64imac-unknown-nuttx-elf warns about abi/instruction-set mismatch #129825

Closed saethlin closed 2 months ago

saethlin commented 2 months ago

When using -Zbuild-std=core --target=riscv64imac-unknown-nuttx-elf I see

Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)

which seems like an indicator that something is broken.

I think LLVM is seeing a mismatch between https://github.com/rust-lang/rust/blob/9649706eada1b2c68cf6504356efb058f68ad739/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_nuttx_elf.rs#L24 and the lack of a +d in https://github.com/rust-lang/rust/blob/9649706eada1b2c68cf6504356efb058f68ad739/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_nuttx_elf.rs#L27

But of course I don't know this target, or whether this is somehow a bug in LLVM.

cc @no1wudi

no1wudi commented 2 months ago

@saethlin Thanks for your report, I'll submit a fix soon, the support (include libstd/libc) for NuttX is in early stage, there are still many issues at present, sorry for that

saethlin commented 2 months ago

No need to apologize, just saying something because I saw something :)