From fbf00957ddc4d949bd1e3516e7b35af0ac949f3e Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 20 Apr 2024 21:45:05 +0200 Subject: [PATCH] Fix build up to GCC 13 The errors cannot be disabled individually because the -Wno-error=some-gcc13-error flags are not recognized by older compilers. Signed-off-by: Francesco Gazzetta --- Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9bcd693..ef6d3d2 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,13 @@ wasp/boards/$(BOARD_SAFE)/watch.py : wasp/boards/$(BOARD_SAFE)/watch.py.in || ($(RM) wasp/boards/$(BOARD)/watch.py; false) micropython/mpy-cross/mpy-cross: - $(MAKE) -C micropython/mpy-cross + $(MAKE) -C micropython/mpy-cross \ + CWARN="-Wall -Wno-error" + # ^ Disable some Werrors from GCC>=13, specifically + # - dangling-pointer + # - enum-int-mismatch + # TODO update micropython and remove. + # https://github.com/wasp-os/wasp-os/issues/493 micropython: build-$(BOARD_SAFE) wasp/boards/manifest_user_apps.py wasp/boards/$(BOARD_SAFE)/watch.py micropython/mpy-cross/mpy-cross $(RM) micropython/ports/nrf/build-$(BOARD)-s132/frozen_content.c @@ -70,7 +76,13 @@ micropython: build-$(BOARD_SAFE) wasp/boards/manifest_user_apps.py wasp/boards/$ BOARD=$(BOARD) SD=s132 \ MICROPY_VFS_LFS2=1 \ FROZEN_MANIFEST=$(CURDIR)/wasp/boards/$(BOARD)/manifest.py \ - USER_C_MODULES=$(CURDIR)/wasp/modules + USER_C_MODULES=$(CURDIR)/wasp/modules \ + COPT="-Wno-error" + # ^ Disable some Werrors from GCC>=13, specifically + # - dangling-pointer + # - enum-int-mismatch + # TODO update micropython and remove. + # https://github.com/wasp-os/wasp-os/issues/493 $(PYTHON) -m nordicsemi dfu genpkg \ --dev-type 0x0052 \ --application micropython/ports/nrf/build-$(BOARD)-s132/firmware.hex \