From 49937f40a1f3808be1cc459696d885c9e537c0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B6ppner?= Date: Wed, 8 Mar 2023 13:46:24 +0100 Subject: [PATCH] zipl: Disable array-bounds warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since GCC12 several warnings like the following are produced in zipl/boot compile targets: CC zipl/boot/stage2.o stage2.c: In function ‘start’: stage2.c:99:24: warning: array subscript 0 is outside array bounds of ‘struct stage2_descr[0]’ [-Warray-bounds] 99 | stage2_descr = *(struct stage2_descr*)STAGE2_DESC; This is the same issue as reported for the Kernel [1][2]. There is currently no sane fix available, therefore simply disable the warning for the zipl/boot/ targets. [1] https://lore.kernel.org/lkml/yt9dzgkelelc.fsf@linux.ibm.com/ [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 Signed-off-by: Jan Höppner Signed-off-by: Steffen Eiden --- zipl/boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipl/boot/Makefile b/zipl/boot/Makefile index 26c31586..2761955c 100644 --- a/zipl/boot/Makefile +++ b/zipl/boot/Makefile @@ -10,7 +10,7 @@ ALL_CFLAGS = $(NO_PIE_CFLAGS) -Os -g $(INCLUDE_PARMS) \ -fno-delete-null-pointer-checks -fno-stack-protector \ -fexec-charset=IBM1047 -m64 -mpacked-stack \ -mstack-size=4096 -mstack-guard=128 -msoft-float \ - -W -Wall -Wformat-security -fno-sanitize=all + -W -Wall -Wformat-security -fno-sanitize=all -Wno-array-bounds ALL_LDFLAGS += -fno-sanitize=all FILES = fba0.bin fba1b.bin fba2.bin \