diff options
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.patch | 50 |
1 files changed, 45 insertions, 5 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 index 480fe33247..7f0e38cb95 100644 --- 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 | |||
@@ -1,18 +1,58 @@ | |||
1 | From bd4e926e7e14747b3cd4d7b2a1bd5410b22f3ea2 Mon Sep 17 00:00:00 2001 | 1 | From 26c104adf6c5162572b7aa2fac89d0835b7f8f0b Mon Sep 17 00:00:00 2001 |
2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | 2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> |
3 | Date: Tue, 16 Oct 2018 21:27:46 -0400 | 3 | Date: Tue, 16 Oct 2018 21:27:46 -0400 |
4 | Subject: [PATCH] context APIs are not available on musl | 4 | Subject: [PATCH] context APIs are not available on musl |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Updated patch for valgrind-3.14 | 6 | Updated patch for valgrind-3.14 |
9 | 7 | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> | 9 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> |
10 | |||
11 | Apply same patch to drd/tests/swapcontext.c | ||
12 | for valgrind-3.17. | ||
13 | |||
14 | Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=434775] | ||
15 | |||
16 | Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> | ||
12 | --- | 17 | --- |
18 | drd/tests/swapcontext.c | 6 ++++++ | ||
13 | memcheck/tests/linux/stack_changes.c | 7 ++++++- | 19 | memcheck/tests/linux/stack_changes.c | 7 ++++++- |
14 | 1 file changed, 6 insertions(+), 1 deletion(-) | 20 | 2 files changed, 12 insertions(+), 1 deletion(-) |
15 | 21 | ||
22 | diff --git a/drd/tests/swapcontext.c b/drd/tests/swapcontext.c | ||
23 | index 622c70bc5..5e72bb0f3 100644 | ||
24 | --- a/drd/tests/swapcontext.c | ||
25 | +++ b/drd/tests/swapcontext.c | ||
26 | @@ -20,6 +20,7 @@ | ||
27 | |||
28 | #define STACKSIZE (PTHREAD_STACK_MIN + 4096) | ||
29 | |||
30 | +#ifdef __GLIBC__ | ||
31 | typedef struct thread_local { | ||
32 | ucontext_t uc[3]; | ||
33 | size_t nrsw; | ||
34 | @@ -67,9 +68,11 @@ void *worker(void *data) | ||
35 | swapcontext(&tlocal->uc[0], &tlocal->uc[1]); | ||
36 | return NULL; | ||
37 | } | ||
38 | +#endif | ||
39 | |||
40 | int main(int argc, char *argv[]) | ||
41 | { | ||
42 | +#ifdef __GLIBC__ | ||
43 | enum { NR = 32 }; | ||
44 | thread_local_t tlocal[NR]; | ||
45 | pthread_t thread[NR]; | ||
46 | @@ -94,6 +97,9 @@ int main(int argc, char *argv[]) | ||
47 | |||
48 | for (i = 0; i < NR; i++) | ||
49 | pthread_join(thread[i], NULL); | ||
50 | +#else | ||
51 | + printf("libc context call APIs e.g. getcontext() are deprecated by posix\n"); | ||
52 | +#endif | ||
53 | |||
54 | return 0; | ||
55 | } | ||
16 | diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c | 56 | diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c |
17 | index 7f97b90a5..a26cb4ae6 100644 | 57 | index 7f97b90a5..a26cb4ae6 100644 |
18 | --- a/memcheck/tests/linux/stack_changes.c | 58 | --- a/memcheck/tests/linux/stack_changes.c |
@@ -48,5 +88,5 @@ index 7f97b90a5..a26cb4ae6 100644 | |||
48 | return 0; | 88 | return 0; |
49 | } | 89 | } |
50 | -- | 90 | -- |
51 | 2.17.0 | 91 | 2.17.1 |
52 | 92 | ||