summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-06-12 07:59:05 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-13 10:46:34 +0100
commit98a967d10d11dd3d086604c822385a71b21031f9 (patch)
tree2f81f250edf796c854d1ed7de8a967d58ed86410 /meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
parent93ddbfd17ddcfb94d3dda9d68dab1e58ea618860 (diff)
downloadpoky-98a967d10d11dd3d086604c822385a71b21031f9.tar.gz
valgrind: Fix ptest build with musl
musl unearthed a problem when building out of tree, config.h was being used from $(srcdir) instead of generated config.h in $(builddir) this assumed functions e.g. mallinfo() and more which are not in musl as a result tests broke. Also add fixes to build remaining tests when building on musl pass -fno-pie as it cant use PIE especially in ptests/x86_64 (From OE-Core rev: 8ab1828f073b5eab606161681a5f260cc0e77bf1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
new file mode 100644
index 0000000000..3f9f33b487
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch
@@ -0,0 +1,49 @@
1From 862b807076d57f2f58ed9d572ddac8bb402774a2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 10 Jun 2017 01:01:10 -0700
4Subject: [PATCH 2/6] context APIs are not available on musl
5
6Upstream-Status: Pending
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 memcheck/tests/linux/stack_changes.c | 7 ++++++-
11 1 file changed, 6 insertions(+), 1 deletion(-)
12
13diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
14index a978fc2..ffb49c6 100644
15--- a/memcheck/tests/linux/stack_changes.c
16+++ b/memcheck/tests/linux/stack_changes.c
17@@ -10,6 +10,7 @@
18 // This test is checking the libc context calls (setcontext, etc.) and
19 // checks that Valgrind notices their stack changes properly.
20
21+#ifdef __GLIBC__
22 typedef struct ucontext mycontext;
23
24 mycontext ctx1, ctx2, oldc;
25@@ -51,9 +52,11 @@ int init_context(mycontext *uc)
26
27 return ret;
28 }
29+#endif
30
31 int main(int argc, char **argv)
32 {
33+#ifdef __GLIBC__
34 int c1 = init_context(&ctx1);
35 int c2 = init_context(&ctx2);
36
37@@ -66,6 +69,8 @@ int main(int argc, char **argv)
38 //free(ctx1.uc_stack.ss_sp);
39 VALGRIND_STACK_DEREGISTER(c2);
40 //free(ctx2.uc_stack.ss_sp);
41-
42+#else
43+ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n");
44+#endif
45 return 0;
46 }
47--
482.13.1
49