summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrii Sharshakov <[email protected]>2025-11-01 10:39:58 +0100
committerTom Rini <[email protected]>2025-11-06 11:21:24 -0600
commite8e3b38def93b5e5d53569961237ce215454e141 (patch)
tree54712115d46b9723c17e547985b27f066e42f8b5
parent62b45e82bdbf703571450e97f605893fe0d50530 (diff)
arch: arm: build: only set -mgeneral-regs-only for AArch64
This option is not available for 32-bit ARM targets and causes an error when building with Clang: clang: error: unsupported option '-mgeneral-regs-only' for target 'arm-none-eabi' This fixes the following patch (also seems to only concern AArch64): Link: https://lists.denx.de/pipermail/u-boot/2021-August/458067.html Signed-off-by: Dmitrii Sharshakov <[email protected]>
-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,)