summaryrefslogtreecommitdiff
path: root/toolchain.inc
diff options
context:
space:
mode:
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 1083476031..4d2fe0bba1 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