From 770a695c85419950e5f8a6658ec9fb59732d66bf Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 7 Jul 2014 19:43:02 +0200 Subject: [PATCH] Explicitely specify C and C++ standards to use This does not change anything, it just makes the defaults explicit. --- hardware/arduino/avr/platform.txt | 4 ++-- hardware/arduino/sam/platform.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hardware/arduino/avr/platform.txt b/hardware/arduino/avr/platform.txt index 2908dbeec..4f09a4b88 100644 --- a/hardware/arduino/avr/platform.txt +++ b/hardware/arduino/avr/platform.txt @@ -20,14 +20,14 @@ compiler.warning_flags.all=-Wall -Wextra # Default "compiler.path" is correct, change only if you want to overidde the initial value compiler.path={runtime.tools.avr-gcc.path}/bin/ compiler.c.cmd=avr-gcc -compiler.c.flags=-c -g -Os {compiler.warning_flags} -ffunction-sections -fdata-sections -MMD +compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu89 -ffunction-sections -fdata-sections -MMD # -w flag added to avoid printing a wrong warning http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396 # This is fixed in gcc 4.8.3 and will be removed as soon as we update the toolchain compiler.c.elf.flags={compiler.warning_flags} -Os -Wl,--gc-sections compiler.c.elf.cmd=avr-gcc compiler.S.flags=-c -g -x assembler-with-cpp compiler.cpp.cmd=avr-g++ -compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD +compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++98 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD compiler.ar.cmd=avr-ar compiler.ar.flags=rcs compiler.objcopy.cmd=avr-objcopy diff --git a/hardware/arduino/sam/platform.txt b/hardware/arduino/sam/platform.txt index 4654e13eb..e6f475603 100644 --- a/hardware/arduino/sam/platform.txt +++ b/hardware/arduino/sam/platform.txt @@ -19,13 +19,13 @@ compiler.warning_flags.all=-Wall -Wextra compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/ compiler.c.cmd=arm-none-eabi-gcc -compiler.c.flags=-c -g -Os {compiler.warning_flags} -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD +compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu89 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD compiler.c.elf.cmd=arm-none-eabi-gcc compiler.c.elf.flags=-Os -Wl,--gc-sections compiler.S.cmd=arm-none-eabi-gcc compiler.S.flags=-c -g -x assembler-with-cpp -mthumb compiler.cpp.cmd=arm-none-eabi-g++ -compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD +compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++98 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -MMD compiler.ar.cmd=arm-none-eabi-ar compiler.ar.flags=rcs compiler.objcopy.cmd=arm-none-eabi-objcopy