From 95948934e7acc9fe1261669d01924ea839ea1f28 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 22 Nov 2014 17:55:46 +0100 Subject: build system: unify linker use across gcc and clang Let's just call ld directly for gcc, too. Change-Id: I305eb92ed0d21b098134a7eb5a9f9fe3b126aeea Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/7553 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- src/lib/Makefile.inc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 0727c9faa3..55e0d6db03 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -109,8 +109,7 @@ ramstage-y += rmodule.c romstage-$(CONFIG_RELOCATABLE_RAMSTAGE) += rmodule.c RMODULE_LDSCRIPT := $(src)/lib/rmodule.ld -RMODULE_LDFLAGS := -nostartfiles -Wl,--emit-relocs -Wl,-z,defs -Wl,-Bsymbolic -Wl,-T,$(RMODULE_LDSCRIPT) -RMODULE_LDFLAGS_CLANG := -nostartfiles --emit-relocs -z defs -Bsymbolic -T$(RMODULE_LDSCRIPT) +RMODULE_LDFLAGS := -nostartfiles --emit-relocs -z defs -Bsymbolic -T$(RMODULE_LDSCRIPT) # rmodule_link_rules is a function that should be called with: # (1) the object name to link @@ -121,11 +120,7 @@ RMODULE_LDFLAGS_CLANG := -nostartfiles --emit-relocs -z defs -Bsymbolic -T$(RMO # rmdoule is named $(1).rmod define rmodule_link $(strip $(1)): $(strip $(2)) $$(RMODULE_LDSCRIPT) $$(obj)/ldoptions $$(RMODTOOL) -ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y) - $$(LD_rmodules_$(4)) $$(RMODULE_LDFLAGS_CLANG) --defsym=__heap_size=$(strip $(3)) -o $$@ --start-group $(strip $(2)) $$(COMPILER_RT_rmodules_$(4)) --end-group -else - $$(CC_rmodules_$(4)) $$(CFLAGS_rmodules_$(4)) $$(RMODULE_LDFLAGS) -Wl,--defsym=__heap_size=$(strip $(3)) -o $$@ -Wl,--start-group $(strip $(2)) $$(COMPILER_RT_rmodules_$(4)) -Wl,--end-group -endif + $$(LD_rmodules_$(4)) $$(RMODULE_LDFLAGS) --defsym=__heap_size=$(strip $(3)) -o $$@ --start-group $(strip $(2)) $$(COMPILER_RT_rmodules_$(4)) --end-group $$(NM_rmodules_$(4)) -n $$@ > $$(basename $$@).map $(strip $(1)).rmod: $(strip $(1)) -- cgit v1.2.3