linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: disallow pre-ARMv5 builds with ld.lld
@ 2022-12-15 16:26 Arnd Bergmann
  2022-12-16 23:10 ` Nathan Chancellor
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2022-12-15 16:26 UTC (permalink / raw)
  To: Russell King, Nathan Chancellor, Nick Desaulniers
  Cc: soc, Arnd Bergmann, Tom Rix, Linus Walleij, Russell King (Oracle),
	Ard Biesheuvel, Geert Uytterhoeven, linux-arm-kernel,
	linux-kernel, llvm

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(+)

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ARM: disallow pre-ARMv5 builds with ld.lld
  2022-12-15 16:26 [PATCH] ARM: disallow pre-ARMv5 builds with ld.lld Arnd Bergmann
@ 2022-12-16 23:10 ` Nathan Chancellor
  0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2022-12-16 23:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Russell King, Nick Desaulniers, soc, Arnd Bergmann, Tom Rix,
	Linus Walleij, Russell King (Oracle), Ard Biesheuvel,
	Geert Uytterhoeven, linux-arm-kernel, linux-kernel, llvm

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
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-16 23:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15 16:26 [PATCH] ARM: disallow pre-ARMv5 builds with ld.lld Arnd Bergmann
2022-12-16 23:10 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).