aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain.inc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-11-22 17:55:46 +0100
committerPatrick Georgi <pgeorgi@google.com>2014-11-25 08:47:41 +0100
commit95948934e7acc9fe1261669d01924ea839ea1f28 (patch)
treef09a2657081dcb2881f23de45ad986efe25bc4b4 /toolchain.inc
parent3ce96bd49c571955c600aba74115fa37124e4e90 (diff)
downloadcoreboot-95948934e7acc9fe1261669d01924ea839ea1f28.tar.gz
coreboot-95948934e7acc9fe1261669d01924ea839ea1f28.tar.xz
coreboot-95948934e7acc9fe1261669d01924ea839ea1f28.zip
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 'toolchain.inc')
-rw-r--r--toolchain.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/toolchain.inc b/toolchain.inc
index 108347603..4d2fe0bba 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -92,10 +92,14 @@ STRIP_$(1) := $(STRIP_$(2))
READELF_$(1) := $(READELF_$(2))
CFLAGS_$(1) = $$(CFLAGS_common) $$(CFLAGS_$(2))
CPPFLAGS_$(1) = $$(CPPFLAGS_common) $$(CPPFLAGS_$(2))
+COMPILER_RT_FLAGS_$(1) :=
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
COMPILER_RT_$(1) = $(shell $(CC_$(2)) $(CFLAGS_$(2)) -print-librt-file-name 2>/dev/null)
else
COMPILER_RT_$(1) = $(wildcard $(shell $(CC_$(2)) $(CFLAGS_$(2)) -print-libgcc-file-name))
+ifeq ($(2),x86_32)
+COMPILER_RT_FLAGS_$(1) := --wrap __divdi3 --wrap __udivdi3 --wrap __moddi3 --wrap __umoddi3
+endif
endif
endef