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>
This commit is contained in:
Arthur Heymans 2024-08-21 11:18:59 +02:00 committed by Nico Huber
commit b1cf21378d

View file

@ -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
###############################################################################