package/gdb: add support for version 12.1
PATCH 1/4 package/gdb: add support for version 12.1
--- ...e-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 55 ++++++++++++++++ ...-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch | 43 +++++++++++++ package/gdb/12.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 ++++++++++++ .../12.1/0007-fix-musl-build-on-riscv.patch | 60 ++++++++++++++++++ ...-gdbserver-Makefile.in-fix-NLS-build.patch | 38 +++++++++++ package/gdb/Config.in | 1 + package/gdb/Config.in.host | 5 ++ package/gdb/gdb.hash | 1 + package/gdb/gdb.mk | 11 ++-- 12 files changed, 403 insertions(+), 6 deletions(-) create mode 100644 package/gdb/12.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch create mode 100644 package/gdb/12.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch create mode 100644 package/gdb/12.1/0003-use-asm-sgidefs.h.patch create mode 100644 package/gdb/12.1/0004-gdbserver-fix-build-for-m68k.patch create mode 100644 package/gdb/12.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch create mode 100644 package/gdb/12.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch create mode 100644 package/gdb/12.1/0007-fix-musl-build-on-riscv.patch create mode 100644 package/gdb/12.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch
package/gdb/12.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch new file +55 -0
@@ -0,0 +1,55 @@ +From bca7617f325787550e2133fe082dbe4da7716fc6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +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 <[email protected]> +Signed-off-by: Thomas Petazzoni <[email protected]> +[Rebase on gdb 8.3] +Signed-off-by: Romain Naour <[email protected]> +--- + 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 1094f6b0be3..d8588a646c2 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 <asm/ptrace.h> ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + #include <asm/cputable.h> + + /* This sometimes isn't defined. */ +diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc +index 08824887003..69afbae5359 100644 +--- a/gdbserver/linux-ppc-low.cc ++++ b/gdbserver/linux-ppc-low.cc +@@ -23,7 +23,13 @@ + #include "elf/common.h" + #include <sys/uio.h> + #include <elf.h> ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++#endif + #include <asm/ptrace.h> ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + + #include "arch/ppc-linux-common.h" + #include "arch/ppc-linux-tdesc.h" +-- +2.37.1 +
package/gdb/12.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/12.1/0003-use-asm-sgidefs.h.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 8c94bf2b40d51c500c364ac03a2da1e9f9a94287 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 20e12b6889e..1e66e98a013 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 <sgidefs.h> ++#include <asm/sgidefs.h> + #include "nat/gdb_ptrace.h" + #include <asm/ptrace.h> + #include "inf-ptrace.h" +-- +2.37.1 +
package/gdb/12.1/0004-gdbserver-fix-build-for-m68k.patch new file +63 -0
63 lines not on this page · raw message
package/gdb/12.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch new file +53 -0
53 lines not on this page · raw message
package/gdb/12.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 03efe04b5748703234516836cb0186d25b052556 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 41212fb329d..0ad3f9648d2 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.37.1 +
package/gdb/12.1/0007-fix-musl-build-on-riscv.patch new file +60 -0
60 lines not on this page · raw message
package/gdb/12.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 73487022cb629415c3b0c2d9e125035b6e5c2d32 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 47648b8d962..9d862bcb9c9 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.37.1 +
package/gdb/Config.in +1 -0
@@ -52,6 +52,7 @@ config BR2_PACKAGE_GDB_DEBUGGER depends on BR2_USE_WCHAR depends on !BR2_sh select BR2_PACKAGE_GMP if BR2_GDB_VERSION_11 + select BR2_PACKAGE_GMP if BR2_GDB_VERSION_12 select BR2_PACKAGE_NCURSES comment "full gdb on target needs a toolchain w/ wchar"
package/gdb/Config.in.host +5 -0
@@ -57,6 +57,9 @@ config BR2_GDB_VERSION_10 config BR2_GDB_VERSION_11 bool "gdb 11.x" +config BR2_GDB_VERSION_12 + bool "gdb 12.x" + endchoice endif
@@ -68,6 +71,7 @@ config BR2_GDB_VERSION default "9.2" if BR2_GDB_VERSION_9_2 default "10.2" if BR2_GDB_VERSION_10 || !BR2_PACKAGE_HOST_GDB default "11.2" if BR2_GDB_VERSION_11 + default "12.1" if BR2_GDB_VERSION_12 depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB # recent gdb versions (>= 10) have gdbserver moved at the top-level,
@@ -77,5 +81,6 @@ config BR2_PACKAGE_GDB_TOPLEVEL default y if BR2_arc default y if BR2_GDB_VERSION_10 default y if BR2_GDB_VERSION_11 + default y if BR2_GDB_VERSION_12 default y if !BR2_PACKAGE_HOST_GDB depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
package/gdb/gdb.hash +1 -0
@@ -2,6 +2,7 @@ sha512 73635f00f343117aa5e2436f1e1597099e2bfb31ef7bb162b273fa1ea282c3fa9b0f52762e70bfc7ad0334addb8d159e9ac7cbe5998ca4f755ea8cf90714d274 gdb-9.2.tar.xz sha512 3653762ac008e065c37cd641653184c9ff7ce51ee2222ade1122bec9d6cc64dffd4fb74888ef11ac1942064a08910e96b7865112ad37f4602eb0a16bed074caa gdb-10.2.tar.xz sha512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127 gdb-11.2.tar.xz +sha512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d gdb-12.1.tar.xz # Locally calculated (fetched from Github) sha512 5a2acf2fd33ab2ff589e1037ca40abda54328997dcff26b2b49b874bd3be980be5a63342962254f3c3bda98e32ce7a33af704d37353352833dee193135600458 gdb-arc-2020.09-release-gdb.tar.gz
package/gdb/gdb.mk +5 -6
@@ -65,9 +65,8 @@ GDB_DEPENDENCIES += host-flex host-bison HOST_GDB_DEPENDENCIES += host-flex host-bison endif -# When BR2_GDB_VERSION_11=y, we're going to build gdb 11.x for the -# host (if enabled), so we add the necessary gmp dependency. -ifeq ($(BR2_GDB_VERSION_11),y) +# Add the necessary host-gmp dependency for the newer releases of GDB +ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12),y) HOST_GDB_DEPENDENCIES += host-gmp endif
@@ -155,11 +154,11 @@ GDB_CONF_OPTS += \ --without-curses endif -# When BR2_GDB_VERSION_11=y (because it's enabled for the host) and -# we're building the full gdb for the target, we need gmp as a +# When GDB >= 11.x (because it's enabled for the host) and we're +# building the full gdb for the target, we need gmp as a # dependency. For now the default gdb version in Buildroot doesn't # require gmp. -ifeq ($(BR2_GDB_VERSION_11)$(BR2_PACKAGE_GDB_DEBUGGER),yy) +ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12):$(BR2_PACKAGE_GDB_DEBUGGER),y:y) GDB_CONF_OPTS += \ --with-libgmp-prefix=$(STAGING_DIR)/usr GDB_DEPENDENCIES += gmp
Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/4 package/gdb: remove support for 9.2
--- 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/9.2/0003-use-asm-sgidefs.h.patch | 40 --- .../0004-gdbserver-fix-build-for-m68k.patch | 62 ----- ...fork-inferior-include-linux-ptrace.h.patch | 53 ---- ...ppc-Fix-linker-error-with-fno-common.patch | 101 -------- ...x-Python3.9-related-runtime-problems.patch | 227 ------------------ ...t-build-gdbserver-with-m68k-and-ucli.patch | 41 ---- package/gdb/Config.in.host | 6 - package/gdb/gdb.hash | 1 - 11 files changed, 8 insertions(+), 629 deletions(-) delete mode 100644 package/gdb/9.2/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch delete mode 100644 package/gdb/9.2/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch delete mode 100644 package/gdb/9.2/0003-use-asm-sgidefs.h.patch delete mode 100644 package/gdb/9.2/0004-gdbserver-fix-build-for-m68k.patch delete mode 100644 package/gdb/9.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch delete mode 100644 package/gdb/9.2/0006-sim-ppc-Fix-linker-error-with-fno-common.patch delete mode 100644 package/gdb/9.2/0007-Fix-Python3.9-related-runtime-problems.patch delete mode 100644 package/gdb/9.2/0007-gdb-configure.tgt-build-gdbserver-with-m68k-and-ucli.patch
Config.in.legacy +8 -0
@@ -144,6 +144,14 @@ endif ############################################################################### +comment "Legacy options removed in 2022.11" + +config BR2_GDB_VERSION_9_2 + bool "gdb 9.2 removed" + help + Support for GDB 9.2 has been removed. A new version has + automatically been selected. + comment "Legacy options removed in 2022.08" config BR2_ECLIPSE_REGISTER
package/gdb/9.2/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch deleted +0 -55
55 lines not on this page · raw message
package/gdb/9.2/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch deleted +0 -43
43 lines not on this page · raw message
package/gdb/9.2/0003-use-asm-sgidefs.h.patch deleted +0 -40
@@ -1,40 +0,0 @@ -From 19a0f664809b6858e69aa98188eb739415de044c 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 e68ed1e4da9..bc42aa59685 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 <sgidefs.h> -+#include <asm/sgidefs.h> - #include "nat/gdb_ptrace.h" - #include <asm/ptrace.h> - #include "inf-ptrace.h" --- -2.21.0 -
package/gdb/9.2/0004-gdbserver-fix-build-for-m68k.patch deleted +0 -62
62 lines not on this page · raw message
package/gdb/9.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch deleted +0 -53
53 lines not on this page · raw message
package/gdb/9.2/0006-sim-ppc-Fix-linker-error-with-fno-common.patch deleted +0 -101
101 lines not on this page · raw message
package/gdb/9.2/0007-Fix-Python3.9-related-runtime-problems.patch deleted +0 -227
227 lines not on this page · raw message
package/gdb/9.2/0007-gdb-configure.tgt-build-gdbserver-with-m68k-and-ucli.patch deleted +0 -41
41 lines not on this page · raw message
package/gdb/Config.in.host +0 -6
@@ -46,11 +46,6 @@ choice help Select the version of gdb you wish to use. -config BR2_GDB_VERSION_9_2 - bool "gdb 9.2.x" - # gdbserver support missing - depends on !BR2_riscv - config BR2_GDB_VERSION_10 bool "gdb 10.x"
@@ -68,7 +63,6 @@ endif config BR2_GDB_VERSION string default "arc-2020.09-release-gdb" if BR2_arc - default "9.2" if BR2_GDB_VERSION_9_2 default "10.2" if BR2_GDB_VERSION_10 || !BR2_PACKAGE_HOST_GDB default "11.2" if BR2_GDB_VERSION_11 default "12.1" if BR2_GDB_VERSION_12
package/gdb/gdb.hash +0 -1
@@ -1,5 +1,4 @@ # From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum -sha512 73635f00f343117aa5e2436f1e1597099e2bfb31ef7bb162b273fa1ea282c3fa9b0f52762e70bfc7ad0334addb8d159e9ac7cbe5998ca4f755ea8cf90714d274 gdb-9.2.tar.xz sha512 3653762ac008e065c37cd641653184c9ff7ce51ee2222ade1122bec9d6cc64dffd4fb74888ef11ac1942064a08910e96b7865112ad37f4602eb0a16bed074caa gdb-10.2.tar.xz sha512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127 gdb-11.2.tar.xz sha512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d gdb-12.1.tar.xz
Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRe: [Buildroot] [PATCH 2/4] package/gdb: remove support for 9.2
Thomas, All,
On 2022-08-13 10:35 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 1 line
Signed-off-by Thomas Petazzoni <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 752 lines
--- 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/9.2/0003-use-asm-sgidefs.h.patch | 40 --- .../0004-gdbserver-fix-build-for-m68k.patch | 62 ----- ...fork-inferior-include-linux-ptrace.h.patch | 53 ---- ...ppc-Fix-linker-error-with-fno-common.patch | 101 -------- ...x-Python3.9-related-runtime-problems.patch | 227 ------------------ ...t-build-gdbserver-with-m68k-and-ucli.patch | 41 ---- package/gdb/Config.in.host | 6 - package/gdb/gdb.hash | 1 - 11 files changed, 8 insertions(+), 629 deletions(-) delete mode 100644 package/gdb/9.2/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch delete mode 100644 package/gdb/9.2/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch delete mode 100644 package/gdb/9.2/0003-use-asm-sgidefs.h.patch delete mode 100644 package/gdb/9.2/0004-gdbserver-fix-build-for-m68k.patch delete mode 100644 package/gdb/9.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch delete mode 100644 package/gdb/9.2/0006-sim-ppc-Fix-linker-error-with-fno-common.patch delete mode 100644 package/gdb/9.2/0007-Fix-Python3.9-related-runtime-problems.patch delete mode 100644 package/gdb/9.2/0007-gdb-configure.tgt-build-gdbserver-with-m68k-and-ucli.patchConfig.in.legacy +8
-0@@ -144,6 +144,14 @@ endif ############################################################################### +comment "Legacy options removed in 2022.11" + +config BR2_GDB_VERSION_9_2 + bool "gdb 9.2 removed" + help + Support for GDB 9.2 has been removed. A new version has + automatically been selected. + comment "Legacy options removed in 2022.08" config BR2_ECLIPSE_REGISTERpackage/gdb/9.2/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch deleted +0
-55@@ -1,55 +0,0 @@ -From 72ee19f54fd35595465b2e35eccf1f3d65fe21c6 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -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 <[email protected]> -Signed-off-by: Thomas Petazzoni <[email protected]> -[Rebase on gdb 8.3] -Signed-off-by: Romain Naour <[email protected]> ---- - gdb/gdbserver/linux-ppc-low.c | 6 ++++++ - gdb/nat/ppc-linux.h | 6 ++++++ - 2 files changed, 12 insertions(+) - -diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c -index 1b695e53fe9..1978347c02c 100644 ---- a/gdb/gdbserver/linux-ppc-low.c -+++ b/gdb/gdbserver/linux-ppc-low.c -@@ -23,7 +23,13 @@ - #include "elf/common.h" - #include <sys/uio.h> - #include <elf.h> -+#if !defined(__GLIBC__) -+# define pt_regs uapi_pt_regs -+#endif - #include <asm/ptrace.h> -+#if !defined(__GLIBC__) -+# undef pt_regs -+#endif - - #include "arch/ppc-linux-common.h" - #include "arch/ppc-linux-tdesc.h" -diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h -index f1561b3b357..40399361c09 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 <asm/ptrace.h> -+#if !defined(__GLIBC__) -+# undef pt_regs -+#endif - #include <asm/cputable.h> - - /* This sometimes isn't defined. */ --- -2.21.0 -package/gdb/9.2/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch deleted +0
-43@@ -1,43 +0,0 @@ -From ef630288fdc2d4d22651702672f9d5c9cd767e5b Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -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 <[email protected]> -[Rebase on gdb 8.0] -Signed-off-by: Romain Naour <[email protected]> ---- - gdb/gdbserver/linux-sh-low.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/gdb/gdbserver/linux-sh-low.c b/gdb/gdbserver/linux-sh-low.c -index 0953721a190..c331c1382f7 100644 ---- a/gdb/gdbserver/linux-sh-low.c -+++ b/gdb/gdbserver/linux-sh-low.c -@@ -27,7 +27,15 @@ extern const struct target_desc *tdesc_sh; - #include <sys/reg.h> - #endif - -+#if !defined(__GLIBC__) -+# define pt_regs uapi_pt_regs -+# define pt_dspregs uapi_pt_dspregs -+#endif - #include <asm/ptrace.h> -+#if !defined(__GLIBC__) -+# undef pt_regs -+# undef pt_dspregs -+#endif - - #define sh_num_regs 41 - --- -2.21.0 -package/gdb/9.2/0003-use-asm-sgidefs.h.patch deleted +0
-40@@ -1,40 +0,0 @@ -From 19a0f664809b6858e69aa98188eb739415de044c 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 e68ed1e4da9..bc42aa59685 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 <sgidefs.h> -+#include <asm/sgidefs.h> - #include "nat/gdb_ptrace.h" - #include <asm/ptrace.h> - #include "inf-ptrace.h" --- -2.21.0 -package/gdb/9.2/0004-gdbserver-fix-build-for-m68k.patch deleted +0
-62@@ -1,62 +0,0 @@ -From 448e481aab86c823d908530038e20a14213db0a2 Mon Sep 17 00:00:00 2001 -From: Romain Naour <[email protected]> -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 <sys/reg.h> is included after <linux/ptrace.h>, -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 <sys/reg.h> on top of "linux-low.h". - -[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92 - -Signed-off-by: Romain Naour <[email protected]> ---- - gdb/gdbserver/linux-m68k-low.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/gdb/gdbserver/linux-m68k-low.c b/gdb/gdbserver/linux-m68k-low.c -index 16f639d02fc..969d9973737 100644 ---- a/gdb/gdbserver/linux-m68k-low.c -+++ b/gdb/gdbserver/linux-m68k-low.c -@@ -17,16 +17,17 @@ - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - - #include "server.h" -+ -+#ifdef HAVE_SYS_REG_H -+#include <sys/reg.h> -+#endif -+ - #include "linux-low.h" - - /* Defined in auto-generated file reg-m68k.c. */ - void init_registers_m68k (void); - extern const struct target_desc *tdesc_m68k; - --#ifdef HAVE_SYS_REG_H --#include <sys/reg.h> --#endif -- - #define m68k_num_regs 29 - #define m68k_num_gregs 18 - --- -2.21.0 -package/gdb/9.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch deleted +0
-53@@ -1,53 +0,0 @@ -From d84ecfa3a8c8fbade89229ac66c09f2a97ab00fb Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -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 <[email protected]> -[Romain: rebase on gdb 8.3] -Signed-off-by: Romain Naour <[email protected]> ---- - 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 fe9360a5039..626fe7c1fbf 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 <vector> - - extern char **environ; --- -2.21.0 -package/gdb/9.2/0006-sim-ppc-Fix-linker-error-with-fno-common.patch deleted +0
-101@@ -1,101 +0,0 @@ -From ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0 Mon Sep 17 00:00:00 2001 -From: Sebastian Huber <[email protected]> -Date: Wed, 1 Jul 2020 19:29:55 +0200 -Subject: [PATCH] sim/ppc: Fix linker error with -fno-common - -GCC 10 enables -fno-common by default. This resulted in a multiple -definition linker error since global variables were declared and defined -in a header file: - - ld: ld-insn.o:sim/ppc/ld-insn.h:221: multiple definition of - `max_model_fields_len'; igen.o:sim/ppc/ld-insn.h:221: first defined here - -sim/ppc - - * ld-insn.h (last_model, last_model_data, last_model_function, - last_model_internal, last_model_macro, last_model_static): - Delete. - (max_model_fields_len, model_data, model_functions, - model_internal, model_macros, model_static, models): Declare, but do not - define. - * ld-insn.c (last_model, last_model_data, last_model_function, - last_model_internal, last_model_macro, last_model_static, - max_model_fields_len, model_data, model_functions, - model_internal, model_macros, model_static, models): Define. - -Signed-off-by: Maxim Kochetkov <[email protected]> -Fetch from: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0 ---- - sim/ppc/ld-insn.c | 18 ++++++++++++++++++ - sim/ppc/ld-insn.h | 24 +++++++----------------- - 2 files changed, 25 insertions(+), 17 deletions(-) - -diff --git a/sim/ppc/ld-insn.c b/sim/ppc/ld-insn.c -index e39131ca133..585071a861f 100644 ---- a/sim/ppc/ld-insn.c -+++ b/sim/ppc/ld-insn.c -@@ -28,6 +28,24 @@ - - #include "igen.h" - -+static model *last_model; -+ -+static insn *last_model_macro; -+static insn *last_model_function; -+static insn *last_model_internal; -+static insn *last_model_static; -+static insn *last_model_data; -+ -+model *models; -+ -+insn *model_macros; -+insn *model_functions; -+insn *model_internal; -+insn *model_static; -+insn *model_data; -+ -+int max_model_fields_len; -+ - static void - update_depth(insn_table *entry, - lf *file, -diff --git a/sim/ppc/ld-insn.h b/sim/ppc/ld-insn.h -index 88318ffa2b3..52baeaa2d84 100644 ---- a/sim/ppc/ld-insn.h -+++ b/sim/ppc/ld-insn.h -@@ -200,25 +200,15 @@ extern insn_table *load_insn_table - table_include *includes, - cache_table **cache_rules); - --model *models; --model *last_model; -+extern model *models; - --insn *model_macros; --insn *last_model_macro; -+extern insn *model_macros; -+extern insn *model_functions; -+extern insn *model_internal; -+extern insn *model_static; -+extern insn *model_data; - --insn *model_functions; --insn *last_model_function; -- --insn *model_internal; --insn *last_model_internal; -- --insn *model_static; --insn *last_model_static; -- --insn *model_data; --insn *last_model_data; -- --int max_model_fields_len; -+extern int max_model_fields_len; - - extern void insn_table_insert_insn - (insn_table *table, --- -2.18.4 -package/gdb/9.2/0007-Fix-Python3.9-related-runtime-problems.patch deleted +0
-227@@ -1,227 +0,0 @@ -From c47bae859a5af0d95224d90000df0e529f7c5aa0 Mon Sep 17 00:00:00 2001 -From: Kevin Buettner <[email protected]> -Date: Wed, 27 May 2020 20:05:40 -0700 -Subject: [PATCH] Fix Python3.9 related runtime problems - -Python3.9b1 is now available on Rawhide. GDB w/ Python 3.9 support -can be built using the configure switch -with-python=/usr/bin/python3.9. - -Attempting to run gdb/Python3.9 segfaults on startup: - - #0 0x00007ffff7b0582c in PyEval_ReleaseLock () from /lib64/libpython3.9.so.1.0 - #1 0x000000000069ccbf in do_start_initialization () - at worktree-test1/gdb/python/python.c:1789 - #2 _initialize_python () - at worktree-test1/gdb/python/python.c:1877 - #3 0x00000000007afb0a in initialize_all_files () at init.c:237 - ... - -Consulting the the documentation... - -https://docs.python.org/3/c-api/init.html - -...we find that PyEval_ReleaseLock() has been deprecated since version -3.2. It recommends using PyEval_SaveThread or PyEval_ReleaseThread() -instead. In do_start_initialization, in gdb/python/python.c, we -can replace the calls to PyThreadState_Swap() and PyEval_ReleaseLock() -with a single call to PyEval_SaveThread. (Thanks to Keith Seitz -for working this out.) - -With that in place, GDB gets a little bit further. It still dies -on startup, but the backtrace is different: - - #0 0x00007ffff7b04306 in PyOS_InterruptOccurred () - from /lib64/libpython3.9.so.1.0 - #1 0x0000000000576e86 in check_quit_flag () - at worktree-test1/gdb/extension.c:776 - #2 0x0000000000576f8a in set_active_ext_lang (now_active=now_active@entry=0x983c00 <extension_language_python>) - at worktree-test1/gdb/extension.c:705 - #3 0x000000000069d399 in gdbpy_enter::gdbpy_enter (this=0x7fffffffd2d0, - gdbarch=0x0, language=0x0) - at worktree-test1/gdb/python/python.c:211 - #4 0x0000000000686e00 in python_new_inferior (inf=0xddeb10) - at worktree-test1/gdb/python/py-inferior.c:251 - #5 0x00000000005d9fb9 in std::function<void (inferior*)>::operator()(inferior*) const (__args#0=<optimized out>, this=0xccad20) - at /usr/include/c++/10/bits/std_function.h:617 - #6 gdb::observers::observable<inferior*>::notify (args#0=0xddeb10, - this=<optimized out>) - at worktree-test1/gdb/../gdbsupport/observable.h:106 - #7 add_inferior_silent (pid=0) - at worktree-test1/gdb/inferior.c:113 - #8 0x00000000005dbcb8 in initialize_inferiors () - at worktree-test1/gdb/inferior.c:947 - ... - -We checked with some Python Developers and were told that we should -acquire the GIL prior to calling any Python C API function. We -definitely don't have the GIL for calls of PyOS_InterruptOccurred(). - -I moved class_gdbpy_gil earlier in the file and use it in -gdbpy_check_quit_flag() to acquire (and automatically release) the -GIL. - -With those changes in place, I was able to run to a GDB prompt. But, -when trying to quit, it segfaulted again due to due to some other -problems with gdbpy_check_quit_flag(): - - Thread 1 "gdb" received signal SIGSEGV, Segmentation fault. - 0x00007ffff7bbab0c in new_threadstate () from /lib64/libpython3.9.so.1.0 - (top-gdb) bt 8 - #0 0x00007ffff7bbab0c in new_threadstate () from /lib64/libpython3.9.so.1.0 - #1 0x00007ffff7afa5ea in PyGILState_Ensure.cold () - from /lib64/libpython3.9.so.1.0 - #2 0x000000000069b58c in gdbpy_gil::gdbpy_gil (this=<synthetic pointer>) - at worktree-test1/gdb/python/python.c:278 - #3 gdbpy_check_quit_flag (extlang=<optimized out>) - at worktree-test1/gdb/python/python.c:278 - #4 0x0000000000576e96 in check_quit_flag () - at worktree-test1/gdb/extension.c:776 - #5 0x000000000057700c in restore_active_ext_lang (previous=0xe9c050) - at worktree-test1/gdb/extension.c:729 - #6 0x000000000088913a in do_my_cleanups ( - pmy_chain=0xc31870 <final_cleanup_chain>, - old_chain=0xae5720 <sentinel_cleanup>) - at worktree-test1/gdbsupport/cleanups.cc:131 - #7 do_final_cleanups () - at worktree-test1/gdbsupport/cleanups.cc:143 - -In this case, we're trying to call a Python C API function after -Py_Finalize() has been called from finalize_python(). I made -finalize_python set gdb_python_initialized to false and then cause -check_quit_flag() to return early when it's false. - -With these changes in place, GDB seems to be working again with -Python3.9b1. I think it likely that there are other problems lurking. -I wouldn't be surprised to find that there are other calls into Python -where we don't first make sure that we have the GIL. Further changes -may well be needed. - -I see no regressions testing on Rawhide using a GDB built with the -default Python version (3.8.3) versus one built using Python 3.9b1. - -I've also tested on Fedora 28, 29, 30, 31, and 32 (all x86_64) using -the default (though updated) system installed versions of Python on -those OSes. This means that I've tested against Python versions -2.7.15, 2.7.17, 2.7.18, 3.7.7, 3.8.2, and 3.8.3. In each case GDB -still builds without problem and shows no regressions after applying -this patch. - -gdb/ChangeLog: - -2020-MM-DD Kevin Buettner <[email protected]> - Keith Seitz <[email protected]> - - * python/python.c (do_start_initialization): For Python 3.9 and - later, call PyEval_SaveThread instead of PyEval_ReleaseLock. - (class gdbpy_gil): Move to earlier in file. - (finalize_python): Set gdb_python_initialized. - (gdbpy_check_quit_flag): Acquire GIL via gdbpy_gil. Return early - when not initialized. - - -[import into Buildroot, removing ChangeLog change to avoid conflict] -Signed-off-by: Thomas De Schampheleire <[email protected]> - ---- - gdb/ChangeLog | 10 ++++++++ - gdb/python/python.c | 56 ++++++++++++++++++++++++--------------------- - 2 files changed, 40 insertions(+), 26 deletions(-) - -diff --git a/gdb/python/python.c b/gdb/python/python.c -index 67f362b852d..4bdd2201abc 100644 ---- a/gdb/python/python.c -+++ b/gdb/python/python.c -@@ -238,6 +238,30 @@ gdbpy_enter::~gdbpy_enter () - PyGILState_Release (m_state); - } - -+/* A helper class to save and restore the GIL, but without touching -+ the other globals that are handled by gdbpy_enter. */ -+ -+class gdbpy_gil -+{ -+public: -+ -+ gdbpy_gil () -+ : m_state (PyGILState_Ensure ()) -+ { -+ } -+ -+ ~gdbpy_gil () -+ { -+ PyGILState_Release (m_state); -+ } -+ -+ DISABLE_COPY_AND_ASSIGN (gdbpy_gil); -+ -+private: -+ -+ PyGILState_STATE m_state; -+}; -+ - /* Set the quit flag. */ - - static void -@@ -251,6 +275,10 @@ gdbpy_set_quit_flag (const struct extension_language_defn *extlang) - static int - gdbpy_check_quit_flag (const struct extension_language_defn *extlang) - { -+ if (!gdb_python_initialized) -+ return 0; -+ -+ gdbpy_gil gil; - return PyOS_InterruptOccurred (); - } - -@@ -943,30 +971,6 @@ gdbpy_source_script (const struct extension_language_defn *extlang, - - /* Posting and handling events. */ - --/* A helper class to save and restore the GIL, but without touching -- the other globals that are handled by gdbpy_enter. */ -- --class gdbpy_gil --{ --public: -- -- gdbpy_gil () -- : m_state (PyGILState_Ensure ()) -- { -- } -- -- ~gdbpy_gil () -- { -- PyGILState_Release (m_state); -- } -- -- DISABLE_COPY_AND_ASSIGN (gdbpy_gil); -- --private: -- -- PyGILState_STATE m_state; --}; -- - /* A single event. */ - struct gdbpy_event - { -@@ -1616,6 +1620,7 @@ finalize_python (void *ignore) - - Py_Finalize (); - -+ gdb_python_initialized = false; - restore_active_ext_lang (previous_active); - } - -@@ -1785,8 +1790,7 @@ do_start_initialization () - return false; - - /* Release the GIL while gdb runs. */ -- PyThreadState_Swap (NULL); -- PyEval_ReleaseLock (); -+ PyEval_SaveThread (); - - make_final_cleanup (finalize_python, NULL); - --- -2.26.3 -package/gdb/9.2/0007-gdb-configure.tgt-build-gdbserver-with-m68k-and-ucli.patch deleted +0
-41@@ -1,41 +0,0 @@ -From 808601f075fe3dd8ca101e31c9121a4e87f0bfc7 Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine <[email protected]> -Date: Thu, 6 May 2021 07:45:00 +0200 -Subject: [PATCH] gdb/configure.tgt: build gdbserver with m68k and - uclibc - -Allow to build gdbserver with m68k and uclibc: - -checking whether gdbserver is supported on this host... no -configure: error: Automatic gdbserver build is not supported for this configuration - -Fixes: - - http://autobuild.buildroot.org/results/f4d6d9d8418c0da48a3db4ad5a82e19bd16eae34 - -Signed-off-by: Fabrice Fontaine <[email protected]> ---- - gdb/configure.tgt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gdb/configure.tgt b/gdb/configure.tgt -index caa42be1c01..8666bc5d0bf 100644 ---- a/gdb/configure.tgt -+++ b/gdb/configure.tgt -@@ -372,12 +372,12 @@ m68hc11*-*-*|m6811*-*-*) - gdb_sim=../sim/m68hc11/libsim.a - ;; - --m68*-*-aout* | m68*-*-coff* | m68*-*-elf* | m68*-*-rtems* | m68*-*-uclinux* | \ -+m68*-*-aout* | m68*-*-coff* | m68*-*-elf* | m68*-*-rtems* | \ - fido-*-elf*) - # Target: Motorola m68k embedded - gdb_target_obs="m68k-tdep.o" - ;; --m68*-*-linux*) -+m68*-*-*linux*) - # Target: Motorola m68k with a.out and ELF - gdb_target_obs="m68k-tdep.o m68k-linux-tdep.o solib-svr4.o \ - linux-tdep.o glibc-tdep.o symfile-mem.o" --- -2.30.2 -package/gdb/Config.in.host +0
-6@@ -46,11 +46,6 @@ choice help Select the version of gdb you wish to use. -config BR2_GDB_VERSION_9_2 - bool "gdb 9.2.x" - # gdbserver support missing - depends on !BR2_riscv - config BR2_GDB_VERSION_10 bool "gdb 10.x"@@ -68,7 +63,6 @@ endif config BR2_GDB_VERSION string default "arc-2020.09-release-gdb" if BR2_arc - default "9.2" if BR2_GDB_VERSION_9_2 default "10.2" if BR2_GDB_VERSION_10 || !BR2_PACKAGE_HOST_GDB default "11.2" if BR2_GDB_VERSION_11 default "12.1" if BR2_GDB_VERSION_12package/gdb/gdb.hash +0
-1@@ -1,5 +1,4 @@ # From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum -sha512 73635f00f343117aa5e2436f1e1597099e2bfb31ef7bb162b273fa1ea282c3fa9b0f52762e70bfc7ad0334addb8d159e9ac7cbe5998ca4f755ea8cf90714d274 gdb-9.2.tar.xz sha512 3653762ac008e065c37cd641653184c9ff7ce51ee2222ade1122bec9d6cc64dffd4fb74888ef11ac1942064a08910e96b7865112ad37f4602eb0a16bed074caa gdb-10.2.tar.xz sha512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127 gdb-11.2.tar.xz sha512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d gdb-12.1.tar.xzSignature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/4 package/gdb: switch to GDB 11.x as the default version
In reply to Thomas Petazzoni via buildrootNow that GDB 12.x has been added, and GDB 9.x removed, we can make GDB 11.x the default version.
The handling of the GMP dependency needs a bit of change. Until now, the GMP dependency was needed when building full GDB (host or target) in version 11.x or 12.x, so we were explicitly checking whether those versions were enabled.
Now that only GDB 10.x and the ARC-specific version of GDB are the only remaining ones not needing GDB, we invert the logic: only those two versions do not trigger the addition of the GMP dependency.
--- package/gdb/Config.in | 3 +-- package/gdb/Config.in.host | 6 +++--- package/gdb/gdb.mk | 14 +++++++------- 3 files changed, 11 insertions(+), 12 deletions(-)
package/gdb/Config.in +1 -2
@@ -51,8 +51,7 @@ config BR2_PACKAGE_GDB_DEBUGGER bool "full debugger" depends on BR2_USE_WCHAR depends on !BR2_sh - select BR2_PACKAGE_GMP if BR2_GDB_VERSION_11 - select BR2_PACKAGE_GMP if BR2_GDB_VERSION_12 + select BR2_PACKAGE_GMP if !BR2_GDB_VERSION_10 && !BR2_arc select BR2_PACKAGE_NCURSES comment "full gdb on target needs a toolchain w/ wchar"
package/gdb/Config.in.host +3 -3
@@ -41,7 +41,7 @@ config BR2_PACKAGE_HOST_GDB_SIM choice prompt "GDB debugger Version" - default BR2_GDB_VERSION_10 + default BR2_GDB_VERSION_11 depends on !BR2_arc help Select the version of gdb you wish to use.
@@ -63,8 +63,8 @@ endif config BR2_GDB_VERSION string default "arc-2020.09-release-gdb" if BR2_arc - default "10.2" if BR2_GDB_VERSION_10 || !BR2_PACKAGE_HOST_GDB - default "11.2" if BR2_GDB_VERSION_11 + default "10.2" if BR2_GDB_VERSION_10 + default "11.2" if BR2_GDB_VERSION_11 || !BR2_PACKAGE_HOST_GDB default "12.1" if BR2_GDB_VERSION_12 depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
package/gdb/gdb.mk +7 -7
@@ -65,8 +65,9 @@ GDB_DEPENDENCIES += host-flex host-bison HOST_GDB_DEPENDENCIES += host-flex host-bison endif -# Add the necessary host-gmp dependency for the newer releases of GDB -ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12),y) +# All newer versions of GDB need host-gmp, so it's only for older +# versions that the dependency can be avoided. +ifeq ($(BR2_GDB_VERSION_10)$(BR2_arc),) HOST_GDB_DEPENDENCIES += host-gmp endif
@@ -154,11 +155,10 @@ GDB_CONF_OPTS += \ --without-curses endif -# When GDB >= 11.x (because it's enabled for the host) and we're -# building the full gdb for the target, we need gmp as a -# dependency. For now the default gdb version in Buildroot doesn't -# require gmp. -ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12):$(BR2_PACKAGE_GDB_DEBUGGER),y:y) +# Starting from GDB 11.x, gmp is needed as a dependency to build full +# gdb. So we avoid the dependency only for GDB 10.x and the special +# version used on ARC. +ifeq ($(BR2_GDB_VERSION_10)$(BR2_arc):$(BR2_PACKAGE_GDB_DEBUGGER),:y) GDB_CONF_OPTS += \ --with-libgmp-prefix=$(STAGING_DIR)/usr GDB_DEPENDENCIES += gmp
Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 3/4] package/gdb: switch to GDB 11.x as the default version
Thomas, All,
On 2022-08-13 10:35 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 10 lines
Now that GDB 12.x has been added, and GDB 9.x removed, we can make GDB 11.x the default version.
The handling of the GMP dependency needs a bit of change. Until now, the GMP dependency was needed when building full GDB (host or target) in version 11.x or 12.x, so we were explicitly checking whether those versions were enabled.
Now that only GDB 10.x and the ARC-specific version of GDB are the only remaining ones not needing GDB, we invert the logic: only those
,^^^
GMP ----------------------------'
Quoted 1 line
two versions do not trigger the addition of the GMP dependency.
I agree that we can invert the logic now, to simplify things later when we eventually drop the older versions, but I fail to see how this is related to changing the default version of gdb.
I've split the two changes into separate patches, fixed the typo, and applied to next, thanks.
Regards,
Yann E. MORIN.
Quoted 84 lines
Signed-off-by Thomas Petazzoni <[email protected]>--- package/gdb/Config.in | 3 +-- package/gdb/Config.in.host | 6 +++--- package/gdb/gdb.mk | 14 +++++++------- 3 files changed, 11 insertions(+), 12 deletions(-)package/gdb/Config.in +1
-2@@ -51,8 +51,7 @@ config BR2_PACKAGE_GDB_DEBUGGER bool "full debugger" depends on BR2_USE_WCHAR depends on !BR2_sh - select BR2_PACKAGE_GMP if BR2_GDB_VERSION_11 - select BR2_PACKAGE_GMP if BR2_GDB_VERSION_12 + select BR2_PACKAGE_GMP if !BR2_GDB_VERSION_10 && !BR2_arc select BR2_PACKAGE_NCURSES comment "full gdb on target needs a toolchain w/ wchar"package/gdb/Config.in.host +3
-3@@ -41,7 +41,7 @@ config BR2_PACKAGE_HOST_GDB_SIM choice prompt "GDB debugger Version" - default BR2_GDB_VERSION_10 + default BR2_GDB_VERSION_11 depends on !BR2_arc help Select the version of gdb you wish to use.@@ -63,8 +63,8 @@ endif config BR2_GDB_VERSION string default "arc-2020.09-release-gdb" if BR2_arc - default "10.2" if BR2_GDB_VERSION_10 || !BR2_PACKAGE_HOST_GDB - default "11.2" if BR2_GDB_VERSION_11 + default "10.2" if BR2_GDB_VERSION_10 + default "11.2" if BR2_GDB_VERSION_11 || !BR2_PACKAGE_HOST_GDB default "12.1" if BR2_GDB_VERSION_12 depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDBpackage/gdb/gdb.mk +7
-7@@ -65,8 +65,9 @@ GDB_DEPENDENCIES += host-flex host-bison HOST_GDB_DEPENDENCIES += host-flex host-bison endif -# Add the necessary host-gmp dependency for the newer releases of GDB -ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12),y) +# All newer versions of GDB need host-gmp, so it's only for older +# versions that the dependency can be avoided. +ifeq ($(BR2_GDB_VERSION_10)$(BR2_arc),) HOST_GDB_DEPENDENCIES += host-gmp endif@@ -154,11 +155,10 @@ GDB_CONF_OPTS += \ --without-curses endif -# When GDB >= 11.x (because it's enabled for the host) and we're -# building the full gdb for the target, we need gmp as a -# dependency. For now the default gdb version in Buildroot doesn't -# require gmp. -ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12):$(BR2_PACKAGE_GDB_DEBUGGER),y:y) +# Starting from GDB 11.x, gmp is needed as a dependency to build full +# gdb. So we avoid the dependency only for GDB 10.x and the special +# version used on ARC. +ifeq ($(BR2_GDB_VERSION_10)$(BR2_arc):$(BR2_PACKAGE_GDB_DEBUGGER),:y) GDB_CONF_OPTS += \ --with-libgmp-prefix=$(STAGING_DIR)/usr GDB_DEPENDENCIES += gmpSignature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 4/4 package/gdb: remove BR2_PACKAGE_GDB_TOPLEVEL
In reply to Thomas Petazzoni via buildrootThis option was needed to build versions of GDB < 10.x. As we just dropped support for GDB 9.x, this logic can now be removed.
--- package/gdb/Config.in.host | 11 ----------- package/gdb/gdb.mk | 13 ++----------- 2 files changed, 2 insertions(+), 22 deletions(-)
package/gdb/Config.in.host +0 -11
@@ -67,14 +67,3 @@ config BR2_GDB_VERSION default "11.2" if BR2_GDB_VERSION_11 || !BR2_PACKAGE_HOST_GDB default "12.1" if BR2_GDB_VERSION_12 depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB - -# recent gdb versions (>= 10) have gdbserver moved at the top-level, -# which requires a different build logic. -config BR2_PACKAGE_GDB_TOPLEVEL - bool - default y if BR2_arc - default y if BR2_GDB_VERSION_10 - default y if BR2_GDB_VERSION_11 - default y if BR2_GDB_VERSION_12 - default y if !BR2_PACKAGE_HOST_GDB - depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
package/gdb/gdb.mk +2 -11
@@ -18,23 +18,14 @@ GDB_LICENSE = GPL-2.0+, LGPL-2.0+, GPL-3.0+, LGPL-3.0+ GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB GDB_CPE_ID_VENDOR = gnu -# On gdb < 10, if you want to build only gdbserver, you need to -# configure only gdb/gdbserver. -ifeq ($(BR2_PACKAGE_GDB_DEBUGGER)$(BR2_PACKAGE_GDB_TOPLEVEL),) -GDB_SUBDIR = gdb/gdbserver - -# When we want to build the full gdb, or for very recent versions of -# gdb with gdbserver at the top-level, out of tree build is mandatory, -# so we create a 'build' subdirectory in the gdb sources, and build -# from there. -else +# Out of tree build is mandatory, so we create a 'build' subdirectory +# in the gdb sources, and build from there. GDB_SUBDIR = build define GDB_CONFIGURE_SYMLINK mkdir -p $(@D)/$(GDB_SUBDIR) ln -sf ../configure $(@D)/$(GDB_SUBDIR)/configure endef GDB_PRE_CONFIGURE_HOOKS += GDB_CONFIGURE_SYMLINK -endif # For the host variant, we really want to build with XML support, # which is needed to read XML descriptions of target architectures. We
Signature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRe: [Buildroot] [PATCH 4/4] package/gdb: remove BR2_PACKAGE_GDB_TOPLEVEL
Thomas, All,
On 2022-08-13 10:35 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 5 lines
This option was needed to build versions of GDB < 10.x. As we just dropped support for GDB 9.x, this logic can now be removed.
Signed-off-by Thomas Petazzoni <[email protected]>---
[--SNIP--]
package/gdb/gdb.mk GDB_LICENSE = GPL-2.0+, LGPL-2.0+, GPL-3.0+, LGPL-3.0+ · line 24
Quoted 12 lines
package/gdb/gdb.mk +0
-4@@ -18,23 +18,14 @@ GDB_LICENSE = GPL-2.0+, LGPL-2.0+, GPL-3.0+, LGPL-3.0+ GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB GDB_CPE_ID_VENDOR = gnu -# On gdb < 10, if you want to build only gdbserver, you need to -# configure only gdb/gdbserver. -ifeq ($(BR2_PACKAGE_GDB_DEBUGGER)$(BR2_PACKAGE_GDB_TOPLEVEL),) -GDB_SUBDIR = gdb/gdbserver
I got slightly confused here, so I added a little blurb in the commit log to explain that it is correct to drop this.
Applied to next, thanks.
Regards,
Yann E. MORIN.
Quoted 24 lines
package/gdb/gdb.mk +2
-6-# When we want to build the full gdb, or for very recent versions of -# gdb with gdbserver at the top-level, out of tree build is mandatory, -# so we create a 'build' subdirectory in the gdb sources, and build -# from there. -else +# Out of tree build is mandatory, so we create a 'build' subdirectory +# in the gdb sources, and build from there. GDB_SUBDIR = build define GDB_CONFIGURE_SYMLINK mkdir -p $(@D)/$(GDB_SUBDIR) ln -sf ../configure $(@D)/$(GDB_SUBDIR)/configure endef GDB_PRE_CONFIGURE_HOOKS += GDB_CONFIGURE_SYMLINK -endif # For the host variant, we really want to build with XML support, # which is needed to read XML descriptions of target architectures. WeSignature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedThomas, All,
On 2022-08-13 10:35 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 1 line
Signed-off-by Thomas Petazzoni <[email protected]>
Applied to next, thanks.
Regards,
Yann E. MORIN.
Quoted 553 lines
--- ...e-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 55 ++++++++++++++++ ...-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch | 43 +++++++++++++ package/gdb/12.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 ++++++++++++ .../12.1/0007-fix-musl-build-on-riscv.patch | 60 ++++++++++++++++++ ...-gdbserver-Makefile.in-fix-NLS-build.patch | 38 +++++++++++ package/gdb/Config.in | 1 + package/gdb/Config.in.host | 5 ++ package/gdb/gdb.hash | 1 + package/gdb/gdb.mk | 11 ++-- 12 files changed, 403 insertions(+), 6 deletions(-) create mode 100644 package/gdb/12.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch create mode 100644 package/gdb/12.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch create mode 100644 package/gdb/12.1/0003-use-asm-sgidefs.h.patch create mode 100644 package/gdb/12.1/0004-gdbserver-fix-build-for-m68k.patch create mode 100644 package/gdb/12.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch create mode 100644 package/gdb/12.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch create mode 100644 package/gdb/12.1/0007-fix-musl-build-on-riscv.patch create mode 100644 package/gdb/12.1/0008-gdbserver-Makefile.in-fix-NLS-build.patchpackage/gdb/12.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch new file +55
-0@@ -0,0 +1,55 @@ +From bca7617f325787550e2133fe082dbe4da7716fc6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +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 <[email protected]> +Signed-off-by: Thomas Petazzoni <[email protected]> +[Rebase on gdb 8.3] +Signed-off-by: Romain Naour <[email protected]> +--- + 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 1094f6b0be3..d8588a646c2 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 <asm/ptrace.h> ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + #include <asm/cputable.h> + + /* This sometimes isn't defined. */ +diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc +index 08824887003..69afbae5359 100644 +--- a/gdbserver/linux-ppc-low.cc ++++ b/gdbserver/linux-ppc-low.cc +@@ -23,7 +23,13 @@ + #include "elf/common.h" + #include <sys/uio.h> + #include <elf.h> ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++#endif + #include <asm/ptrace.h> ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + + #include "arch/ppc-linux-common.h" + #include "arch/ppc-linux-tdesc.h" +-- +2.37.1 +package/gdb/12.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch new file +43
-0@@ -0,0 +1,43 @@ +From a3b84f1777bd75bdc5914f4ce5f52c55e723cd9a Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <[email protected]> +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 <[email protected]> +[Rebase on gdb 8.0] +Signed-off-by: Romain Naour <[email protected]> +--- + 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 966bdeb8ba7..1e3ce53b4d5 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 <sys/reg.h> + #endif + ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++# define pt_dspregs uapi_pt_dspregs ++#endif + #include <asm/ptrace.h> ++#if !defined(__GLIBC__) ++# undef pt_regs ++# undef pt_dspregs ++#endif + + #define sh_num_regs 41 + +-- +2.37.1 +package/gdb/12.1/0003-use-asm-sgidefs.h.patch new file +40
-0@@ -0,0 +1,40 @@ +From 8c94bf2b40d51c500c364ac03a2da1e9f9a94287 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 20e12b6889e..1e66e98a013 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 <sgidefs.h> ++#include <asm/sgidefs.h> + #include "nat/gdb_ptrace.h" + #include <asm/ptrace.h> + #include "inf-ptrace.h" +-- +2.37.1 +package/gdb/12.1/0004-gdbserver-fix-build-for-m68k.patch new file +63
-0@@ -0,0 +1,63 @@ +From 48af20f76b468c5d274d286677a2887136c4c7c4 Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +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 <sys/reg.h> is included after <linux/ptrace.h>, +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 <sys/reg.h> on top of "linux-low.h". + +[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92 + +Signed-off-by: Romain Naour <[email protected]> +--- + 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 7a433ffab5e..bb3fbd69bd7 100644 +--- a/gdbserver/linux-m68k-low.cc ++++ b/gdbserver/linux-m68k-low.cc +@@ -17,6 +17,11 @@ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + + #include "server.h" ++ ++#ifdef HAVE_SYS_REG_H ++#include <sys/reg.h> ++#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 <sys/reg.h> +-#endif +- + #define m68k_num_regs 29 + #define m68k_num_gregs 18 + +-- +2.37.1 +package/gdb/12.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch new file +53
-0@@ -0,0 +1,53 @@ +From cbcb73a86dea0c0b9917b49b37095463155c5377 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <[email protected]> +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 <[email protected]> +[Romain: rebase on gdb 8.3] +Signed-off-by: Romain Naour <[email protected]> +--- + 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 4df9a98047e..9bf0f6059f5 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 <vector> + + extern char **environ; +-- +2.37.1 +package/gdb/12.1/0006-Fix-getrandom-compile-for-uclibc-v1.0.35.patch new file +39
-0@@ -0,0 +1,39 @@ +From 03efe04b5748703234516836cb0186d25b052556 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 41212fb329d..0ad3f9648d2 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.37.1 +package/gdb/12.1/0007-fix-musl-build-on-riscv.patch new file +60
-0@@ -0,0 +1,60 @@ +From f2dd94dce490d8e8301fba9e4684cfb8d7bc7756 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +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 <[email protected]> +--- + 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 07b49c0f16e..1ff58cce16f 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 6b2902e422d..ead54db09a8 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.37.1 +package/gdb/12.1/0008-gdbserver-Makefile.in-fix-NLS-build.patch new file +38
-0@@ -0,0 +1,38 @@ +From 73487022cb629415c3b0c2d9e125035b6e5c2d32 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 47648b8d962..9d862bcb9c9 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.37.1 +package/gdb/Config.in +1
-0@@ -52,6 +52,7 @@ config BR2_PACKAGE_GDB_DEBUGGER depends on BR2_USE_WCHAR depends on !BR2_sh select BR2_PACKAGE_GMP if BR2_GDB_VERSION_11 + select BR2_PACKAGE_GMP if BR2_GDB_VERSION_12 select BR2_PACKAGE_NCURSES comment "full gdb on target needs a toolchain w/ wchar"package/gdb/Config.in.host +5
-0@@ -57,6 +57,9 @@ config BR2_GDB_VERSION_10 config BR2_GDB_VERSION_11 bool "gdb 11.x" +config BR2_GDB_VERSION_12 + bool "gdb 12.x" + endchoice endif@@ -68,6 +71,7 @@ config BR2_GDB_VERSION default "9.2" if BR2_GDB_VERSION_9_2 default "10.2" if BR2_GDB_VERSION_10 || !BR2_PACKAGE_HOST_GDB default "11.2" if BR2_GDB_VERSION_11 + default "12.1" if BR2_GDB_VERSION_12 depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB # recent gdb versions (>= 10) have gdbserver moved at the top-level,@@ -77,5 +81,6 @@ config BR2_PACKAGE_GDB_TOPLEVEL default y if BR2_arc default y if BR2_GDB_VERSION_10 default y if BR2_GDB_VERSION_11 + default y if BR2_GDB_VERSION_12 default y if !BR2_PACKAGE_HOST_GDB depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDBpackage/gdb/gdb.hash +1
-0@@ -2,6 +2,7 @@ sha512 73635f00f343117aa5e2436f1e1597099e2bfb31ef7bb162b273fa1ea282c3fa9b0f52762e70bfc7ad0334addb8d159e9ac7cbe5998ca4f755ea8cf90714d274 gdb-9.2.tar.xz sha512 3653762ac008e065c37cd641653184c9ff7ce51ee2222ade1122bec9d6cc64dffd4fb74888ef11ac1942064a08910e96b7865112ad37f4602eb0a16bed074caa gdb-10.2.tar.xz sha512 07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127 gdb-11.2.tar.xz +sha512 425568d2e84672177d0fb87b1ad7daafdde097648d605e30cf0656970f66adc6a82ca2d83375ea4be583e9683a340e5bfdf5819668ddf66728200141ae50ff2d gdb-12.1.tar.xz # Locally calculated (fetched from Github) sha512 5a2acf2fd33ab2ff589e1037ca40abda54328997dcff26b2b49b874bd3be980be5a63342962254f3c3bda98e32ce7a33af704d37353352833dee193135600458 gdb-arc-2020.09-release-gdb.tar.gzpackage/gdb/gdb.mk +5
-6@@ -65,9 +65,8 @@ GDB_DEPENDENCIES += host-flex host-bison HOST_GDB_DEPENDENCIES += host-flex host-bison endif -# When BR2_GDB_VERSION_11=y, we're going to build gdb 11.x for the -# host (if enabled), so we add the necessary gmp dependency. -ifeq ($(BR2_GDB_VERSION_11),y) +# Add the necessary host-gmp dependency for the newer releases of GDB +ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12),y) HOST_GDB_DEPENDENCIES += host-gmp endif@@ -155,11 +154,11 @@ GDB_CONF_OPTS += \ --without-curses endif -# When BR2_GDB_VERSION_11=y (because it's enabled for the host) and -# we're building the full gdb for the target, we need gmp as a +# When GDB >= 11.x (because it's enabled for the host) and we're +# building the full gdb for the target, we need gmp as a # dependency. For now the default gdb version in Buildroot doesn't # require gmp. -ifeq ($(BR2_GDB_VERSION_11)$(BR2_PACKAGE_GDB_DEBUGGER),yy) +ifeq ($(BR2_GDB_VERSION_11)$(BR2_GDB_VERSION_12):$(BR2_PACKAGE_GDB_DEBUGGER),y:y) GDB_CONF_OPTS += \ --with-libgmp-prefix=$(STAGING_DIR)/usr GDB_DEPENDENCIES += gmpSignature · 6 lines
2.37.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot