mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fixup! kbuild: sync with Linux v6.17
@ 2026-06-10 13:59 Ahmad Fatoum
  2026-06-10 14:30 ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-06-10 13:59 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Makefile: clang: fail non-sandbox LLVM builds early

For the reasons outlines in aaea175ad00f
("Makefile: clang: fail non-sandbox LLVM builds early"), restore
sandbox-only clang support.

The code that has been imported here is wrong anyway, because it doesn't
account for the fact that SRCARCH in barebox is never arm64, even for
CONFIG_ARM64. This is not trivially fixable either as this file is
included before CONFIG_ options are available, so we can't actually know
whether it's arm64 or arm32...

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 scripts/Makefile.clang | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang
index e93ffb77aa10..4e4b620e1645 100644
--- a/scripts/Makefile.clang
+++ b/scripts/Makefile.clang
@@ -2,15 +2,7 @@
 # Individual arch/{arch}/Makefiles should use -EL/-EB to set intended
 # endianness and -m32/-m64 to set word size based on Kconfigs instead of
 # relying on the target triple.
-CLANG_TARGET_FLAGS_arm		:= arm-linux-gnueabi
-CLANG_TARGET_FLAGS_arm64	:= aarch64-linux-gnu
-CLANG_TARGET_FLAGS_mips		:= mipsel-linux-gnu
-CLANG_TARGET_FLAGS_powerpc	:= powerpc64le-linux-gnu
-CLANG_TARGET_FLAGS_riscv	:= riscv64-linux-gnu
-CLANG_TARGET_FLAGS_x86		:= x86_64-linux-gnu
-# This is only for i386 UM builds, which need the 32-bit target not -m32
-CLANG_TARGET_FLAGS_i386		:= i386-linux-gnu
-CLANG_TARGET_FLAGS_sandbox	:= $(CLANG_TARGET_FLAGS_$(SUBARCH))
+CLANG_TARGET_FLAGS_sandbox	:= $(shell $(CC) -print-target-triple)
 CLANG_TARGET_FLAGS		:= $(CLANG_TARGET_FLAGS_$(SRCARCH))
 
 ifeq ($(CLANG_TARGET_FLAGS),)
-- 
2.47.3




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

* Re: [PATCH] fixup! kbuild: sync with Linux v6.17
  2026-06-10 13:59 [PATCH] fixup! kbuild: sync with Linux v6.17 Ahmad Fatoum
@ 2026-06-10 14:30 ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2026-06-10 14:30 UTC (permalink / raw)
  To: barebox

On 6/10/26 15:59, Ahmad Fatoum wrote:
> Makefile: clang: fail non-sandbox LLVM builds early
> 
> For the reasons outlines in aaea175ad00f
> ("Makefile: clang: fail non-sandbox LLVM builds early"), restore
> sandbox-only clang support.
> 
> The code that has been imported here is wrong anyway, because it doesn't
> account for the fact that SRCARCH in barebox is never arm64, even for
> CONFIG_ARM64. This is not trivially fixable either as this file is
> included before CONFIG_ options are available, so we can't actually know
> whether it's arm64 or arm32...
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>

Please dismiss. I will try to fix this instead.

> ---
>  scripts/Makefile.clang | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang
> index e93ffb77aa10..4e4b620e1645 100644
> --- a/scripts/Makefile.clang
> +++ b/scripts/Makefile.clang
> @@ -2,15 +2,7 @@
>  # Individual arch/{arch}/Makefiles should use -EL/-EB to set intended
>  # endianness and -m32/-m64 to set word size based on Kconfigs instead of
>  # relying on the target triple.
> -CLANG_TARGET_FLAGS_arm		:= arm-linux-gnueabi
> -CLANG_TARGET_FLAGS_arm64	:= aarch64-linux-gnu
> -CLANG_TARGET_FLAGS_mips		:= mipsel-linux-gnu
> -CLANG_TARGET_FLAGS_powerpc	:= powerpc64le-linux-gnu
> -CLANG_TARGET_FLAGS_riscv	:= riscv64-linux-gnu
> -CLANG_TARGET_FLAGS_x86		:= x86_64-linux-gnu
> -# This is only for i386 UM builds, which need the 32-bit target not -m32
> -CLANG_TARGET_FLAGS_i386		:= i386-linux-gnu
> -CLANG_TARGET_FLAGS_sandbox	:= $(CLANG_TARGET_FLAGS_$(SUBARCH))
> +CLANG_TARGET_FLAGS_sandbox	:= $(shell $(CC) -print-target-triple)
>  CLANG_TARGET_FLAGS		:= $(CLANG_TARGET_FLAGS_$(SRCARCH))
>  
>  ifeq ($(CLANG_TARGET_FLAGS),)




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

end of thread, other threads:[~2026-06-10 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-10 13:59 [PATCH] fixup! kbuild: sync with Linux v6.17 Ahmad Fatoum
2026-06-10 14:30 ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox