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