Skip to content

Conversation

FawazTirmizi
Copy link
Contributor

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 #104284

r? rust-lang/risc-v

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
@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2023

Failed to set assignee to kraj: invalid assignee

Note: Only org members, users with write permissions, or people who have commented on the PR may be assigned.

@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kraj (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 13, 2023
@Noratrieb
Copy link
Member

r? @bjorn3

Copy link
Contributor

@kraj kraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@bjorn3
Copy link
Member

bjorn3 commented Jan 13, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 13, 2023

📌 Commit 138a1d2 has been approved by bjorn3

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 13, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 13, 2023
…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
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 13, 2023
…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
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2023
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#104645 (Add log-backtrace option to show backtraces along with logging)
 - rust-lang#106465 (Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow)
 - rust-lang#106489 (Fix linker detection for linker (drivers) with a version postfix (e.g. clang-12 instead of clang))
 - rust-lang#106585 (When suggesting writing a fully qualified path probe for appropriate types)
 - rust-lang#106641 (Provide help on closures capturing self causing borrow checker errors)
 - rust-lang#106678 (Warn when using panic-strategy abort for proc-macro crates)
 - rust-lang#106701 (Fix `mpsc::SyncSender` spinning behavior)
 - rust-lang#106793 (Normalize test output more thoroughly)
 - rust-lang#106797 (riscv: Fix ELF header flags)
 - rust-lang#106813 (Remove redundant session field)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 278e02a into rust-lang:master Jan 14, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

riscv32gc-* targets produce a synthetic object file (symbols.o) with a mismatching floating-point ABI
6 participants