1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/makefiles/arch/msp430.inc.mk
Gaëtan Harter e4331e8391
cpu/arch: blacklist incompatible CFLAGS
Blacklist incompatible CFLAGS that are currently "optionally" included
in 'cflags.inc.mk'.

This prepares for the migration to 'OPTIONAL_CFLAGS'.
2019-08-29 17:43:54 +02:00

21 lines
770 B
Makefile

# Target architecture for the build. Use msp430 if you are unsure.
export TARGET_ARCH ?= msp430
# define build specific options
CFLAGS_CPU = -mmcu=$(CPU_MODEL)
# default std set to gnu99 of not overwritten by user
ifeq (, $(filter -std=%, $(CFLAGS)))
CFLAGS += -std=gnu99
endif
CFLAGS_LINK = -ffunction-sections -fdata-sections
CFLAGS_DBG ?= -gdwarf-2
CFLAGS_OPT ?= -Os
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
ASFLAGS += $(CFLAGS_CPU) --defsym $(CPU_MODEL)=1 $(CFLAGS_DBG)
# export linker flags
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc
OPTIONAL_CFLAGS_BLACKLIST += -fdiagnostics-color
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-overflow
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-truncation