diff mbox series

ARM: disallow pre-ARMv5 builds with ld.lld

Message ID 20221215162635.3750763-1-arnd@kernel.org (mailing list archive)
State Accepted
Commit 6a7ee50f8f56dc181e1150cc101896053b02d220
Headers show
Series ARM: disallow pre-ARMv5 builds with ld.lld | expand

Commit Message

Arnd Bergmann Dec. 15, 2022, 4:26 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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.

Link: https://github.com/llvm/llvm-project/issues/50764
Link: https://github.com/ClangBuiltLinux/linux/issues/964
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

Comments

Nathan Chancellor Dec. 16, 2022, 11:10 p.m. UTC | #1
On Thu, Dec 15, 2022 at 05:26:20PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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.
> 
> Link: https://github.com/llvm/llvm-project/issues/50764
> Link: https://github.com/ClangBuiltLinux/linux/issues/964
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  arch/arm/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 4a8fff7f9be0..d995054ab602 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -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 || \
> -- 
> 2.35.1
>
patchwork-bot+linux-soc@kernel.org Dec. 19, 2022, 4 p.m. UTC | #2
Hello:

This patch was applied to soc/soc.git (arm/fixes)
by Arnd Bergmann <arnd@arndb.de>:

On Thu, 15 Dec 2022 17:26:20 +0100 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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!
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4a8fff7f9be0..d995054ab602 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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 || \