Commit 08571af
authored
Rollup merge of rust-lang#153537 - taiki-e:ef-sparc-32plus, r=wesleywiser
rustc_codegen_ssa: Define ELF flag value for sparc-unknown-linux-gnu
Currently, attempting to build this target using Ubuntu/Debian's sparc64-multilib toolchain results in the following link error ([full log](https://github.com/taiki-e/atomic-maybe-uninit/actions/runs/22798868888/job/66137493862#step:15:442)):
```
= note: /usr/lib/gcc-cross/sparc64-linux-gnu/13/../../../../sparc64-linux-gnu/bin/ld: unknown architecture of input file `/home/runner/work/atomic-maybe-uninit/atomic-maybe-uninit/target/sparc-unknown-linux-gnu/debug/deps/rustcYzaDYW/symbols.o' is incompatible with sparc:v8plus output
```
This appears to be caused by the required e_flag being missing and can be fixed by setting `EF_SPARC_32PLUS`.
Tested using rustc with this patch applied and qemu-user (taiki-e/atomic-maybe-uninit@57d7e7f, [log](https://github.com/taiki-e/atomic-maybe-uninit/actions/runs/22798793270/job/66137298093)).
Related discussion: rust-lang#131222 (comment)
r? workingjubilee
cc @glaubitz
@rustbot label +O-SPARC1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
| |||
0 commit comments