[PATCH] fixup! kbuild: sync with Linux v6.17

Ahmad Fatoum a.fatoum at barebox.org
Wed Jun 10 07:30:44 PDT 2026


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 at 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),)




More information about the barebox mailing list