Skip to contentSkip to conversation

package/gdb: link with libatomic if needed

PATCH Applied Bernd Kuhls 2 participants 10 messages May 3 – Jul 26 1 message not in the archive RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/gdb: link with libatomic if needed

Fixes:
gdb-14.2: https://autobuild.buildroot.net/results/32f/32f5715285ca46370df2ab35c38d16dbdbde5d21/
gdb-15.2: https://autobuild.buildroot.net/results/386/38645389cc5fdb1d5fdfa5d6f6eef417a975ea41/

Support for gdb 14.x was added to buildroot with commit a9a56ab6fd98125ca09078bdeb7c8d55d53aa35e so a backport to LTS branches should be considered.

---
 package/gdb/gdb.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/gdb/gdb.mk +8 -0
index 1841002dc1..2a2fdb260d 100644
@@ -116,6 +116,14 @@ GDB_MAKE_ENV += \
 GDB_CONF_ENV += gdb_cv_prfpregset_t_broken=no
 GDB_MAKE_ENV += gdb_cv_prfpregset_t_broken=no
 
+GDB_LDFLAGS = $(TARGET_LDFLAGS)
+# Uses __atomic_compare_exchange_1
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GDB_LDFLAGS += -latomic
+endif
+GDB_CONF_ENV += \
+	LDFLAGS="$(GDB_LDFLAGS)"
+
 # We want the built-in libraries of gdb (libbfd, libopcodes) to be
 # built and linked statically, as we do not install them on the
 # target, to not clash with the ones potentially installed by
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/4 package/gdb: add support for GDB 17.1

All patches that were applicable to GDB 16.1 are also applicable to GDB 17.1. Rebased patch 0005. Added upstream patch 0010 to fix build error with musl and upstream patch 0011 to fix build error on sparc.

Details about the 17.1 release:

https://sourceware.org/gdb/download/ANNOUNCEMENT

---
 .checkpackageignore                           |   9 ++
 ...e-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch |  55 +++++++++
 ...-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch |  43 ++++++++
 package/gdb/17.1/0003-use-asm-sgidefs.h.patch |  40 +++++++
 .../0004-gdbserver-fix-build-for-m68k.patch   |  64 +++++++++++
 ...fork-inferior-include-linux-ptrace.h.patch |  55 +++++++++
 ...getrandom-compile-for-uclibc-v1.0.35.patch |  39 +++++++
 .../17.1/0007-fix-musl-build-on-riscv.patch   |  60 ++++++++++
 ...-gdbserver-Makefile.in-fix-NLS-build.patch |  38 +++++++
 .../0009-gdb-Fix-native-build-on-xtensa.patch |  57 ++++++++++
 ...-musl-build-failure-when-setting-cus.patch | 104 ++++++++++++++++++
 ...k-around-conflicting-types-for-tcfla.patch |  77 +++++++++++++
 package/gdb/Config.in.host                    |   7 +-
 package/gdb/gdb.hash                          |   1 +
 14 files changed, 648 insertions(+), 1 deletion(-)
 create mode 100644 package/gdb/17.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
 create mode 100644 package/gdb/17.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch
 create mode 100644 package/gdb/17.1/0003-use-asm-sgidefs.h.patch
 create mode 100644 package/gdb/17.1/0004-gdbserver-fix-build-for-m68k.patch
 create mode 100644 package/gdb/17.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch
 create mode 100644 package/gdb/17.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch
 create mode 100644 package/gdb/17.1/0007-fix-musl-build-on-riscv.patch
 create mode 100644 package/gdb/17.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch
 create mode 100644 package/gdb/17.1/0009-gdb-Fix-native-build-on-xtensa.patch
 create mode 100644 package/gdb/17.1/0010-gdb-ser-unix-fix-musl-build-failure-when-setting-cus.patch
 create mode 100644 package/gdb/17.1/0011-gdb-ser-unix-work-around-conflicting-types-for-tcfla.patch
