Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84337?usp=email )
Change subject: Makefile.mk: Add c-ccopts to LTO linking ......................................................................
Makefile.mk: Add c-ccopts to LTO linking
arm adds some extra cflags via ccopts lie '-march='. Those are also necessary when linking with LTO.
Change-Id: Ib1d890d4b4a3b812cb2969cbfa8bec77c3b6e0dc Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M Makefile.mk 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/84337/1
diff --git a/Makefile.mk b/Makefile.mk index 5b48ca5..9a9aef42 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -1329,7 +1329,7 @@ ifeq ($(CONFIG_LTO),y) $$(objcbfs)/$(1).debug: $$$$($(1)-libs) $$$$($(1)-objs) @printf " LINK $$(subst $$(obj)/,,$$(@))\n" - $$(CC_$(1)) $$(CPPFLAGS_$(1)) $$(CFLAGS_$(1)) $$(LDFLAGS_$(1):%=-Wl,%) $(LTO_LINK_CFLAGS) -o $$@ -L$$(obj) $$(COMPILER_RT_FLAGS_$(1):%=-Wl,%) -Wl,--whole-archive -Wl,--start-group $$(filter-out %.ld,$$($(1)-objs)) $$($(1)-libs) -Wl,--no-whole-archive $$(COMPILER_RT_$(1)) -Wl,--end-group -T $(call src-to-obj,$(1),$(CONFIG_MEMLAYOUT_LD_FILE)) + $$(CC_$(1)) $$(CPPFLAGS_$(1)) $$(CFLAGS_$(1)) $$(LDFLAGS_$(1):%=-Wl,%) $(LTO_LINK_CFLAGS) $$($(1)-c-ccopts) -o $$@ -L$$(obj) $$(COMPILER_RT_FLAGS_$(1):%=-Wl,%) -Wl,--whole-archive -Wl,--start-group $$(filter-out %.ld,$$($(1)-objs)) $$($(1)-libs) -Wl,--no-whole-archive $$(COMPILER_RT_$(1)) -Wl,--end-group -T $(call src-to-obj,$(1),$(CONFIG_MEMLAYOUT_LD_FILE)) else $$(objcbfs)/$(1).debug: $$$$($(1)-libs) $$$$($(1)-objs) @printf " LINK $$(subst $$(obj)/,,$$(@))\n"