From fc3ae02b63b322c9dd7fe85d7fa70a90814958dd Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Thu, 10 Mar 2016 11:47:23 -0500 Subject: [PATCH] gdb: Update 7.10 to 7.11 and NDK r11 compatibility --- packages/gdb/build.sh | 6 ++- packages/gdb/gdb-arm-linux-nac.c.patch | 8 ---- packages/gdb/gdb-gdbserver-configure.patch | 21 +++++++++++ .../gdb/gdbserver_gdb_proc_service.h.patch | 12 ------ packages/gdb/i386-linux-nat.c.patch | 15 -------- packages/gdb/linux-arm-low.c.patch | 11 ------ packages/gdb/linux-x86-low.c.patch | 23 ------------ packages/gdb/linux_low.patch | 37 ------------------- packages/gdb/linux_nat.patch | 17 --------- packages/gdb/nm-linux.h.patch | 24 ------------ packages/gdb/proc_server_c_procfs.patch | 11 ------ packages/gdb/x86-linux-nat.c.patch | 23 ------------ 12 files changed, 25 insertions(+), 183 deletions(-) create mode 100644 packages/gdb/gdb-gdbserver-configure.patch delete mode 100644 packages/gdb/gdbserver_gdb_proc_service.h.patch delete mode 100644 packages/gdb/i386-linux-nat.c.patch delete mode 100644 packages/gdb/linux-arm-low.c.patch delete mode 100644 packages/gdb/linux-x86-low.c.patch delete mode 100644 packages/gdb/linux_low.patch delete mode 100644 packages/gdb/nm-linux.h.patch delete mode 100644 packages/gdb/proc_server_c_procfs.patch delete mode 100644 packages/gdb/x86-linux-nat.c.patch diff --git a/packages/gdb/build.sh b/packages/gdb/build.sh index 2ec4db60c..6ca430f6e 100755 --- a/packages/gdb/build.sh +++ b/packages/gdb/build.sh @@ -1,8 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gdb/ TERMUX_PKG_DESCRIPTION="The standard GNU Debugger that runs on many Unix-like systems and works for many programming languages" TERMUX_PKG_DEPENDS="liblzma, libexpat, readline" -TERMUX_PKG_VERSION=7.10.1 -TERMUX_PKG_BUILD_REVISION=2 +TERMUX_PKG_VERSION=7.11 TERMUX_PKG_SRCURL=http://ftp.gnu.org/gnu/gdb/gdb-${TERMUX_PKG_VERSION}.tar.xz # gdb can not build with our normal --disable-static: https://sourceware.org/bugzilla/show_bug.cgi?id=15916 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-system-readline --with-curses --enable-static ac_cv_func_getpwent=no ac_cv_func_getpwnam=no" @@ -13,3 +12,6 @@ TERMUX_PKG_BUILD_IN_SRC="yes" # For frexp(3) usage: LDFLAGS+=" -lm" + +export gl_cv_func_gettimeofday_clobber=no +export gl_cv_func_gettimeofday_posix_signature=yes diff --git a/packages/gdb/gdb-arm-linux-nac.c.patch b/packages/gdb/gdb-arm-linux-nac.c.patch index 9fd6c5c4a..4f5838da2 100644 --- a/packages/gdb/gdb-arm-linux-nac.c.patch +++ b/packages/gdb/gdb-arm-linux-nac.c.patch @@ -1,14 +1,6 @@ diff -u -r ../gdb-7.10/gdb/arm-linux-nat.c ./gdb/arm-linux-nat.c --- ../gdb-7.10/gdb/arm-linux-nat.c 2015-08-28 17:22:07.000000000 -0400 +++ ./gdb/arm-linux-nat.c 2015-08-29 08:06:52.000680658 -0400 -@@ -34,7 +34,6 @@ - #include - #include - #include --#include - - #include "nat/linux-ptrace.h" - @@ -63,6 +62,10 @@ #define PTRACE_SETHBPREGS 30 #endif diff --git a/packages/gdb/gdb-gdbserver-configure.patch b/packages/gdb/gdb-gdbserver-configure.patch new file mode 100644 index 000000000..3ede86d36 --- /dev/null +++ b/packages/gdb/gdb-gdbserver-configure.patch @@ -0,0 +1,21 @@ +diff -u -r ../gdb-7.11/gdb/gdbserver/configure ./gdb/gdbserver/configure +--- ../gdb-7.11/gdb/gdbserver/configure 2016-02-09 22:19:39.000000000 -0500 ++++ ./gdb/gdbserver/configure 2016-03-10 10:17:40.111988028 -0500 +@@ -6735,17 +6735,6 @@ + + + case "${target}" in +- *-android*) +- # Starting with NDK version 9, actually includes definitions +- # of Elf32_auxv_t and Elf64_auxv_t. But sadly, includes +- # which defines some of the ELF types incorrectly, +- # leading to conflicts with the defintions from . +- # This makes it impossible for us to include both and +- # , which means that, in practice, we do not have +- # access to Elf32_auxv_t and Elf64_auxv_t on this platform. +- # Therefore, do not try to auto-detect availability, as it would +- # get it wrong on this platform. +- ;; + *) + ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include + diff --git a/packages/gdb/gdbserver_gdb_proc_service.h.patch b/packages/gdb/gdbserver_gdb_proc_service.h.patch deleted file mode 100644 index 2b71d3166..000000000 --- a/packages/gdb/gdbserver_gdb_proc_service.h.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../gdb-7.8.1/gdb/gdbserver/gdb_proc_service.h ./gdb/gdbserver/gdb_proc_service.h ---- ../gdb-7.8.1/gdb/gdbserver/gdb_proc_service.h 2014-06-11 12:34:41.000000000 -0400 -+++ ./gdb/gdbserver/gdb_proc_service.h 2014-12-22 07:53:22.855702229 -0500 -@@ -38,6 +38,8 @@ - # endif - #endif - -+#include "../gregset.h" /* for elf_gregset_t */ -+ - typedef enum - { - PS_OK, /* Success. */ diff --git a/packages/gdb/i386-linux-nat.c.patch b/packages/gdb/i386-linux-nat.c.patch deleted file mode 100644 index cb67b2f38..000000000 --- a/packages/gdb/i386-linux-nat.c.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -u -r ../gdb-7.9/gdb/i386-linux-nat.c ./gdb/i386-linux-nat.c ---- ../gdb-7.9/gdb/i386-linux-nat.c 2015-02-19 06:58:07.000000000 -0500 -+++ ./gdb/i386-linux-nat.c 2015-03-17 18:14:06.728805213 -0400 -@@ -35,6 +35,11 @@ - - #include "x86-linux-nat.h" - -+#ifdef __ANDROID__ -+#include -+typedef fpregset_t elf_fpxregset_t; -+#endif -+ - /* The register sets used in GNU/Linux ELF core-dumps are identical to - the register sets in `struct user' that is used for a.out - core-dumps, and is also used by `ptrace'. The corresponding types diff --git a/packages/gdb/linux-arm-low.c.patch b/packages/gdb/linux-arm-low.c.patch deleted file mode 100644 index aded24b8f..000000000 --- a/packages/gdb/linux-arm-low.c.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -u -r ../gdb-7.8.1/gdb/gdbserver/linux-arm-low.c ./gdb/gdbserver/linux-arm-low.c ---- ../gdb-7.8.1/gdb/gdbserver/linux-arm-low.c 2014-10-29 15:45:50.000000000 -0400 -+++ ./gdb/gdbserver/linux-arm-low.c 2014-12-22 07:57:06.035702383 -0500 -@@ -26,6 +26,7 @@ - #endif - #include - #include -+#include /* for AT_HWCAP define */ - - /* Defined in auto-generated files. */ - void init_registers_arm (void); diff --git a/packages/gdb/linux-x86-low.c.patch b/packages/gdb/linux-x86-low.c.patch deleted file mode 100644 index 34653b75e..000000000 --- a/packages/gdb/linux-x86-low.c.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -u -r ../gdb-7.9/gdb/gdbserver/linux-x86-low.c ./gdb/gdbserver/linux-x86-low.c ---- ../gdb-7.9/gdb/gdbserver/linux-x86-low.c 2015-02-19 06:58:07.000000000 -0500 -+++ ./gdb/gdbserver/linux-x86-low.c 2015-03-17 18:29:50.412805866 -0400 -@@ -38,6 +38,11 @@ - #include "tracepoint.h" - #include "ax.h" - -+#ifdef __ANDROID__ -+#include -+typedef fpregset_t elf_fpxregset_t; -+#endif -+ - #ifdef __x86_64__ - /* Defined in auto-generated file amd64-linux.c. */ - void init_registers_amd64_linux (void); -@@ -113,7 +118,6 @@ - #endif - - #include --#include - #include - #include - diff --git a/packages/gdb/linux_low.patch b/packages/gdb/linux_low.patch deleted file mode 100644 index fb8d534e8..000000000 --- a/packages/gdb/linux_low.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -u -r ../gdb-7.8.1/gdb/gdbserver/linux-low.c ./gdb/gdbserver/linux-low.c ---- ../gdb-7.8.1/gdb/gdbserver/linux-low.c 2014-10-29 15:45:50.000000000 -0400 -+++ ./gdb/gdbserver/linux-low.c 2014-12-22 07:51:39.355702157 -0500 -@@ -47,6 +47,7 @@ - #include "filestuff.h" - #include "tracepoint.h" - #include "hostio.h" -+#include /* For AT_PHDR and AT_PHNUM defines */ - #ifndef ELFMAG0 - /* Don't include here. If it got included by gdb_proc_service.h - then ELFMAG0 will have been defined. If it didn't get included by -@@ -108,7 +109,6 @@ - # include "linux-btrace.h" - #endif - --#ifndef HAVE_ELF32_AUXV_T - /* Copied from glibc's elf.h. */ - typedef struct - { -@@ -121,9 +121,7 @@ - on 64-bit platforms and vice versa. */ - } a_un; - } Elf32_auxv_t; --#endif - --#ifndef HAVE_ELF64_AUXV_T - /* Copied from glibc's elf.h. */ - typedef struct - { -@@ -136,7 +134,6 @@ - on 64-bit platforms and vice versa. */ - } a_un; - } Elf64_auxv_t; --#endif - - /* A list of all unknown processes which receive stop signals. Some - other process will presumably claim each of these as forked diff --git a/packages/gdb/linux_nat.patch b/packages/gdb/linux_nat.patch index 30671c907..276eef9be 100644 --- a/packages/gdb/linux_nat.patch +++ b/packages/gdb/linux_nat.patch @@ -1,14 +1,6 @@ diff -u -r ../gdb-7.7/gdb/linux-nat.c ./gdb/linux-nat.c --- ../gdb-7.7/gdb/linux-nat.c 2014-02-06 03:21:29.000000000 +0100 +++ ./gdb/linux-nat.c 2014-02-12 01:55:15.000000000 +0100 -@@ -41,7 +41,6 @@ - #include "inf-child.h" - #include "inf-ptrace.h" - #include "auxv.h" --#include /* for elf_gregset etc. */ - #include "elf-bfd.h" /* for elfcore_write_* */ - #include "gregset.h" /* for gregset */ - #include "gdbcore.h" /* for get_exec_file */ @@ -68,6 +67,10 @@ #include "target-descriptions.h" #include "filestuff.h" @@ -20,12 +12,3 @@ diff -u -r ../gdb-7.7/gdb/linux-nat.c ./gdb/linux-nat.c #ifndef SPUFS_MAGIC #define SPUFS_MAGIC 0x23c9b64e #endif -@@ -3789,7 +3792,7 @@ - if (last.kind == TARGET_WAITKIND_FORKED - || last.kind == TARGET_WAITKIND_VFORKED) - { -- ptrace (PT_KILL, ptid_get_pid (last.value.related_pid), 0, 0); -+ ptrace (PTRACE_KILL, ptid_get_pid (last.value.related_pid), 0, 0); - wait (&status); - - /* Let the arch-specific native code know this process is diff --git a/packages/gdb/nm-linux.h.patch b/packages/gdb/nm-linux.h.patch deleted file mode 100644 index 0a551a783..000000000 --- a/packages/gdb/nm-linux.h.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -u -r ../gdb-7.8.1/gdb/config/nm-linux.h ./gdb/config/nm-linux.h ---- ../gdb-7.8.1/gdb/config/nm-linux.h 2014-06-11 12:34:41.000000000 -0400 -+++ ./gdb/config/nm-linux.h 2014-12-22 07:45:14.127701891 -0500 -@@ -20,5 +20,20 @@ - /* Use elf_gregset_t and elf_fpregset_t, rather than - gregset_t and fpregset_t. */ - -+#ifndef NM_CONFIG_LINUX_H -+#define NM_CONFIG_LINUX_H -+ -+#include -+ -+#ifdef __arm__ -+/* Structure to describe FPU registers. */ -+typedef struct fpregset { } fpregset_t; -+#endif -+ -+typedef gregset_t elf_gregset_t; -+typedef fpregset_t elf_fpregset_t; -+ - #define GDB_GREGSET_T elf_gregset_t - #define GDB_FPREGSET_T elf_fpregset_t -+ -+#endif diff --git a/packages/gdb/proc_server_c_procfs.patch b/packages/gdb/proc_server_c_procfs.patch deleted file mode 100644 index 530bd738a..000000000 --- a/packages/gdb/proc_server_c_procfs.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -u -r ../gdb-7.6.2/gdb/proc-service.c ./gdb/proc-service.c ---- ../gdb-7.6.2/gdb/proc-service.c 2013-12-08 05:33:13.000000000 +0100 -+++ ./gdb/proc-service.c 2014-01-07 16:43:01.866311352 +0100 -@@ -27,7 +27,6 @@ - - #include "gdb_proc_service.h" - --#include - - /* Prototypes for supply_gregset etc. */ - #include "gregset.h" diff --git a/packages/gdb/x86-linux-nat.c.patch b/packages/gdb/x86-linux-nat.c.patch deleted file mode 100644 index 3f455c2f4..000000000 --- a/packages/gdb/x86-linux-nat.c.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -u -r ../gdb-7.9/gdb/x86-linux-nat.c ./gdb/x86-linux-nat.c ---- ../gdb-7.9/gdb/x86-linux-nat.c 2015-02-20 12:11:44.000000000 -0500 -+++ ./gdb/x86-linux-nat.c 2015-03-17 18:20:50.044805492 -0400 -@@ -23,7 +23,6 @@ - #include "gdb_proc_service.h" - #include - #include --#include - #include - - #include "x86-nat.h" -@@ -39,6 +38,11 @@ - #include "x86-xstate.h" - #include "nat/linux-btrace.h" - -+#ifdef __ANDROID__ -+#include -+typedef fpregset_t elf_fpxregset_t; -+#endif -+ - /* Per-thread arch-specific data we want to keep. */ - - struct arch_lwp_info