Skip to content

Commit 3fe7fd7

Browse files
authored
Merge pull request #69 from fjtrujy/fix_windows
Fix compilation when using GCC 16
2 parents 80460c8 + 0f3591f commit 3fe7fd7

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/002-gcc-stage1.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ for TARGET in "mips64r5900el-ps2-elf"; do
6262
cd "build-$TARGET-stage1"
6363
6464
## Configure the build.
65+
## -fno-char8_t keeps u8"..." literals as `const char[]` so libcody builds
66+
## under host compilers that default to C++20 or later (e.g. GCC 16).
6567
CFLAGS_FOR_TARGET="$TARGET_CFLAGS" \
68+
CXXFLAGS="-g -O2 -fno-char8_t" \
69+
CXXFLAGS_FOR_BUILD="-g -O2 -fno-char8_t" \
6670
../configure \
6771
--quiet \
6872
--prefix="$PS2DEV/$TARGET_ALIAS" \

scripts/006-gcc-stage2.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ for TARGET in "mips64r5900el-ps2-elf"; do
6565
cd "build-$TARGET-stage2"
6666
6767
## Configure the build.
68+
## -fno-char8_t keeps u8"..." literals as `const char[]` so libcody builds
69+
## under host compilers that default to C++20 or later (e.g. GCC 16).
6870
CFLAGS_FOR_TARGET="$TARGET_CFLAGS" \
6971
CXXFLAGS_FOR_TARGET="$TARGET_CFLAGS" \
72+
CXXFLAGS="-g -O2 -fno-char8_t" \
73+
CXXFLAGS_FOR_BUILD="-g -O2 -fno-char8_t" \
7074
../configure \
7175
--quiet \
7276
--prefix="$PS2DEV/$TARGET_ALIAS" \

0 commit comments

Comments
 (0)