From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 08 May 2024 12:14:44 +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 1s4eJv-002lqf-30 for lore@lore.pengutronix.de; Wed, 08 May 2024 12:14:44 +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 1s4eJv-0008DZ-9Q; Wed, 08 May 2024 12:14:43 +0200 Received: from smtp66.iad3a.emailsrvr.com ([173.203.187.66]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4eJc-0008CZ-5n for ptxdist@pengutronix.de; Wed, 08 May 2024 12:14:26 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1715163262; bh=4f19a5Zbkx1ZKzaeLrBtxp+4EUCl6tyzyDv0W7tNc7w=; h=From:To:Subject:Date:From; b=v8Be0hRfEt8CQoNCGumiliw0tPThp07StCM6z7YTC/FLRa/IrkTHrAK2dmOIrTpHn 1gq4FXPnBM3LQGUX2dFWYDDEqXOhCj3QEXmmqm8T2KSTgCU0Jd+0b9RBPMJHjaKVqE TyGWRJRpiJtTDUb9rUtLS9VAWc/87a8kHsi9XuYc= X-Auth-ID: abbotti@mev.co.uk Received: by smtp33.relay.iad3a.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 47B181980; Wed, 8 May 2024 06:14:22 -0400 (EDT) From: Ian Abbott To: ptxdist@pengutronix.de Date: Wed, 8 May 2024 11:14:04 +0100 Message-ID: <20240508101404.272507-1-abbotti@mev.co.uk> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Classification-ID: 1992b8c7-c151-4f4d-a097-6ca17d5e9a0b-1-1 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] 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 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 --- 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