From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/build] Use gnulib fnmatch
Date: Thu, 12 Nov 2026 22:53:13 +0000 [thread overview]
Message-ID: <87qzgpbr1i.fsf@linaro.org> (raw)
In-Reply-To: <20261109192655.32551-1-tdevries@suse.de>
Hello Tom,
Tom de Vries <tdevries@suse.de> writes:
> and the root cause is that we use libiberty's fnmatch, which is rather old
> (based on some glibc v1 version).
>
> This happens as follows:
> - because system libc is not glibc, the !__GNU_LIBRARY__ test in
> libiberty/fnmatch.c succeeds and fnmatch.o contains an fnmatch function
> - because system libc is not glibc, gnulib also compiles an fnmatch function
> - because of the inclusion order in INTERNAL_CFLAGS of libiberty vs gnulib,
> the libiberty copy gets used
>
> For contrast, on x86_64-linux:
> - because system libc is glibc, the !__GNU_LIBRARY__ test in
> libiberty/fnmatch.c fails and fnmatch.o is empty
> - because system libc is glibc, gnulib doesn't compile an fnmatch function
> - fnmatch binds to fnmatch from the system glibc
>
> Fix this by changing the inclusion order in INTERNAL_CFLAGS.
This is somewhat subtle. Can it be fixed instead by removing
libiberty/fnmatch.c from the repo?
--
Thiago
(he/him)
next prev parent reply other threads:[~2026-11-12 22:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 19:26 Tom de Vries
2026-11-12 22:53 ` Thiago Jung Bauermann [this message]
2026-11-13 14:52 ` Tom de Vries
2026-11-13 18:16 ` Tom Tromey
2026-11-18 15:57 ` Tom de Vries
2026-11-19 20:39 ` Tom Tromey
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=87qzgpbr1i.fsf@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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