summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-11-06 11:23:10 -0600
committerTom Rini <[email protected]>2025-11-06 13:35:51 -0600
commit5451315bab931a6bf2aad785e5489c26729a8366 (patch)
tree6db74b1dedaa394c6548597207d5a6bdd4a76ba5 /arch
parentc488907f91ec90bb6a93803b1db53e24b93b52ea (diff)
parentf7d177395d73f7747373dfd0ef7329834788106e (diff)
Merge patch series "Fix AArch32 compilation with Clang"
Dmitrii Sharshakov <[email protected]> says: I faced some minor compatibility issues when choosing Clang as the cross-compiler for my target. Please review these two fixes, aiming at enabling Clang-based builds (still using GNU binutils) for 32-bit ARM targets. Tested to fix build with (also run-tested on qemu arm and arm64 with clang): make ARCH=arm HOSTCC=clang CROSS_COMPILE=arm-none-eabi- CC=clang imx6ulz_smm_m2b_defconfig make ARCH=arm HOSTCC=clang CROSS_COMPILE=arm-none-eabi- CC=clang -j20 Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/config.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 6e725ba1081..ba7dd99672a 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -23,9 +23,12 @@ endif
PLATFORM_RELFLAGS += -fno-common $(FIXED_REG)
PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
- $(call cc-option,-mgeneral-regs-only) \
$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
+ifeq ($(CONFIG_ARM64),y)
+PLATFORM_RELFLAGS += $(call cc-option,-mgeneral-regs-only)
+endif
+
# LLVM support
LLVM_RELFLAGS := $(call cc-option,-mllvm,) \
$(call cc-option,-mno-movt,)