.checkpackageignore +9 -0
index b2d5320045..0799b0ad7a 100644
@@ -390,6 +390,15 @@ package/gdb/16.3/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch lib_patch.U
 package/gdb/16.3/0007-fix-musl-build-on-riscv.patch lib_patch.Upstream
 package/gdb/16.3/0008-gdbserver-Makefile.in-fix-NLS-build.patch lib_patch.Upstream
 package/gdb/16.3/0009-gdb-Fix-native-build-on-xtensa.patch lib_patch.Upstream
+package/gdb/17.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch lib_patch.Upstream
+package/gdb/17.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch lib_patch.Upstream
+package/gdb/17.1/0003-use-asm-sgidefs.h.patch lib_patch.Upstream
+package/gdb/17.1/0004-gdbserver-fix-build-for-m68k.patch lib_patch.Upstream
+package/gdb/17.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch lib_patch.Upstream
+package/gdb/17.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch lib_patch.Upstream
+package/gdb/17.1/0007-fix-musl-build-on-riscv.patch lib_patch.Upstream
+package/gdb/17.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch lib_patch.Upstream
+package/gdb/17.1/0009-gdb-Fix-native-build-on-xtensa.patch lib_patch.Upstream
 package/genpart/0001-fix-return-code.patch lib_patch.Upstream
 package/gensio/0001-Fix-missing-EVP_PKEY_ED25519-build-error-on-libressl.patch lib_patch.Upstream
 package/gerbera/S99gerbera lib_sysv.Indent
package/gdb/17.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch new file +55 -0

55 lines not on this page · raw message

package/gdb/17.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch new file +43 -0

43 lines not on this page · raw message

package/gdb/17.1/0003-use-asm-sgidefs.h.patch new file +40 -0
new file mode 100644
index 0000000000..b36d3730de
@@ -0,0 +1,40 @@
+From aa66834f88463c23a641c12e967bce68799cda47 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <[email protected]>
+Date: Sat, 30 Apr 2016 15:29:06 -0700
+Subject: [PATCH] use <asm/sgidefs.h>
+
+Build fix for MIPS with musl libc
+
+The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
+but not by musl. Regardless of the libc, the kernel headers provide
+<asm/sgidefs.h> which provides the same definitions, so use that
+instead.
+
+Upstream-Status: Pending
+
+[Vincent:
+Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070]
+
+Signed-off-by: Andre McCurdy <[email protected]>
+Signed-off-by: Khem Raj <[email protected]>
+Signed-off-by: Vicente Olivert Riera <[email protected]>
+---
+ gdb/mips-linux-nat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
+index 3d072ea935c..d763c9b8f7e 100644
+--- a/gdb/mips-linux-nat.c
++++ b/gdb/mips-linux-nat.c
+@@ -30,7 +30,7 @@
+ #include "gdb_proc_service.h"
+ #include "gregset.h"
+ 
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+ #include "nat/gdb_ptrace.h"
+ #include <asm/ptrace.h>
+ #include "inf-ptrace.h"
+-- 
+2.48.1
+
package/gdb/17.1/0004-gdbserver-fix-build-for-m68k.patch new file +64 -0

64 lines not on this page · raw message

package/gdb/17.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch new file +55 -0

55 lines not on this page · raw message

package/gdb/17.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch new file +39 -0
new file mode 100644
index 0000000000..6d205279da
@@ -0,0 +1,39 @@
+From 95d6a5a844083585f4f7b235cba14be94595b04a Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Sat, 6 Nov 2021 10:06:25 +0100
+Subject: [PATCH] Fix getrandom compile for uclibc < v1.0.35
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+- fix getrandom compile for uclibc < v1.0.35, add missing stddef.h
+  include (fixed in uclibc since v1.0.35, see [1])
+
+Fixes:
+
+  .../host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35: error: unknown type name ‘size_t’
+     27 | extern int getrandom(void *__buf, size_t count, unsigned int flags)
+        |                                   ^~~~~~
+
+[1] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=00972c02c2b6e0a95d5def4a71bdfb188e091782t
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ gnulib/import/getrandom.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gnulib/import/getrandom.c b/gnulib/import/getrandom.c
+index e1468730933..3948d8d552a 100644
+--- a/gnulib/import/getrandom.c
++++ b/gnulib/import/getrandom.c
+@@ -19,6 +19,7 @@
+ 
+ #include <config.h>
+ 
++#include <stddef.h>
+ #include <sys/random.h>
+ 
+ #include <errno.h>
+-- 
+2.48.1
+
package/gdb/17.1/0007-fix-musl-build-on-riscv.patch new file +60 -0

