From 5217eb6dbcc481ceae02aaeda27cc79da5048ae4 Mon Sep 17 00:00:00 2001 From: Gabriel Hansson Date: Mon, 29 Aug 2022 18:29:21 +0000 Subject: [PATCH] fix error: array subscript 0 is outside array bounds for newer gcc versions --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index f61922e..6abd441 100644 --- a/Makefile +++ b/Makefile @@ -323,6 +323,11 @@ ifeq ($(DEBUG), 1) C_SRC += $(RTT_SRC)/RTT/SEGGER_RTT.c endif +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 +ifneq ($(findstring 12.,$(shell $(CC) --version 2>/dev/null)),) + CFLAGS += --param=min-pagesize=0 +endif + #------------------------------------------------------------------------------ # Linker Flags #------------------------------------------------------------------------------