From e0a37f988571fc470bf14608feff7d20ae239f65 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Thu, 23 Apr 2026 16:53:01 +0200 Subject: [PATCH] libpng: Avoid ICE with some GCC versions There is a bug in GCC >= 15 that is triggered by compiling pngwrite.c with -O3. Using -O2 instead works fine. Signed-off-by: Paul Cercueil --- libpng/files/KOSMakefile.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libpng/files/KOSMakefile.mk b/libpng/files/KOSMakefile.mk index c071315..2181847 100644 --- a/libpng/files/KOSMakefile.mk +++ b/libpng/files/KOSMakefile.mk @@ -14,6 +14,9 @@ KOS_CFLAGS += -I. \ defaultall: pnglibconf.h fix-pngh $(OBJS) subdirs linklib +# Avoid ICE with some GCC versions +pngwrite.o: CFLAGS += -O2 + # Force the configuration file to be generated. pnglibconf.h: scripts/pnglibconf.h.prebuilt cp $< $@