60 lines not on this page · raw message

package/gdb/17.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch new file +38 -0
new file mode 100644
index 0000000000..10156407cb
@@ -0,0 +1,38 @@
+From e5a09ecd2a222168a6c58eb57a171f64e75ad053 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Thu, 18 Nov 2021 22:52:08 +0100
+Subject: [PATCH] gdbserver/Makefile.in: fix NLS build
+
+Fix the following build failure raised since gdb version 10.1 and
+https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a665d62266e75f0519f3a663784c458885b5c63:
+
+  CXXLD  libinproctrace.so
+/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/9.3.0/../../../../i586-buildroot-linux-musl/bin/ld: gdbsupport/tdesc-ipa.o: in function `print_xml_feature::visit(tdesc_type_builtin const*)':
+/home/buildroot/autobuild/instance-2/output-1/build/gdb-10.2/build/gdbserver/../../gdbserver/../gdbsupport/tdesc.cc:310: undefined reference to `libintl_gettext'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/faacc874fe9d32b74cb3d3dea988ef661cb0e3d0
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status:
+https://sourceware.org/pipermail/gdb-patches/2021-November/183580.html]
+---
+ gdbserver/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
+index 365dcf23650..42e1b7bcf6d 100644
+--- a/gdbserver/Makefile.in
++++ b/gdbserver/Makefile.in
+@@ -407,7 +407,7 @@ $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
+ 	$(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
+ 		-Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
+ 		 $(CXXFLAGS) \
+-		-o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread
++		-o $(IPA_LIB) ${IPA_OBJS} $(LIBIBERTY_FOR_SHLIB) -ldl -pthread $(INTL)
+ 
+ # Put the proper machine-specific files first, so M-. on a machine
+ # specific routine gets the one for the correct machine.
+-- 
+2.48.1
+
package/gdb/17.1/0009-gdb-Fix-native-build-on-xtensa.patch new file +57 -0

57 lines not on this page · raw message

package/gdb/17.1/0010-gdb-ser-unix-fix-musl-build-failure-when-setting-cus.patch new file +104 -0

104 lines not on this page · raw message

package/gdb/17.1/0011-gdb-ser-unix-work-around-conflicting-types-for-tcfla.patch new file +77 -0

77 lines not on this page · raw message

package/gdb/Config.in.host +6 -1
index 963c46129d..a2caa3d58a 100644
@@ -61,7 +61,11 @@ config BR2_GDB_VERSION_16
 	bool "gdb 16.x"
 	depends on BR2_HOST_GCC_AT_LEAST_9 && BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
-comment "gdb 15.x/16.x need host and target gcc >= 9"
+config BR2_GDB_VERSION_17
+	bool "gdb 17.x"
+	depends on BR2_HOST_GCC_AT_LEAST_9 && BR2_TOOLCHAIN_GCC_AT_LEAST_9
+
+comment "gdb 15.x/16.x/17.x need host and target gcc >= 9"
 	depends on !BR2_HOST_GCC_AT_LEAST_9 || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
@@ -76,4 +80,5 @@ config BR2_GDB_VERSION
 	default "14.2"     if BR2_GDB_VERSION_14 || (!BR2_PACKAGE_HOST_GDB && !BR2_TOOLCHAIN_GCC_AT_LEAST_9)
 	default "15.2"	   if BR2_GDB_VERSION_15 || (!BR2_PACKAGE_HOST_GDB && BR2_TOOLCHAIN_GCC_AT_LEAST_9)
 	default "16.3"	   if BR2_GDB_VERSION_16
+	default "17.1"	   if BR2_GDB_VERSION_17
 	depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
package/gdb/gdb.hash +1 -0
index 7844b765e6..e2a250c0c7 100644
@@ -2,6 +2,7 @@
 sha512  7e07941f1fe661288cc571b4964012ceabc1760624fce20320db2f470c01439b2386f859b5288da13204b758e2e3b22a74c68c012178db93b9529b06f1e22ede  gdb-14.2.tar.xz
 sha512  624007deceb5b15ba89c0725883d1a699fa46714ef30887f3d0165e17c5d65d634671740a135aa69e437d916218abb08cfa2a38ed309ff19d48f51da56b2a8ba  gdb-15.2.tar.xz
 sha512  fffd6689c3405466a179670b04720dc825e4f210a761f63dd2b33027432f8cd5d1c059c431a5ec9e165eedd1901220b5329d73c522f9a444788888c731b29e9c  gdb-16.3.tar.xz
+sha512  f1a6751e439a2128fecf3eae8b57c1608a0dc7cfe79b4356a937874e5a42bb2df0aba36eb6a9452c41966908b9a59076c7cad9720f684688ab956b65080f1d7c  gdb-17.1.tar.xz
 
 # Locally calculated (fetched from Github)
 sha512  a909a687abf6e9623c7ec99a8b2cbb03ab6fdeccee9ebd33ce34fffdb2bed5e4d519113aeb29ba3ca8db52e9bdbb63b59973914c74e3eebf4a4a2a6033b9e784  gdb-arc-2024.12-release-gdb.tar.gz
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/4] package/gdb: add support for GDB 17.1

