summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-07-20 11:00:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-23 22:26:28 +0100
commitd5b73bdb45c906cfbcfc395d191537a0a7b4ff38 (patch)
tree8a151075dd66ccbf6b48480bd004fb5dc9c53b56 /meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch
parent002c33a38f87c19bd68d58d936a8d822bcf484f8 (diff)
downloadpoky-d5b73bdb45c906cfbcfc395d191537a0a7b4ff38.tar.gz
elfutils: Fix eu-* utils builds for musl
Re-organize the musl patches in three different areas namely libs, utils and tests, this will help maintain them in future version bumps Add obstack dependency on musl targets which is needed for eu-* PN and PN-binutils is not empty anymore on musl (From OE-Core rev: a747239978e63f22d4107e6e12c75b5f78043cce) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch')
-rw-r--r--meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch91
1 files changed, 0 insertions, 91 deletions
diff --git a/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch b/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch
deleted file mode 100644
index 433db133b2..0000000000
--- a/meta/recipes-devtools/elfutils/files/0001-fix-err-variable-and-function-conflicts.patch
+++ /dev/null
@@ -1,91 +0,0 @@
1From 2c50fe7068bd6911958c6d851aef88179e73bb21 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <Mingli.Yu@windriver.com>
3Date: Tue, 16 Apr 2019 15:30:38 +0800
4Subject: [PATCH] fix err variable and function conflicts
5
6There comes below build failure with musl when
7ptest enabled.
8| In file included from ../../elfutils-0.176/tests/dwfl-proc-attach.c:33:
9| ../../elfutils-0.176/lib/system.h:63:35: error: called object 'err' is not a function or function pointer
10| #define error(status, errno, ...) err(status, __VA_ARGS__)
11| ^~~
12| ../../elfutils-0.176/tests/dwfl-proc-attach.c:92:5: note: in expansion of macro 'error'
13| error (-1, 0, "dwfl_linux_proc_attach pid %d: %s", pid,
14| ^~~~~
15| ../../elfutils-0.176/tests/dwfl-proc-attach.c:79:7: note: declared here
16| int err;
17| ^~~
18
19It is because there is no error.h in musl and
20the patch 0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
21has updated to use err.h to replace error.h
22and also added macro definiton as below when
23use musl.
24 #define error(status, errno, ...) err(status, __VA_ARGS__)
25
26And in err.h, there is below logic:
27_Noreturn void err(int, const char *, ...);
28
29But when ptest enabled, there comes below error
30as there is both variable and function defined
31to be err in tests/dwfl-proc-attach.c.
32So change the err variable's name to workaround
33the build failure with musl.
34
35Upstream-Status: Inappropriate [workaround in musl]
36
37Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
38---
39 tests/dwfl-proc-attach.c | 6 +++---
40 1 file changed, 3 insertions(+), 3 deletions(-)
41
42Index: elfutils-0.176/tests/dwfl-proc-attach.c
43===================================================================
44--- elfutils-0.176.orig/tests/dwfl-proc-attach.c
45+++ elfutils-0.176/tests/dwfl-proc-attach.c
46@@ -76,10 +76,10 @@ main (int argc __attribute__ ((unused)),
47 char **argv __attribute__ ((unused)))
48 {
49 /* Create two extra threads to iterate through. */
50- int err;
51- if ((err = pthread_create (&thread1, NULL, sleeper, NULL)) != 0)
52+ int err1;
53+ if ((err1 = pthread_create (&thread1, NULL, sleeper, NULL)) != 0)
54 error (-1, err, "Couldn't create thread1");
55- if ((err = pthread_create (&thread2, NULL, sleeper, NULL)) != 0)
56+ if ((err1 = pthread_create (&thread2, NULL, sleeper, NULL)) != 0)
57 error (-1, err, "Couldn't create thread2");
58
59 Dwfl *dwfl = dwfl_begin (&proc_callbacks);
60Index: elfutils-0.176/tests/backtrace.c
61===================================================================
62--- elfutils-0.176.orig/tests/backtrace.c
63+++ elfutils-0.176/tests/backtrace.c
64@@ -219,23 +219,23 @@ dump (Dwfl *dwfl)
65 {
66 ptrdiff_t ptrdiff = dwfl_getmodules (dwfl, dump_modules, NULL, 0);
67 assert (ptrdiff == 0);
68- bool err = false;
69+ bool err1 = false;
70 switch (dwfl_getthreads (dwfl, thread_callback, NULL))
71 {
72 case 0:
73 break;
74 case DWARF_CB_ABORT:
75- err = true;
76+ err1 = true;
77 break;
78 case -1:
79 error (0, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
80- err = true;
81+ err1 = true;
82 break;
83 default:
84 abort ();
85 }
86 callback_verify (0, 0, 0, NULL, dwfl);
87- if (err)
88+ if (err1)
89 exit (EXIT_FAILURE);
90 }
91