Skip to contentSkip to conversation

ARM: disallow pre-ARMv5 builds with ld.lld

PATCH Applied Arnd Bergmann 3 participants 3 messages Dec 15, 2022 – Dec 19, 2022 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: disallow pre-ARMv5 builds with ld.lld

From: Arnd Bergmann <[email protected]>

lld cannot build for ARMv4/v4T targets because it inserts 'blx' instructions that are unsupported there:

ld.lld: warning: lld uses blx instruction, no object with architecture supporting feature detected

Add a Kconfig time dependency to prevent those targets from being selected in randconfig builds.

---
 arch/arm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/Kconfig +2 -0
index 4a8fff7f9be0..d995054ab602 100644
@@ -344,12 +344,14 @@ comment "CPU Core family selection"
 config ARCH_MULTI_V4
 	bool "ARMv4 based platforms (FA526, StrongARM)"
 	depends on !ARCH_MULTI_V6_V7
+	depends on !LD_IS_LLD
 	select ARCH_MULTI_V4_V5
 	select CPU_FA526 if !(CPU_SA110 || CPU_SA1100)
 
 config ARCH_MULTI_V4T
 	bool "ARMv4T based platforms (ARM720T, ARM920T, ...)"
 	depends on !ARCH_MULTI_V6_V7
+	depends on !LD_IS_LLD
 	select ARCH_MULTI_V4_V5
 	select CPU_ARM920T if !(CPU_ARM7TDMI || CPU_ARM720T || \
 		CPU_ARM740T || CPU_ARM9TDMI || CPU_ARM922T || \
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

lld cannot build for ARMv4/v4T targets because it inserts 'blx' instructions that are unsupported there:

Quoted 8 lines

ld.lld: warning: lld uses blx instruction, no object with architecture supporting feature detected

Add a Kconfig time dependency to prevent those targets from being selected in randconfig builds.

Quoted 26 lines
---
 arch/arm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/Kconfig +2 -0
index 4a8fff7f9be0..d995054ab602 100644
@@ -344,12 +344,14 @@ comment "CPU Core family selection"
 config ARCH_MULTI_V4
 	bool "ARMv4 based platforms (FA526, StrongARM)"
 	depends on !ARCH_MULTI_V6_V7
+	depends on !LD_IS_LLD
 	select ARCH_MULTI_V4_V5
 	select CPU_FA526 if !(CPU_SA110 || CPU_SA1100)
 
 config ARCH_MULTI_V4T
 	bool "ARMv4T based platforms (ARM720T, ARM920T, ...)"
 	depends on !ARCH_MULTI_V6_V7
+	depends on !LD_IS_LLD
 	select ARCH_MULTI_V4_V5
 	select CPU_ARM920T if !(CPU_ARM7TDMI || CPU_ARM720T || \
 		CPU_ARM740T || CPU_ARM9TDMI || CPU_ARM922T || \
Signature · 1 line
2.35.1
#2 lore raw
In reply to Arnd Bergmann
This patch was applied to soc/soc.git (arm/fixes) by Arnd Bergmann <[email protected]>:

Hello:

This patch was applied to soc/soc.git (arm/fixes)
by Arnd Bergmann <[email protected]>:

Quoted 8 lines · On Thu, 15 Dec 2022 17:26:20 +0100 you wrote:

From: Arnd Bergmann <[email protected]>

lld cannot build for ARMv4/v4T targets because it inserts 'blx' instructions that are unsupported there:

ld.lld: warning: lld uses blx instruction, no object with architecture supporting feature detected

[...]

Here is the summary with links:
- ARM: disallow pre-ARMv5 builds with ld.lld

    https://git.kernel.org/soc/soc/c/6a7ee50f8f56

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html