Quoted 9 lines · Bernd Kuhls

All patches that were applicable to GDB 16.1 are also applicable to GDB 17.1. Rebased patch 0005. Added upstream patch 0010 to fix build error with musl and upstream patch 0011 to fix build error on sparc.

Details about the 17.1 release:

https://sourceware.org/gdb/download/ANNOUNCEMENT

Applied to master, thanks.

Quoted 35 lines
---
  .checkpackageignore                           |   9 ++
  ...e-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch |  55 +++++++++
  ...-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch |  43 ++++++++
  package/gdb/17.1/0003-use-asm-sgidefs.h.patch |  40 +++++++
  .../0004-gdbserver-fix-build-for-m68k.patch   |  64 +++++++++++
  ...fork-inferior-include-linux-ptrace.h.patch |  55 +++++++++
  ...getrandom-compile-for-uclibc-v1.0.35.patch |  39 +++++++
  .../17.1/0007-fix-musl-build-on-riscv.patch   |  60 ++++++++++
  ...-gdbserver-Makefile.in-fix-NLS-build.patch |  38 +++++++
  .../0009-gdb-Fix-native-build-on-xtensa.patch |  57 ++++++++++
  ...-musl-build-failure-when-setting-cus.patch | 104 ++++++++++++++++++
  ...k-around-conflicting-types-for-tcfla.patch |  77 +++++++++++++
  package/gdb/Config.in.host                    |   7 +-
  package/gdb/gdb.hash                          |   1 +
  14 files changed, 648 insertions(+), 1 deletion(-)

create mode 100644 package/gdb/17.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch create mode 100644 package/gdb/17.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch create mode 100644 package/gdb/17.1/0003-use-asm-sgidefs.h.patch
create mode 100644 package/gdb/17.1/0004-gdbserver-fix-build-for-m68k.patch
create mode 100644 package/gdb/17.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch create mode 100644 package/gdb/17.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch create mode 100644 package/gdb/17.1/0007-fix-musl-build-on-riscv.patch
create mode 100644 package/gdb/17.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch create mode 100644 package/gdb/17.1/0009-gdb-Fix-native-build-on-xtensa.patch create mode 100644 package/gdb/17.1/0010-gdb-ser-unix-fix-musl-build-failure-when-setting-cus.patch create mode 100644 package/gdb/17.1/0011-gdb-ser-unix-work-around-conflicting-types-for-tcfla.patch

