[Buildroot] [PATCH v2] package/gdb: really fix build with GCC 15.x by using external readline
Julien Olivain
ju.o at free.fr
Sat Sep 6 21:22:21 UTC 2025
On 29/08/2025 17:24, Thomas Petazzoni via buildroot wrote:
> The copy of readline bundled with gdb versions earlier than 16.x does
> not build with GCC 15.x, despite our
> 0010-readline-tcap.h-Update-definitions-for-C23.patch. In GDB 16.x,
> readline has been updated to 8.2, which fixes the issue, but
> backporting this to older GDB versions results in a ~450 KB.
>
> So let's take the approach we should have probably taken from the
> ground up: use an external readline, instead of the bundled one. This
> is exactly what this patch does. Instead of having gdb depend on
> ncurses and host-gdb depend on host-ncurses, we make it depend on
> readline/host-readline (which in turn already has a dependency on
> ncurses). In fact, gdb does not need ncurses itself, it really needs
> only readline.
>
> Since the GDB TUI itself needs ncurses, we move the ncurses
> select/dependency down to the GDB TUI option. This was pointed out by
> Romain Naour.
>
> Fixes:
>
>
> https://autobuild.buildroot.net/results/3b0ce5cfac81e150816027fc1259600ee02f0f1f/
> (host gdb 14.x)
>
> https://autobuild.buildroot.net/results/e64e3cd7aa5e7315464e380982f7febaff5df908/
> (host gdb 15.x)
>
> https://autobuild.buildroot.net/results/2f2616a4ac7d9cbc06ba7775eb57bdd2a0419cb5/
> (host arc gdb)
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Applied to master (with few fixups suggested by Romain). See:
https://gitlab.com/buildroot.org/buildroot/-/commit/d98e15a3639d9758ab3223f0a6de3a94d506e6fa
Thanks!
Julien.
More information about the buildroot
mailing list