Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: Nick Alcock <nix@esperi.org.uk>
Cc: GDB Patches <gdb-patches@sourceware.org>,
	GCC Binutils <binutils@sourceware.org>,
	Jan Beulich <jbeulich@suse.com>,
	sam@gentoo.org, pietro@sociotechnical.xyz
Subject: Re: [PATCH] Fix libiberty.h inclusion on non-glibc hosts tree-wide
Date: Wed, 18 Nov 2026 12:41:24 +0500	[thread overview]
Message-ID: <9FF06E6B-7535-448F-90D7-3E8436D54440@sandoe.co.uk> (raw)
In-Reply-To: <20972285-e1ea-4048-8a65-62d4f0ea021d@suse.com>

@sam, @pietro … any ideas most welcome.

> On 18 Nov 2026, at 12:24, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 18.11.2026 01:49, Nick Alcock wrote:
>> In 2025, Iain Sandoe added memrchr support to libiberty.h. This requires
>> a new AC_CHECK_FUNCS of memrchr in every project that transitively
>> includes it, or builds on non-glibc, non-Linux hosts will fail (observed
>> on FreeBSD 15).

In a way, it’s a nit surprising to find a *BSD having an issue (since it was a
BSD derivative that prompted adding this)…but that’s life :)

>> Fix trivial, but a tad invasive, since a lot of projects include
>> libiberty.h, and it shows up a few places that don't include config.h at
>> all (including some that include ansidecl.h, which requires config.h for
>> proper operation).
>> 
>> All relevant configury regenerated.
>> 
>> Also touches GDB machinery, so gdb-patches is Cc:ed.
>> 
>> Iain Sandoe Cc:ed: Iain, if you disagree with my rather nasty approach
>> here, I'd be interested in anything better. (The need to use %top in
>> binutils/arlex.l is slightly worrying.  It's not in POSIX, but
>> we need something like it or we can't include config.h before the
>> system headers it must precede.  (Including config.h in libiberty.h
>> won't work for the same reason.)
> 
> What does this mean compatibility-wise? I.e. when did relevant tools (no
> idea which one it would be on the BSDs) start supporting %top?

I have no better idea - unless there’s a way to down-scope the addition to
GCC-local.

Adding folks who are currently working on updating GCC’s configury…

Iain

> 
> Jan


  reply	other threads:[~2026-11-18  7:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  0:49 Nick Alcock
2026-11-18  7:24 ` Jan Beulich
2026-11-18  7:41   ` Iain Sandoe [this message]
2026-11-18 11:50     ` Nick Alcock
2026-11-18  8:39 ` Sam James
2026-11-18 12:00   ` Nick Alcock
2026-11-18 12:12     ` Sam James
2026-11-18 17:18       ` Nix
2026-11-19 20:35 ` Tom Tromey
2026-11-20 15:25   ` [PATCH v2] Support libiberty functions as macros; fix up AC_CHECK_DECL tree-wide Nick Alcock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9FF06E6B-7535-448F-90D7-3E8436D54440@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=nix@esperi.org.uk \
    --cc=pietro@sociotechnical.xyz \
    --cc=sam@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox