diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2024-08-22 23:03:44 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-08-29 13:55:32 +0000 |
commit | af0da957f59d77f9120e19dfc8a29909180d097a (patch) | |
tree | aac44b279bc1253af238aeaae5881c9e8be6cb35 /src/cpu/x86/smm/Makefile.mk | |
parent | f48bf2e5e6428211e3555c985f73408e7af7c067 (diff) |
cpu/x86/smm: Don't do partial linking
For LTO we want to link everything in one go.
Change-Id: If2c186eb87072e0b80c7e8998b2a0d9bdfddf740
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84037
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu/x86/smm/Makefile.mk')
-rw-r--r-- | src/cpu/x86/smm/Makefile.mk | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cpu/x86/smm/Makefile.mk b/src/cpu/x86/smm/Makefile.mk index 33b24a87f2..a104a87743 100644 --- a/src/cpu/x86/smm/Makefile.mk +++ b/src/cpu/x86/smm/Makefile.mk @@ -17,8 +17,10 @@ smmstub-generic-ccopts += -D__SMM__ smm-generic-ccopts += -D__SMM__ smm-c-deps+=$$(OPTION_TABLE_H) -$(obj)/smm/smm.o: $$(smm-objs) $(COMPILER_RT_smm) - $(LD_smm) -nostdlib -r -o $@ $(COMPILER_RT_FLAGS_smm) --whole-archive --start-group $(filter-out %.ld, $(smm-objs)) --no-whole-archive $(COMPILER_RT_smm) --end-group +$(obj)/smm/smm.a: $$(smm-objs) + $(AR_smm) rcsT $@.tmp $(filter-out %.ld, $(smm-objs)) + mv $@.tmp $@ + # change to the target path because objcopy will use the path name in its # ELF symbol names. @@ -65,9 +67,9 @@ $(call src-to-obj,ramstage,$(obj)/cpu/x86/smm/smmstub.manual): $(obj)/smmstub/sm # C-based SMM handler. ifeq ($(CONFIG_ARCH_RAMSTAGE_X86_32),y) -$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o,x86_32)) +$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.a,x86_32)) else -$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.o,x86_64)) +$(eval $(call rmodule_link,$(obj)/smm/smm.elf, $(obj)/smm/smm.a,x86_64)) endif $(obj)/smm/smm: $(obj)/smm/smm.elf.rmod |