All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/gdb: handle lzma option for host-gdb
@ 2026-08-24 21:33 Thomas Petazzoni via buildroot
  2026-08-24 21:33 ` [Buildroot] [PATCH 2/2] package/gdb: handle xxhash optional dependency Thomas Petazzoni via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-24 21:33 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

For target gdb, we properly enable/disable lzma support depending on
BR2_PACKAGE_XZ.

However, for host-gdb we don't do anything, which can lead the gdb
configure script to detect and use a system-provided xz library, which
is not desired.

Instead, add an explicit option BR2_PACKAGE_HOST_GDB_LZMA, which when
enabled pulls in host-xz, but also when disabled ensures gdb doesn't
try to use a system-provided xz library.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/gdb/Config.in.host | 5 +++++
 package/gdb/gdb.mk         | 8 ++++++++
 2 files changed, 13 insertions(+)

diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
index 2e1eed6f50..823c2e9966 100644
--- a/package/gdb/Config.in.host
+++ b/package/gdb/Config.in.host
@@ -44,6 +44,11 @@ config BR2_PACKAGE_HOST_GDB_SIM
 	help
 	  This option enables the simulator support in the cross gdb.
 
+config BR2_PACKAGE_HOST_GDB_LZMA
+	bool "lzma support"
+	help
+	  This option enables lzma support in the cross gdb.
+
 choice
 	prompt "GDB debugger Version"
 	default BR2_GDB_VERSION_16
diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
index 685d1fe992..ebb80072cf 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -293,6 +293,14 @@ else
 HOST_GDB_CONF_OPTS += --disable-sim
 endif
 
+ifeq ($(BR2_PACKAGE_HOST_GDB_LZMA),y)
+HOST_GDB_CONF_OPTS += --with-lzma
+HOST_GDB_CONF_OPTS += --with-liblzma-prefix=$(HOST_DIR)
+HOST_GDB_DEPENDENCIES += host-xz
+else
+HOST_GDB_CONF_OPTS += --without-lzma
+endif
+
 # Since gdb 9, in-tree builds for GDB are not allowed anymore,
 # so we create a 'build' subdirectory in the gdb sources, and
 # build from there.
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-04 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-24 21:33 [Buildroot] [PATCH 1/2] package/gdb: handle lzma option for host-gdb Thomas Petazzoni via buildroot
2026-08-24 21:33 ` [Buildroot] [PATCH 2/2] package/gdb: handle xxhash optional dependency Thomas Petazzoni via buildroot
2026-08-25 11:49   ` Peter Korsgaard
2026-09-04 12:18   ` Thomas Perale via buildroot
2026-08-25 11:48 ` [Buildroot] [PATCH 1/2] package/gdb: handle lzma option for host-gdb Peter Korsgaard
2026-09-04 12:18 ` Thomas Perale via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.