aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/strace
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/strace
parentd7799a17d5e802db3f8d16bdc824aae81538e675 (diff)
downloadopenembedded-core-contrib-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/strace')
-rw-r--r--meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch36
-rw-r--r--meta/recipes-devtools/strace/strace_4.11.bb3
2 files changed, 38 insertions, 1 deletions
diff --git a/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch b/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch
new file mode 100644
index 0000000000..7f59210ca9
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch
@@ -0,0 +1,36 @@
+From 1f0c22b79045cfcdc976643f383c1d09589d3087 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Apr 2016 16:23:56 +0000
+Subject: [PATCH] Fix build when using non-glibc libc implementation on ppc
+
+glibc includes the kernel header into its own header for macros
+musl does not
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ptrace.h | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/ptrace.h b/ptrace.h
+index d8af976..4978a69 100644
+--- a/ptrace.h
++++ b/ptrace.h
+@@ -52,7 +52,13 @@ extern long ptrace(int, int, char *, long);
+ # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
+ #endif
+
+-#include <linux/ptrace.h>
++#if defined(POWERPC) && !defined(__GLIBC__)
++#define pt_regs uapi_pt_regs
++#endif
++# include <linux/ptrace.h>
++#if defined(POWERPC) && !defined(__GLIBC__)
++# undef pt_regs
++#endif
+
+ #ifdef HAVE_STRUCT_IA64_FPREG
+ # undef ia64_fpreg
+--
+1.8.3.1
+
diff --git a/meta/recipes-devtools/strace/strace_4.11.bb b/meta/recipes-devtools/strace/strace_4.11.bb
index 7391388020..56b64bb0c9 100644
--- a/meta/recipes-devtools/strace/strace_4.11.bb
+++ b/meta/recipes-devtools/strace/strace_4.11.bb
@@ -16,7 +16,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
file://0001-Move-gcc-compat-macros-to-gcc_compat.h.patch \
file://0001-tests-introduce-libtests.patch \
file://run-ptest \
- "
+ file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \
+ "
SRC_URI[md5sum] = "a15d2555a7febb56d00c6e1a51c655dc"
SRC_URI[sha256sum] = "e86a5f6cd8f941f67f3e4b28f4e60f3d9185c951cf266404533210a2e5cd8152"