summaryrefslogtreecommitdiff
path: root/core/cortex-m0/build.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m0/build.mk')
-rw-r--r--core/cortex-m0/build.mk14
1 files changed, 4 insertions, 10 deletions
diff --git a/core/cortex-m0/build.mk b/core/cortex-m0/build.mk
index f3cce27eea..7de8956a4d 100644
--- a/core/cortex-m0/build.mk
+++ b/core/cortex-m0/build.mk
@@ -6,14 +6,6 @@
# Cortex-M0 core OS files build
#
-# When set to 1, exclusively use builtins from compiler-rt.
-# When set to 0, use EC's builtins.
-USE_LLVM_COMPILER_RT:=0
-
-ifeq ($(USE_LLVM_COMPILER_RT),1)
-CFLAGS_CPU+=-DUSE_LLVM_COMPILER_RT
-endif
-
# CPU specific compilation flags
CFLAGS_CPU+=-mthumb
ifeq ($(cc-name),clang)
@@ -32,12 +24,14 @@ LDFLAGS_EXTRA+=-flto
endif
core-y=cpu.o debug.o init.o thumb_case.o mula.o
-ifeq ($(USE_LLVM_COMPILER_RT),0)
+# When using clang, we get these as builtins from compiler-rt.
+ifneq ($(cc-name),clang)
core-y+=div.o lmul.o ldivmod.o uldivmod.o
endif
core-y+=vecttable.o
-ifeq ($(USE_LLVM_COMPILER_RT),0)
+# When using clang, we get these as builtins from compiler-rt.
+ifneq ($(cc-name),clang)
core-y+=__builtin.o
endif
core-$(CONFIG_COMMON_PANIC_OUTPUT)+=panic.o