diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2014-11-22 17:55:46 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2014-11-25 08:47:41 +0100 |
commit | 95948934e7acc9fe1261669d01924ea839ea1f28 (patch) | |
tree | f09a2657081dcb2881f23de45ad986efe25bc4b4 /src/lib | |
parent | 3ce96bd49c571955c600aba74115fa37124e4e90 (diff) |
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 <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/7553
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Makefile.inc | 9 |
1 files changed, 2 insertions, 7 deletions
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)) |