From 513ffe7c8217570b948c57bfc4049ba938080951 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 19 Jul 2026 20:41:15 -1000 Subject: Build the sources with -fno-common Apple clang still defaults to -fcommon, so git's 64 KB packet_buffer became a common symbol whose size drove a 32 KB section alignment that ld64 then clamped to the 16 KB page size, warning on every macOS link. Everywhere else already compiles with -fno-common. --- source/cgit.mk | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source') diff --git a/source/cgit.mk b/source/cgit.mk index ace8fd1..661d351 100644 --- a/source/cgit.mk +++ b/source/cgit.mk @@ -13,6 +13,13 @@ CGIT_PREFIX = ../../ CGIT_SRC = $(CGIT_PREFIX)source/ CGIT_BUILD = $(CGIT_PREFIX)build/ +# Emit zero-initialised globals as plain definitions instead of common +# symbols, the default everywhere but Apple clang. ld64 otherwise derives +# a 32 KB alignment from the size of git's 64 KB packet_buffer and warns +# about reducing it on every macOS link. Use override so a command-line +# CFLAGS (as tools/release-build.sh passes) still keeps the flag. +override CFLAGS += -fno-common + -include $(CGIT_PREFIX)cgit.conf # The CGIT_* variables are inherited from the top-level Makefile. -- cgit 2.12.1