Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2538c0c
fix `SyncSender` spinning behavior
ibraheemdev Jan 11, 2023
f8276c9
add `SyncSender::send_timeout` test
ibraheemdev Jan 11, 2023
4e2a356
Add log-backtrace option to show backtraces along with logging
yukiomoto Jan 11, 2023
12ddf77
When suggesting writing a fully qualified path probe for appropriate …
estebank Jan 8, 2023
147c9bf
review comments
estebank Jan 8, 2023
c6f322b
review comments: account for generics
estebank Jan 8, 2023
8917e99
rework and document backoff behavior of `sync::mpsc`
ibraheemdev Jan 12, 2023
c825459
Provide help on closures capturing self causing borrow checker errors
chenyukang Jan 7, 2023
eafbca9
take care when there is no args in method call
chenyukang Jan 7, 2023
5457140
Bump IMPLIED_BOUNDS_ENTAILMENT to Deny + ReportNow
compiler-errors Jan 4, 2023
eaa7cc8
Add logic to make IMPLIED_BOUNDS_ENTAILMENT easier to understand
compiler-errors Jan 12, 2023
95ef76b
Normalize test output more thoroughly
Mark-Simulacrum Jan 13, 2023
138a1d2
riscv: Fix ELF header flags
FawazTirmizi Jan 9, 2023
549ece7
Warn when using panic-strategy abort for proc-macro crates
Veykril Jan 10, 2023
4aca7be
Remove redundant session field
oli-obk Dec 8, 2022
958fc4d
Update `rental` hack to work with remapped paths.
TimNN Jan 6, 2023
3bc2970
Improve linker-flavor detection
jschwe Jan 5, 2023
67379b5
Rollup merge of #104645 - yukiomoto:log-backtrace-option, r=oli-obk
matthiaskrgr Jan 13, 2023
9a1d529
Rollup merge of #106465 - compiler-errors:bump-IMPLIED_BOUNDS_ENTAILM…
matthiaskrgr Jan 13, 2023
d986a55
Rollup merge of #106489 - jschwe:fix_linker_detection, r=petrochenkov
matthiaskrgr Jan 13, 2023
61871e3
Rollup merge of #106585 - estebank:issue-46585, r=compiler-errors
matthiaskrgr Jan 13, 2023
62f41ca
Rollup merge of #106641 - chenyukang:yukang/fix-105761-segguest-this,…
matthiaskrgr Jan 13, 2023
822d4d2
Rollup merge of #106678 - Veykril:proc-macro-panic-abort, r=eholk
matthiaskrgr Jan 13, 2023
6746469
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
matthiaskrgr Jan 13, 2023
24a4c9a
Rollup merge of #106793 - Mark-Simulacrum:normalize-test, r=compiler-…
matthiaskrgr Jan 13, 2023
41c0c4b
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
matthiaskrgr Jan 13, 2023
213b4cf
Rollup merge of #106813 - oli-obk:sess_cleanup, r=GuillaumeGomez,petr…
matthiaskrgr Jan 13, 2023
6a77868
Rollup merge of #106816 - TimNN:rental-remap, r=oli-obk
matthiaskrgr Jan 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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
  • Loading branch information
FawazTirmizi committed Jan 13, 2023
commit 138a1d26b53cab16066b0faa3846722358a2c09f
22 changes: 17 additions & 5 deletions compiler/rustc_codegen_ssa/src/back/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,23 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
};
e_flags
}
Architecture::Riscv64 if sess.target.options.features.contains("+d") => {
// copied from `riscv64-linux-gnu-gcc foo.c -c`, note though
// that the `+d` target feature represents whether the double
// float abi is enabled.
let e_flags = elf::EF_RISCV_RVC | elf::EF_RISCV_FLOAT_ABI_DOUBLE;
Architecture::Riscv32 | Architecture::Riscv64 => {
// Source: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/079772828bd10933d34121117a222b4cc0ee2200/riscv-elf.adoc
let mut e_flags: u32 = 0x0;
let features = &sess.target.options.features;
// Check if compressed is enabled
if features.contains("+c") {
e_flags |= elf::EF_RISCV_RVC;
}

// Select the appropriate floating-point ABI
if features.contains("+d") {
e_flags |= elf::EF_RISCV_FLOAT_ABI_DOUBLE;
} else if features.contains("+f") {
e_flags |= elf::EF_RISCV_FLOAT_ABI_SINGLE;
} else {
e_flags |= elf::EF_RISCV_FLOAT_ABI_SOFT;
}
e_flags
}
_ => 0,
Expand Down