Control C standard with a CFLAGS_STD flag, GNU99 by default.
This commit is contained in:
parent
ae77089bdd
commit
f90087a329
2 changed files with 8 additions and 4 deletions
|
@ -780,8 +780,11 @@ ifeq ($(VARIANT),leonardo)
|
|||
CPPFLAGS += -DUSB_VID=$(USB_VID) -DUSB_PID=$(USB_PID)
|
||||
endif
|
||||
|
||||
ifdef USE_GNU99
|
||||
CFLAGS += -std=gnu99
|
||||
ifndef CFLAGS_STD
|
||||
CFLAGS_STD = -std=gnu99
|
||||
$(call show_config_variable,CFLAGS_STD,[DEFAULT])
|
||||
else
|
||||
$(call show_config_variable,CFLAGS_STD,[USER])
|
||||
endif
|
||||
|
||||
CFLAGS += $(EXTRA_FLAGS) $(EXTRA_CFLAGS)
|
||||
|
|
|
@ -96,5 +96,6 @@ LDSCRIPT_FILE = $(ARDUINO_CORE_PATH)/$(LDSCRIPT)
|
|||
MCU_FLAG_NAME=mprocessor
|
||||
LDFLAGS += -T$(ARDUINO_CORE_PATH)/$(LDSCRIPT)
|
||||
CPPFLAGS += -mno-smart-io -fno-short-double
|
||||
CFLAGS_STD =
|
||||
|
||||
include $(ARDMK_DIR)/arduino-mk/Arduino.mk
|
||||
|
|
Loading…
Reference in a new issue