Fix: GCC warning flags conditional (Clang doesn't support them)

This commit is contained in:
Martin Vogel
2026-03-18 01:30:02 +01:00
parent c8294ce160
commit a97bfc684e
+4 -1
View File
@@ -31,9 +31,12 @@ LIBGIT2_FLAGS =
LIBGIT2_LIBS =
endif
# GCC-specific warning suppressions (Clang doesn't have these flags)
GCC_NOWARN := $(shell $(CC) -Wno-format-truncation -x c -c /dev/null -o /dev/null 2>/dev/null && echo "-Wno-format-truncation -Wno-restrict -Wno-unused-result")
CFLAGS_COMMON = -std=c11 -D_DEFAULT_SOURCE -Wall -Wextra -Werror \
-Wno-unused-parameter -Wno-sign-compare \
-Wno-format-truncation -Wno-restrict -Wno-unused-result \
$(GCC_NOWARN) \
-Isrc -Ivendored -Ivendored/sqlite3 \
-Ivendored/mimalloc/include \
-I$(CBM_DIR) -I$(TS_INCLUDE) \