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

Re: [PATCH] pkt-line: initialize packet_buffer to avoid macOS linker warning

From
Harald Nordgren <haraldnordgren@gmail.com>
Date
May 28, 2026, 08:14 UTC
Message-ID
<CAHwyqnXgxnDNiq0UWyAsz6CHvroYPZ36EGbaUn=-OmP6w3gsWw@mail.gmail.com>
In-Reply-To
<CAHwyqnWjHTpWfbMcBHOabny5NQN7xTZmxew2yDWWu3AoosngWA@mail.gmail.com>
So maybe we can do something like this then?
```
+       # 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')
+        ifeq ($(shell test "$(LD_MAJOR_VERSION)" -ge 1167 && echo 1),1)
+               BASIC_CFLAGS += -fno-common
+        endif
```
Harald

On Thu, May 28, 2026 at 9:40 AM Harald Nordgren <haraldnordgren@gmail.com> wrote:

Show 15 quoted lines
>
> > According to Internet, Xcode 16.3 or newer introduced this insanity,
> > it seems.  How about adding -fno-common to your CFLAGS?  If it
> > solves the issue, then we can think about teaching config.mak.uname
> > to detect macOS with problematic versions of compilers and add the
> > flag as workaround.
>
> Yes, this works:
>
> ```
> make -s CFLAGS_APPEND="-fno-common"
> ```
>
>
> Harald
Previous: Harald NordgrenNext: Junio C Hamano
Message 4 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.