From 0d3ba46b486cacbaa060a4010d0e2552288ccf63 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 13 Apr 2015 12:22:37 +0200 Subject: Better preference for setting warnings level. See https://github.com/arduino/Arduino/commit/61592d78fa71c023e4f1577f7e2b6bada2661a13#commitcomment-10668365 --- platform.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'platform.txt') diff --git a/platform.txt b/platform.txt index db3e26b..afe2f23 100644 --- a/platform.txt +++ b/platform.txt @@ -1,7 +1,7 @@ # Arduino AVR Core and platform. # ------------------------------ - +# # For more info: # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification @@ -11,17 +11,22 @@ version=1.6.3 # AVR compile variables # --------------------- +compiler.warning_flags.none=-w +compiler.warning_flags.normal= +compiler.warning_flags.all=-Wall +compiler.warning_flags.extra=-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 -w -ffunction-sections -fdata-sections -MMD +compiler.c.flags=-c -g -Os {compiler.warning_flags} -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=-w -Os -Wl,--gc-sections +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 -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD +compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD compiler.ar.cmd=avr-ar compiler.ar.flags=rcs compiler.objcopy.cmd=avr-objcopy -- cgit v1.2.3-18-g5258