trying to link an arm64 allyesconfig with LLD, it looks like LLD doesn't support CONFIG_CPU_BIG_ENDIAN=y.
Indeed: https://github.com/llvm/llvm-project/blob/4134143cf55d5cb68be12dd8511cdc7a254e31df/lld/ELF/Driver.cpp#L114-L146
Just FYI for others who want to avoid big endian on allyesconfig, you can use the KCONFIG_ALLCONFIG variable to force little endian during config time.
$ TMP=$(mktemp)
$ echo "CONFIG_CPU_BIG_ENDIAN=n" > "${TMP}"
$ make ARCH=arm64 KCONFIG_ALLCONFIG=${TMP} allyesconfig &>/dev/null
$ grep CONFIG_CPU_BIG_ENDIAN .config
# CONFIG_CPU_BIG_ENDIAN is not set
and here's where the kernel sets it: https://github.com/ClangBuiltLinux/linux/blob/master/arch/arm64/Makefile#L75
Thanks for highlighting the relevant code @nathanchance !
https://reviews.llvm.org/D58655
arm64 is little endian by default now, even with all{yes,mod}config: d8e85e144bbe12e8d82c6b05d690a34da62cc991
I am not sure it is really worth pursuing this further but I鈥檒l leave that up to you all.
Closing, I don't think LLD developers have the bandwidth to implement this.
Most helpful comment
Thanks for highlighting the relevant code @nathanchance !
https://reviews.llvm.org/D58655