summaryrefslogtreecommitdiff
path: root/src/arch/ppc64/Makefile.mk
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2024-07-19 09:41:30 +0200
committerFelix Held <felix-coreboot@felixheld.de>2024-08-22 13:57:47 +0000
commit7bb8de184338453cde924c816e027af5eae40d32 (patch)
tree3d62385704091171df525629f2061351466dbe49 /src/arch/ppc64/Makefile.mk
parentcb26ed489c67b58bc981a57d032969355850cbd6 (diff)
Makefile.mk: Add a common link_stage function and use it
A few differences with the original link targets: - 'libs' is now supported on all arch even though only x86 uses it - compiler_rt is included on arch that previously did not (arm). This however has no impact as there compiler_rt is not defined for those arch in xcompile - LIBGCC_FILE_NAME_bootblock is not included, but this was not defined anywhere so this is a noop Change-Id: I64f7686894c99732d06972e7ba327061db6d7c44 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83574 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/ppc64/Makefile.mk')
-rw-r--r--src/arch/ppc64/Makefile.mk14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/arch/ppc64/Makefile.mk b/src/arch/ppc64/Makefile.mk
index 92b1e399d6..4299e7409c 100644
--- a/src/arch/ppc64/Makefile.mk
+++ b/src/arch/ppc64/Makefile.mk
@@ -21,11 +21,7 @@ bootblock-y += \
bootblock-generic-ccopts += $(ppc64_flags)
-$(objcbfs)/bootblock.debug: $$(bootblock-objs)
- @printf " LINK $(subst $(obj)/,,$(@))\n"
- $(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) \
- -T $(call src-to-obj,bootblock,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(bootblock-objs)) \
- $(LIBGCC_FILE_NAME_bootblock) --end-group $(COMPILER_RT_bootblock)
+$(eval $(call link_stage,bootblock))
endif
@@ -48,9 +44,7 @@ romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
# Build the romstage
-$(objcbfs)/romstage.debug: $$(romstage-objs)
- @printf " LINK $(subst $(obj)/,,$(@))\n"
- $(LD_romstage) $(LDFLAGS_romstage) -o $@ -L$(obj) -T $(call src-to-obj,romstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(romstage-objs)) --end-group $(COMPILER_RT_romstage)
+$(eval $(call link_stage,romstage))
romstage-c-ccopts += $(ppc64_flags)
romstage-S-ccopts += $(ppc64_asm_flags)
@@ -81,9 +75,7 @@ ramstage-srcs += src/mainboard/$(MAINBOARDDIR)/mainboard.c
# Build the ramstage
-$(objcbfs)/ramstage.debug: $$(ramstage-objs)
- @printf " CC $(subst $(obj)/,,$(@))\n"
- $(LD_ramstage) $(LDFLAGS_ramstage) -o $@ -L$(obj) -T $(call src-to-obj,ramstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(ramstage-objs)) --end-group $(COMPILER_RT_ramstage)
+$(eval $(call link_stage,ramstage))
ramstage-c-ccopts += $(ppc64_flags)
ramstage-S-ccopts += $(ppc64_asm_flags)