diff options
| author | Daniel Díaz <daniel.diaz@linaro.org> | 2018-03-13 10:07:50 -0600 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-14 07:54:06 -0700 |
| commit | f94e741f1fc503bc2fe19ad6181dfc00c51f68c8 (patch) | |
| tree | 6f0c41c7c8d589bbfd35788c835121917e4279dd /meta | |
| parent | e81d780f73083af4c51525b4240bc6e4beaf07e4 (diff) | |
| download | poky-f94e741f1fc503bc2fe19ad6181dfc00c51f68c8.tar.gz | |
gdb: fix header ordering for TRAP_HWBKPT
This error can appear in gdb/nat/linux-ptrace.c because of
the order in which some headers are processed:
| In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0:
| ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier before numeric constant
| # define TRAP_HWBKPT 4
| ^
| Makefile:2357: recipe for target 'linux-ptrace.o' failed
| make[2]: *** [linux-ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| make[2]: Leaving directory '/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb'
| Makefile:8822: recipe for target 'all-gdb' failed
| make[1]: *** [all-gdb] Error 2
| make[1]: Leaving directory '/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux'
| Makefile:846: recipe for target 'all' failed
| make: *** [all] Error 2
A patch from GDB's current master solves the issue.
(From OE-Core rev: 4aaf747099714ec11158571527396ed9e818729e)
(From OE-Core rev: 5a4f22a0cb9b1a6151256d009d06e130ddc62573)
Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/gdb/gdb-8.0.inc | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch | 56 |
2 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-8.0.inc b/meta/recipes-devtools/gdb/gdb-8.0.inc index fba32ce12c..227abd9e04 100644 --- a/meta/recipes-devtools/gdb/gdb-8.0.inc +++ b/meta/recipes-devtools/gdb/gdb-8.0.inc | |||
| @@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ | |||
| 16 | file://0009-Change-order-of-CFLAGS.patch \ | 16 | file://0009-Change-order-of-CFLAGS.patch \ |
| 17 | file://0010-resolve-restrict-keyword-conflict.patch \ | 17 | file://0010-resolve-restrict-keyword-conflict.patch \ |
| 18 | file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \ | 18 | file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \ |
| 19 | file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \ | ||
| 19 | " | 20 | " |
| 20 | SRC_URI[md5sum] = "c3d35cd949084be53b92cc1e03485f88" | 21 | SRC_URI[md5sum] = "c3d35cd949084be53b92cc1e03485f88" |
| 21 | SRC_URI[sha256sum] = "f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee" | 22 | SRC_URI[sha256sum] = "f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee" |
diff --git a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch new file mode 100644 index 0000000000..ef97de7772 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | From b033a9663053eed87cb572397176747b88e9a699 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: James Clarke <jrtc27@jrtc27.com> | ||
| 3 | Date: Fri, 19 Jan 2018 17:22:49 +0000 | ||
| 4 | Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including | ||
| 5 | gdb_wait.h | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which | ||
| 11 | contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot | ||
| 12 | define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included | ||
| 13 | earlier; include it from linux-ptrace.h so it can never come afterwards. | ||
| 14 | |||
| 15 | gdb/ChangeLog: | ||
| 16 | |||
| 17 | * nat/linux-ptrace.c: Remove unnecessary reinclusion of | ||
| 18 | gdb_ptrace.h, and move including gdb_wait.h ... | ||
| 19 | * nat/linux-ptrace.h: ... to here. | ||
| 20 | |||
| 21 | Upstream-Status: Accepted [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8] | ||
| 22 | |||
| 23 | Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> | ||
| 24 | --- | ||
| 25 | gdb/nat/linux-ptrace.c | 2 -- | ||
| 26 | gdb/nat/linux-ptrace.h | 1 + | ||
| 27 | 2 files changed, 1 insertion(+), 2 deletions(-) | ||
| 28 | |||
| 29 | diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c | ||
| 30 | index 3265b16..559c2de 100644 | ||
| 31 | --- a/gdb/nat/linux-ptrace.c | ||
| 32 | +++ b/gdb/nat/linux-ptrace.c | ||
| 33 | @@ -21,8 +21,6 @@ | ||
| 34 | #include "linux-procfs.h" | ||
| 35 | #include "linux-waitpid.h" | ||
| 36 | #include "buffer.h" | ||
| 37 | -#include "gdb_wait.h" | ||
| 38 | -#include "gdb_ptrace.h" | ||
| 39 | #ifdef HAVE_SYS_PROCFS_H | ||
| 40 | #include <sys/procfs.h> | ||
| 41 | #endif | ||
| 42 | diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h | ||
| 43 | index 5954945..6faa89b 100644 | ||
| 44 | --- a/gdb/nat/linux-ptrace.h | ||
| 45 | +++ b/gdb/nat/linux-ptrace.h | ||
| 46 | @@ -21,6 +21,7 @@ | ||
| 47 | struct buffer; | ||
| 48 | |||
| 49 | #include "nat/gdb_ptrace.h" | ||
| 50 | +#include "gdb_wait.h" | ||
| 51 | |||
| 52 | #ifdef __UCLIBC__ | ||
| 53 | #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__)) | ||
| 54 | -- | ||
| 55 | 2.7.4 | ||
| 56 | |||