.checkpackageignore +0 -0
index b2d5320045..0799b0ad7a 100644
@@ -390,6 +390,15 @@ package/gdb/16.3/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch lib_patch.U
  package/gdb/16.3/0007-fix-musl-build-on-riscv.patch lib_patch.Upstream
  package/gdb/16.3/0008-gdbserver-Makefile.in-fix-NLS-build.patch lib_patch.Upstream

.checkpackageignore package/gdb/16.3/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch lib_patch.U · line 401

Quoted 10 lines
.checkpackageignore +9 -0
  package/gdb/16.3/0009-gdb-Fix-native-build-on-xtensa.patch lib_patch.Upstream
+package/gdb/17.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch lib_patch.Upstream
+package/gdb/17.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch lib_patch.Upstream
+package/gdb/17.1/0003-use-asm-sgidefs.h.patch lib_patch.Upstream
+package/gdb/17.1/0004-gdbserver-fix-build-for-m68k.patch lib_patch.Upstream
+package/gdb/17.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch lib_patch.Upstream
+package/gdb/17.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch lib_patch.Upstream
+package/gdb/17.1/0007-fix-musl-build-on-riscv.patch lib_patch.Upstream
+package/gdb/17.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch lib_patch.Upstream
+package/gdb/17.1/0009-gdb-Fix-native-build-on-xtensa.patch lib_patch.Upstream

Any chance of trying to get (some of) these patches upstream?

Regards,
Arnout

.checkpackageignore package/gdb/16.3/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch lib_patch.U · line 404

Quoted 3 lines
.checkpackageignore +0 -0
  package/genpart/0001-fix-return-code.patch lib_patch.Upstream
  package/gensio/0001-Fix-missing-EVP_PKEY_ED25519-build-error-on-libressl.patch lib_patch.Upstream
  package/gerbera/S99gerbera lib_sysv.Indent

[snip]
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

PATCH 3/4 package/gdb: change the default to GDB 16.x

In reply to Bernd Kuhls
---
 package/gdb/Config.in.host | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/gdb/Config.in.host +3 -3
index a2caa3d58a..fe639a4019 100644
@@ -41,7 +41,7 @@ config BR2_PACKAGE_HOST_GDB_SIM
 
 choice
 	prompt "GDB debugger Version"
-	default BR2_GDB_VERSION_15 if !BR2_arc
+	default BR2_GDB_VERSION_16 if !BR2_arc
 	default BR2_GDB_VERSION_ARC if BR2_arc
 	help
 	  Select the version of gdb you wish to use.
@@ -78,7 +78,7 @@ config BR2_GDB_VERSION
 	string
 	default "arc-2024.12-release-gdb" if BR2_GDB_VERSION_ARC || (!BR2_PACKAGE_HOST_GDB && BR2_arc)
 	default "14.2"     if BR2_GDB_VERSION_14 || (!BR2_PACKAGE_HOST_GDB && !BR2_TOOLCHAIN_GCC_AT_LEAST_9)
-	default "15.2"	   if BR2_GDB_VERSION_15 || (!BR2_PACKAGE_HOST_GDB && BR2_TOOLCHAIN_GCC_AT_LEAST_9)
-	default "16.3"	   if BR2_GDB_VERSION_16
+	default "15.2"	   if BR2_GDB_VERSION_15
+	default "16.3"	   if BR2_GDB_VERSION_16 || (!BR2_PACKAGE_HOST_GDB && BR2_TOOLCHAIN_GCC_AT_LEAST_9)
 	default "17.1"	   if BR2_GDB_VERSION_17
 	depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Re: [Buildroot] [PATCH 3/4] package/gdb: change the default to GDB 16.x

Quoted 1 line · Bernd Kuhls

Applied to master, thanks.

Regards,
Arnout

Quoted 18 lines
---
  package/gdb/Config.in.host | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
package/gdb/Config.in.host +1 -1
index a2caa3d58a..fe639a4019 100644
@@ -41,7 +41,7 @@ config BR2_PACKAGE_HOST_GDB_SIM
 
  choice
  	prompt "GDB debugger Version"
