]> Kevux Git Server - rit/commit
config.mak.uname: avoid macOS dup-library warning
authorHarald Nordgren <haraldnordgren@gmail.com>
Fri, 19 Jun 2026 20:32:07 +0000 (20:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jun 2026 21:34:17 +0000 (14:34 -0700)
commitf6791de689be2f5b88b39def9ad5b73e38c32f7c
treec895da686b010702ce80791754b0f265040bf6bd
parent5cd4d0d8500c6ef1b102f5cb35187a91c299f013
config.mak.uname: avoid macOS dup-library warning

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 <haraldnordgren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.mak.uname