* [ptxdist] [PATCH] gdb: Add option to configure lzma support
@ 2024-05-08 10:14 Ian Abbott
2024-05-12 13:16 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Ian Abbott @ 2024-05-08 10:14 UTC (permalink / raw)
To: ptxdist; +Cc: Ian Abbott
GDB's '--with-lzma=auto/yes/no' option defaults to 'auto' but it would
be better to configure it to 'yes' or 'no' explicitly. GDB's lzma
support is required to read the .gnu_debuginfo sections in binaries (if
they have been built to include those sections), so call the
configuration option GDB_DEBUGINFO_SUPPORT.
The '--with-lzma' option was added in GDB 7.6, but that is quite old, so
assume it is supported.
While we are at it, change the test `ifneq ($(filter
1%,$(GDBSERVER_VERSION)),)` to use `$(GDB_VERSION)` instead, and add the
'--without-python' configure command line option.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
rules/gdb.in | 12 ++++++++++++
rules/gdb.make | 9 ++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/rules/gdb.in b/rules/gdb.in
index 3014271de..9e76307e3 100644
--- a/rules/gdb.in
+++ b/rules/gdb.in
@@ -8,6 +8,7 @@ menuconfig GDB
select GCCLIBS_GCC_S
select NCURSES
select LIBGMP if GDB_11_1
+ select XZ if GDB_DEBUGINFO_SUPPORT
help
The GNU Debugger
@@ -26,6 +27,17 @@ config GDB_SHARED
If not set, the build option
LDFLAGS=-static will be activated.
+config GDB_DEBUGINFO_SUPPORT
+ bool
+ prompt "support reading .gnu_debuginfo sections"
+ help
+ Configures whether to link with liblzma to support reading the
+ .gnu_debuginfo sections in binaries.
+
+ Note: This is useful if TARGET_MINI_DEBUGINFO has been enabled
+ in the platform configuration to add .gnu_debuginfo sections
+ to all the binaries.
+
config GDB_11_1
bool
prompt "gdb-11.1 or later"
diff --git a/rules/gdb.make b/rules/gdb.make
index 6c9f05fab..c1337427b 100644
--- a/rules/gdb.make
+++ b/rules/gdb.make
@@ -40,10 +40,12 @@ endif
GDB_CONF_OPT_HOST := \
--disable-tui \
--disable-rpath \
+ --with-lzma=$(call ptx/yesno, PTXCONF_GDB_DEBUGINFO_SUPPORT) \
--without-expat \
- --without-mpfr
+ --without-mpfr \
+ --without-python
-ifneq ($(filter 1%,$(GDBSERVER_VERSION)),)
+ifneq ($(filter 1%,$(GDB_VERSION)),)
# version >= 10
GDB_CONF_OPT_HOST += \
--without-xxhash
@@ -72,7 +74,8 @@ GDB_BUILD_OOT := YES
# for gdb subdir configure
GDB_MAKE_ENV := \
- with_libgmp_prefix=no
+ with_libgmp_prefix=no \
+ with_liblzma_prefix=no
# ----------------------------------------------------------------------------
# Install
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [APPLIED] gdb: Add option to configure lzma support
2024-05-08 10:14 [ptxdist] [PATCH] gdb: Add option to configure lzma support Ian Abbott
@ 2024-05-12 13:16 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2024-05-12 13:16 UTC (permalink / raw)
To: ptxdist; +Cc: Ian Abbott
Thanks, applied as 68cd37983cacf188ccb6fd3fdfaeaf776937c6d0.
Michael
[sent from post-receive hook]
On Sun, 12 May 2024 15:16:47 +0200, Ian Abbott <abbotti@mev.co.uk> wrote:
> GDB's '--with-lzma=auto/yes/no' option defaults to 'auto' but it would
> be better to configure it to 'yes' or 'no' explicitly. GDB's lzma
> support is required to read the .gnu_debuginfo sections in binaries (if
> they have been built to include those sections), so call the
> configuration option GDB_DEBUGINFO_SUPPORT.
>
> The '--with-lzma' option was added in GDB 7.6, but that is quite old, so
> assume it is supported.
>
> While we are at it, change the test `ifneq ($(filter
> 1%,$(GDBSERVER_VERSION)),)` to use `$(GDB_VERSION)` instead, and add the
> '--without-python' configure command line option.
>
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> Message-Id: <20240508101404.272507-1-abbotti@mev.co.uk>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/rules/gdb.in b/rules/gdb.in
> index 3014271de9c1..9e76307e36b1 100644
> --- a/rules/gdb.in
> +++ b/rules/gdb.in
> @@ -8,6 +8,7 @@ menuconfig GDB
> select GCCLIBS_GCC_S
> select NCURSES
> select LIBGMP if GDB_11_1
> + select XZ if GDB_DEBUGINFO_SUPPORT
> help
> The GNU Debugger
>
> @@ -26,6 +27,17 @@ config GDB_SHARED
> If not set, the build option
> LDFLAGS=-static will be activated.
>
> +config GDB_DEBUGINFO_SUPPORT
> + bool
> + prompt "support reading .gnu_debuginfo sections"
> + help
> + Configures whether to link with liblzma to support reading the
> + .gnu_debuginfo sections in binaries.
> +
> + Note: This is useful if TARGET_MINI_DEBUGINFO has been enabled
> + in the platform configuration to add .gnu_debuginfo sections
> + to all the binaries.
> +
> config GDB_11_1
> bool
> prompt "gdb-11.1 or later"
> diff --git a/rules/gdb.make b/rules/gdb.make
> index 6c9f05fab7f5..c1337427b605 100644
> --- a/rules/gdb.make
> +++ b/rules/gdb.make
> @@ -40,10 +40,12 @@ endif
> GDB_CONF_OPT_HOST := \
> --disable-tui \
> --disable-rpath \
> + --with-lzma=$(call ptx/yesno, PTXCONF_GDB_DEBUGINFO_SUPPORT) \
> --without-expat \
> - --without-mpfr
> + --without-mpfr \
> + --without-python
>
> -ifneq ($(filter 1%,$(GDBSERVER_VERSION)),)
> +ifneq ($(filter 1%,$(GDB_VERSION)),)
> # version >= 10
> GDB_CONF_OPT_HOST += \
> --without-xxhash
> @@ -72,7 +74,8 @@ GDB_BUILD_OOT := YES
>
> # for gdb subdir configure
> GDB_MAKE_ENV := \
> - with_libgmp_prefix=no
> + with_libgmp_prefix=no \
> + with_liblzma_prefix=no
>
> # ----------------------------------------------------------------------------
> # Install
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-12 13:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-08 10:14 [ptxdist] [PATCH] gdb: Add option to configure lzma support Ian Abbott
2024-05-12 13:16 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox