fix: EDK2 BaseTools build with modern GCC

PCCTS parser generator uses K&R-style function pointers void (*)() which
modern GCC (12+) rejects under -Werror (treats () as (void)).
Build with -std=gnu89 -Wno-error for the BaseTools C toolchain.
This commit is contained in:
2026-07-01 04:57:01 +03:00
parent bedb30791b
commit 36a9133c8e
+5 -1
View File
@@ -19,7 +19,11 @@ EDK2_DIR="${EDK2_DIR:-$(pwd)}"
}
echo "=== Building EDK2 BaseTools (C toolchain) ==="
make -C BaseTools/Source/C -j"$(nproc)"
# PCCTS parser code uses K&R-style function pointers (void (*)()) which
# modern GCC rejects with -Werror. Build with -Wno-error and gnu89.
make -C BaseTools/Source/C -j"$(nproc)" \
CFLAGS="-MMD -MP -g -O2 -Wno-error -std=gnu89" \
BUILD_CFLAGS="-MMD -MP -g -O2 -Wno-error -std=gnu89"
echo "=== Initializing EDK2 environment ==="
# shellcheck disable=SC1091