summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRandy MacLeod <Randy.MacLeod@windriver.com>2018-10-22 00:21:16 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-25 14:53:44 +0100
commit1c03ada82de69a7f04ebb191fa560c02a2d29ea7 (patch)
tree87216dc110f6c7d643d29b30ddd02ee393620c0c /meta/recipes-devtools
parent60bdb3d6a18e2d136df3590f04df55a9a3a045f9 (diff)
downloadpoky-1c03ada82de69a7f04ebb191fa560c02a2d29ea7.tar.gz
valgrind: Make local functions static to avoid assembler error
Avoid mips32 x-compiler warnings such as: | ../../../valgrind-3.14.0/helgrind/tests/annotate_hbefore.c:360:6: warning: no previous prototype for 'do_signal' [-Wmissing-prototypes] | void do_signal ( UWord* w ) | ^~~~~~~~~ by making functions and global variables that are file scope be static and more importantly also avoid an assembler error: /tmp/cce22iiw.s: Assembler messages: /tmp/cce22iiw.s:446: Error: symbol `exit_0' is already defined /tmp/cce22iiw.s:448: Error: symbol `exit' is already defined /tmp/cce22iiw.s:915: Error: symbol `exit_0' is already defined /tmp/cce22iiw.s:917: Error: symbol `exit' is already defined (From OE-Core rev: 5fface331c46b809c10b4f3d65904534d6933896) Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch182
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.14.0.bb1
2 files changed, 183 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch
new file mode 100644
index 0000000000..45e5ea3e74
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-Make-local-functions-static-to-avoid-assembler-error.patch
@@ -0,0 +1,182 @@
1From 2155c1b2cf00e744e280c493eb74bf457dfcc3b1 Mon Sep 17 00:00:00 2001
2From: Randy MacLeod <Randy.MacLeod@windriver.com>
3Date: Sun, 21 Oct 2018 15:09:31 -0400
4Subject: [PATCH] Make local functions static to avoid assembler error
5
6Avoid mips32 x-compiler warnings such as:
7
8| ../../../valgrind-3.14.0/helgrind/tests/annotate_hbefore.c:360:6: warning: no previous prototype for 'do_signal' [-Wmissing-prototypes]
9| void do_signal ( UWord* w )
10| ^~~~~~~~~
11
12by making functions and global variables that are file scope be static
13and more importantly also avoid an assembler error:
14
15/tmp/cce22iiw.s: Assembler messages:
16/tmp/cce22iiw.s:446: Error: symbol `exit_0' is already defined
17/tmp/cce22iiw.s:448: Error: symbol `exit' is already defined
18/tmp/cce22iiw.s:915: Error: symbol `exit_0' is already defined
19/tmp/cce22iiw.s:917: Error: symbol `exit' is already defined
20
21Upstream-Status: Pending
22
23Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
24---
25 helgrind/tests/annotate_hbefore.c | 34 +++++++++++++++----------------
26 1 file changed, 17 insertions(+), 17 deletions(-)
27
28diff --git a/helgrind/tests/annotate_hbefore.c b/helgrind/tests/annotate_hbefore.c
29index e311714f7..f55514e45 100644
30--- a/helgrind/tests/annotate_hbefore.c
31+++ b/helgrind/tests/annotate_hbefore.c
32@@ -24,7 +24,7 @@ typedef unsigned long int UWord;
33
34 // ppc64
35 /* return 1 if success, 0 if failure */
36-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
37+static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
38 {
39 UWord old, success;
40
41@@ -57,7 +57,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
42
43 // ppc32
44 /* return 1 if success, 0 if failure */
45-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
46+static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
47 {
48 UWord old, success;
49
50@@ -90,7 +90,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
51
52 // amd64
53 /* return 1 if success, 0 if failure */
54-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
55+static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
56 {
57 UWord block[4] = { (UWord)addr, expected, nyu, 2 };
58 __asm__ __volatile__(
59@@ -113,7 +113,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
60
61 // x86
62 /* return 1 if success, 0 if failure */
63-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
64+static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
65 {
66 UWord block[4] = { (UWord)addr, expected, nyu, 2 };
67 __asm__ __volatile__(
68@@ -138,7 +138,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
69
70 // arm
71 /* return 1 if success, 0 if failure */
72-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
73+static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
74 {
75 UWord old, success;
76 UWord block[2] = { (UWord)addr, nyu };
77@@ -171,7 +171,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
78
79 // arm64
80 /* return 1 if success, 0 if failure */
81-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
82+static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
83 {
84 UWord old, success;
85 UWord block[2] = { (UWord)addr, nyu };
86@@ -204,7 +204,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
87
88 // s390x
89 /* return 1 if success, 0 if failure */
90-UWord do_acasW(UWord* addr, UWord expected, UWord nyu )
91+static UWord do_acasW(UWord* addr, UWord expected, UWord nyu )
92 {
93 int cc;
94
95@@ -223,7 +223,7 @@ UWord do_acasW(UWord* addr, UWord expected, UWord nyu )
96
97 // mips32
98 /* return 1 if success, 0 if failure */
99-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
100+static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
101 {
102 UWord success;
103 UWord block[3] = { (UWord)addr, nyu, expected};
104@@ -256,7 +256,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
105
106 // mips64
107 /* return 1 if success, 0 if failure */
108-UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
109+static UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
110 {
111 UWord success;
112 UWord block[3] = { (UWord)addr, nyu, expected};
113@@ -287,7 +287,7 @@ UWord do_acasW ( UWord* addr, UWord expected, UWord nyu )
114
115 #endif
116
117-void atomic_incW ( UWord* w )
118+static void atomic_incW ( UWord* w )
119 {
120 while (1) {
121 UWord old = *w;
122@@ -301,7 +301,7 @@ void atomic_incW ( UWord* w )
123
124 #define NNN 1000000
125
126-void* thread_fn ( void* arg )
127+static void* thread_fn ( void* arg )
128 {
129 UWord* w = (UWord*)arg;
130 int i;
131@@ -331,10 +331,10 @@ int main ( void )
132
133 #endif
134
135-int shared_var = 0; // is not raced upon
136+static int shared_var = 0; // is not raced upon
137
138
139-void delayXms ( int i )
140+static void delayXms ( int i )
141 {
142 struct timespec ts = { 0, 1 * 1000 * 1000 };
143 // We do the sleep in small pieces to have scheduling
144@@ -348,7 +348,7 @@ void delayXms ( int i )
145 }
146 }
147
148-void do_wait ( UWord* w )
149+static void do_wait ( UWord* w )
150 {
151 UWord w0 = *w;
152 UWord volatile * wV = w;
153@@ -357,7 +357,7 @@ void do_wait ( UWord* w )
154 ANNOTATE_HAPPENS_AFTER(w);
155 }
156
157-void do_signal ( UWord* w )
158+static void do_signal ( UWord* w )
159 {
160 ANNOTATE_HAPPENS_BEFORE(w);
161 atomic_incW(w);
162@@ -365,7 +365,7 @@ void do_signal ( UWord* w )
163
164
165
166-void* thread_fn1 ( void* arg )
167+static void* thread_fn1 ( void* arg )
168 {
169 UWord* w = (UWord*)arg;
170 delayXms(500); // ensure t2 gets to its wait first
171@@ -376,7 +376,7 @@ void* thread_fn1 ( void* arg )
172 return NULL;
173 }
174
175-void* thread_fn2 ( void* arg )
176+static void* thread_fn2 ( void* arg )
177 {
178 UWord* w = (UWord*)arg;
179 do_wait(w); // wait for h-b edge from first thread
180--
1812.17.0
182
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
index 2fa529516b..7f0a93f6f8 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
@@ -35,6 +35,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
35 file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ 35 file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
36 file://0001-fix-opcode-not-supported-on-mips32-linux.patch \ 36 file://0001-fix-opcode-not-supported-on-mips32-linux.patch \
37 file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \ 37 file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
38 file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
38 " 39 "
39SRC_URI[md5sum] = "74175426afa280184b62591b58c671b3" 40SRC_URI[md5sum] = "74175426afa280184b62591b58c671b3"
40SRC_URI[sha256sum] = "037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5" 41SRC_URI[sha256sum] = "037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5"