From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Sun, 12 May 2024 15:19:11 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s696d-00Aw4h-2q for lore@lore.pengutronix.de; Sun, 12 May 2024 15:19:11 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1s696d-0005qX-8C; Sun, 12 May 2024 15:19:11 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s694K-0002kH-BB; Sun, 12 May 2024 15:16:48 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s694J-000zYy-Uz; Sun, 12 May 2024 15:16:47 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1s694J-00FXZ5-2x; Sun, 12 May 2024 15:16:47 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Sun, 12 May 2024 15:16:47 +0200 Message-Id: <20240512131647.3703936-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240508101404.272507-1-abbotti@mev.co.uk> References: <20240508101404.272507-1-abbotti@mev.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] gdb: Add option to configure lzma support X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Ian Abbott Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as 68cd37983cacf188ccb6fd3fdfaeaf776937c6d0. Michael [sent from post-receive hook] On Sun, 12 May 2024 15:16:47 +0200, Ian Abbott 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 > Message-Id: <20240508101404.272507-1-abbotti@mev.co.uk> > Signed-off-by: Michael Olbrich > > 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