All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 2/2] package/gdb: handle xxhash optional dependency
Date: Mon, 24 Aug 2026 23:33:14 +0200	[thread overview]
Message-ID: <20260824213315.3323882-2-thomas.petazzoni@bootlin.com> (raw)
In-Reply-To: <20260824213315.3323882-1-thomas.petazzoni@bootlin.com>

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

  reply	other threads:[~2026-08-24 21:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-08-25 11:49   ` [Buildroot] [PATCH 2/2] package/gdb: handle xxhash optional dependency 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260824213315.3323882-2-thomas.petazzoni@bootlin.com \
    --to=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.