From 7674b39ea26a6bff0c80cdef1f0b83b0a390a983 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 17 Oct 2026 12:53:16 -1000 Subject: Check cgit under sparse in its own dialect The sparse rule put git's SPARSE_FLAGS last, and their -std=gnu99 overrode the gnu17 the sources are built as. --- source/cgit.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/cgit.mk') diff --git a/source/cgit.mk b/source/cgit.mk index 41bceb4..a4b9758 100644 --- a/source/cgit.mk +++ b/source/cgit.mk @@ -165,7 +165,9 @@ $(CGIT_BUILD)/cgit: $(CGIT_OBJS) GIT-LDFLAGS $(GITLIBS) CGIT_SP_OBJS := $(patsubst %.o,%.sp,$(CGIT_OBJS)) +# Git's SPARSE_FLAGS name a -std of their own, so they come ahead of +# CGIT_CFLAGS for sparse to read the sources in the dialect they build in. $(CGIT_SP_OBJS): $(CGIT_BUILD)/%.sp: $(CGIT_SRC)/%.c GIT-CFLAGS $(CGIT_BUILD)/CGIT-CFLAGS FORCE - $(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $(CGIT_CFLAGS) $(SPARSE_FLAGS) $< + $(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $(SPARSE_FLAGS) $(CGIT_CFLAGS) $< cgit-sparse: $(CGIT_SP_OBJS) -- cgit