Files
Thomas Petazzoni d98e15a363 package/gdb: really fix build with GCC 15.x by using external readline
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)
  https://gitlab.com/buildroot.org/buildroot/-/jobs/11176774348 (TestGdbArc)
  https://gitlab.com/buildroot.org/buildroot/-/jobs/11176774349 (TestGdbFullTarget)
  https://gitlab.com/buildroot.org/buildroot/-/jobs/11176774355 (TestGdbserverOnly)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Julien: as pointed out by Romain Naour:
 - also select and add readline dependency when
   BR2_PACKAGE_GDB_SERVER=y
 - add links to gitlab CI failures in commit log
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-09-06 22:37:18 +02:00
..