From 2470bec2f9a668aa9b8c959f6ba090b13c5a3511 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Sun, 11 Oct 2026 11:02:51 -0300 Subject: [PATCH] Build SPU binutils 2.22 on host GCC 15 and 16. Those compilers default to C23, which rejects the K&R-era sources. The build uses gnu17, system zlib, and LTO. --- scripts/005-binutils-SPU.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/005-binutils-SPU.sh b/scripts/005-binutils-SPU.sh index b2c2c218..2fe535e1 100755 --- a/scripts/005-binutils-SPU.sh +++ b/scripts/005-binutils-SPU.sh @@ -36,6 +36,8 @@ fi cd ${BINUTILS}/build-spu ## Configure the build. +## Host GCC 15/16 default to C23; binutils 2.22 uses K&R-era C. +CFLAGS="${CFLAGS:-} -std=gnu17 -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-implicit-function-declaration" \ ../configure --prefix="$PS3DEV/spu" --target="spu" \ --disable-nls \ --disable-shared \ @@ -44,7 +46,9 @@ cd ${BINUTILS}/build-spu --disable-werror \ --with-gcc \ --with-gnu-as \ - --with-gnu-ld + --with-gnu-ld \ + --enable-lto \ + --with-system-zlib ## Compile and install. PROCS="$(nproc --all 2>&1)" || ret=$?