make loader
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
CHK include/generated/compile.h
AS arch/arc/boot/loader.o
LDS arch/arc/boot/loader.lds
arc64-elf-ld: arch/arc/boot/loader.o: ABI is incompatible with the selected emulation:
target emulation 'elf32-littlearc64' does not match 'elf64-littlearc64'
arc64-elf-ld: failed to merge target specific data of file arch/arc/boot/loader.o
make[1]: *** [arch/arc/boot/Makefile:50: arch/arc/boot/loader] Error 1
make: *** [arch/arc/Makefile:147: loader] Error 2
That happens because LD flags are not being passed to the loader link command.
The following change fixes that:
But it's just a fast fix, while I may guess there might be a more elegant solution to that problem like proper passing LDFLAGS to the LD invocation etc.
If pre-built
arc64-el
f toolchain is used (for example the one fromarc-2022.09
release, see https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2022.09-release/arc_gnu_2022.09_prebuilt_arc64_elf_linux_install.tar.gz) to build so-calledloader
binary for 32-bit ARCv3 processor (ARC HS58) the following error appears:That happens because LD flags are not being passed to the
loader
link command. The following change fixes that:But it's just a fast fix, while I may guess there might be a more elegant solution to that problem like proper passing
LDFLAGS
to theLD
invocation etc.