From: D. Ben Knoble Date: Sat, 20 Jun 2026 20:58:41 GMT Subject: Re: [PATCH v3] config.mak.uname: avoid macOS dup-library warning Message-ID: In-Reply-To: On Fri, Jun 19, 2026 at 6:27 PM Junio C Hamano wrote: > > "Harald Nordgren via GitGitGadget" writes: > > > From: Harald Nordgren > > > > Building on macOS with Xcode 15 or newer emits: > > > > ld: warning: ignoring duplicate libraries: 'libgit.a', > > 'target/release/libgitcore.a' > > > > Some link recipes list the same archive twice, which is harmless. > > Quiet the warning instead. > > > > Pass -Wl,-no_warn_duplicate_libraries on Xcode 15 and newer, whose > > linkers added both the warning and the suppression flag (ld64-907 > > and dyld-1009). Earlier linkers reject the flag, so gate on the > > linker version. Broaden the existing -fno-common version probe to > > also match the "ld64-NNN" and "dyld-NNN" forms Xcode 15 reports. > > > > Signed-off-by: Harald Nordgren > > --- > > Yeah, this looks like what I expected. > > A few things to note. > > * Can folks with different versions of Xcode (or is 15 sufficiently > old that practically nobody is expected to have anything older?) > test this patch? > > * We only patch Makefile here; can folks who use meson report how > well your build goes? > > Thanks. On one (old) machine I have available: $ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables [trimmed] version: 14.2.0.0.1.1668646533 On said machine, I don't get the duplicate warnings on a Meson build. No issues with the patch when running make. I think I have seen this on my other machine, which is much newer. When I get around to trying it there, I'll report back as well.