From 6479ee53d5ecaf2b47b59979239ac31868779c05 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 1 Oct 2019 15:43:28 +0700 Subject: [PATCH] -Wno-error=cast-function-type is only available for gcc 8+, change travis dist to bionic --- .travis.yml | 2 +- hw/bsp/circuitplayground_bluefruit/board.mk | 3 +++ hw/bsp/feather_nrf52840_express/board.mk | 3 +++ hw/bsp/pca10056/board.mk | 3 +++ hw/bsp/pca10059/board.mk | 3 +++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f2f2ba51..6dfc507f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: c -dist: xenial +dist: bionic compiler: - gcc diff --git a/hw/bsp/circuitplayground_bluefruit/board.mk b/hw/bsp/circuitplayground_bluefruit/board.mk index c1513fe7..72b9ddfb 100644 --- a/hw/bsp/circuitplayground_bluefruit/board.mk +++ b/hw/bsp/circuitplayground_bluefruit/board.mk @@ -12,7 +12,10 @@ CFLAGS += \ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter # due to tusb_hal_nrf_power_event +GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/circuitplayground_bluefruit/nrf52840_s140_v6.ld diff --git a/hw/bsp/feather_nrf52840_express/board.mk b/hw/bsp/feather_nrf52840_express/board.mk index 1900bedb..1e077bac 100644 --- a/hw/bsp/feather_nrf52840_express/board.mk +++ b/hw/bsp/feather_nrf52840_express/board.mk @@ -12,7 +12,10 @@ CFLAGS += \ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter # due to tusb_hal_nrf_power_event +GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/feather_nrf52840_express/nrf52840_s140_v6.ld diff --git a/hw/bsp/pca10056/board.mk b/hw/bsp/pca10056/board.mk index dc2c434f..c0616abe 100644 --- a/hw/bsp/pca10056/board.mk +++ b/hw/bsp/pca10056/board.mk @@ -12,7 +12,10 @@ CFLAGS += \ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter # due to tusb_hal_nrf_power_event +GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type +endif # All source paths should be relative to the top level. LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf52840_xxaa.ld diff --git a/hw/bsp/pca10059/board.mk b/hw/bsp/pca10059/board.mk index 0ef56ed5..15801054 100644 --- a/hw/bsp/pca10059/board.mk +++ b/hw/bsp/pca10059/board.mk @@ -12,7 +12,10 @@ CFLAGS += \ CFLAGS += -Wno-error=undef -Wno-error=unused-parameter # due to tusb_hal_nrf_power_event +GCCVERSION = $(firstword $(subst ., ,$(shell arm-none-eabi-gcc -dumpversion))) +ifeq ($(shell expr $(GCCVERSION) \>= 8), 1) CFLAGS += -Wno-error=cast-function-type +endif # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/$(BOARD).ld