Skip to content
Snippets Groups Projects
Commit 32ff8e30 authored by Cenk Gündoğan's avatar Cenk Gündoğan
Browse files

cpu/Makefile.include.cortexm_common: don't use cortex-m0plus for clang if unsupported

parent d2541c84
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,19 @@ export USEMODULE += newlib ...@@ -11,6 +11,19 @@ export USEMODULE += newlib
# set default for CPU_MODEL # set default for CPU_MODEL
export CPU_MODEL ?= $(CPU) export CPU_MODEL ?= $(CPU)
# Temporary LLVM/Clang Workaround:
# report cortex-m0 instead of cortex-m0plus if llvm/clang (<= 3.6.2) is used
# llvm/clang version 3.6.2 still does not support the cortex-m0plus mcpu type
ifeq (llvm,$(TOOLCHAIN))
ifeq (cortex-m0plus,$(CPU_ARCH))
LLVM_UNSUP = $(shell clang -target arm-none-eabi -mcpu=$(CPU_ARCH) -c -x c /dev/null -o /dev/null \
> /dev/null 2>&1 || echo 1 )
ifeq (1,$(LLVM_UNSUP))
CPU_ARCH = cortex-m0
endif
endif
endif
# export the CPU model and architecture # export the CPU model and architecture
MODEL = $(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z') MODEL = $(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z')
export CFLAGS += -DCPU_MODEL_$(MODEL) export CFLAGS += -DCPU_MODEL_$(MODEL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment