]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arch: arm: build: only set -mgeneral-regs-only for AArch64
authorDmitrii Sharshakov <d3dx12.xx@gmail.com>
Sat, 1 Nov 2025 09:39:58 +0000 (10:39 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 6 Nov 2025 17:21:24 +0000 (11:21 -0600)
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 <d3dx12.xx@gmail.com>
arch/arm/config.mk

index 6e725ba1081a59ef0b343a2a6bd4de98e05e575e..ba7dd99672aa5d38442a8276940ad154e4dcd730 100644 (file)
@@ -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,)