Thanks, applied as 68cd37983cacf188ccb6fd3fdfaeaf776937c6d0.

Michael

[sent from post-receive hook]

On Sun, 12 May 2024 15:16:47 +0200, Ian Abbott <abbo...@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 <abbo...@mev.co.uk>
> Message-Id: <20240508101404.272507-1-abbo...@mev.co.uk>
> Signed-off-by: Michael Olbrich <m.olbr...@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

Reply via email to