-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
riscv64gc-unknown-none-elf
target generates soft-float ABI
#60012
Comments
I think LLVM doesn't support hard-float for RISC-V yet. |
LLVM supports it since https://llvm.org/D59357, though I think our LLVM version needs bumping to bring that in. Clang support is still under review (https://reviews.llvm.org/D60456) but we couldn't use/cherry-pick that code anyway. It may still be prudent to wait for the Clang patch being polished and committed, to unearth any issues with the ABI spec, but in principle someone could implement the same logic in rustc today. |
Good to know, thanks! |
Closing, this specific issue is no longer relevant to me, sufficiently has now been implemented in rust to no longer need this unholy linkage with the Kendryte SDK. |
tl;dr: confusion about float ABI in rust-generated RV64 object files
To do a little testing with Rust on Kendryte K210 (RV64GC) without having to write a full BSP, I'm trying to link the output of rust into an existing bare-metal project,
With the following source:
However, it looks like the output (see
flags
is marked as soft-float ABI):This causes the following error during link:
The expected value for
flags
would be, in this specific case:To be honest I don't know if this is expected or not! For gcc it seems to have to do with the
-mabi
flag—I'm not sure what ABI we'd be expecting Rust to generate here:The text was updated successfully, but these errors were encountered: