summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2024-08-21 11:18:59 +0200
committerNico Huber <nico.h@gmx.de>2024-08-27 08:58:30 +0000
commitb1cf21378d843bd97a8061569c2b9fc837b7bb84 (patch)
tree496daa8b2ab5bf575444eb14e599a6cef32e723f /src/arch
parenta82f28e5e328c590902cdc35b92fc2db56e030f0 (diff)
arch/arm: Fix building with LTO
With LTO clang cannot find the aliased symbols. Change-Id: I3d89c093cee2636e648987a06afb0d325b1d96ff Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84005 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/Makefile.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/arch/arm/Makefile.mk b/src/arch/arm/Makefile.mk
index 3f8232f68a..ef87dcf14f 100644
--- a/src/arch/arm/Makefile.mk
+++ b/src/arch/arm/Makefile.mk
@@ -19,6 +19,10 @@ $(stages_o): $(stages_c) $(obj)/config.h
@printf " CC $(subst $(obj)/,,$(@))\n"
$(CC_arm) -I. $(CPPFLAGS_arm) -c -o $@ $< -marm
+# Clang LTO does not like the aliasing in here.
+TARGETS := decompressor bootblock verstage romstage ramstage rmodules_arm
+$(foreach target,$(TARGETS),$(eval $(call src-to-obj,$(target),$(dir)/eabi_compat.c): CFLAGS_$(target) += -fno-lto))
+
endif # CONFIG_ARCH_ARM
###############################################################################