Merge pull request #9122 from kaspar030/fix_cortexm0_gcc81

cpu/cortexm: explicitly set -march=armv6s-m for crotexm0(plus)
This commit is contained in:
Cenk Gündoğan 2018-05-14 09:59:30 +02:00 committed by GitHub
commit db754c6cd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,11 +3,18 @@ export TARGET_ARCH ?= arm-none-eabi
# define build specific options
export CFLAGS_CPU = -mcpu=$(MCPU) -mlittle-endian -mthumb $(CFLAGS_FPU)
ifneq (llvm,$(TOOLCHAIN))
# Clang (observed with v3.7) does not understand -mno-thumb-interwork, only add if
# not building with LLVM
export CFLAGS += -mno-thumb-interwork
# work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85606
ifneq (,$(filter cortex-m0%,$(CPU_ARCH)))
CFLAGS_CPU += -march=armv6s-m
endif
endif
export CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin -fshort-enums
export CFLAGS_DBG ?= -ggdb -g3
export CFLAGS_OPT ?= -Os