summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m0/config_core.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/cortex-m0/config_core.h b/core/cortex-m0/config_core.h
index c31adc471c..a40756fb49 100644
--- a/core/cortex-m0/config_core.h
+++ b/core/cortex-m0/config_core.h
@@ -10,9 +10,14 @@
#define BFD_ARCH arm
#define BFD_FORMAT "elf32-littlearm"
-/* Emulate the CLZ/CTZ instructions since the CPU core is lacking support */
+/*
+ * Emulate the CLZ/CTZ instructions since the CPU core is lacking support.
+ * When building with clang, we rely on compiler_rt to provide this support.
+ */
+#ifndef __clang__
#define CONFIG_SOFTWARE_CLZ
#define CONFIG_SOFTWARE_CTZ
+#endif /* __clang__ */
#define CONFIG_SOFTWARE_PANIC
#define CONFIG_ASSEMBLY_MULA32