diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2024-07-19 09:41:30 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-08-22 13:57:47 +0000 |
commit | 7bb8de184338453cde924c816e027af5eae40d32 (patch) | |
tree | 3d62385704091171df525629f2061351466dbe49 /src/arch/arm/Makefile.mk | |
parent | cb26ed489c67b58bc981a57d032969355850cbd6 (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/arm/Makefile.mk')
-rw-r--r-- | src/arch/arm/Makefile.mk | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/arch/arm/Makefile.mk b/src/arch/arm/Makefile.mk index b18b137252..3f8232f68a 100644 --- a/src/arch/arm/Makefile.mk +++ b/src/arch/arm/Makefile.mk @@ -43,13 +43,8 @@ bootblock-y += memmove.S bootblock-y += clock.c bootblock-y += stages.c -$(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)) --end-group - -$(objcbfs)/decompressor.debug: $$(decompressor-objs) - @printf " LINK $(subst $(obj)/,,$(@))\n" - $(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) -T $(call src-to-obj,decompressor,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(decompressor-objs)) --end-group +$(eval $(call link_stage,bootblock)) +$(eval $(call link_stage,decompressor)) endif # CONFIG_ARCH_BOOTBLOCK_ARM @@ -59,9 +54,7 @@ endif # CONFIG_ARCH_BOOTBLOCK_ARM ifeq ($(CONFIG_ARCH_VERSTAGE_ARM),y) -$(objcbfs)/verstage.debug: $$(verstage-objs) - @printf " LINK $(subst $(obj)/,,$(@))\n" - $(LD_verstage) $(LDFLAGS_verstage) -o $@ -L$(obj) -T $(call src-to-obj,verstage,$(CONFIG_MEMLAYOUT_LD_FILE)) --whole-archive --start-group $(filter-out %.ld,$(verstage-objs)) --end-group +$(eval $(call link_stage,verstage)) verstage-y += boot.c verstage-y += div0.c @@ -92,9 +85,7 @@ rmodules_arm-y += memcpy.S rmodules_arm-y += memmove.S rmodules_arm-y += eabi_compat.c -$(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 +$(eval $(call link_stage,romstage)) endif # CONFIG_ARCH_ROMSTAGE_ARM @@ -122,8 +113,6 @@ rmodules_arm-y += memmove.S rmodules_arm-y += eabi_compat.c ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c) -$(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 +$(eval $(call link_stage,ramstage)) endif # CONFIG_ARCH_RAMSTAGE_ARM |