-	default BR2_GDB_VERSION_15 if !BR2_arc
+	default BR2_GDB_VERSION_16 if !BR2_arc
  	default BR2_GDB_VERSION_ARC if BR2_arc
  	help
  	  Select the version of gdb you wish to use.

package/gdb/Config.in.host config BR2_GDB_VERSION · line 84

Quoted 9 lines
package/gdb/Config.in.host +2 -2
@@ -78,7 +78,7 @@ config BR2_GDB_VERSION
  	string
  	default "arc-2024.12-release-gdb" if BR2_GDB_VERSION_ARC || (!BR2_PACKAGE_HOST_GDB && BR2_arc)
  	default "14.2"     if BR2_GDB_VERSION_14 || (!BR2_PACKAGE_HOST_GDB && !BR2_TOOLCHAIN_GCC_AT_LEAST_9)
-	default "15.2"	   if BR2_GDB_VERSION_15 || (!BR2_PACKAGE_HOST_GDB && BR2_TOOLCHAIN_GCC_AT_LEAST_9)
-	default "16.3"	   if BR2_GDB_VERSION_16
+	default "15.2"	   if BR2_GDB_VERSION_15
+	default "16.3"	   if BR2_GDB_VERSION_16 || (!BR2_PACKAGE_HOST_GDB && BR2_TOOLCHAIN_GCC_AT_LEAST_9)
  	default "17.1"	   if BR2_GDB_VERSION_17
  	depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw

PATCH 4/4 package/gdb: hide version choice for 14.x for gcc/host-gcc >= 10

In reply to Bernd Kuhls

We need to keep GDB 14.x for setups which use gcc <= 9.

---
 package/gdb/Config.in.host | 1 +
 1 file changed, 1 insertion(+)
package/gdb/Config.in.host +1 -0
index fe639a4019..172446c70a 100644
@@ -52,6 +52,7 @@ config BR2_GDB_VERSION_ARC
 
 config BR2_GDB_VERSION_14
 	bool "gdb 14.x"
+	depends on !BR2_HOST_GCC_AT_LEAST_10 && !BR2_TOOLCHAIN_GCC_AT_LEAST_10
 
 config BR2_GDB_VERSION_15
 	bool "gdb 15.x"
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

Re: [Buildroot] [PATCH 4/4] package/gdb: hide version choice for 14.x for gcc/host-gcc >= 10

Quoted 3 lines · Bernd Kuhls

We need to keep GDB 14.x for setups which use gcc <= 9.

We don't want to keep on dragging this old stuff around. Just require GCC 9
for gdb entirely. That allows us to drop all of those somewhat brittle dependencies.

Regards,
Arnout

Quoted 9 lines
---
  package/gdb/Config.in.host | 1 +
  1 file changed, 1 insertion(+)
package/gdb/Config.in.host +0 -0
index fe639a4019..172446c70a 100644

package/gdb/Config.in.host config BR2_GDB_VERSION_ARC · line 58

Quoted 7 lines
package/gdb/Config.in.host +1 -0
@@ -52,6 +52,7 @@ config BR2_GDB_VERSION_ARC
 
  config BR2_GDB_VERSION_14
  	bool "gdb 14.x"
+	depends on !BR2_HOST_GCC_AT_LEAST_10 && !BR2_TOOLCHAIN_GCC_AT_LEAST_10
 
  config BR2_GDB_VERSION_15
  	bool "gdb 15.x"

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

A message that is not in the archive (sent off-list or not yet received): 410696ed-2c91-4d32-bebe-d437e0a187b3__36894.8651057266$1780145198$gmane$org@rnout.be

#8 lore raw

Re: [Buildroot] [PATCH 4/4] package/gdb: hide version choice for 14.x for gcc/host-gcc >= 10

Am Sat, 30 May 2026 12:34:55 +0200 schrieb Arnout Vandecappelle via buildroot:

Quoted 4 lines

