-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Several SPARC lld issues in compiler-rt tests #100320
Comments
@llvm/issue-subscribers-lld-elf Author: Rainer Orth (rorth)
When running an LLVM build on Debian/sparc64, several `compiler-rt` tests `FAIL` with linker errors. Although the primary linker is `ld.bfd` 2.42.50.20240625, some tests are specificially run with `ld.lld`. Admittedly this is currenty `lld` 16.0.6, AFAICS most if not all of the issues remain:
```
ld.lld: error: unknown emulation: elf32_sparc
```
```
ld.lld: error: /lib/sparc64-linux-gnu/Scrt1.o:(function _start: .text+0x1c): unknown relocation (82) against symbol main
ld.lld: error: /lib/sparc64-linux-gnu/Scrt1.o:(function _start: .text+0x20): unknown relocation (83) against symbol main
ld.lld: error: /lib/sparc64-linux-gnu/Scrt1.o:(function _start: .text+0x24): unknown relocation (84) against symbol main
```
which is
```
#define R_SPARC_GOTDATA_OP_HIX22 82
#define R_SPARC_GOTDATA_OP_LOX10 83
#define R_SPARC_GOTDATA_OP 84
```
```
ld.lld: error: /tmp/lit-tmp-gq6t5qs1/coverage-linkage-35e2a3.o:(__llvm_prf_data+0x10): unknown relocation (46) against symbol
```
which is
```
#define R_SPARC_DISP64 46 /* PC relative 64 bit */
```
```
ld.lld: error: relocation R_SPARC_64 cannot be used against local symbol; recompile with -fPIC
```
I'm still looking how to properly disable use of `-fuse-lld` on this target; maybe it should be done in `compiler-rt` for now.
|
As detailed in Issue llvm#100320, a considerable number of tests that explicitly use `-fuse-ld=lld` `FAIL` on Linux/sparc64 due to several `lld` limitations (no 32-bit SPARC support, lack of support for various relocations, ...). To reduce the noise, this patch disables `COMPILER_RT_HAS_LLD` on SPARC wholesale. Tested on `sparc64-unknown-linux-gnu`.
I believe the Sparc port of lld for the 64-bit architecture was contributed by enthusiasts without long-term maintenance plans. |
Thanks for the explanation. I've just had a look: after the initial code drop back in 2017 there were barely any non-mechanical changes to the file. Given that situation (no 32-bit support at all, incomplete 64-bit reloc support, ...), I guess it's reasonable to disable the |
As detailed in Issue #100320, a considerable number of tests that explicitly use `-fuse-ld=lld` `FAIL` on Linux/sparc64 due to several `lld` limitations (no 32-bit SPARC support, lack of support for various relocations, ...). To reduce the noise, this patch disables `COMPILER_RT_HAS_LLD` on SPARC wholesale. Tested on `sparc64-unknown-linux-gnu`.
As detailed in Issue llvm#100320, a considerable number of tests that explicitly use `-fuse-ld=lld` `FAIL` on Linux/sparc64 due to several `lld` limitations (no 32-bit SPARC support, lack of support for various relocations, ...). To reduce the noise, this patch disables `COMPILER_RT_HAS_LLD` on SPARC wholesale. Tested on `sparc64-unknown-linux-gnu`. (cherry picked from commit 33a50e0)
As detailed in Issue llvm#100320, a considerable number of tests that explicitly use `-fuse-ld=lld` `FAIL` on Linux/sparc64 due to several `lld` limitations (no 32-bit SPARC support, lack of support for various relocations, ...). To reduce the noise, this patch disables `COMPILER_RT_HAS_LLD` on SPARC wholesale. Tested on `sparc64-unknown-linux-gnu`. (cherry picked from commit 33a50e0)
As detailed in Issue llvm#100320, a considerable number of tests that explicitly use `-fuse-ld=lld` `FAIL` on Linux/sparc64 due to several `lld` limitations (no 32-bit SPARC support, lack of support for various relocations, ...). To reduce the noise, this patch disables `COMPILER_RT_HAS_LLD` on SPARC wholesale. Tested on `sparc64-unknown-linux-gnu`.
When running an LLVM build on Debian/sparc64, several
compiler-rt
testsFAIL
with linker errors. Although the primary linker isld.bfd
2.42.50.20240625, some tests are specificially run withld.lld
. Admittedly this is currentylld
16.0.6, AFAICS most if not all of the issues remain:which is
which is
I'm still looking how to properly disable use of
-fuse-lld
on this target; maybe it should be done incompiler-rt
for now.The text was updated successfully, but these errors were encountered: