From 0403a1baf5bd94f5450ff647a69098a64fdbf3ae Mon Sep 17 00:00:00 2001 From: Neal Jackson Date: Mon, 29 Jan 2018 08:12:27 -0800 Subject: [PATCH] [nrf52840] add conditional -Wno-expansion-to-defined for GCC7 (#2514) --- examples/Makefile-nrf52840 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/Makefile-nrf52840 b/examples/Makefile-nrf52840 index d58f5c4ce..c1c14226b 100644 --- a/examples/Makefile-nrf52840 +++ b/examples/Makefile-nrf52840 @@ -40,6 +40,7 @@ RANLIB = arm-none-eabi-ranlib OBJCOPY = arm-none-eabi-objcopy BuildJobs ?= 10 +GCCVersion = $(shell expr `$(CC) -dumpversion | cut -f1 -d.`) configure_OPTIONS = \ --enable-cli-app=all \ @@ -87,6 +88,10 @@ ifeq ($(USB),1) COMMONCFLAGS += -DUSB_CDC_AS_SERIAL_TRANSPORT=1 endif +ifeq ($(shell expr $(GCCVersion) \>= 7), 1) + COMMONCFLAGS += -Wno-expansion-to-defined +endif + CPPFLAGS += \ $(COMMONCFLAGS) \ $(target_CPPFLAGS) \