Skip to content

Commit e9c6dee

Browse files
nathanchancewilldeacon
authored andcommitted
arm64: Make CPU_BIG_ENDIAN depend on ld.bfd or ld.lld 13.0.0+
Similar to commit 28187dc ("ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN depends on !LD_IS_LLD"), ld.lld prior to 13.0.0 does not properly support aarch64 big endian, leading to the following build error when CONFIG_CPU_BIG_ENDIAN is selected: ld.lld: error: unknown emulation: aarch64linuxb This has been resolved in LLVM 13. To avoid errors like this, only allow CONFIG_CPU_BIG_ENDIAN to be selected if using ld.bfd or ld.lld 13.0.0 and newer. While we are here, the indentation of this symbol used spaces since its introduction in commit a872013 ("arm64: kconfig: allow CPU_BIG_ENDIAN to be selected"). Change it to tabs to be consistent with kernel coding style. Link: ClangBuiltLinux/linux#380 Link: ClangBuiltLinux/linux#1288 Link: llvm/llvm-project@7605a9a Link: llvm/llvm-project@eea34aa Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 0188a89 commit e9c6dee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/arm64/Kconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -952,8 +952,9 @@ choice
952952
that is selected here.
953953

954954
config CPU_BIG_ENDIAN
955-
bool "Build big-endian kernel"
956-
help
955+
bool "Build big-endian kernel"
956+
depends on !LD_IS_LLD || LLD_VERSION >= 130000
957+
help
957958
Say Y if you plan on running a kernel with a big-endian userspace.
958959

959960
config CPU_LITTLE_ENDIAN

0 commit comments

Comments
 (0)