Skip to content

Commit 5eb6e28

Browse files
nathanchanceRussell King (Oracle)
authored andcommitted
ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.0.0 and newer
Commit 6a7ee50 ("ARM: disallow pre-ARMv5 builds with ld.lld") prevented v4 or v4t kernels when ld.lld will link the kernel due to inserting unsupported blx instructions. ld.lld has been fixed in current main (16.0.0) to avoid inserting these instructions by inserting position independent thunks instead. Allow these configurations to be enabled when ld.lld 16.0.0 is used to link the kernel. Additionally, add a link to the upstream LLVM issue so that the reason for this dependency is clearly documented. Link: ClangBuiltLinux#964 Link: llvm/llvm-project@6f9ff1b Suggested-by: Nick Desaulniers <[email protected]> Tested-by: Arnd Bergmann <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent cfb1076 commit 5eb6e28

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/arm/Kconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,16 @@ comment "CPU Core family selection"
345345
config ARCH_MULTI_V4
346346
bool "ARMv4 based platforms (FA526, StrongARM)"
347347
depends on !ARCH_MULTI_V6_V7
348-
depends on !LD_IS_LLD
348+
# https://github.com/llvm/llvm-project/issues/50764
349+
depends on !LD_IS_LLD || LLD_VERSION >= 160000
349350
select ARCH_MULTI_V4_V5
350351
select CPU_FA526 if !(CPU_SA110 || CPU_SA1100)
351352

352353
config ARCH_MULTI_V4T
353354
bool "ARMv4T based platforms (ARM720T, ARM920T, ...)"
354355
depends on !ARCH_MULTI_V6_V7
355-
depends on !LD_IS_LLD
356+
# https://github.com/llvm/llvm-project/issues/50764
357+
depends on !LD_IS_LLD || LLD_VERSION >= 160000
356358
select ARCH_MULTI_V4_V5
357359
select CPU_ARM920T if !(CPU_ARM7TDMI || CPU_ARM720T || \
358360
CPU_ARM740T || CPU_ARM9TDMI || CPU_ARM922T || \

0 commit comments

Comments
 (0)