Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/84005?usp=email )
Change subject: arch/arm: Fix building with LTO ......................................................................
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 --- M src/arch/arm/Makefile.mk 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/arch/arm/Makefile.mk b/src/arch/arm/Makefile.mk index 3f8232f..ef87dcf 100644 --- a/src/arch/arm/Makefile.mk +++ b/src/arch/arm/Makefile.mk @@ -19,6 +19,10 @@ @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
###############################################################################