kumquat-buildroot/package/gdb
Yann E. MORIN 8ce33fed49 package/gdb: gdbserver does not need zlib
Since 3341ceb1e5 (package/gdb: zlib is mandatory, not optional), zlib
has become a mandatory dependencies of the gdb package.

However, zlib is only needed for the debugger, gdb itself, while the
server, gdbserver, does not use it.

This means that, when building an SDK to be later reused as an external
toolchain, the zlib headers and libraries are present in the sysroot of
the toolchain, tainting the toolchain and making it unsuitable to be
reused.

As Julien noticed, for example, tcl will try and link with zlib if
available, and at build time it is. But at runtime, it is not, and thus
tclsh fails to run; see 7af8dee3a8 (package/tcl: add mandatory
dependency to zlib)

When we only need to build gdbserver, we still need to configure and
build the whole gdb distribution, which means we call the top-level
configure script; that script has no option to disable the detection
of zlib: it wants to either use a system one, or it will build the
bundled one.

So, when we only build gdbserver, we tell configure to not use a system
zlib. This triggers the build of the bundled one, but it is not linked
with gdbserver so in the end it is not used on the target.

Reported-by: Julien Olivain <ju.o@free.fr>
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-09-17 21:30:19 +02:00
..
11.2
12.1
13.2 package/gdb: add support for GDB 13.2 2023-08-06 16:41:22 +02:00
arc-2020.09-release-gdb package/gdb: fix build error for version arc-2020.09 2023-08-02 21:59:43 +02:00
Config.in package/gdb: gdbserver does not need zlib 2023-09-17 21:30:19 +02:00
Config.in.host package/gdb: remove gdb 10.x 2023-08-06 16:41:25 +02:00
gdb-python-config
gdb.hash package/gdb: add support for GDB 13.2 2023-08-06 16:41:22 +02:00
gdb.mk package/gdb: gdbserver does not need zlib 2023-09-17 21:30:19 +02:00