From patchwork Sun Dec 24 16:08:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1879974 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SymF43bytz1ydb for ; Mon, 25 Dec 2023 03:09:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A8A6C403E7; Sun, 24 Dec 2023 16:09:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A8A6C403E7 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id abcMoFfgY44j; Sun, 24 Dec 2023 16:09:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 9A2B04049A; Sun, 24 Dec 2023 16:09:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9A2B04049A X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 036F61BF275 for ; Sun, 24 Dec 2023 16:08:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id CDD1340490 for ; Sun, 24 Dec 2023 16:08:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org CDD1340490 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GvtYjX3sKXEc for ; Sun, 24 Dec 2023 16:08:37 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by smtp2.osuosl.org (Postfix) with ESMTPS id 7FA26403E7 for ; Sun, 24 Dec 2023 16:08:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7FA26403E7 Received: by mail.gandi.net (Postfix) with ESMTPA id 1BF42C0002; Sun, 24 Dec 2023 16:08:32 +0000 (UTC) To: buildroot@buildroot.org Date: Sun, 24 Dec 2023 17:08:27 +0100 Message-ID: <20231224160831.871650-1-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-GND-Sasl: thomas.petazzoni@bootlin.com X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1703434113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xiemXoayfMGTR6Dzp26vusoeS8t+4BUQtI/qiZpAAX0=; b=hIwL8J7n0/3EwTcY4rDV7JKctqRP3RvBk2Q69KNcci/lYAqv1faCnMfCKwgrBy9+hiAFWT q62/zb0/h1BYzuOxzzBRVa3/qANg7Q05AACFDDGtoZdESvb8Eq8v3qUDtjv2w+uh4cWpNZ l9s8AG4Xvol3ll4Py8DAS7+sMjIWwEF7Fz1FpDRz1C1mtpNzb0mgPUrOizr+RiY4dKxlt2 fHfot1Bj8ZtylCVZ4hvlKlJK56DL4jyLO4VDJQEfGw3N5AzwhJnT+1obpIrKh+KO9B/z/F L9PcxORh7sjI7gli6HorGkHrlUf7oxrYaDmxoMqNR619A9+hWBhGBxEyJww8tQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=hIwL8J7n Subject: [Buildroot] [PATCH 1/3] package/gdb: add support for GDB 14.1 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" All patches are still relevant, and have been rebased on top of GDB 14.1. GDB 14.1 now needs mpfr unconditionally, so it is added as a dependency of host-gdb, and of gdb when the full debugger is built. Signed-off-by: Thomas Petazzoni --- .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/14.1/0003-use-asm-sgidefs.h.patch | 40 ++++++++++++ .../0004-gdbserver-fix-build-for-m68k.patch | 63 +++++++++++++++++++ ...fork-inferior-include-linux-ptrace.h.patch | 53 ++++++++++++++++ ...getrandom-compile-for-uclibc-v1.0.35.patch | 39 ++++++++++++ .../14.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 +++++++++++++++++ package/gdb/Config.in | 1 + package/gdb/Config.in.host | 4 ++ package/gdb/gdb.hash | 1 + package/gdb/gdb.mk | 19 +++++- 14 files changed, 480 insertions(+), 2 deletions(-) create mode 100644 package/gdb/14.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch create mode 100644 package/gdb/14.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch create mode 100644 package/gdb/14.1/0003-use-asm-sgidefs.h.patch create mode 100644 package/gdb/14.1/0004-gdbserver-fix-build-for-m68k.patch create mode 100644 package/gdb/14.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch create mode 100644 package/gdb/14.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch create mode 100644 package/gdb/14.1/0007-fix-musl-build-on-riscv.patch create mode 100644 package/gdb/14.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch create mode 100644 package/gdb/14.1/0009-gdb-Fix-native-build-on-xtensa.patch diff --git a/.checkpackageignore b/.checkpackageignore index 0868593a92..06f087f5f0 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -485,6 +485,15 @@ package/gdb/13.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch Upstream package/gdb/13.2/0007-fix-musl-build-on-riscv.patch Upstream package/gdb/13.2/0008-gdbserver-Makefile.in-fix-NLS-build.patch Upstream package/gdb/13.2/0009-gdb-Fix-native-build-on-xtensa.patch Upstream +package/gdb/14.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch Upstream +package/gdb/14.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch Upstream +package/gdb/14.1/0003-use-asm-sgidefs.h.patch Upstream +package/gdb/14.1/0004-gdbserver-fix-build-for-m68k.patch Upstream +package/gdb/14.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch Upstream +package/gdb/14.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch Upstream +package/gdb/14.1/0007-fix-musl-build-on-riscv.patch Upstream +package/gdb/14.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch Upstream +package/gdb/14.1/0009-gdb-Fix-native-build-on-xtensa.patch Upstream package/gengetopt/0001-configure.ac-add-disable-doc-option.patch Upstream package/genpart/0001-fix-return-code.patch Upstream package/genromfs/0001-build-system.patch Sob Upstream diff --git a/package/gdb/14.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/package/gdb/14.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch new file mode 100644 index 0000000000..b213ba5a09 --- /dev/null +++ b/package/gdb/14.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch @@ -0,0 +1,55 @@ +From ee74f5a6fa98b43c45c9c56a26c00abc21aeeaa1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 6 Aug 2016 17:32:50 -0700 +Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +Signed-off-by: Thomas Petazzoni +[Rebase on gdb 8.3] +Signed-off-by: Romain Naour +--- + gdb/nat/ppc-linux.h | 6 ++++++ + gdbserver/linux-ppc-low.cc | 6 ++++++ + 2 files changed, 12 insertions(+) + +diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h +index c84f9146bbd..8c8580c95e1 100644 +--- a/gdb/nat/ppc-linux.h ++++ b/gdb/nat/ppc-linux.h +@@ -18,7 +18,13 @@ + #ifndef NAT_PPC_LINUX_H + #define NAT_PPC_LINUX_H + ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++#endif + #include ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + #include + + /* This sometimes isn't defined. */ +diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc +index 86fbc8f5d96..8a1a39bc750 100644 +--- a/gdbserver/linux-ppc-low.cc ++++ b/gdbserver/linux-ppc-low.cc +@@ -23,7 +23,13 @@ + #include "elf/common.h" + #include + #include ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++#endif + #include ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + + #include "arch/ppc-linux-common.h" + #include "arch/ppc-linux-tdesc.h" +-- +2.43.0 + diff --git a/package/gdb/14.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch b/package/gdb/14.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch new file mode 100644 index 0000000000..b070c4fc05 --- /dev/null +++ b/package/gdb/14.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch @@ -0,0 +1,43 @@ +From 57b2606e39b2ac90a3810baccbd73161ffdb5f2d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 3 Jun 2017 21:23:52 +0200 +Subject: [PATCH] sh/ptrace: Define pt_{dsp,}regs uapi_pt_{dsp,}regs on !GLIBC + systems + +Fixes a pt_{dsp,}regs redefinition when building with the musl C library +on SuperH. + +Inspired by +http://git.yoctoproject.org/clean/cgit.cgi/poky/plain/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch, +adapted for SuperH. + +Signed-off-by: Thomas Petazzoni +[Rebase on gdb 8.0] +Signed-off-by: Romain Naour +--- + gdbserver/linux-sh-low.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/gdbserver/linux-sh-low.cc b/gdbserver/linux-sh-low.cc +index 782b8292010..e42f29b845a 100644 +--- a/gdbserver/linux-sh-low.cc ++++ b/gdbserver/linux-sh-low.cc +@@ -76,7 +76,15 @@ extern const struct target_desc *tdesc_sh; + #include + #endif + ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++# define pt_dspregs uapi_pt_dspregs ++#endif + #include ++#if !defined(__GLIBC__) ++# undef pt_regs ++# undef pt_dspregs ++#endif + + #define sh_num_regs 41 + +-- +2.43.0 + diff --git a/package/gdb/14.1/0003-use-asm-sgidefs.h.patch b/package/gdb/14.1/0003-use-asm-sgidefs.h.patch new file mode 100644 index 0000000000..12f0885b34 --- /dev/null +++ b/package/gdb/14.1/0003-use-asm-sgidefs.h.patch @@ -0,0 +1,40 @@ +From 5288e2a3dcb2928e1367cd1d4c31da3b8310f3a0 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Sat, 30 Apr 2016 15:29:06 -0700 +Subject: [PATCH] use + +Build fix for MIPS with musl libc + +The MIPS specific header is provided by glibc and uclibc +but not by musl. Regardless of the libc, the kernel headers provide + 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 +Signed-off-by: Khem Raj +Signed-off-by: Vicente Olivert Riera +--- + 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 8a7cc95f2a4..3686f43abfd 100644 +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include "nat/gdb_ptrace.h" + #include + #include "inf-ptrace.h" +-- +2.43.0 + diff --git a/package/gdb/14.1/0004-gdbserver-fix-build-for-m68k.patch b/package/gdb/14.1/0004-gdbserver-fix-build-for-m68k.patch new file mode 100644 index 0000000000..21509b3283 --- /dev/null +++ b/package/gdb/14.1/0004-gdbserver-fix-build-for-m68k.patch @@ -0,0 +1,63 @@ +From 5e352184c2fc696c5b7aff1985098c460686a638 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 22 Jun 2018 22:40:26 +0200 +Subject: [PATCH] gdbserver: fix build for m68k +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +As for strace [1], when is included after , +the build fails on m68k with the following diagnostics: + +In file included from ./../nat/linux-ptrace.h:28:0, + from linux-low.h:27, + from linux-m68k-low.c:20: +[...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant + PT_D1 = 0, + ^ +[...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant +[...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant +In file included from linux-m68k-low.c:27:0: +[...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token + }; + ^ + +Fix this by moving on top of "linux-low.h". + +[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92 + +Signed-off-by: Romain Naour +--- + gdbserver/linux-m68k-low.cc | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/gdbserver/linux-m68k-low.cc b/gdbserver/linux-m68k-low.cc +index 6094fd914f5..3613d9f642a 100644 +--- a/gdbserver/linux-m68k-low.cc ++++ b/gdbserver/linux-m68k-low.cc +@@ -17,6 +17,11 @@ + along with this program. If not, see . */ + + #include "server.h" ++ ++#ifdef HAVE_SYS_REG_H ++#include ++#endif ++ + #include "linux-low.h" + + /* Linux target op definitions for the m68k architecture. */ +@@ -80,10 +85,6 @@ m68k_target::low_decr_pc_after_break () + void init_registers_m68k (void); + extern const struct target_desc *tdesc_m68k; + +-#ifdef HAVE_SYS_REG_H +-#include +-#endif +- + #define m68k_num_regs 29 + #define m68k_num_gregs 18 + +-- +2.43.0 + diff --git a/package/gdb/14.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch b/package/gdb/14.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch new file mode 100644 index 0000000000..43ed3778ca --- /dev/null +++ b/package/gdb/14.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch @@ -0,0 +1,53 @@ +From 3e55ad5448f5379e3d7e079f17a18904e905cebf Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 24 Jun 2018 23:33:55 +0200 +Subject: [PATCH] nat/fork-inferior: include linux-ptrace.h + +To decide whether fork() or vfork() should be used, fork-inferior.c +uses the following test: + + #if !(defined(__UCLIBC__) && defined(HAS_NOMMU)) + +However, HAS_NOMMU is never defined, because it gets defined in +linux-ptrace.h, which is not included by fork-inferior.c. Due to this, +gdbserver fails to build on noMMU architectures. This commit fixes +that by simply including linux-ptrace.h. + +This bug was introduced by commit +2090129c36c7e582943b7d300968d19b46160d84 ("Share fork_inferior et al +with gdbserver"). Indeed, the same fork()/vfork() selection was done, +but in another file where linux-ptrace.h was included. + +Fixes the following build issue: + +../nat/fork-inferior.c: In function 'pid_t fork_inferior(const char*, const string&, char**, void (*)(), void (*)(int), void (*)(), const char*, void (*)(const char*, char* const*, char* const*))': +../nat/fork-inferior.c:376:11: error: 'fork' was not declared in this scope + pid = fork (); + ^~~~ +../nat/fork-inferior.c:376:11: note: suggested alternative: 'vfork' + pid = fork (); + ^~~~ + vfork + +Signed-off-by: Thomas Petazzoni +[Romain: rebase on gdb 8.3] +Signed-off-by: Romain Naour +--- + gdb/nat/fork-inferior.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c +index 968983b2021..8ef620c7193 100644 +--- a/gdb/nat/fork-inferior.c ++++ b/gdb/nat/fork-inferior.c +@@ -27,6 +27,7 @@ + #include "gdbsupport/pathstuff.h" + #include "gdbsupport/signals-state-save-restore.h" + #include "gdbsupport/gdb_tilde_expand.h" ++#include "linux-ptrace.h" + #include + + extern char **environ; +-- +2.43.0 + diff --git a/package/gdb/14.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch b/package/gdb/14.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch new file mode 100644 index 0000000000..7fed8266df --- /dev/null +++ b/package/gdb/14.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch @@ -0,0 +1,39 @@ +From c87940ff1c2efd22c3dab9cd712531281144ed89 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +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 +--- + 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 + ++#include + #include + + #include +-- +2.43.0 + diff --git a/package/gdb/14.1/0007-fix-musl-build-on-riscv.patch b/package/gdb/14.1/0007-fix-musl-build-on-riscv.patch new file mode 100644 index 0000000000..ca6af2522f --- /dev/null +++ b/package/gdb/14.1/0007-fix-musl-build-on-riscv.patch @@ -0,0 +1,60 @@ +From f297ef653008b47fdaa4eebbccf2705f3d0996a8 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 10 Nov 2021 23:14:54 +0100 +Subject: [PATCH] fix musl build on riscv + +Fix the following build failure raised with musl: + +../../gdbserver/linux-riscv-low.cc: In function 'void riscv_fill_fpregset(regcache*, void*)': +../../gdbserver/linux-riscv-low.cc:140:19: error: 'ELF_NFPREG' was not declared in this scope; did you mean 'ELF_NGREG'? + 140 | for (i = 0; i < ELF_NFPREG - 1; i++, regbuf += flen) + | ^~~~~~~~~~ + | ELF_NGREG + +musl fixed the issue with +https://git.musl-libc.org/cgit/musl/commit/?id=e5d2823631bbfebacf48e1a34ed28f28d7cb2570 + +Fixes: + - http://autobuild.buildroot.org/results/16b19198980ce9c81a618b3f6e8dc9fe28247a28 + +Signed-off-by: Fabrice Fontaine +--- + gdb/nat/riscv-linux-tdesc.c | 5 +++++ + gdbserver/linux-riscv-low.cc | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/gdb/nat/riscv-linux-tdesc.c b/gdb/nat/riscv-linux-tdesc.c +index d676233cc31..b620aab5b72 100644 +--- a/gdb/nat/riscv-linux-tdesc.c ++++ b/gdb/nat/riscv-linux-tdesc.c +@@ -31,6 +31,11 @@ + # define NFPREG 33 + #endif + ++/* Work around musl breakage since version 1.1.24. */ ++#ifndef ELF_NFPREG ++# define ELF_NFPREG 33 ++#endif ++ + /* See nat/riscv-linux-tdesc.h. */ + + struct riscv_gdbarch_features +diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc +index 4c251bb179c..77a48ac9ee1 100644 +--- a/gdbserver/linux-riscv-low.cc ++++ b/gdbserver/linux-riscv-low.cc +@@ -30,6 +30,11 @@ + # define NFPREG 33 + #endif + ++/* Work around musl breakage since version 1.1.24. */ ++#ifndef ELF_NFPREG ++# define ELF_NFPREG 33 ++#endif ++ + /* Linux target op definitions for the RISC-V architecture. */ + + class riscv_target : public linux_process_target +-- +2.43.0 + diff --git a/package/gdb/14.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch b/package/gdb/14.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch new file mode 100644 index 0000000000..05fedfc960 --- /dev/null +++ b/package/gdb/14.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch @@ -0,0 +1,38 @@ +From 49cc0d8a7a930eab1eb8c848101150ca83145334 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +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 +[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 b597515d428..54cc7ccb0f6 100644 +--- a/gdbserver/Makefile.in ++++ b/gdbserver/Makefile.in +@@ -389,7 +389,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.43.0 + diff --git a/package/gdb/14.1/0009-gdb-Fix-native-build-on-xtensa.patch b/package/gdb/14.1/0009-gdb-Fix-native-build-on-xtensa.patch new file mode 100644 index 0000000000..10302a4bb6 --- /dev/null +++ b/package/gdb/14.1/0009-gdb-Fix-native-build-on-xtensa.patch @@ -0,0 +1,57 @@ +From 0533122983d2ac973453915cb1331b87d8d7fc0a Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 28 Aug 2022 23:21:37 +0200 +Subject: [PATCH] gdb: Fix native build on xtensa +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Apply a similar fix than for Alpha architecture on gdb 9: +https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=7a27b85f6d9b5eea9bd1493f903158fbea4b2231 + +Fixes: + +../../gdb/xtensa-linux-nat.c: In function ‘void fill_gregset(const regcache*, elf_greg_t (*)[128], int)’: +../../gdb/xtensa-linux-nat.c:66:17: error: ‘gdbarch_pc_regnum’ was not declared in this scope + 66 | if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1) + | ^~~~~~~~~~~~~~~~~ + CXX complaints.o +../../gdb/xtensa-linux-nat.c:68:17: error: ‘gdbarch_ps_regnum’ was not declared in this scope + 68 | if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1) + | ^~~~~~~~~~~~~~~~~ +../../gdb/xtensa-linux-nat.c:71:38: error: no matching function for call to ‘gdbarch_tdep::gdbarch_tdep(gdbarch*&)’ + 71 | if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1) + | ^ +In file included from ../../gdb/xtensa-linux-nat.c:38: +../../gdb/xtensa-tdep.h:160:8: note: candidate: ‘gdbarch_tdep::gdbarch_tdep()’ + 160 | struct gdbarch_tdep + | ^~~~~~~~~~~~ +../../gdb/xtensa-tdep.h:160:8: note: candidate expects 0 arguments, 1 provided +../../gdb/xtensa-tdep.h:160:8: note: candidate: ‘constexpr gdbarch_tdep::gdbarch_tdep(const gdbarch_tdep&)’ +../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from ‘gdbarch*’ to ‘const gdbarch_tdep&’ +../../gdb/xtensa-tdep.h:160:8: note: candidate: ‘constexpr gdbarch_tdep::gdbarch_tdep(gdbarch_tdep&&)’ +../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from ‘gdbarch*’ to ‘gdbarch_tdep&&’ +../../gdb/xtensa-linux-nat.c:72:49: error: no matching function for call to ‘gdbarch_tdep::gdbarch_tdep(gdbarch*&)’ + 72 | regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum, + | ^ + +Signed-off-by: Romain Naour +--- + gdb/xtensa-linux-nat.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c +index e3da3c6a7a5..61834bc28d0 100644 +--- a/gdb/xtensa-linux-nat.c ++++ b/gdb/xtensa-linux-nat.c +@@ -36,6 +36,7 @@ + + #include "gregset.h" + #include "xtensa-tdep.h" ++#include "gdbarch.h" + + /* Defines ps_err_e, struct ps_prochandle. */ + #include "gdb_proc_service.h" +-- +2.43.0 + diff --git a/package/gdb/Config.in b/package/gdb/Config.in index e4ab39a2bd..7251dce668 100644 --- a/package/gdb/Config.in +++ b/package/gdb/Config.in @@ -59,6 +59,7 @@ config BR2_PACKAGE_GDB_DEBUGGER depends on BR2_USE_WCHAR depends on !BR2_sh select BR2_PACKAGE_GMP if !BR2_arc + select BR2_PACKAGE_MPFR if BR2_GDB_VERSION_14 select BR2_PACKAGE_NCURSES select BR2_PACKAGE_ZLIB diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host index 9ba987222a..3f81883005 100644 --- a/package/gdb/Config.in.host +++ b/package/gdb/Config.in.host @@ -57,6 +57,9 @@ config BR2_GDB_VERSION_12 config BR2_GDB_VERSION_13 bool "gdb 13.x" +config BR2_GDB_VERSION_14 + bool "gdb 14.x" + endchoice endif @@ -68,4 +71,5 @@ config BR2_GDB_VERSION default "11.2" if BR2_GDB_VERSION_11 default "12.1" if BR2_GDB_VERSION_12 || !BR2_PACKAGE_HOST_GDB default "13.2" if BR2_GDB_VERSION_13 + default "14.1" if BR2_GDB_VERSION_14 depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB diff --git a/package/gdb/gdb.hash b/package/gdb/gdb.hash index ebe5647dab..ba90bff5d6 100644 --- a/package/gdb/gdb.hash +++ b/package/gdb/gdb.hash @@ -3,6 +3,7 @@ sha512 3653762ac008e065c37cd641653184c9ff7ce51ee2222ade1122bec9d6cc64dffd4fb748 sha512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127 gdb-11.2.tar.xz sha512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d gdb-12.1.tar.xz sha512 8185d3e11ab60dafff5860a5016577bfe7dd7547ef01ebc867bc247603d82b74ff74c4f29492c7d2aee57076f52be33e289f4c6b414a4b870d4b3004909f4c34 gdb-13.2.tar.xz +sha512 575e198105076fc4a88f68591aa114ab9c1196e84386a3f7b9b58fe5f30cdeed33f6a5f957b68f08c47284ec922bb60c964627e238471419673fd913575ce427 gdb-14.1.tar.xz # Locally calculated (fetched from Github) sha512 5a2acf2fd33ab2ff589e1037ca40abda54328997dcff26b2b49b874bd3be980be5a63342962254f3c3bda98e32ce7a33af704d37353352833dee193135600458 gdb-arc-2020.09-release-gdb.tar.gz diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk index 070598b385..2b50eec690 100644 --- a/package/gdb/gdb.mk +++ b/package/gdb/gdb.mk @@ -132,7 +132,6 @@ GDB_CONF_OPTS = \ --without-included-gettext \ --disable-werror \ --enable-static \ - --without-mpfr \ --disable-source-highlight ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),y) @@ -164,6 +163,15 @@ GDB_CONF_OPTS += \ GDB_DEPENDENCIES += gmp endif +# Starting from GDB 14.x, mpfr is needed as a dependency to build full +# gdb. +ifeq ($(BR2_GDB_VERSION_14)$(BR2_PACKAGE_GDB_DEBUGGER),yy) +GDB_DEPENDENCIES += mpfr +GDB_CONF_OPTS += --with-mpfr=$(STAGING_DIR) +else +GDB_CONF_OPTS += --without-mpfr +endif + ifeq ($(BR2_PACKAGE_GDB_SERVER),y) GDB_CONF_OPTS += --enable-gdbserver GDB_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES) @@ -260,10 +268,17 @@ HOST_GDB_CONF_OPTS = \ --without-included-gettext \ --with-system-zlib \ --with-curses \ - --without-mpfr \ --disable-source-highlight \ $(GDB_DISABLE_BINUTILS_CONF_OPTS) +# GDB newer than 14.x need host-mpfr +ifeq ($(BR2_GDB_VERSION_14),y) +HOST_GDB_DEPENDENCIES += host-mpfr +HOST_GDB_CONF_OPTS += --with-mpfr=$(HOST_DIR) +else +HOST_GDB_CONF_OPTS += --without-mpfr +endif + ifeq ($(BR2_PACKAGE_HOST_GDB_TUI),y) HOST_GDB_CONF_OPTS += --enable-tui else From patchwork Sun Dec 24 16:08:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1879972 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SymDZ46ycz1ydb for ; Mon, 25 Dec 2023 03:08:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9C20840470; Sun, 24 Dec 2023 16:08:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9C20840470 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rNG4ttxIXnyC; Sun, 24 Dec 2023 16:08:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id A510540481; Sun, 24 Dec 2023 16:08:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A510540481 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9FBA61BF275 for ; Sun, 24 Dec 2023 16:08:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7ECB58141A for ; Sun, 24 Dec 2023 16:08:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7ECB58141A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2aKy5Mgn0GTO for ; Sun, 24 Dec 2023 16:08:36 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by smtp1.osuosl.org (Postfix) with ESMTPS id 190E7813EE for ; Sun, 24 Dec 2023 16:08:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 190E7813EE Received: by mail.gandi.net (Postfix) with ESMTPA id B156DC0003; Sun, 24 Dec 2023 16:08:33 +0000 (UTC) To: buildroot@buildroot.org Date: Sun, 24 Dec 2023 17:08:28 +0100 Message-ID: <20231224160831.871650-2-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231224160831.871650-1-thomas.petazzoni@bootlin.com> References: <20231224160831.871650-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: thomas.petazzoni@bootlin.com X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1703434113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2W1JA0Z4APvjeZ9Ww9MxL8r+uza+cQpdypNlrlq4Pb0=; b=QmI+2z2uvlM4h48A7inU3jvE9I6iBu3h5z3qX1rA5b4rTugXZtAg3HSdGB++6OyRkMelli bp82/akd9aZwmheLl6XnBFstKBftYIhgbjZ2eVPkn9wNMaciLw3EKmI5EGOXbYgkzTxk70 WQrqEpFRqvl8t7kUdGe9s1fmCfUjJIuf6eoXegJJNCeWxlT9j+jq77lhn7H5QlhoRjgu23 ZfDHDEYZbE20UIJq2LDZUVym0nJqrAKNmywuYtXLETqLpUdQmPRrznj1xF+OrRELVSIEYY MHF97SMMHtr907ZLSoOSsNbwno+R8tiAT+gptoyqscMOvAaA0/HnN7tKyasrvA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=QmI+2z2u Subject: [Buildroot] [PATCH 2/3] package/gdb: make GDB 13.x the default version X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Following the addition of GDB 14.x, let's make GDB 13.x the default. Signed-off-by: Thomas Petazzoni --- package/gdb/Config.in.host | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host index 3f81883005..43a85f1376 100644 --- a/package/gdb/Config.in.host +++ b/package/gdb/Config.in.host @@ -41,7 +41,7 @@ config BR2_PACKAGE_HOST_GDB_SIM choice prompt "GDB debugger Version" - default BR2_GDB_VERSION_12 + default BR2_GDB_VERSION_13 depends on !BR2_arc help Select the version of gdb you wish to use. @@ -69,7 +69,7 @@ config BR2_GDB_VERSION string default "arc-2020.09-release-gdb" if BR2_arc default "11.2" if BR2_GDB_VERSION_11 - default "12.1" if BR2_GDB_VERSION_12 || !BR2_PACKAGE_HOST_GDB - default "13.2" if BR2_GDB_VERSION_13 + default "12.1" if BR2_GDB_VERSION_12 + default "13.2" if BR2_GDB_VERSION_13 || !BR2_PACKAGE_HOST_GDB default "14.1" if BR2_GDB_VERSION_14 depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB From patchwork Sun Dec 24 16:08:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1879973 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SymDp1XcKz1ydb for ; Mon, 25 Dec 2023 03:08:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id ECC8A40470; Sun, 24 Dec 2023 16:08:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org ECC8A40470 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8c7Lt1UTudSf; Sun, 24 Dec 2023 16:08:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 08C484047D; Sun, 24 Dec 2023 16:08:53 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 08C484047D X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 073651BF275 for ; Sun, 24 Dec 2023 16:08:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id D4D818141A for ; Sun, 24 Dec 2023 16:08:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D4D818141A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Glza25CDZe4g for ; Sun, 24 Dec 2023 16:08:36 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2BB6F813F7 for ; Sun, 24 Dec 2023 16:08:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2BB6F813F7 Received: by mail.gandi.net (Postfix) with ESMTPA id 4894BC0004; Sun, 24 Dec 2023 16:08:34 +0000 (UTC) To: buildroot@buildroot.org Date: Sun, 24 Dec 2023 17:08:29 +0100 Message-ID: <20231224160831.871650-3-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231224160831.871650-1-thomas.petazzoni@bootlin.com> References: <20231224160831.871650-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: thomas.petazzoni@bootlin.com X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1703434114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zec9GJ/ZykaBjRuxpzAlAylR+a1EadtHwCC5Qc0gh2g=; b=nVD9jWPVEPPrfcwHgUOrQBElquwCcN3NmG0IxV+FMg+2BDTcueFtA28HyTH0+shkPbYcWh x4mlaOZZLPJsTLfa6uvBi0TfzOWvAmtVxW9P6VR9mUAh7ZHTUXYwCPxc+9NkqF+LTBh73I Ss5+LIys19nM/rQLAEX9d1hsekl8PKNgRF2/IeIBeG7KdDjXb09WGagLg2JbLK/in2hrvE GsK9GWOqCSR5kVUEygt9RJhCDGrwL8fOffbBrUrVQJqiq++Mv0a4/Vw3hf5GbCxCAMZWyE 5m8pSOlXB5V1lGHWXMYhdyCvDLmpMqCXNwrTr88Itmdu6xamMq6NvP3a3zjSCA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=nVD9jWPV Subject: [Buildroot] [PATCH 3/3] package/gdb: remove support for GDB 11.x X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" After adding GDB 14.x and making GDB 13.x the new default, let's drop support for GDB 11.x. Signed-off-by: Thomas Petazzoni --- .checkpackageignore | 9 --- Config.in.legacy | 8 +++ ...e-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 55 ---------------- ...-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch | 43 ------------- package/gdb/11.2/0003-use-asm-sgidefs.h.patch | 40 ------------ .../0004-gdbserver-fix-build-for-m68k.patch | 63 ------------------- ...fork-inferior-include-linux-ptrace.h.patch | 53 ---------------- ...getrandom-compile-for-uclibc-v1.0.35.patch | 39 ------------ .../11.2/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 ----------------- package/gdb/Config.in.host | 6 -- 12 files changed, 8 insertions(+), 463 deletions(-) delete mode 100644 package/gdb/11.2/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch delete mode 100644 package/gdb/11.2/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch delete mode 100644 package/gdb/11.2/0003-use-asm-sgidefs.h.patch delete mode 100644 package/gdb/11.2/0004-gdbserver-fix-build-for-m68k.patch delete mode 100644 package/gdb/11.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch delete mode 100644 package/gdb/11.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch delete mode 100644 package/gdb/11.2/0007-fix-musl-build-on-riscv.patch delete mode 100644 package/gdb/11.2/0008-gdbserver-Makefile.in-fix-NLS-build.patch delete mode 100644 package/gdb/11.2/0009-gdb-Fix-native-build-on-xtensa.patch diff --git a/.checkpackageignore b/.checkpackageignore index 06f087f5f0..d5daa42dce 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -458,15 +458,6 @@ package/gcc/arc-2020.09-release/0002-libsanitizer-Remove-cyclades-from-libsaniti package/gcc/arc-2020.09-release/0100-uclibc-conf.patch Upstream package/gcr/0001-meson-Fix-unknown-kw-argument-in-gnome.generate_gir.patch Upstream package/gdal/0001-fix-uclibc-build-without-NPTL.patch Upstream -package/gdb/11.2/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch Upstream -package/gdb/11.2/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch Upstream -package/gdb/11.2/0003-use-asm-sgidefs.h.patch Upstream -package/gdb/11.2/0004-gdbserver-fix-build-for-m68k.patch Upstream -package/gdb/11.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch Upstream -package/gdb/11.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch Upstream -package/gdb/11.2/0007-fix-musl-build-on-riscv.patch Upstream -package/gdb/11.2/0008-gdbserver-Makefile.in-fix-NLS-build.patch Upstream -package/gdb/11.2/0009-gdb-Fix-native-build-on-xtensa.patch Upstream package/gdb/12.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch Upstream package/gdb/12.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch Upstream package/gdb/12.1/0003-use-asm-sgidefs.h.patch Upstream diff --git a/Config.in.legacy b/Config.in.legacy index 4689226290..fdee3f30bc 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -144,6 +144,14 @@ endif ############################################################################### +comment "Legacy options removed in 2024.02" + +config BR2_GDB_VERSION_11 + bool "gdb 11.x removed" + select BR2_LEGACY + help + GDB 11.x has been removed, use a newer version. + comment "Legacy options removed in 2023.11" config BR2_KERNEL_HEADERS_6_5 diff --git a/package/gdb/11.2/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/package/gdb/11.2/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch deleted file mode 100644 index 9369a14d2c..0000000000 --- a/package/gdb/11.2/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 64b8ab56118d2fea027adfb7ebbc01668b29528e Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 6 Aug 2016 17:32:50 -0700 -Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems - -Upstream-Status: Pending - -Signed-off-by: Khem Raj -Signed-off-by: Thomas Petazzoni -[Rebase on gdb 8.3] -Signed-off-by: Romain Naour ---- - gdb/nat/ppc-linux.h | 6 ++++++ - gdbserver/linux-ppc-low.cc | 6 ++++++ - 2 files changed, 12 insertions(+) - -diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h -index d937a65b69c..1fd54b4a0e0 100644 ---- a/gdb/nat/ppc-linux.h -+++ b/gdb/nat/ppc-linux.h -@@ -18,7 +18,13 @@ - #ifndef NAT_PPC_LINUX_H - #define NAT_PPC_LINUX_H - -+#if !defined(__GLIBC__) -+# define pt_regs uapi_pt_regs -+#endif - #include -+#if !defined(__GLIBC__) -+# undef pt_regs -+#endif - #include - - /* This sometimes isn't defined. */ -diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc -index 337d555aee7..5d518f37268 100644 ---- a/gdbserver/linux-ppc-low.cc -+++ b/gdbserver/linux-ppc-low.cc -@@ -23,7 +23,13 @@ - #include "elf/common.h" - #include - #include -+#if !defined(__GLIBC__) -+# define pt_regs uapi_pt_regs -+#endif - #include -+#if !defined(__GLIBC__) -+# undef pt_regs -+#endif - - #include "arch/ppc-linux-common.h" - #include "arch/ppc-linux-tdesc.h" --- -2.29.2 - diff --git a/package/gdb/11.2/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch b/package/gdb/11.2/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch deleted file mode 100644 index 2f96d29820..0000000000 --- a/package/gdb/11.2/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch +++ /dev/null @@ -1,43 +0,0 @@ -From d205f398e1e36f9673f50f368a3f29fd1dfaa794 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sat, 3 Jun 2017 21:23:52 +0200 -Subject: [PATCH] sh/ptrace: Define pt_{dsp,}regs uapi_pt_{dsp,}regs on !GLIBC - systems - -Fixes a pt_{dsp,}regs redefinition when building with the musl C library -on SuperH. - -Inspired by -http://git.yoctoproject.org/clean/cgit.cgi/poky/plain/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch, -adapted for SuperH. - -Signed-off-by: Thomas Petazzoni -[Rebase on gdb 8.0] -Signed-off-by: Romain Naour ---- - gdbserver/linux-sh-low.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/gdbserver/linux-sh-low.cc b/gdbserver/linux-sh-low.cc -index a6d3fc60047..b83cce6b9fe 100644 ---- a/gdbserver/linux-sh-low.cc -+++ b/gdbserver/linux-sh-low.cc -@@ -76,7 +76,15 @@ extern const struct target_desc *tdesc_sh; - #include - #endif - -+#if !defined(__GLIBC__) -+# define pt_regs uapi_pt_regs -+# define pt_dspregs uapi_pt_dspregs -+#endif - #include -+#if !defined(__GLIBC__) -+# undef pt_regs -+# undef pt_dspregs -+#endif - - #define sh_num_regs 41 - --- -2.29.2 - diff --git a/package/gdb/11.2/0003-use-asm-sgidefs.h.patch b/package/gdb/11.2/0003-use-asm-sgidefs.h.patch deleted file mode 100644 index e04ebd1dd5..0000000000 --- a/package/gdb/11.2/0003-use-asm-sgidefs.h.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 65acc8800dba7e10da882871d4648241805c47ce Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Sat, 30 Apr 2016 15:29:06 -0700 -Subject: [PATCH] use - -Build fix for MIPS with musl libc - -The MIPS specific header is provided by glibc and uclibc -but not by musl. Regardless of the libc, the kernel headers provide - 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 -Signed-off-by: Khem Raj -Signed-off-by: Vicente Olivert Riera ---- - 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 38ff461a35b..b6cf194b2bf 100644 ---- a/gdb/mips-linux-nat.c -+++ b/gdb/mips-linux-nat.c -@@ -31,7 +31,7 @@ - #include "gdb_proc_service.h" - #include "gregset.h" - --#include -+#include - #include "nat/gdb_ptrace.h" - #include - #include "inf-ptrace.h" --- -2.29.2 - diff --git a/package/gdb/11.2/0004-gdbserver-fix-build-for-m68k.patch b/package/gdb/11.2/0004-gdbserver-fix-build-for-m68k.patch deleted file mode 100644 index 846f7ed293..0000000000 --- a/package/gdb/11.2/0004-gdbserver-fix-build-for-m68k.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 90ebe548922538b854de52e8b687384f44360984 Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Fri, 22 Jun 2018 22:40:26 +0200 -Subject: [PATCH] gdbserver: fix build for m68k -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -As for strace [1], when is included after , -the build fails on m68k with the following diagnostics: - -In file included from ./../nat/linux-ptrace.h:28:0, - from linux-low.h:27, - from linux-m68k-low.c:20: -[...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant - PT_D1 = 0, - ^ -[...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant -[...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant -In file included from linux-m68k-low.c:27:0: -[...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token - }; - ^ - -Fix this by moving on top of "linux-low.h". - -[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92 - -Signed-off-by: Romain Naour ---- - gdbserver/linux-m68k-low.cc | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/gdbserver/linux-m68k-low.cc b/gdbserver/linux-m68k-low.cc -index 838ba353b0b..36679682b9a 100644 ---- a/gdbserver/linux-m68k-low.cc -+++ b/gdbserver/linux-m68k-low.cc -@@ -17,6 +17,11 @@ - along with this program. If not, see . */ - - #include "server.h" -+ -+#ifdef HAVE_SYS_REG_H -+#include -+#endif -+ - #include "linux-low.h" - - /* Linux target op definitions for the m68k architecture. */ -@@ -80,10 +85,6 @@ m68k_target::low_decr_pc_after_break () - void init_registers_m68k (void); - extern const struct target_desc *tdesc_m68k; - --#ifdef HAVE_SYS_REG_H --#include --#endif -- - #define m68k_num_regs 29 - #define m68k_num_gregs 18 - --- -2.29.2 - diff --git a/package/gdb/11.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch b/package/gdb/11.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch deleted file mode 100644 index 33dce4d940..0000000000 --- a/package/gdb/11.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch +++ /dev/null @@ -1,53 +0,0 @@ -From c8454711eca2e79437e17ed1e1e68b48b4c8d927 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sun, 24 Jun 2018 23:33:55 +0200 -Subject: [PATCH] nat/fork-inferior: include linux-ptrace.h - -To decide whether fork() or vfork() should be used, fork-inferior.c -uses the following test: - - #if !(defined(__UCLIBC__) && defined(HAS_NOMMU)) - -However, HAS_NOMMU is never defined, because it gets defined in -linux-ptrace.h, which is not included by fork-inferior.c. Due to this, -gdbserver fails to build on noMMU architectures. This commit fixes -that by simply including linux-ptrace.h. - -This bug was introduced by commit -2090129c36c7e582943b7d300968d19b46160d84 ("Share fork_inferior et al -with gdbserver"). Indeed, the same fork()/vfork() selection was done, -but in another file where linux-ptrace.h was included. - -Fixes the following build issue: - -../nat/fork-inferior.c: In function 'pid_t fork_inferior(const char*, const string&, char**, void (*)(), void (*)(int), void (*)(), const char*, void (*)(const char*, char* const*, char* const*))': -../nat/fork-inferior.c:376:11: error: 'fork' was not declared in this scope - pid = fork (); - ^~~~ -../nat/fork-inferior.c:376:11: note: suggested alternative: 'vfork' - pid = fork (); - ^~~~ - vfork - -Signed-off-by: Thomas Petazzoni -[Romain: rebase on gdb 8.3] -Signed-off-by: Romain Naour ---- - gdb/nat/fork-inferior.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c -index 7ba0126871d..53e1ec72f09 100644 ---- a/gdb/nat/fork-inferior.c -+++ b/gdb/nat/fork-inferior.c -@@ -27,6 +27,7 @@ - #include "gdbsupport/pathstuff.h" - #include "gdbsupport/signals-state-save-restore.h" - #include "gdbsupport/gdb_tilde_expand.h" -+#include "linux-ptrace.h" - #include - - extern char **environ; --- -2.29.2 - diff --git a/package/gdb/11.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch b/package/gdb/11.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch deleted file mode 100644 index b02d63fc0c..0000000000 --- a/package/gdb/11.2/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 879008ef9a48aa1363671f5c1736b49f30c5a379 Mon Sep 17 00:00:00 2001 -From: Peter Seiderer -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 ---- - gnulib/import/getrandom.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gnulib/import/getrandom.c b/gnulib/import/getrandom.c -index 41212fb..0ad3f96 100644 ---- a/gnulib/import/getrandom.c -+++ b/gnulib/import/getrandom.c -@@ -19,6 +19,7 @@ - - #include - -+#include - #include - - #include --- -2.33.1 - diff --git a/package/gdb/11.2/0007-fix-musl-build-on-riscv.patch b/package/gdb/11.2/0007-fix-musl-build-on-riscv.patch deleted file mode 100644 index 34ab08a97a..0000000000 --- a/package/gdb/11.2/0007-fix-musl-build-on-riscv.patch +++ /dev/null @@ -1,60 +0,0 @@ -From c3fdbc0a24c83246f951ba79c7167547da979ae5 Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Wed, 10 Nov 2021 23:14:54 +0100 -Subject: [PATCH] fix musl build on riscv - -Fix the following build failure raised with musl: - -../../gdbserver/linux-riscv-low.cc: In function 'void riscv_fill_fpregset(regcache*, void*)': -../../gdbserver/linux-riscv-low.cc:140:19: error: 'ELF_NFPREG' was not declared in this scope; did you mean 'ELF_NGREG'? - 140 | for (i = 0; i < ELF_NFPREG - 1; i++, regbuf += flen) - | ^~~~~~~~~~ - | ELF_NGREG - -musl fixed the issue with -https://git.musl-libc.org/cgit/musl/commit/?id=e5d2823631bbfebacf48e1a34ed28f28d7cb2570 - -Fixes: - - http://autobuild.buildroot.org/results/16b19198980ce9c81a618b3f6e8dc9fe28247a28 - -Signed-off-by: Fabrice Fontaine ---- - gdb/nat/riscv-linux-tdesc.c | 5 +++++ - gdbserver/linux-riscv-low.cc | 5 +++++ - 2 files changed, 10 insertions(+) - -diff --git a/gdb/nat/riscv-linux-tdesc.c b/gdb/nat/riscv-linux-tdesc.c -index 837b1707e0f..667c013006a 100644 ---- a/gdb/nat/riscv-linux-tdesc.c -+++ b/gdb/nat/riscv-linux-tdesc.c -@@ -31,6 +31,11 @@ - # define NFPREG 33 - #endif - -+/* Work around musl breakage since version 1.1.24. */ -+#ifndef ELF_NFPREG -+# define ELF_NFPREG 33 -+#endif -+ - /* See nat/riscv-linux-tdesc.h. */ - - struct riscv_gdbarch_features -diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc -index 8bf97ea4aa3..1142dbc7b16 100644 ---- a/gdbserver/linux-riscv-low.cc -+++ b/gdbserver/linux-riscv-low.cc -@@ -30,6 +30,11 @@ - # define NFPREG 33 - #endif - -+/* Work around musl breakage since version 1.1.24. */ -+#ifndef ELF_NFPREG -+# define ELF_NFPREG 33 -+#endif -+ - /* Linux target op definitions for the RISC-V architecture. */ - - class riscv_target : public linux_process_target --- -2.33.0 - diff --git a/package/gdb/11.2/0008-gdbserver-Makefile.in-fix-NLS-build.patch b/package/gdb/11.2/0008-gdbserver-Makefile.in-fix-NLS-build.patch deleted file mode 100644 index 903dc61df8..0000000000 --- a/package/gdb/11.2/0008-gdbserver-Makefile.in-fix-NLS-build.patch +++ /dev/null @@ -1,38 +0,0 @@ -From c098500aee945ee7a3021649eb0a2655b004103c Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -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 -[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 71c3c4ad959..e69fbc4dae4 100644 ---- a/gdbserver/Makefile.in -+++ b/gdbserver/Makefile.in -@@ -383,7 +383,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.33.0 - diff --git a/package/gdb/11.2/0009-gdb-Fix-native-build-on-xtensa.patch b/package/gdb/11.2/0009-gdb-Fix-native-build-on-xtensa.patch deleted file mode 100644 index bf4d617fc1..0000000000 --- a/package/gdb/11.2/0009-gdb-Fix-native-build-on-xtensa.patch +++ /dev/null @@ -1,57 +0,0 @@ -From d3bb361eb0b6cbf0257f515f9d5e64add89e6bfa Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Sun, 28 Aug 2022 23:21:37 +0200 -Subject: [PATCH] gdb: Fix native build on xtensa -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Apply a similar fix than for Alpha architecture on gdb 9: -https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=7a27b85f6d9b5eea9bd1493f903158fbea4b2231 - -Fixes: - -../../gdb/xtensa-linux-nat.c: In function ‘void fill_gregset(const regcache*, elf_greg_t (*)[128], int)’: -../../gdb/xtensa-linux-nat.c:66:17: error: ‘gdbarch_pc_regnum’ was not declared in this scope - 66 | if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1) - | ^~~~~~~~~~~~~~~~~ - CXX complaints.o -../../gdb/xtensa-linux-nat.c:68:17: error: ‘gdbarch_ps_regnum’ was not declared in this scope - 68 | if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1) - | ^~~~~~~~~~~~~~~~~ -../../gdb/xtensa-linux-nat.c:71:38: error: no matching function for call to ‘gdbarch_tdep::gdbarch_tdep(gdbarch*&)’ - 71 | if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1) - | ^ -In file included from ../../gdb/xtensa-linux-nat.c:38: -../../gdb/xtensa-tdep.h:160:8: note: candidate: ‘gdbarch_tdep::gdbarch_tdep()’ - 160 | struct gdbarch_tdep - | ^~~~~~~~~~~~ -../../gdb/xtensa-tdep.h:160:8: note: candidate expects 0 arguments, 1 provided -../../gdb/xtensa-tdep.h:160:8: note: candidate: ‘constexpr gdbarch_tdep::gdbarch_tdep(const gdbarch_tdep&)’ -../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from ‘gdbarch*’ to ‘const gdbarch_tdep&’ -../../gdb/xtensa-tdep.h:160:8: note: candidate: ‘constexpr gdbarch_tdep::gdbarch_tdep(gdbarch_tdep&&)’ -../../gdb/xtensa-tdep.h:160:8: note: no known conversion for argument 1 from ‘gdbarch*’ to ‘gdbarch_tdep&&’ -../../gdb/xtensa-linux-nat.c:72:49: error: no matching function for call to ‘gdbarch_tdep::gdbarch_tdep(gdbarch*&)’ - 72 | regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum, - | ^ - -Signed-off-by: Romain Naour ---- - gdb/xtensa-linux-nat.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c -index ec33f4a10f2..73f35eac683 100644 ---- a/gdb/xtensa-linux-nat.c -+++ b/gdb/xtensa-linux-nat.c -@@ -36,6 +36,7 @@ - - #include "gregset.h" - #include "xtensa-tdep.h" -+#include "gdbarch.h" - - /* Defines ps_err_e, struct ps_prochandle. */ - #include "gdb_proc_service.h" --- -2.37.2 - diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host index 43a85f1376..2ecd796e6b 100644 --- a/package/gdb/Config.in.host +++ b/package/gdb/Config.in.host @@ -46,11 +46,6 @@ choice help Select the version of gdb you wish to use. -config BR2_GDB_VERSION_11 - bool "gdb 11.x" - # gdbserver support missing - depends on !BR2_or1k - config BR2_GDB_VERSION_12 bool "gdb 12.x" @@ -68,7 +63,6 @@ endif config BR2_GDB_VERSION string default "arc-2020.09-release-gdb" if BR2_arc - default "11.2" if BR2_GDB_VERSION_11 default "12.1" if BR2_GDB_VERSION_12 default "13.2" if BR2_GDB_VERSION_13 || !BR2_PACKAGE_HOST_GDB default "14.1" if BR2_GDB_VERSION_14