summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-05-11 10:35:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-13 13:40:53 +0100
commitcc48929e916697d2103738cf12f02f47cdd43f32 (patch)
tree4216548bdba534d806b2c2255b0ec467aba1fa39 /meta/recipes-devtools/gdb
parentd7799a17d5e802db3f8d16bdc824aae81538e675 (diff)
downloadopenembedded-core-cc48929e916697d2103738cf12f02f47cdd43f32.tar.gz
gdb,strace: Fix builds on ppc/musl
ptrace namespace is polluted in glibc for ppc which is highlighted with musl, these fixes tries to undo it Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gdb')
-rw-r--r--meta/recipes-devtools/gdb/gdb.inc16
-rw-r--r--meta/recipes-devtools/gdb/gdb/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch52
2 files changed, 61 insertions, 7 deletions
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc
index d9c864dcab..5a2067e04c 100644
--- a/meta/recipes-devtools/gdb/gdb.inc
+++ b/meta/recipes-devtools/gdb/gdb.inc
@@ -2,13 +2,15 @@ require gdb-common.inc
inherit gettext
-SRC_URI += "file://0002-Change-order-of-CFLAGS.patch \
- file://0003-Add-support-for-Renesas-SH-sh4-architecture.patch \
- file://0001-Use-exported-definitions-of-SIGRTMIN.patch \
- file://0001-include-sys-types.h-for-mode_t.patch \
- file://0001-use-asm-sgidefs.h.patch \
- file://force-readline-static.patch \
- file://0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
+SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
+ file://0002-Change-order-of-CFLAGS.patch \
+ file://0003-Add-support-for-Renesas-SH-sh4-architecture.patch \
+ file://0001-Use-exported-definitions-of-SIGRTMIN.patch \
+ file://0001-include-sys-types.h-for-mode_t.patch \
+ file://0001-use-asm-sgidefs.h.patch \
+ file://force-readline-static.patch \
+ file://0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
+ file://0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
"
#LDFLAGS_append = " -s"
#export CFLAGS_append=" -L${STAGING_LIBDIR}"
diff --git a/meta/recipes-devtools/gdb/gdb/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta/recipes-devtools/gdb/gdb/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
new file mode 100644
index 0000000000..342f1ce425
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
@@ -0,0 +1,52 @@
+From 33a2cdb731298b73277507f01b9a21cd340c5b5c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Apr 2016 16:46:03 +0000
+Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gdb/gdbserver/linux-ppc-low.c | 6 ++++++
+ gdb/nat/ppc-linux.h | 6 ++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
+index 188fac0..f71d5ab 100644
+--- a/gdb/gdbserver/linux-ppc-low.c
++++ b/gdb/gdbserver/linux-ppc-low.c
+@@ -21,7 +21,13 @@
+ #include "linux-low.h"
+
+ #include <elf.h>
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
+ #include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+
+ #include "nat/ppc-linux.h"
+
+diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
+index 0ff2223..c978daa 100644
+--- a/gdb/nat/ppc-linux.h
++++ b/gdb/nat/ppc-linux.h
+@@ -18,7 +18,13 @@
+ #ifndef PPC_LINUX_H
+ #define PPC_LINUX_H 1
+
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
+ #include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+ #include <asm/cputable.h>
+
+ /* This sometimes isn't defined. */
+--
+1.8.3.1
+