-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
riscv32gc-*
targets produce a synthetic object file (symbols.o
) with a mismatching floating-point ABI
#104284
Comments
riscv32gc-*
targets produce a synthetic object file (symbols.o
) with a mismatching floating-point ABIriscv32gc-*
targets produce a synthetic object file (symbols.o
) with a mismatching floating-point ABI
The relevant code is rust/compiler/rustc_codegen_ssa/src/back/metadata.rs Lines 168 to 174 in 742d3f0
|
Doesn't seem like anyone else has picked this up yet, if it's as simple a fix as it seems I would be happy to make the PR. |
@rustbot claim |
…bjorn3 riscv: Fix ELF header flags The previous version added both `EF_RISCV_FLOAT_ABI_DOUBLE` and `EF_RISCV_RVC` if the "D" extension was enabled on riscv64 targets. riscv32 targets were not accounted for. This patch changes this so that: - Only add `EF_RISCV_RVC` if the "C" extension is enabled - Add `EF_RISCV_FLOAT_ABI_SINGLE` if the "F" extension is enabled and the "D" extension is not - Add these ELF flags for riscv32 as well Fixes rust-lang#104284 r? rust-lang/risc-v
…bjorn3 riscv: Fix ELF header flags The previous version added both `EF_RISCV_FLOAT_ABI_DOUBLE` and `EF_RISCV_RVC` if the "D" extension was enabled on riscv64 targets. riscv32 targets were not accounted for. This patch changes this so that: - Only add `EF_RISCV_RVC` if the "C" extension is enabled - Add `EF_RISCV_FLOAT_ABI_SINGLE` if the "F" extension is enabled and the "D" extension is not - Add these ELF flags for riscv32 as well Fixes rust-lang#104284 r? rust-lang/risc-v
The mismatch still occurs if extra features are specified by |
Sorry about the delayed response. I just tested it, but I'm not seeing the error. Could you test again as well? I was running the following command: Here is the version I'm on:
|
Hm, I actually encountered the issue in a more complicated setup (CI run) with bare-metal targets and assumed from the symptom that it was caused by a similar underlying problem. I'll look into it again and open a separate issue after getting a better idea. |
I tried this code:
I expected to see this happen: Successful compilation (because this would succeed for the target
riscv64gc-unknown-linux-gnu
)Instead, this happened:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: