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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user