-
Couldn't load subscription status.
- Fork 15k
Open
Labels
Description
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.