SMM: link against libgcc
The non-relocatable SMM code was changed to link against libgcc a while back so that printk could use built-in division instead of a hand crafted div() function. However, the relocatable SMM code was not adapted by mistake. This patch links the relocatable SMM against libgcc, too, so we can enable it for Haswell. Change-Id: Ia64a78e2e62348d115ae4ded52d1a02c74c5cea4 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/2727 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
7492ec1ca6
commit
c2fe1e0a09
|
@ -18,7 +18,6 @@
|
|||
##
|
||||
|
||||
ifeq ($(CONFIG_SMM_MODULES),y)
|
||||
|
||||
smmstub-y += smm_stub.S
|
||||
smmstub-y += smm_module_header.c
|
||||
|
||||
|
@ -48,8 +47,9 @@ $(obj)/cpu/x86/smm/smmstub.ramstage.o: $(obj)/cpu/x86/smm/smmstub
|
|||
|
||||
# C-based SMM handler.
|
||||
|
||||
$(obj)/cpu/x86/smm/smm.o: $$(smm-objs)
|
||||
$(CC) $(LDFLAGS) -nostdlib -r -o $@ $^
|
||||
$(obj)/cpu/x86/smm/smm.o: $$(smm-objs) $(LIBGCC_FILE_NAME)
|
||||
$(CC) $(LDFLAGS) -nostdlib -r -o $@ -Wl,--wrap,__divdi3 -Wl,--wrap,__udivdi3 -Wl,--wrap,__moddi3 -Wl,--wrap,__umoddi3 -Wl,--start-group $(smm-objs) $(LIBGCC_FILE_NAME) -Wl,--end-group
|
||||
|
||||
|
||||
$(eval $(call rmodule_link,$(obj)/cpu/x86/smm/smm.elf, $(obj)/cpu/x86/smm/smm.o, $(CONFIG_SMM_MODULE_HEAP_SIZE)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue