From 82c79542119523998498e94ee86c98125a737bb7 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Mon, 2 Apr 2012 10:44:19 -0400 Subject: [PATCH] Optionally enable the GNU99 standard when compiling. --- arduino-mk/Arduino.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index fb14eca..0522621 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -371,8 +371,12 @@ endif CPPFLAGS = -$(MCU_FLAG_NAME)=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) \ -I. -I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VAR_PATH)/$(VARIANT) \ $(SYS_INCLUDES) -g -Os -w -Wall \ - -ffunction-sections -fdata-sections + -ffunction-sections -fdata-sections $(EXTRA_CPPFLAGS) + +ifndef USE_GNU99 CFLAGS = -std=gnu99 +endif + CXXFLAGS = -fno-exceptions ASFLAGS = -$(MCU_FLAG_NAME)=$(MCU) -I. -x assembler-with-cpp LDFLAGS = -$(MCU_FLAG_NAME)=$(MCU) -Wl,--gc-sections -Os $(EXTRA_LDFLAGS)