We don't want to keep on dragging this old stuff around. Just require GCC 9
for gdb entirely. That allows us to drop all of those somewhat brittle dependencies.

Hi Arnout,

done: https://patchwork.ozlabs.org/project/buildroot/patch/
[email protected]/

Regards, Bernd

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#9 lore raw
In reply to Bernd Kuhls
Quoted 9 lines · Bernd Kuhls

Fixes:
gdb-14.2: https://autobuild.buildroot.net/results/32f/32f5715285ca46370df2ab35c38d16dbdbde5d21/
gdb-15.2: https://autobuild.buildroot.net/results/386/38645389cc5fdb1d5fdfa5d6f6eef417a975ea41/

Support for gdb 14.x was added to buildroot with commit a9a56ab6fd98125ca09078bdeb7c8d55d53aa35e so a backport to LTS branches should be considered.

Applied to master, thanks.

It's a little bit annoying for us to have such mixed master/next series. We
don't like to leave a series on patchwork where patch 1/4 is missing (because already applied) because it then requires extra effort to understand where that first patch went. Basically, if a series is not entirely applied, the non-applied part should be marked as Changes Requested (or Rejected).

But the rest of the series actually looks good, so this kind of forces me to
switch to next and apply it as well.

Of course, I do understand you want it as one series, because you only tested
anything with this patch included as well. I have no good solution for that, other than perhaps an additional comment in the series for next that explains that it depends on this other patch which is for master. Or I just have to live with the annoyance :-)

Regards,
Arnout

Quoted 13 lines
---
  package/gdb/gdb.mk | 8 ++++++++
  1 file changed, 8 insertions(+)
package/gdb/gdb.mk +1 -0
index 1841002dc1..2a2fdb260d 100644
@@ -116,6 +116,14 @@ GDB_MAKE_ENV += \
  GDB_CONF_ENV += gdb_cv_prfpregset_t_broken=no
  GDB_MAKE_ENV += gdb_cv_prfpregset_t_broken=no
 
+GDB_LDFLAGS = $(TARGET_LDFLAGS)

package/gdb/gdb.mk GDB_MAKE_ENV += \ · line 129

Quoted 10 lines
package/gdb/gdb.mk +7 -0
+# Uses __atomic_compare_exchange_1
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GDB_LDFLAGS += -latomic
+endif
+GDB_CONF_ENV += \
+	LDFLAGS="$(GDB_LDFLAGS)"
+
  # We want the built-in libraries of gdb (libbfd, libopcodes) to be
  # built and linked statically, as we do not install them on the
  # target, to not clash with the ones potentially installed by

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#10 lore raw
In reply to Bernd Kuhls

In reply of:

Quoted 9 lines

Fixes:
gdb-14.2: https://autobuild.buildroot.net/results/32f/32f5715285ca46370df2ab35c38d16dbdbde5d21/
gdb-15.2: https://autobuild.buildroot.net/results/386/38645389cc5fdb1d5fdfa5d6f6eef417a975ea41/

Support for gdb 14.x was added to buildroot with commit a9a56ab6fd98125ca09078bdeb7c8d55d53aa35e so a backport to LTS branches should be considered.

Applied to 2025.02.x & 2026.02.x. Thanks

Quoted 30 lines
---
 package/gdb/gdb.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/gdb/gdb.mk +8 -0
index 1841002dc1..2a2fdb260d 100644
@@ -116,6 +116,14 @@ GDB_MAKE_ENV += \
 GDB_CONF_ENV += gdb_cv_prfpregset_t_broken=no
 GDB_MAKE_ENV += gdb_cv_prfpregset_t_broken=no
 
+GDB_LDFLAGS = $(TARGET_LDFLAGS)
+# Uses __atomic_compare_exchange_1
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GDB_LDFLAGS += -latomic
+endif
+GDB_CONF_ENV += \
+	LDFLAGS="$(GDB_LDFLAGS)"
+
 # We want the built-in libraries of gdb (libbfd, libopcodes) to be
 # built and linked statically, as we do not install them on the
 # target, to not clash with the ones potentially installed by
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot