summaryrefslogtreecommitdiffstats
path: root/meta-microblaze
diff options
context:
space:
mode:
Diffstat (limited to 'meta-microblaze')
-rw-r--r--meta-microblaze/conf/layer.conf1
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb-common.inc66
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb3
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb-cross_12.1.bb2
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb.inc20
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch28
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch35
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch52
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch50
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch36
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch30
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch48
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch55
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch49
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch40
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb/readline-8.2.patch39
-rw-r--r--meta-microblaze/recipes-devtools/gdb/gdb_12.1.bb39
17 files changed, 0 insertions, 593 deletions
diff --git a/meta-microblaze/conf/layer.conf b/meta-microblaze/conf/layer.conf
index d1443c16..dbb83aed 100644
--- a/meta-microblaze/conf/layer.conf
+++ b/meta-microblaze/conf/layer.conf
@@ -24,7 +24,6 @@ INHERIT += "rust_microblaze"
24GCCVERSION:microblaze = "12.2.%" 24GCCVERSION:microblaze = "12.2.%"
25SDKGCCVERSION:microblaze = "13.%" 25SDKGCCVERSION:microblaze = "13.%"
26 26
27GDBVERSION:microblaze = "12.1"
28# canon-prefix-map doesn't exist in gcc 12.x 27# canon-prefix-map doesn't exist in gcc 12.x
29DEBUG_PREFIX_MAP:remove:microblaze = "-fcanon-prefix-map" 28DEBUG_PREFIX_MAP:remove:microblaze = "-fcanon-prefix-map"
30 29
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb-common.inc b/meta-microblaze/recipes-devtools/gdb/gdb-common.inc
deleted file mode 100644
index 925b0c2f..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb-common.inc
+++ /dev/null
@@ -1,66 +0,0 @@
1SUMMARY = "GNU debugger"
2HOMEPAGE = "http://www.gnu.org/software/gdb/"
3DESCRIPTION = "GDB, the GNU Project debugger, allows you to see what is going on inside another program while it executes -- or what another program was doing at the moment it crashed."
4SECTION = "devel"
5DEPENDS = "expat gmp zlib ncurses virtual/libiconv ${LTTNGUST} bison-native"
6
7LTTNGUST = "lttng-ust"
8LTTNGUST:arc = ""
9LTTNGUST:aarch64 = ""
10LTTNGUST:mipsarch = ""
11LTTNGUST:sh4 = ""
12
13inherit autotools texinfo
14
15UPSTREAM_CHECK_GITTAGREGEX = "gdb\-(?P<pver>.+)\-release"
16
17B = "${WORKDIR}/build-${TARGET_SYS}"
18
19EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
20
21EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \
22 --with-curses --disable-multilib --disable-sim \
23 --without-guile \
24 ${GDBPROPREFIX} ${EXPAT} \
25 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
26 --disable-rpath \
27 --disable-gas --disable-binutils \
28 --disable-ld --disable-gold \
29 --disable-gprof \
30 --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \
31"
32
33PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
34# Use --without-system-readline to compile with readline 5.
35PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
36PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
37PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
38# ncurses is already a hard DEPENDS, but would be added here if it weren't
39PACKAGECONFIG[tui] = "--enable-tui,--disable-tui"
40PACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--without-lzma,xz"
41PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils"
42
43GDBPROPREFIX = "--program-prefix=''"
44
45DISABLE_STATIC = ""
46
47do_configure () {
48 # override this function to avoid the autoconf/automake/aclocal/autoheader
49 # calls for now
50 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
51 oe_runconf
52}
53
54# we don't want gdb to provide bfd/iberty/opcodes, which instead will override the
55# right bits installed by binutils. Same for bfd.info -- also from binutils.
56do_install:append() {
57 rm -rf ${D}${libdir}
58 rm -rf ${D}${includedir}
59 rm -rf ${D}${datadir}/locale
60 rm -f ${D}${infodir}/bfd.info
61}
62
63RRECOMMENDS:gdb:append:linux = " glibc-thread-db "
64RRECOMMENDS:gdb:append:linux-gnueabi = " glibc-thread-db "
65RRECOMMENDS:gdbserver:append:linux = " glibc-thread-db "
66RRECOMMENDS:gdbserver:append:linux-gnueabi = " glibc-thread-db "
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb b/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb
deleted file mode 100644
index 4ab2b715..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require gdb-common.inc
2require gdb-cross-canadian.inc
3require gdb.inc
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb-cross_12.1.bb b/meta-microblaze/recipes-devtools/gdb/gdb-cross_12.1.bb
deleted file mode 100644
index 3b654a2f..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb-cross_12.1.bb
+++ /dev/null
@@ -1,2 +0,0 @@
1require gdb-cross.inc
2require gdb.inc
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb.inc b/meta-microblaze/recipes-devtools/gdb/gdb.inc
deleted file mode 100644
index a5dc5545..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb.inc
+++ /dev/null
@@ -1,20 +0,0 @@
1LICENSE = "GPL-2.0-only & GPL-3.0-only & LGPL-2.0-only & LGPL-3.0-only"
2LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
3 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
4 file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
5 file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
6
7SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \
8 file://0001-make-man-install-relative-to-DESTDIR.patch \
9 file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
10 file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
11 file://0004-Dont-disable-libreadline.a-when-using-disable-static.patch \
12 file://0005-use-asm-sgidefs.h.patch \
13 file://0006-Change-order-of-CFLAGS.patch \
14 file://0007-resolve-restrict-keyword-conflict.patch \
15 file://0008-Fix-invalid-sigprocmask-call.patch \
16 file://0009-gdbserver-ctrl-c-handling.patch \
17 file://readline-8.2.patch \
18 file://0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
19 "
20SRC_URI[sha256sum] = "0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed"
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
deleted file mode 100644
index 16d6cf19..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 8eca28eddcda4ce8a345ca031f43ff1ed6f37089 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 2 Mar 2015 02:27:55 +0000
4Subject: [PATCH 1/9] make man install relative to DESTDIR
5
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 sim/common/Make-common.in | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in
14index 74e5dad3049..9e95c224ba4 100644
15--- a/sim/common/Make-common.in
16+++ b/sim/common/Make-common.in
17@@ -70,7 +70,7 @@ tooldir = $(libdir)/$(target_alias)
18 datadir = @datadir@
19 datarootdir = @datarootdir@
20 mandir = @mandir@
21-man1dir = $(mandir)/man1
22+man1dir = $(DESTDIR)$(mandir)/man1
23 infodir = @infodir@
24 includedir = @includedir@
25
26--
272.36.1
28
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
deleted file mode 100644
index 8d263de8..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 37d3afd2eaa95c89ad7cb5d0079b017752e4d0ea Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 23 Mar 2016 06:30:09 +0000
4Subject: [PATCH 2/9] mips-linux-nat: Define _ABIO32 if not defined
5
6This helps building gdb on mips64 on musl, since
7musl does not provide sgidefs.h this define is
8only defined when GCC is using o32 ABI, in that
9case gcc emits it as built-in define and hence
10it works ok for mips32
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 gdb/mips-linux-nat.c | 4 ++++
16 1 file changed, 4 insertions(+)
17
18diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
19index 20e12b6889e..6adc61235aa 100644
20--- a/gdb/mips-linux-nat.c
21+++ b/gdb/mips-linux-nat.c
22@@ -41,6 +41,10 @@
23 #ifndef PTRACE_GET_THREAD_AREA
24 #define PTRACE_GET_THREAD_AREA 25
25 #endif
26+/* musl does not define and relies on compiler built-in macros for it */
27+#ifndef _ABIO32
28+#define _ABIO32 1
29+#endif
30
31 class mips_linux_nat_target final : public linux_nat_trad_target
32 {
33--
342.36.1
35
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
deleted file mode 100644
index 7e09404b..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From e689eec672ee8c53b3adb2ade2b5deb9b7cd99d4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Apr 2016 18:32:14 -0700
4Subject: [PATCH 3/9] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
5
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 gdb/nat/ppc-linux.h | 6 ++++++
11 gdbserver/linux-ppc-low.cc | 6 ++++++
12 2 files changed, 12 insertions(+)
13
14diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
15index 1094f6b0be3..d8588a646c2 100644
16--- a/gdb/nat/ppc-linux.h
17+++ b/gdb/nat/ppc-linux.h
18@@ -18,7 +18,13 @@
19 #ifndef NAT_PPC_LINUX_H
20 #define NAT_PPC_LINUX_H
21
22+#if !defined(__GLIBC__)
23+# define pt_regs uapi_pt_regs
24+#endif
25 #include <asm/ptrace.h>
26+#if !defined(__GLIBC__)
27+# undef pt_regs
28+#endif
29 #include <asm/cputable.h>
30
31 /* This sometimes isn't defined. */
32diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
33index 08824887003..69afbae5359 100644
34--- a/gdbserver/linux-ppc-low.cc
35+++ b/gdbserver/linux-ppc-low.cc
36@@ -23,7 +23,13 @@
37 #include "elf/common.h"
38 #include <sys/uio.h>
39 #include <elf.h>
40+#if !defined(__GLIBC__)
41+# define pt_regs uapi_pt_regs
42+#endif
43 #include <asm/ptrace.h>
44+#if !defined(__GLIBC__)
45+# undef pt_regs
46+#endif
47
48 #include "arch/ppc-linux-common.h"
49 #include "arch/ppc-linux-tdesc.h"
50--
512.36.1
52
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch
deleted file mode 100644
index a1e85e91..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From 15ee6a626242efb8f367be49c13e00d0b72317f0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Apr 2016 15:25:03 -0700
4Subject: [PATCH 4/9] Dont disable libreadline.a when using --disable-static
5
6If gdb is configured with --disable-static then this is dutifully passed to
7readline which then disables libreadline.a, which causes a problem when gdb
8tries to link against that.
9
10To ensure that readline always builds static libraries, pass --enable-static to
11the sub-configure.
12
13Upstream-Status: Pending
14Signed-off-by: Ross Burton <ross.burton@intel.com>
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 Makefile.def | 3 ++-
18 Makefile.in | 2 +-
19 2 files changed, 3 insertions(+), 2 deletions(-)
20
21diff --git a/Makefile.def b/Makefile.def
22index acdcd625ed6..78fc31e1199 100644
23--- a/Makefile.def
24+++ b/Makefile.def
25@@ -120,7 +120,8 @@ host_modules= { module= libiconv;
26 missing= install-html;
27 missing= install-info; };
28 host_modules= { module= m4; };
29-host_modules= { module= readline; };
30+host_modules= { module= readline;
31+ extra_configure_flags='--enable-static';};
32 host_modules= { module= sid; };
33 host_modules= { module= sim; };
34 host_modules= { module= texinfo; no_install= true; };
35diff --git a/Makefile.in b/Makefile.in
36index 3aacd2daac9..aa58adada4a 100644
37--- a/Makefile.in
38+++ b/Makefile.in
39@@ -32791,7 +32791,7 @@ configure-readline:
40 $$s/$$module_srcdir/configure \
41 --srcdir=$${topdir}/$$module_srcdir \
42 $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
43- --target=${target_alias} \
44+ --target=${target_alias} --enable-static \
45 || exit 1
46 @endif readline
47
48--
492.36.1
50
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch
deleted file mode 100644
index 242099b9..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From 25a75aaf29791f4302f0e4452f7ebaf735d4f083 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <amccurdy@gmail.com>
3Date: Sat, 30 Apr 2016 15:29:06 -0700
4Subject: [PATCH 5/9] use <asm/sgidefs.h>
5
6Build fix for MIPS with musl libc
7
8The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
9but not by musl. Regardless of the libc, the kernel headers provide
10<asm/sgidefs.h> which provides the same definitions, so use that
11instead.
12
13Upstream-Status: Pending
14
15Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 gdb/mips-linux-nat.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
22index 6adc61235aa..afb40066744 100644
23--- a/gdb/mips-linux-nat.c
24+++ b/gdb/mips-linux-nat.c
25@@ -31,7 +31,7 @@
26 #include "gdb_proc_service.h"
27 #include "gregset.h"
28
29-#include <sgidefs.h>
30+#include <asm/sgidefs.h>
31 #include "nat/gdb_ptrace.h"
32 #include <asm/ptrace.h>
33 #include "inf-ptrace.h"
34--
352.36.1
36
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch
deleted file mode 100644
index 58c9b1d0..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From c0e7c34134aa1f9644075c596a2338a50d3d923e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Apr 2016 15:35:39 -0700
4Subject: [PATCH 6/9] Change order of CFLAGS
5
6Lets us override Werror if need be
7
8Upstream-Status: Inappropriate
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 gdbserver/Makefile.in | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
16index 47648b8d962..5599779de57 100644
17--- a/gdbserver/Makefile.in
18+++ b/gdbserver/Makefile.in
19@@ -156,7 +156,7 @@ WIN32APILIBS = @WIN32APILIBS@
20 INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \
21 ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS)
22 INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
23-INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
24+INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER
25
26 # LDFLAGS is specifically reserved for setting from the command line
27 # when running make.
28--
292.36.1
30
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch
deleted file mode 100644
index bbd1f0b2..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 44fa1ecfbd8a5fe0cfea12a175fa041686842a0c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 10 May 2016 08:47:05 -0700
4Subject: [PATCH 7/9] resolve restrict keyword conflict
5
6GCC detects that we call 'restrict' as param name in function
7signatures and complains since both params are called 'restrict'
8therefore we use __restrict to denote the C99 keywork
9
10Upstream-Status: Pending
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 gnulib/import/sys_time.in.h | 8 ++++----
15 1 file changed, 4 insertions(+), 4 deletions(-)
16
17diff --git a/gnulib/import/sys_time.in.h b/gnulib/import/sys_time.in.h
18index 90a67d18426..664641a1fe8 100644
19--- a/gnulib/import/sys_time.in.h
20+++ b/gnulib/import/sys_time.in.h
21@@ -93,20 +93,20 @@ struct timeval
22 # define gettimeofday rpl_gettimeofday
23 # endif
24 _GL_FUNCDECL_RPL (gettimeofday, int,
25- (struct timeval *restrict, void *restrict)
26+ (struct timeval *__restrict, void *__restrict)
27 _GL_ARG_NONNULL ((1)));
28 _GL_CXXALIAS_RPL (gettimeofday, int,
29- (struct timeval *restrict, void *restrict));
30+ (struct timeval *__restrict, void *__restrict));
31 # else
32 # if !@HAVE_GETTIMEOFDAY@
33 _GL_FUNCDECL_SYS (gettimeofday, int,
34- (struct timeval *restrict, void *restrict)
35+ (struct timeval *__restrict, void *__restrict)
36 _GL_ARG_NONNULL ((1)));
37 # endif
38 /* Need to cast, because on glibc systems, by default, the second argument is
39 struct timezone *. */
40 _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
41- (struct timeval *restrict, void *restrict));
42+ (struct timeval *__restrict, void *__restrict));
43 # endif
44 _GL_CXXALIASWARN (gettimeofday);
45 # if defined __cplusplus && defined GNULIB_NAMESPACE
46--
472.36.1
48
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch
deleted file mode 100644
index 3e293276..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From 48906e1038e469b429aa35d0f967730a929c3880 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 15 Jan 2023 00:16:25 -0800
4Subject: [PATCH 8/8] Define alignof using _Alignof when using C11 or newer
5
6WG14 N2350 made very clear that it is an UB having type definitions
7within "offsetof" [1]. This patch enhances the implementation of macro
8alignof_slot to use builtin "_Alignof" to avoid undefined behavior on
9when using std=c11 or newer
10
11clang 16+ has started to flag this [2]
12
13Fixes build when using -std >= gnu11 and using clang16+
14
15Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it
16may support C11, exclude those compilers too
17
18gnulib needs this fix and then it will be applied to downstream packages
19like gdb [3]
20
21[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm
22[2] https://reviews.llvm.org/D133574
23[3] https://public-inbox.org/bug-gnulib/20230114232744.215167-1-raj.khem@gmail.com/T/#u
24
25Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=2d404c7dd974cc65f894526f4a1b76bc1dcd8d82]
26Signed-off-by: Khem Raj <raj.khem@gmail.com>
27---
28 libiberty/sha1.c | 10 ++++++++++
29 1 file changed, 10 insertions(+)
30
31diff --git a/libiberty/sha1.c b/libiberty/sha1.c
32index 504f06d3b9b..790ada82443 100644
33--- a/libiberty/sha1.c
34+++ b/libiberty/sha1.c
35@@ -229,7 +229,17 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
36 if (len >= 64)
37 {
38 #if !_STRING_ARCH_unaligned
39+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
40+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
41+ clang versions < 8.0.0 have the same bug. */
42+#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
43+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
44+ && !defined __clang__) \
45+ || (defined __clang__ && __clang_major__ < 8))
46 # define alignof(type) offsetof (struct { char c; type x; }, x)
47+#else
48+# define alignof(type) _Alignof(type)
49+#endif
50 # define UNALIGNED_P(p) (((size_t) p) % alignof (sha1_uint32) != 0)
51 if (UNALIGNED_P (buffer))
52 while (len > 64)
53--
542.39.0
55
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch
deleted file mode 100644
index ed1310ce..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From 5bdd15553daef7370ca3c1f12d8f14247fdd4907 Mon Sep 17 00:00:00 2001
2From: Yousong Zhou <yszhou4tech@gmail.com>
3Date: Fri, 24 Mar 2017 10:36:03 +0800
4Subject: [PATCH 8/9] Fix invalid sigprocmask call
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The POSIX document says
10
11 The pthread_sigmask() and sigprocmask() functions shall fail if:
12
13 [EINVAL]
14 The value of the how argument is not equal to one of the defined values.
15
16and this is how musl-libc is currently doing. Fix the call to be safe
17and correct
18
19 [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html
20
21gdb/ChangeLog:
222017-03-24 Yousong Zhou <yszhou4tech@gmail.com>
23
24 * common/signals-state-save-restore.c (save_original_signals_state):
25 Fix invalid sigprocmask call.
26
27Upstream-Status: Pending [not author, cherry-picked from LEDE https://bugs.lede-project.org/index.php?do=details&task_id=637&openedfrom=-1%2Bweek]
28Signed-off-by: André Draszik <adraszik@tycoint.com>
29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30---
31 gdbsupport/signals-state-save-restore.cc | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-)
33
34diff --git a/gdbsupport/signals-state-save-restore.cc b/gdbsupport/signals-state-save-restore.cc
35index 92e799d3551..a4a0234272a 100644
36--- a/gdbsupport/signals-state-save-restore.cc
37+++ b/gdbsupport/signals-state-save-restore.cc
38@@ -38,7 +38,7 @@ save_original_signals_state (bool quiet)
39 int i;
40 int res;
41
42- res = gdb_sigmask (0, NULL, &original_signal_mask);
43+ res = gdb_sigmask (SIG_BLOCK, NULL, &original_signal_mask);
44 if (res == -1)
45 perror_with_name (("sigprocmask"));
46
47--
482.36.1
49
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch
deleted file mode 100644
index f53d3bd1..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From bc3b1f6aacf2d8fe66b022fbfcf28cd82c76e52f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 29 Nov 2018 18:00:23 -0800
4Subject: [PATCH 9/9] gdbserver ctrl-c handling
5
6This problem was created by the upstream commit 78708b7c8c
7After applying the commit, it will send SIGINT to the process
8group(-signal_pid).
9But if we use gdbserver send SIGINT, and the attached process is not a
10process
11group leader, then the "kill (-signal_pid, SIGINT)" returns error and
12fails to
13interrupt the attached process.
14
15Upstream-Status: Submitted
16[https://sourceware.org/bugzilla/show_bug.cgi?id=18945]
17
18Author: Josh Gao
19Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21---
22 gdbserver/linux-low.cc | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
26index 7726a4a0c36..f750e074a03 100644
27--- a/gdbserver/linux-low.cc
28+++ b/gdbserver/linux-low.cc
29@@ -5496,7 +5496,7 @@ linux_process_target::request_interrupt ()
30 {
31 /* Send a SIGINT to the process group. This acts just like the user
32 typed a ^C on the controlling terminal. */
33- ::kill (-signal_pid, SIGINT);
34+ ::kill (signal_pid, SIGINT);
35 }
36
37 bool
38--
392.36.1
40
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/readline-8.2.patch b/meta-microblaze/recipes-devtools/gdb/gdb/readline-8.2.patch
deleted file mode 100644
index c2db4c0d..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb/readline-8.2.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 1add37b567a7dee39d99f37b37802034c3fce9c4 Mon Sep 17 00:00:00 2001
2From: Andreas Schwab <schwab@linux-m68k.org>
3Date: Sun, 20 Mar 2022 14:01:54 +0100
4Subject: [PATCH] Add support for readline 8.2
5
6In readline 8.2 the type of rl_completer_word_break_characters changed to
7include const.
8
9Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1add37b567a7dee39d99f37b37802034c3fce9c4]
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11---
12 gdb/completer.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/gdb/completer.c b/gdb/completer.c
16index d3900ae2014..a51c16ac7f8 100644
17--- a/gdb/completer.c
18+++ b/gdb/completer.c
19@@ -36,7 +36,7 @@
20 calling a hook instead so we eliminate the CLI dependency. */
21 #include "gdbcmd.h"
22
23-/* Needed for rl_completer_word_break_characters() and for
24+/* Needed for rl_completer_word_break_characters and for
25 rl_filename_completion_function. */
26 #include "readline/readline.h"
27
28@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw ()
29 rl_basic_quote_characters = NULL;
30 }
31
32- return rl_completer_word_break_characters;
33+ return (char *) rl_completer_word_break_characters;
34 }
35
36 char *
37--
382.31.1
39
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb_12.1.bb b/meta-microblaze/recipes-devtools/gdb/gdb_12.1.bb
deleted file mode 100644
index 9c6db4ca..00000000
--- a/meta-microblaze/recipes-devtools/gdb/gdb_12.1.bb
+++ /dev/null
@@ -1,39 +0,0 @@
1require gdb-common.inc
2
3inherit gettext pkgconfig
4
5#LDFLAGS:append = " -s"
6#export CFLAGS:append=" -L${STAGING_LIBDIR}"
7
8# cross-canadian must not see this
9PACKAGES =+ "gdbserver"
10FILES:gdbserver = "${bindir}/gdbserver"
11
12require gdb.inc
13
14inherit python3-dir
15
16EXTRA_OEMAKE:append:libc-musl = "\
17 gt_cv_func_gnugettext1_libc=yes \
18 gt_cv_func_gnugettext2_libc=yes \
19 gl_cv_func_working_strerror=yes \
20 gl_cv_func_strerror_0_works=yes \
21 gl_cv_func_gettimeofday_clobber=no \
22 "
23
24do_configure:prepend() {
25 if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
26 cat > ${WORKDIR}/python << EOF
27#!/bin/sh
28case "\$2" in
29 --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;;
30 --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;;
31 --exec-prefix) echo "${exec_prefix}" ;;
32 *) exit 1 ;;
33esac
34exit 0
35EOF
36 chmod +x ${WORKDIR}/python
37 fi
38}
39