diff options
Diffstat (limited to 'package/devel/gdb')
| -rw-r--r-- | package/devel/gdb/Makefile | 13 | ||||
| -rw-r--r-- | package/devel/gdb/patches/010-aarch64-headers.patch | 38 | ||||
| -rw-r--r-- | package/devel/gdb/patches/100-musl_fix.patch | 53 | ||||
| -rw-r--r-- | package/devel/gdb/patches/110-shared_libgcc.patch | 12 | ||||
| -rw-r--r-- | package/devel/gdb/patches/130-gdb-ctrl-c.patch | 35 | ||||
| -rw-r--r-- | package/devel/gdb/patches/130-uclibc-fix.patch | 11 | ||||
| -rw-r--r-- | package/devel/gdb/patches/140-sgidefs.patch | 30 | ||||
| -rw-r--r-- | package/devel/gdb/patches/150-mips64.patch | 32 |
8 files changed, 111 insertions, 113 deletions
diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index 17b2bb84812..cf897b79f27 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=10.1 +PKG_VERSION:=14.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0 +PKG_HASH:=d66df51276143451fcbff464cc8723d68f1e9df45a6a2d5635a54e71643edb80 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -33,7 +33,7 @@ endef define Package/gdb $(call Package/gdb/Default) TITLE:=GNU Debugger - DEPENDS+=+libreadline +libncurses +zlib + DEPENDS+=+libreadline +libncurses +zlib +libgmp +libmpfr endef define Package/gdb/description @@ -45,7 +45,6 @@ endef define Package/gdbserver $(call Package/gdb/Default) TITLE:=Remote server for GNU Debugger - DEPENDS+=@!arc endef define Package/gdbserver/description @@ -59,11 +58,15 @@ CONFIGURE_ARGS+= \ --with-system-zlib \ --without-expat \ --without-lzma \ + --without-zstd \ --disable-unit-tests \ --disable-ubsan \ --disable-sim \ --disable-werror \ - --disable-source-highlight + --disable-source-highlight \ + --without-isl \ + --without-xxhash \ + --with-libgmp-prefix=$(STAGING_DIR)/usr CONFIGURE_VARS+= \ ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline" diff --git a/package/devel/gdb/patches/010-aarch64-headers.patch b/package/devel/gdb/patches/010-aarch64-headers.patch deleted file mode 100644 index 8f057382986..00000000000 --- a/package/devel/gdb/patches/010-aarch64-headers.patch +++ /dev/null @@ -1,38 +0,0 @@ -The signal definitions of musl and gdb collide - -The kernel defines "struct sigcontext" in asm/sigcontext.h and musl libc -defines it in signal.h which collides. -Kernel 4.14 misses the definitions of struct user_sve_header so we still -have to use the aarch64-sve-linux-sigcontext.h header file which also -provides that and make sure aarch64-sve-linux-sigcontext.h does not -provide the same headers as the kernel or musl. - ---- a/gdb/nat/aarch64-sve-linux-ptrace.h -+++ b/gdb/nat/aarch64-sve-linux-ptrace.h -@@ -25,7 +25,7 @@ - #include <sys/ptrace.h> - #include <asm/ptrace.h> - --#ifndef SVE_SIG_ZREGS_SIZE -+#ifndef SVE_PT_REGS_SVE - #include "aarch64-sve-linux-sigcontext.h" - #endif - ---- a/gdb/nat/aarch64-sve-linux-sigcontext.h -+++ b/gdb/nat/aarch64-sve-linux-sigcontext.h -@@ -19,6 +19,7 @@ - #ifndef NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H - #define NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H - -+#ifndef SVE_MAGIC - #define SVE_MAGIC 0x53564501 - - struct sve_context { -@@ -128,6 +129,7 @@ struct sve_context { - (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET) - - #define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) -+#endif - - /* SVE/FP/SIMD state (NT_ARM_SVE) */ - diff --git a/package/devel/gdb/patches/100-musl_fix.patch b/package/devel/gdb/patches/100-musl_fix.patch deleted file mode 100644 index e0d871d2914..00000000000 --- a/package/devel/gdb/patches/100-musl_fix.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- a/gdb/linux-nat.c -+++ b/gdb/linux-nat.c -@@ -17,6 +17,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -+#include "stopcode.h" - #include "defs.h" - #include "inferior.h" - #include "infrun.h" -@@ -70,6 +71,10 @@ - #include "gdbsupport/gdb-sigmask.h" - #include "debug.h" - -+#ifndef __SIGRTMIN -+#define __SIGRTMIN SIGRTMIN -+#endif -+ - /* This comment documents high-level logic of this file. - - Waiting for events in sync mode ---- /dev/null -+++ b/gdb/stopcode.h -@@ -0,0 +1,4 @@ -+#ifndef W_STOPCODE -+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) -+#endif -+ ---- a/gdb/nat/ppc-linux.h -+++ b/gdb/nat/ppc-linux.h -@@ -18,7 +18,10 @@ - #ifndef NAT_PPC_LINUX_H - #define NAT_PPC_LINUX_H - -+#define pt_regs __pt_regs - #include <asm/ptrace.h> -+#undef pt_regs -+ - #include <asm/cputable.h> - - /* This sometimes isn't defined. */ ---- a/gdbserver/linux-ppc-low.cc -+++ b/gdbserver/linux-ppc-low.cc -@@ -23,7 +23,9 @@ - #include "elf/common.h" - #include <sys/uio.h> - #include <elf.h> -+#define pt_regs __pt_regs - #include <asm/ptrace.h> -+#undef pt_regs - - #include "arch/ppc-linux-common.h" - #include "arch/ppc-linux-tdesc.h" diff --git a/package/devel/gdb/patches/110-shared_libgcc.patch b/package/devel/gdb/patches/110-shared_libgcc.patch index de92a1f945c..1a02ad11603 100644 --- a/package/devel/gdb/patches/110-shared_libgcc.patch +++ b/package/devel/gdb/patches/110-shared_libgcc.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -1302,13 +1302,13 @@ if test -z "$LD"; then +@@ -1400,13 +1400,13 @@ if test -z "$LD"; then fi fi @@ -17,7 +17,7 @@ AC_LANG_PUSH(C++) AC_LINK_IFELSE([AC_LANG_SOURCE([ #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) -@@ -1648,7 +1648,7 @@ AC_ARG_WITH(stage1-ldflags, +@@ -1836,7 +1836,7 @@ AC_ARG_WITH(stage1-ldflags, # trust that they are doing what they want. if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ -a "$have_static_libs" = yes; then @@ -26,7 +26,7 @@ fi]) AC_SUBST(stage1_ldflags) -@@ -1677,7 +1677,7 @@ AC_ARG_WITH(boot-ldflags, +@@ -1865,7 +1865,7 @@ AC_ARG_WITH(boot-ldflags, # statically. But if the user explicitly specified the libraries to # use, trust that they are doing what they want. if test "$poststage1_libs" = ""; then @@ -37,7 +37,7 @@ --- a/configure +++ b/configure -@@ -5075,14 +5075,14 @@ if test -z "$LD"; then +@@ -5413,14 +5413,14 @@ if test -z "$LD"; then fi fi @@ -56,7 +56,7 @@ ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -5883,7 +5883,7 @@ else +@@ -8464,7 +8464,7 @@ else # trust that they are doing what they want. if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ -a "$have_static_libs" = yes; then @@ -65,7 +65,7 @@ fi fi -@@ -5919,7 +5919,7 @@ else +@@ -8500,7 +8500,7 @@ else # statically. But if the user explicitly specified the libraries to # use, trust that they are doing what they want. if test "$poststage1_libs" = ""; then diff --git a/package/devel/gdb/patches/130-gdb-ctrl-c.patch b/package/devel/gdb/patches/130-gdb-ctrl-c.patch new file mode 100644 index 00000000000..5272b7e9698 --- /dev/null +++ b/package/devel/gdb/patches/130-gdb-ctrl-c.patch @@ -0,0 +1,35 @@ +From 63df98fa78c8a6e12b40ebdc5c155838d2bf8b5f 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 11/11] 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(-) + +--- a/gdbserver/linux-low.cc ++++ b/gdbserver/linux-low.cc +@@ -5481,7 +5481,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. */ +- int res = ::kill (-signal_pid, SIGINT); ++ int res = ::kill (signal_pid, SIGINT); + if (res == -1) + warning (_("Sending SIGINT to process group of pid %ld failed: %s"), + signal_pid, safe_strerror (errno)); diff --git a/package/devel/gdb/patches/130-uclibc-fix.patch b/package/devel/gdb/patches/130-uclibc-fix.patch deleted file mode 100644 index a4c339ebe03..00000000000 --- a/package/devel/gdb/patches/130-uclibc-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gdb/dwarf2/index-write.c -+++ b/gdb/dwarf2/index-write.c -@@ -777,7 +777,7 @@ public: - gdb_assert (m_abbrev_table.empty ()); - const size_t name_count = m_name_to_value_set.size (); - m_bucket_table.resize -- (std::pow (2, std::ceil (std::log2 (name_count * 4 / 3)))); -+ (std::pow (2, std::ceil (log2 (name_count * 4 / 3)))); - m_hash_table.reserve (name_count); - m_name_table_string_offs.reserve (name_count); - m_name_table_entry_offs.reserve (name_count); diff --git a/package/devel/gdb/patches/140-sgidefs.patch b/package/devel/gdb/patches/140-sgidefs.patch new file mode 100644 index 00000000000..05b30f52425 --- /dev/null +++ b/package/devel/gdb/patches/140-sgidefs.patch @@ -0,0 +1,30 @@ +From 677b5b56135141c0d259e370aacd0e11c810aa15 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy <armccurdy@gmail.com> +Date: Fri, 5 Feb 2016 14:00:00 -0800 +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 + +Signed-off-by: Andre McCurdy <armccurdy@gmail.com> +--- + gdb/mips-linux-nat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- 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" diff --git a/package/devel/gdb/patches/150-mips64.patch b/package/devel/gdb/patches/150-mips64.patch new file mode 100644 index 00000000000..65418fd290f --- /dev/null +++ b/package/devel/gdb/patches/150-mips64.patch @@ -0,0 +1,32 @@ +From e92f8932ef488de2a56db4299131ce6a4eb170bd 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] 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 +only defined when GCC is using o32 ABI, in that +case gcc emits it as built-in define and hence +it works ok for mips32 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + gdb/mips-linux-nat.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -42,6 +42,11 @@ + #define PTRACE_GET_THREAD_AREA 25 + #endif + ++/* musl does not define and relies on compiler built-in macros for it */ ++#ifndef _ABIO32 ++#define _ABIO32 1 ++#endif ++ + class mips_linux_nat_target final : public linux_nat_trad_target + { + public: |
