diff --git a/makefiles/arch/msp430.inc.mk b/makefiles/arch/msp430.inc.mk index e892289c8ec834fa00596039b2d730d399e8eff0..1ebe522be8a596c318b5511c855648d0f85ebef5 100644 --- a/makefiles/arch/msp430.inc.mk +++ b/makefiles/arch/msp430.inc.mk @@ -2,7 +2,11 @@ export TARGET_ARCH ?= msp430 # define build specific options -CFLAGS_CPU = -mmcu=$(CPU_MODEL) -std=gnu99 +CFLAGS_CPU = -mmcu=$(CPU_MODEL) +# default std set to gnu99 of not overwritten by user +ifeq (, $(filter -std=%, $(CFLAGS))) + export CFLAGS += -std=gnu99 +endif CFLAGS_LINK = -ffunction-sections -fdata-sections CFLAGS_DBG ?= -gdwarf-2 CFLAGS_OPT ?= -Os