diff options
Diffstat (limited to 'meta/recipes-devtools/gdb')
17 files changed, 92 insertions, 132 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc index 925b0c2f80..ea1fc27a61 100644 --- a/meta/recipes-devtools/gdb/gdb-common.inc +++ b/meta/recipes-devtools/gdb/gdb-common.inc @@ -2,7 +2,7 @@ SUMMARY = "GNU debugger" HOMEPAGE = "http://www.gnu.org/software/gdb/" DESCRIPTION = "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." SECTION = "devel" -DEPENDS = "expat gmp zlib ncurses virtual/libiconv ${LTTNGUST} bison-native" +DEPENDS = "expat gmp mpfr zlib ncurses virtual/libiconv ${LTTNGUST} bison-native" LTTNGUST = "lttng-ust" LTTNGUST:arc = "" @@ -30,13 +30,14 @@ EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \ --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \ " -PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" +PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python \ + ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)} \ + " # Use --without-system-readline to compile with readline 5. PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline" -PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs" +PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3-codecs" PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace" -# ncurses is already a hard DEPENDS, but would be added here if it weren't -PACKAGECONFIG[tui] = "--enable-tui,--disable-tui" +PACKAGECONFIG[tui] = "--enable-tui,--disable-tui,,ncurses-terminfo-base" PACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--without-lzma,xz" PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils" @@ -58,6 +59,7 @@ do_install:append() { rm -rf ${D}${includedir} rm -rf ${D}${datadir}/locale rm -f ${D}${infodir}/bfd.info + rm -f ${D}${infodir}/sframe-spec.info } RRECOMMENDS:gdb:append:linux = " glibc-thread-db " diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc index 8e926e81e1..058ffbc9c5 100644 --- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc @@ -6,8 +6,8 @@ SUMMARY = "GNU debugger (cross-canadian gdb for ${TARGET_ARCH} target)" PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" BPN = "gdb" -DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-gmp \ - virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-libc" +DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-gmp nativesdk-mpfr \ + virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}binutils virtual/nativesdk-libc" GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'" diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_14.2.bb index 4ab2b7156d..4ab2b7156d 100644 --- a/meta/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_14.2.bb diff --git a/meta/recipes-devtools/gdb/gdb-cross.inc b/meta/recipes-devtools/gdb/gdb-cross.inc index 9f9675c1b3..399f4bba97 100644 --- a/meta/recipes-devtools/gdb/gdb-cross.inc +++ b/meta/recipes-devtools/gdb/gdb-cross.inc @@ -1,6 +1,6 @@ require gdb-common.inc -DEPENDS = "expat-native gmp-native ncurses-native flex-native bison-native" +DEPENDS = "expat-native gmp-native mpfr-native ncurses-native flex-native bison-native" inherit python3native pkgconfig diff --git a/meta/recipes-devtools/gdb/gdb-cross_12.1.bb b/meta/recipes-devtools/gdb/gdb-cross_14.2.bb index 3b654a2f0d..3b654a2f0d 100644 --- a/meta/recipes-devtools/gdb/gdb-cross_12.1.bb +++ b/meta/recipes-devtools/gdb/gdb-cross_14.2.bb diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc index 3b569fd40e..81ac441462 100644 --- a/meta/recipes-devtools/gdb/gdb.inc +++ b/meta/recipes-devtools/gdb/gdb.inc @@ -5,14 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \ - file://0001-make-man-install-relative-to-DESTDIR.patch \ - file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ - file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ - file://0004-Dont-disable-libreadline.a-when-using-disable-static.patch \ - file://0005-use-asm-sgidefs.h.patch \ - file://0006-Change-order-of-CFLAGS.patch \ - file://0007-resolve-restrict-keyword-conflict.patch \ - file://0008-Fix-invalid-sigprocmask-call.patch \ - file://0009-gdbserver-ctrl-c-handling.patch \ + file://0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ + file://0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ + file://0003-Dont-disable-libreadline.a-when-using-disable-static.patch \ + file://0004-use-asm-sgidefs.h.patch \ + file://0005-Change-order-of-CFLAGS.patch \ + file://0006-resolve-restrict-keyword-conflict.patch \ + file://0007-Fix-invalid-sigprocmask-call.patch \ + file://0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ " -SRC_URI[sha256sum] = "0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed" +SRC_URI[sha256sum] = "2d4dd8061d8ded12b6c63f55e45344881e8226105f4d2a9b234040efa5ce7772" diff --git a/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch b/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch deleted file mode 100644 index 16d6cf196f..0000000000 --- a/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 8eca28eddcda4ce8a345ca031f43ff1ed6f37089 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 2 Mar 2015 02:27:55 +0000 -Subject: [PATCH 1/9] make man install relative to DESTDIR - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - sim/common/Make-common.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in -index 74e5dad3049..9e95c224ba4 100644 ---- a/sim/common/Make-common.in -+++ b/sim/common/Make-common.in -@@ -70,7 +70,7 @@ tooldir = $(libdir)/$(target_alias) - datadir = @datadir@ - datarootdir = @datarootdir@ - mandir = @mandir@ --man1dir = $(mandir)/man1 -+man1dir = $(DESTDIR)$(mandir)/man1 - infodir = @infodir@ - includedir = @includedir@ - --- -2.36.1 - diff --git a/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch index 8d263de896..86f6e2642d 100644 --- a/meta/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch +++ b/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch @@ -1,7 +1,7 @@ -From 37d3afd2eaa95c89ad7cb5d0079b017752e4d0ea Mon Sep 17 00:00:00 2001 +From ff77aebf533758f0b6f7d22b272d32e08ed06e45 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 23 Mar 2016 06:30:09 +0000 -Subject: [PATCH 2/9] mips-linux-nat: Define _ABIO32 if not defined +Subject: [PATCH] mips-linux-nat: Define _ABIO32 if not defined This helps building gdb on mips64 on musl, since musl does not provide sgidefs.h this define is @@ -16,7 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 4 insertions(+) diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c -index 20e12b6889e..6adc61235aa 100644 +index 8a7cc95f2a4..bfd1c72cba6 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -41,6 +41,10 @@ @@ -30,6 +30,3 @@ index 20e12b6889e..6adc61235aa 100644 class mips_linux_nat_target final : public linux_nat_trad_target { --- -2.36.1 - diff --git a/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta/recipes-devtools/gdb/gdb/0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch index 7e09404bb0..897cfd0df9 100644 --- a/meta/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch +++ b/meta/recipes-devtools/gdb/gdb/0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch @@ -1,7 +1,7 @@ -From e689eec672ee8c53b3adb2ade2b5deb9b7cd99d4 Mon Sep 17 00:00:00 2001 +From 78748dc55b1ceafe9a64beb9628f1d51b215482f Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 30 Apr 2016 18:32:14 -0700 -Subject: [PATCH 3/9] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems +Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems Upstream-Status: Pending @@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 2 files changed, 12 insertions(+) diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h -index 1094f6b0be3..d8588a646c2 100644 +index c84f9146bbd..8c8580c95e1 100644 --- a/gdb/nat/ppc-linux.h +++ b/gdb/nat/ppc-linux.h @@ -18,7 +18,13 @@ @@ -30,7 +30,7 @@ index 1094f6b0be3..d8588a646c2 100644 /* This sometimes isn't defined. */ diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc -index 08824887003..69afbae5359 100644 +index 86fbc8f5d96..8a1a39bc750 100644 --- a/gdbserver/linux-ppc-low.cc +++ b/gdbserver/linux-ppc-low.cc @@ -23,7 +23,13 @@ @@ -47,6 +47,3 @@ index 08824887003..69afbae5359 100644 #include "arch/ppc-linux-common.h" #include "arch/ppc-linux-tdesc.h" --- -2.36.1 - diff --git a/meta/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch b/meta/recipes-devtools/gdb/gdb/0003-Dont-disable-libreadline.a-when-using-disable-static.patch index a1e85e91b3..e41be8209e 100644 --- a/meta/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch +++ b/meta/recipes-devtools/gdb/gdb/0003-Dont-disable-libreadline.a-when-using-disable-static.patch @@ -1,7 +1,7 @@ -From 15ee6a626242efb8f367be49c13e00d0b72317f0 Mon Sep 17 00:00:00 2001 +From 683650564cd231bbf09c7cbc35543b77ca0b10d0 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 30 Apr 2016 15:25:03 -0700 -Subject: [PATCH 4/9] Dont disable libreadline.a when using --disable-static +Subject: [PATCH] Dont disable libreadline.a when using --disable-static If gdb is configured with --disable-static then this is dutifully passed to readline which then disables libreadline.a, which causes a problem when gdb @@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.def b/Makefile.def -index acdcd625ed6..78fc31e1199 100644 +index 870150183b9..eb3788da0d2 100644 --- a/Makefile.def +++ b/Makefile.def -@@ -120,7 +120,8 @@ host_modules= { module= libiconv; +@@ -119,7 +119,8 @@ host_modules= { module= libiconv; missing= install-html; missing= install-info; }; host_modules= { module= m4; }; @@ -33,10 +33,10 @@ index acdcd625ed6..78fc31e1199 100644 host_modules= { module= sim; }; host_modules= { module= texinfo; no_install= true; }; diff --git a/Makefile.in b/Makefile.in -index 3aacd2daac9..aa58adada4a 100644 +index c97130a2338..a83f98e4778 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -32791,7 +32791,7 @@ configure-readline: +@@ -31691,7 +31691,7 @@ configure-readline: $$s/$$module_srcdir/configure \ --srcdir=$${topdir}/$$module_srcdir \ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ @@ -45,6 +45,3 @@ index 3aacd2daac9..aa58adada4a 100644 || exit 1 @endif readline --- -2.36.1 - diff --git a/meta/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch b/meta/recipes-devtools/gdb/gdb/0004-use-asm-sgidefs.h.patch index 242099b9b1..413610d71f 100644 --- a/meta/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch +++ b/meta/recipes-devtools/gdb/gdb/0004-use-asm-sgidefs.h.patch @@ -1,7 +1,7 @@ -From 25a75aaf29791f4302f0e4452f7ebaf735d4f083 Mon Sep 17 00:00:00 2001 +From 04eba78ea6bd167b7eeef3af668c8f49888dc688 Mon Sep 17 00:00:00 2001 From: Andre McCurdy <amccurdy@gmail.com> Date: Sat, 30 Apr 2016 15:29:06 -0700 -Subject: [PATCH 5/9] use <asm/sgidefs.h> +Subject: [PATCH] use <asm/sgidefs.h> Build fix for MIPS with musl libc @@ -19,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c -index 6adc61235aa..afb40066744 100644 +index bfd1c72cba6..13dc9cdb703 100644 --- a/gdb/mips-linux-nat.c +++ b/gdb/mips-linux-nat.c @@ -31,7 +31,7 @@ @@ -31,6 +31,3 @@ index 6adc61235aa..afb40066744 100644 #include "nat/gdb_ptrace.h" #include <asm/ptrace.h> #include "inf-ptrace.h" --- -2.36.1 - diff --git a/meta/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch b/meta/recipes-devtools/gdb/gdb/0005-Change-order-of-CFLAGS.patch index 58c9b1d0a7..7631e75048 100644 --- a/meta/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch +++ b/meta/recipes-devtools/gdb/gdb/0005-Change-order-of-CFLAGS.patch @@ -1,7 +1,7 @@ -From c0e7c34134aa1f9644075c596a2338a50d3d923e Mon Sep 17 00:00:00 2001 +From e7041e9346aa0c3aee0b76315559e3ab2ef8977e Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 30 Apr 2016 15:35:39 -0700 -Subject: [PATCH 6/9] Change order of CFLAGS +Subject: [PATCH] Change order of CFLAGS Lets us override Werror if need be @@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in -index 47648b8d962..5599779de57 100644 +index b597515d428..9e615e2842d 100644 --- a/gdbserver/Makefile.in +++ b/gdbserver/Makefile.in @@ -156,7 +156,7 @@ WIN32APILIBS = @WIN32APILIBS@ @@ -25,6 +25,3 @@ index 47648b8d962..5599779de57 100644 # LDFLAGS is specifically reserved for setting from the command line # when running make. --- -2.36.1 - diff --git a/meta/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch b/meta/recipes-devtools/gdb/gdb/0006-resolve-restrict-keyword-conflict.patch index bbd1f0b27f..45388c5ac5 100644 --- a/meta/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch +++ b/meta/recipes-devtools/gdb/gdb/0006-resolve-restrict-keyword-conflict.patch @@ -1,7 +1,7 @@ -From 44fa1ecfbd8a5fe0cfea12a175fa041686842a0c Mon Sep 17 00:00:00 2001 +From 477f1b2049c7f940b8e8fda4ac396cfe322b269f Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 10 May 2016 08:47:05 -0700 -Subject: [PATCH 7/9] resolve restrict keyword conflict +Subject: [PATCH] resolve restrict keyword conflict GCC detects that we call 'restrict' as param name in function signatures and complains since both params are called 'restrict' @@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnulib/import/sys_time.in.h b/gnulib/import/sys_time.in.h -index 90a67d18426..664641a1fe8 100644 +index 87db1a88745..e6b98c7e467 100644 --- a/gnulib/import/sys_time.in.h +++ b/gnulib/import/sys_time.in.h @@ -93,20 +93,20 @@ struct timeval @@ -43,6 +43,3 @@ index 90a67d18426..664641a1fe8 100644 # endif _GL_CXXALIASWARN (gettimeofday); # if defined __cplusplus && defined GNULIB_NAMESPACE --- -2.36.1 - diff --git a/meta/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch b/meta/recipes-devtools/gdb/gdb/0007-Fix-invalid-sigprocmask-call.patch index ed1310ced2..26e3ad9098 100644 --- a/meta/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch +++ b/meta/recipes-devtools/gdb/gdb/0007-Fix-invalid-sigprocmask-call.patch @@ -1,7 +1,7 @@ -From 5bdd15553daef7370ca3c1f12d8f14247fdd4907 Mon Sep 17 00:00:00 2001 +From ebeb6125acf6b4e4a8a4eaa59e2830b9ca02d683 Mon Sep 17 00:00:00 2001 From: Yousong Zhou <yszhou4tech@gmail.com> Date: Fri, 24 Mar 2017 10:36:03 +0800 -Subject: [PATCH 8/9] Fix invalid sigprocmask call +Subject: [PATCH] Fix invalid sigprocmask call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -32,7 +32,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbsupport/signals-state-save-restore.cc b/gdbsupport/signals-state-save-restore.cc -index 92e799d3551..a4a0234272a 100644 +index 3ec7a259c9c..0702eca7725 100644 --- a/gdbsupport/signals-state-save-restore.cc +++ b/gdbsupport/signals-state-save-restore.cc @@ -38,7 +38,7 @@ save_original_signals_state (bool quiet) @@ -44,6 +44,3 @@ index 92e799d3551..a4a0234272a 100644 if (res == -1) perror_with_name (("sigprocmask")); --- -2.36.1 - diff --git a/meta/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch b/meta/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch new file mode 100644 index 0000000000..819f1c9f17 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch @@ -0,0 +1,48 @@ +From cb7c8df338184d2d2f31ee1fd238653e3162da44 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Jan 2023 00:16:25 -0800 +Subject: [PATCH] Define alignof using _Alignof when using C11 or newer + +WG14 N2350 made very clear that it is an UB having type definitions +within "offsetof" [1]. This patch enhances the implementation of macro +alignof to use builtin "_Alignof" to avoid undefined behavior on +when using std=c11 or newer + +clang 16+ has started to flag this [2] + +Fixes build when using -std >= gnu11 and using clang16+ + +Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it +may support C11, exclude those compilers too + +[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm +[2] https://reviews.llvm.org/D133574 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + libiberty/sha1.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/libiberty/sha1.c b/libiberty/sha1.c +index 6c71e3ebb41..a2caf947d31 100644 +--- a/libiberty/sha1.c ++++ b/libiberty/sha1.c +@@ -229,7 +229,17 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) + if (len >= 64) + { + #if !_STRING_ARCH_unaligned ++/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 ++ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. ++ clang versions < 8.0.0 have the same bug. */ ++#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ ++ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ ++ && !defined __clang__) \ ++ || (defined __clang__ && __clang_major__ < 8)) + # define alignof(type) offsetof (struct { char c; type x; }, x) ++#else ++# define alignof(type) _Alignof(type) ++#endif + # define UNALIGNED_P(p) (((size_t) p) % alignof (sha1_uint32) != 0) + if (UNALIGNED_P (buffer)) + while (len > 64) diff --git a/meta/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch b/meta/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch deleted file mode 100644 index f53d3bd1e5..0000000000 --- a/meta/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch +++ /dev/null @@ -1,40 +0,0 @@ -From bc3b1f6aacf2d8fe66b022fbfcf28cd82c76e52f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 29 Nov 2018 18:00:23 -0800 -Subject: [PATCH 9/9] gdbserver ctrl-c handling - -This problem was created by the upstream commit 78708b7c8c -After applying the commit, it will send SIGINT to the process -group(-signal_pid). -But if we use gdbserver send SIGINT, and the attached process is not a -process -group leader, then the "kill (-signal_pid, SIGINT)" returns error and -fails to -interrupt the attached process. - -Upstream-Status: Submitted -[https://sourceware.org/bugzilla/show_bug.cgi?id=18945] - -Author: Josh Gao -Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - gdbserver/linux-low.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc -index 7726a4a0c36..f750e074a03 100644 ---- a/gdbserver/linux-low.cc -+++ b/gdbserver/linux-low.cc -@@ -5496,7 +5496,7 @@ linux_process_target::request_interrupt () - { - /* Send a SIGINT to the process group. This acts just like the user - typed a ^C on the controlling terminal. */ -- ::kill (-signal_pid, SIGINT); -+ ::kill (signal_pid, SIGINT); - } - - bool --- -2.36.1 - diff --git a/meta/recipes-devtools/gdb/gdb_12.1.bb b/meta/recipes-devtools/gdb/gdb_14.2.bb index 9c6db4ca2c..9c6db4ca2c 100644 --- a/meta/recipes-devtools/gdb/gdb_12.1.bb +++ b/meta/recipes-devtools/gdb/gdb_14.2.bb |