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

* [Buildroot] [PATCH 2/2] package/gdb: handle xxhash optional dependency
  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 ` 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
  2 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-24 21:33 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

Since gdb 9.x, gdb can optionally use the xxhash library. Since we
currently don't do anything about it, it's a potential "silent"
dependency.

In particular, for host-gdb, this means host-gdb might end up being
linked with the system-provided xxhash library if available.

This patch handles this dependency:

- For the target package, by looking at the value of
  BR2_PACKAGE_XXHASH

- For the host package, by looking at the value of a newly introduced
  BR2_PACKAGE_HOST_GDB_XXHASH

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

diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
index 823c2e9966..61fe32d8ff 100644
--- a/package/gdb/Config.in.host
+++ b/package/gdb/Config.in.host
@@ -49,6 +49,11 @@ config BR2_PACKAGE_HOST_GDB_LZMA
 	help
 	  This option enables lzma support in the cross gdb.
 
+config BR2_PACKAGE_HOST_GDB_XXHASH
+	bool "xxhash support"
+	help
+	  This option enables xxhash 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 ebb80072cf..cfec0585da 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -217,6 +217,14 @@ else
 GDB_CONF_OPTS += --without-expat
 endif
 
+ifeq ($(BR2_PACKAGE_XXHASH),y)
+GDB_CONF_OPTS += --with-xxhash
+GDB_CONF_OPTS += --with-xxhash-prefix=$(STAGING_DIR)/usr
+GDB_DEPENDENCIES += xxhash
+else
+GDB_CONF_OPTS += --without-xxhash
+endif
+
 ifeq ($(BR2_PACKAGE_XZ),y)
 GDB_CONF_OPTS += --with-lzma
 GDB_CONF_OPTS += --with-liblzma-prefix=$(STAGING_DIR)/usr
@@ -301,6 +309,14 @@ else
 HOST_GDB_CONF_OPTS += --without-lzma
 endif
 
+ifeq ($(BR2_PACKAGE_HOST_GDB_XXHASH),y)
+HOST_GDB_CONF_OPTS += --with-xxhash
+HOST_GDB_CONF_OPTS += --with-xxhash-prefix=$(HOST_DIR)
+HOST_GDB_DEPENDENCIES += host-xxhash
+else
+HOST_GDB_CONF_OPTS += --without-xxhash
+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

* Re: [Buildroot] [PATCH 1/2] package/gdb: handle lzma option for host-gdb
  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:48 ` Peter Korsgaard
  2026-09-04 12:18 ` Thomas Perale via buildroot
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2026-08-25 11:48 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > 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>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/gdb: handle xxhash optional dependency
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2026-08-25 11:49 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > Since gdb 9.x, gdb can optionally use the xxhash library. Since we
 > currently don't do anything about it, it's a potential "silent"
 > dependency.

 > In particular, for host-gdb, this means host-gdb might end up being
 > linked with the system-provided xxhash library if available.

 > This patch handles this dependency:

 > - For the target package, by looking at the value of
 >   BR2_PACKAGE_XXHASH

 > - For the host package, by looking at the value of a newly introduced
 >   BR2_PACKAGE_HOST_GDB_XXHASH

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/gdb: handle lzma option for host-gdb
  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:48 ` [Buildroot] [PATCH 1/2] package/gdb: handle lzma option for host-gdb Peter Korsgaard
@ 2026-09-04 12:18 ` Thomas Perale via buildroot
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Perale via buildroot @ 2026-09-04 12:18 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Thomas Perale, buildroot

In reply of:
> 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>

Applied to 2025.02.x & 2026.05.x. Thanks

> ---
>  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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/gdb: handle xxhash optional dependency
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Perale via buildroot @ 2026-09-04 12:18 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Thomas Perale, buildroot

In reply of:
> Since gdb 9.x, gdb can optionally use the xxhash library. Since we
> currently don't do anything about it, it's a potential "silent"
> dependency.
> 
> In particular, for host-gdb, this means host-gdb might end up being
> linked with the system-provided xxhash library if available.
> 
> This patch handles this dependency:
> 
> - For the target package, by looking at the value of
>   BR2_PACKAGE_XXHASH
> 
> - For the host package, by looking at the value of a newly introduced
>   BR2_PACKAGE_HOST_GDB_XXHASH
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to 2025.02.x & 2026.05.x. Thanks

> ---
>  package/gdb/Config.in.host |  5 +++++
>  package/gdb/gdb.mk         | 16 ++++++++++++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
> index 823c2e9966..61fe32d8ff 100644
> --- a/package/gdb/Config.in.host
> +++ b/package/gdb/Config.in.host
> @@ -49,6 +49,11 @@ config BR2_PACKAGE_HOST_GDB_LZMA
>  	help
>  	  This option enables lzma support in the cross gdb.
>  
> +config BR2_PACKAGE_HOST_GDB_XXHASH
> +	bool "xxhash support"
> +	help
> +	  This option enables xxhash 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 ebb80072cf..cfec0585da 100644
> --- a/package/gdb/gdb.mk
> +++ b/package/gdb/gdb.mk
> @@ -217,6 +217,14 @@ else
>  GDB_CONF_OPTS += --without-expat
>  endif
>  
> +ifeq ($(BR2_PACKAGE_XXHASH),y)
> +GDB_CONF_OPTS += --with-xxhash
> +GDB_CONF_OPTS += --with-xxhash-prefix=$(STAGING_DIR)/usr
> +GDB_DEPENDENCIES += xxhash
> +else
> +GDB_CONF_OPTS += --without-xxhash
> +endif
> +
>  ifeq ($(BR2_PACKAGE_XZ),y)
>  GDB_CONF_OPTS += --with-lzma
>  GDB_CONF_OPTS += --with-liblzma-prefix=$(STAGING_DIR)/usr
> @@ -301,6 +309,14 @@ else
>  HOST_GDB_CONF_OPTS += --without-lzma
>  endif
>  
> +ifeq ($(BR2_PACKAGE_HOST_GDB_XXHASH),y)
> +HOST_GDB_CONF_OPTS += --with-xxhash
> +HOST_GDB_CONF_OPTS += --with-xxhash-prefix=$(HOST_DIR)
> +HOST_GDB_DEPENDENCIES += host-xxhash
> +else
> +HOST_GDB_CONF_OPTS += --without-xxhash
> +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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[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.