git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] config.mak.uname: avoid macOS linker warning on Xcode 16.3+

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 1, 2026, 22:41 UTC
Message-ID
<xmqqzf1d2894.fsf@gitster.g>
In-Reply-To
<pull.2313.v2.git.git.1780065163866.gitgitgadget@gmail.com>
"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 10 quoted lines
> diff --git a/config.mak.uname b/config.mak.uname
> index ce5e7de779..d4d55cb324 100644
> --- a/config.mak.uname
> +++ b/config.mak.uname
> @@ -163,6 +163,12 @@ ifeq ($(uname_S),Darwin)
>  		NEEDS_GOOD_LIBICONV = UnfortunatelyYes
>          endif
>  
> +	# Silence Xcode 16.3+ linker warning about __DATA,__common alignment.
> +	LD_MAJOR_VERSION = $(shell ld -v 2>&1 | sed -n 's/.*PROJECT:ld-\([0-9]*\).*/\1/p')
If LD_MAJOR_VERSION ever ends up being an empty string, then ...
> +        ifeq ($(shell test "$(LD_MAJOR_VERSION)" -ge 1167 && echo 1),1)
... this "test" would see
	test "" -ge 1167
that would result in errors like
	/bin/bash: line 1: test: : integer expected
	dash: 1: test: Illegal number: 

While this won't break the build (the `ifeq` will just evaluate to false), it can be noisy.

Perhaps
	test -n "$(LD_MAJOR_VERSION)" &&

in front? We know from your "sed" invocation that we won't see anything other than an empty string that is not a number, so I do not think we have to worry about feeding a non-number to the comparison against 1167 except for the "ah, no match, empty string" case.

Other than that, looking good.  Thanks.
Show 8 quoted lines
> +		BASIC_CFLAGS += -fno-common
> +        endif
> +
>  	# The builtin FSMonitor on MacOS builds upon Simple-IPC.  Both require
>  	# Unix domain sockets and PThreads.
>          ifndef NO_PTHREADS
>
> base-commit: c69baaf57ba26cf117c2b6793802877f19738b0d
Previous: Harald Nordgren via GitGitGadgetNext: Harald Nordgren via GitGitGadget
Message 7 of 8 in “pkt-line: initialize packet_buffer to avoid macOS linker warning”
  1. pkt-line: initialize packet_buffer to avoid macOS linker warningHarald Nordgren via GitGitGadget, May 27, 2026
  2. Junio C HamanoMay 28, 2026
  3. Harald NordgrenMay 28, 2026
  4. Harald NordgrenMay 28, 2026
  5. Junio C HamanoMay 28, 2026
  6. config.mak.uname: avoid macOS linker warning on Xcode 16.3+Harald Nordgren via GitGitGadget, May 29, 2026
  7. Junio C HamanoJun 1, 2026
  8. config.mak.uname: avoid macOS linker warning on Xcode 16.3+Harald Nordgren via GitGitGadget, Jun 2, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.