From 45026965bfe4bd0123490d7b4ea9ea40373ecc2b Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Tue, 21 Jul 2026 15:36:16 -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(+) 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 v2.8.0