diff --git a/pkg/micro-ecc/Makefile b/pkg/micro-ecc/Makefile index 237161a208..7bbf9aeda5 100644 --- a/pkg/micro-ecc/Makefile +++ b/pkg/micro-ecc/Makefile @@ -5,5 +5,11 @@ PKG_LICENSE=BSD-2-Clause include $(RIOTBASE)/pkg/pkg.mk +# With LLVM register allocation fails. We can tell LLVM to spend more time +# on trying to allocate registers using the following snippet: +ifeq (llvm,$(TOOLCHAIN)) + CFLAGS += -mllvm -exhaustive-register-search +endif + all: $(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR) -f $(RIOTBASE)/Makefile.base diff --git a/pkg/micro-ecc/Makefile.include b/pkg/micro-ecc/Makefile.include index e63b996ddd..4d6987be64 100644 --- a/pkg/micro-ecc/Makefile.include +++ b/pkg/micro-ecc/Makefile.include @@ -4,8 +4,5 @@ CFLAGS += -Wno-unused-parameter CFLAGS += -Wno-unused-function CFLAGS += -Wno-unused-variable -ifneq (,$(filter cortex-m0%,$(CPU_CORE))) - # LLVM/clang can't handle the inline assembler instructions on M0 in this - # package - TOOLCHAINS_BLACKLIST += llvm -endif +# llvm fails to allocate registers for inline assembly :/ +TOOLCHAINS_BLACKLIST += llvm