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) \