From 7754725c4c96dc30c408e10116250391dd77a911 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Sun, 10 May 2026 17:55:59 +0200 Subject: [PATCH] Fix windows compilation when using GCC 16 --- scripts/002-gcc-stage1.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/002-gcc-stage1.sh b/scripts/002-gcc-stage1.sh index da47a58..a799bad 100755 --- a/scripts/002-gcc-stage1.sh +++ b/scripts/002-gcc-stage1.sh @@ -61,8 +61,12 @@ mkdir "build-$TARGET-stage1" cd "build-$TARGET-stage1" ## Configure the build. +## -fno-char8_t keeps u8"..." literals as `const char[]` so libcody builds +## under host compilers that default to C++20 or later (e.g. GCC 16). CFLAGS_FOR_TARGET="$TARGET_CFLAGS" \ CXXFLAGS_FOR_TARGET="$TARGET_CFLAGS" \ +CXXFLAGS="-g -O2 -fno-char8_t" \ +CXXFLAGS_FOR_BUILD="-g -O2 -fno-char8_t" \ ../configure \ --quiet \ --prefix="$PS2DEV/$TARGET_ALIAS" \