[Buildroot] [PATCH 2/2] package/gdb: handle xxhash optional dependency

Thomas Perale thomas.perale at mind.be
Fri Sep 4 12:18:36 UTC 2026


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 at 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 at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot


More information about the buildroot mailing list