diff options
| author | Dmitrii Sharshakov <[email protected]> | 2025-11-08 21:48:47 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-11-18 15:52:11 -0600 |
| commit | 2ed758fa7ef9e434c586ff5e12eeca7dfae7efb2 (patch) | |
| tree | 45846437d3eb3d98e148dbce96141fd2136c3e4d | |
| parent | 91bb236194162472d1e19b0cbc215e25eddc11d0 (diff) | |
arch: arm: fix AArch64 builds with Clang 21+
Clang is strict with respect to unknown options.
Therefore, only enable AArch32-specific options when CONFIG_ARM64
is not set.
Signed-off-by: Dmitrii Sharshakov <[email protected]>
| -rw-r--r-- | arch/arm/config.mk | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/config.mk b/arch/arm/config.mk index ba7dd99672a..73fddd50bd7 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -30,18 +30,19 @@ PLATFORM_RELFLAGS += $(call cc-option,-mgeneral-regs-only) endif # LLVM support -LLVM_RELFLAGS := $(call cc-option,-mllvm,) \ - $(call cc-option,-mno-movt,) -PLATFORM_RELFLAGS += $(LLVM_RELFLAGS) - +LLVM_RELFLAGS := $(call cc-option,-mllvm,) PLATFORM_CPPFLAGS += -D__ARM__ ifdef CONFIG_ARM64 PLATFORM_ELFFLAGS += -B aarch64 -O elf64-littleaarch64 else PLATFORM_ELFFLAGS += -B arm -O elf32-littlearm +# no-movt is only available when targeting AArch32 +LLVM_RELFLAGS += $(call cc-option,-mno-movt,) endif +PLATFORM_RELFLAGS += $(LLVM_RELFLAGS) + # Choose between ARM/Thumb instruction sets ifeq ($(CONFIG_$(PHASE_)SYS_THUMB_BUILD),y) AFLAGS_IMPLICIT_IT := $(call as-option,-Wa$(comma)-mimplicit-it=always) @@ -50,7 +51,7 @@ PF_CPPFLAGS_ARM := $(AFLAGS_IMPLICIT_IT) \ $(call cc-option,-marm,)\ $(call cc-option,-mno-thumb-interwork,)\ ) -else +else ifneq ($(CONFIG_ARM64),y) PF_CPPFLAGS_ARM := $(call cc-option,-marm,) \ $(call cc-option,-mno-thumb-interwork,) endif |
