diff options
Diffstat (limited to 'meta-oe/recipes-support/mysql/mariadb/plug.in.patch')
-rw-r--r-- | meta-oe/recipes-support/mysql/mariadb/plug.in.patch | 405 |
1 files changed, 405 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/mysql/mariadb/plug.in.patch b/meta-oe/recipes-support/mysql/mariadb/plug.in.patch new file mode 100644 index 0000000000..156fd10823 --- /dev/null +++ b/meta-oe/recipes-support/mysql/mariadb/plug.in.patch | |||
@@ -0,0 +1,405 @@ | |||
1 | diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in | ||
2 | index 7650251..3cc22c5 100644 | ||
3 | --- a/storage/innodb_plugin/plug.in | ||
4 | +++ b/storage/innodb_plugin/plug.in | ||
5 | @@ -56,180 +56,10 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ | ||
6 | esac | ||
7 | AC_SUBST(INNODB_DYNAMIC_CFLAGS) | ||
8 | |||
9 | - AC_MSG_CHECKING(whether GCC atomic builtins are available) | ||
10 | - # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not | ||
11 | - AC_TRY_RUN( | ||
12 | - [ | ||
13 | - int main() | ||
14 | - { | ||
15 | - long x; | ||
16 | - long y; | ||
17 | - long res; | ||
18 | - char c; | ||
19 | - | ||
20 | - x = 10; | ||
21 | - y = 123; | ||
22 | - res = __sync_bool_compare_and_swap(&x, x, y); | ||
23 | - if (!res || x != y) { | ||
24 | - return(1); | ||
25 | - } | ||
26 | - | ||
27 | - x = 10; | ||
28 | - y = 123; | ||
29 | - res = __sync_bool_compare_and_swap(&x, x + 1, y); | ||
30 | - if (res || x != 10) { | ||
31 | - return(1); | ||
32 | - } | ||
33 | - | ||
34 | - x = 10; | ||
35 | - y = 123; | ||
36 | - res = __sync_add_and_fetch(&x, y); | ||
37 | - if (res != 123 + 10 || x != 123 + 10) { | ||
38 | - return(1); | ||
39 | - } | ||
40 | - | ||
41 | - c = 10; | ||
42 | - res = __sync_lock_test_and_set(&c, 123); | ||
43 | - if (res != 10 || c != 123) { | ||
44 | - return(1); | ||
45 | - } | ||
46 | - | ||
47 | - return(0); | ||
48 | - } | ||
49 | - ], | ||
50 | - [ | ||
51 | - AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1], | ||
52 | - [GCC atomic builtins are available]) | ||
53 | - AC_MSG_RESULT(yes) | ||
54 | - ], | ||
55 | - [ | ||
56 | - AC_MSG_RESULT(no) | ||
57 | - ] | ||
58 | - ) | ||
59 | - | ||
60 | - AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins) | ||
61 | - # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not | ||
62 | - AC_TRY_RUN( | ||
63 | - [ | ||
64 | - #include <pthread.h> | ||
65 | - #include <string.h> | ||
66 | - | ||
67 | - int main(int argc, char** argv) { | ||
68 | - pthread_t x1; | ||
69 | - pthread_t x2; | ||
70 | - pthread_t x3; | ||
71 | - | ||
72 | - memset(&x1, 0x0, sizeof(x1)); | ||
73 | - memset(&x2, 0x0, sizeof(x2)); | ||
74 | - memset(&x3, 0x0, sizeof(x3)); | ||
75 | - | ||
76 | - __sync_bool_compare_and_swap(&x1, x2, x3); | ||
77 | - | ||
78 | - return(0); | ||
79 | - } | ||
80 | - ], | ||
81 | - [ | ||
82 | - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1], | ||
83 | - [pthread_t can be used by GCC atomic builtins]) | ||
84 | - AC_MSG_RESULT(yes) | ||
85 | - ], | ||
86 | - [ | ||
87 | - AC_MSG_RESULT(no) | ||
88 | - ] | ||
89 | - ) | ||
90 | - | ||
91 | - AC_MSG_CHECKING(whether Solaris libc atomic functions are available) | ||
92 | - # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following | ||
93 | - # functions are present. | ||
94 | - AC_CHECK_FUNCS(atomic_add_long_nv \ | ||
95 | - atomic_cas_32 \ | ||
96 | - atomic_cas_64 \ | ||
97 | - atomic_cas_ulong \ | ||
98 | - atomic_swap_uchar) | ||
99 | - | ||
100 | - if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \ | ||
101 | - "${ac_cv_func_atomic_cas_32}" = "yes" -a \ | ||
102 | - "${ac_cv_func_atomic_cas_64}" = "yes" -a \ | ||
103 | - "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \ | ||
104 | - "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then | ||
105 | - | ||
106 | - AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], | ||
107 | - [Define to 1 if Solaris libc atomic functions are available] | ||
108 | - ) | ||
109 | - fi | ||
110 | - | ||
111 | - AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions) | ||
112 | - # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not | ||
113 | - AC_TRY_RUN( | ||
114 | - [ | ||
115 | - #include <pthread.h> | ||
116 | - #include <string.h> | ||
117 | - | ||
118 | - int main(int argc, char** argv) { | ||
119 | - pthread_t x1; | ||
120 | - pthread_t x2; | ||
121 | - pthread_t x3; | ||
122 | - | ||
123 | - memset(&x1, 0x0, sizeof(x1)); | ||
124 | - memset(&x2, 0x0, sizeof(x2)); | ||
125 | - memset(&x3, 0x0, sizeof(x3)); | ||
126 | - | ||
127 | - if (sizeof(pthread_t) == 4) { | ||
128 | - | ||
129 | - atomic_cas_32(&x1, x2, x3); | ||
130 | - | ||
131 | - } else if (sizeof(pthread_t) == 8) { | ||
132 | - | ||
133 | - atomic_cas_64(&x1, x2, x3); | ||
134 | - | ||
135 | - } else { | ||
136 | - | ||
137 | - return(1); | ||
138 | - } | ||
139 | - | ||
140 | - return(0); | ||
141 | - } | ||
142 | - ], | ||
143 | - [ | ||
144 | - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1], | ||
145 | - [pthread_t can be used by solaris atomics]) | ||
146 | - AC_MSG_RESULT(yes) | ||
147 | - ], | ||
148 | - [ | ||
149 | - AC_MSG_RESULT(no) | ||
150 | - ] | ||
151 | - ) | ||
152 | - | ||
153 | # this is needed to know which one of atomic_cas_32() or atomic_cas_64() | ||
154 | # to use in the source | ||
155 | AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>]) | ||
156 | |||
157 | - # Check for x86 PAUSE instruction | ||
158 | - AC_MSG_CHECKING(for x86 PAUSE instruction) | ||
159 | - # We have to actually try running the test program, because of a bug | ||
160 | - # in Solaris on x86_64, where it wrongly reports that PAUSE is not | ||
161 | - # supported when trying to run an application. See | ||
162 | - # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684 | ||
163 | - # We use ib_ prefix to avoid collisoins if this code is added to | ||
164 | - # mysql's configure.in. | ||
165 | - AC_TRY_RUN( | ||
166 | - [ | ||
167 | - int main() { | ||
168 | - __asm__ __volatile__ ("pause"); | ||
169 | - return(0); | ||
170 | - } | ||
171 | - ], | ||
172 | - [ | ||
173 | - AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist]) | ||
174 | - AC_MSG_RESULT(yes) | ||
175 | - ], | ||
176 | - [ | ||
177 | - AC_MSG_RESULT(no) | ||
178 | - ], | ||
179 | - [ | ||
180 | - AC_MSG_RESULT(no) | ||
181 | - ] | ||
182 | - ) | ||
183 | ]) | ||
184 | |||
185 | # vim: set ft=config: | ||
186 | diff --git a/storage/xtradb/plug.in b/storage/xtradb/plug.in | ||
187 | index 3fadacc..a33f4dc 100644 | ||
188 | --- a/storage/xtradb/plug.in | ||
189 | +++ b/storage/xtradb/plug.in | ||
190 | @@ -56,215 +56,10 @@ MYSQL_PLUGIN_ACTIONS(xtradb, [ | ||
191 | esac | ||
192 | AC_SUBST(INNODB_DYNAMIC_CFLAGS) | ||
193 | |||
194 | - AC_MSG_CHECKING(whether GCC atomic builtins are available) | ||
195 | - # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not | ||
196 | - AC_TRY_RUN( | ||
197 | - [ | ||
198 | - int main() | ||
199 | - { | ||
200 | - long x; | ||
201 | - long y; | ||
202 | - long res; | ||
203 | - char c; | ||
204 | - | ||
205 | - x = 10; | ||
206 | - y = 123; | ||
207 | - res = __sync_bool_compare_and_swap(&x, x, y); | ||
208 | - if (!res || x != y) { | ||
209 | - return(1); | ||
210 | - } | ||
211 | - | ||
212 | - x = 10; | ||
213 | - y = 123; | ||
214 | - res = __sync_bool_compare_and_swap(&x, x + 1, y); | ||
215 | - if (res || x != 10) { | ||
216 | - return(1); | ||
217 | - } | ||
218 | - | ||
219 | - x = 10; | ||
220 | - y = 123; | ||
221 | - res = __sync_add_and_fetch(&x, y); | ||
222 | - if (res != 123 + 10 || x != 123 + 10) { | ||
223 | - return(1); | ||
224 | - } | ||
225 | - | ||
226 | - c = 10; | ||
227 | - res = __sync_lock_test_and_set(&c, 123); | ||
228 | - if (res != 10 || c != 123) { | ||
229 | - return(1); | ||
230 | - } | ||
231 | - return(0); | ||
232 | - } | ||
233 | - ], | ||
234 | - [ | ||
235 | - AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1], | ||
236 | - [GCC atomic builtins are available]) | ||
237 | - AC_MSG_RESULT(yes) | ||
238 | - ], | ||
239 | - [ | ||
240 | - AC_MSG_RESULT(no) | ||
241 | - ] | ||
242 | - ) | ||
243 | - | ||
244 | - AC_MSG_CHECKING(whether GCC 64-bit atomic builtins are available) | ||
245 | - # either define HAVE_IB_GCC_ATOMIC_BUILTINS_64 or not | ||
246 | - AC_TRY_RUN( | ||
247 | - [ | ||
248 | - #include <stdint.h> | ||
249 | - int main() | ||
250 | - { | ||
251 | - int64_t x, y, res; | ||
252 | - | ||
253 | - x = 10; | ||
254 | - y = 123; | ||
255 | - res = __sync_bool_compare_and_swap(&x, x, y); | ||
256 | - if (!res || x != y) { | ||
257 | - return(1); | ||
258 | - } | ||
259 | - | ||
260 | - x = 10; | ||
261 | - y = 123; | ||
262 | - res = __sync_add_and_fetch(&x, y); | ||
263 | - if (res != 123 + 10 || x != 123 + 10) { | ||
264 | - return(1); | ||
265 | - } | ||
266 | - | ||
267 | - return(0); | ||
268 | - } | ||
269 | - ], | ||
270 | - [ | ||
271 | - AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS_64], [1], | ||
272 | - [GCC 64-bit atomic builtins are available]) | ||
273 | - AC_MSG_RESULT(yes) | ||
274 | - ], | ||
275 | - [ | ||
276 | - AC_MSG_RESULT(no) | ||
277 | - ] | ||
278 | - ) | ||
279 | - | ||
280 | - AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins) | ||
281 | - # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not | ||
282 | - AC_TRY_RUN( | ||
283 | - [ | ||
284 | - #include <pthread.h> | ||
285 | - #include <string.h> | ||
286 | - | ||
287 | - int main(int argc, char** argv) { | ||
288 | - pthread_t x1; | ||
289 | - pthread_t x2; | ||
290 | - pthread_t x3; | ||
291 | - | ||
292 | - memset(&x1, 0x0, sizeof(x1)); | ||
293 | - memset(&x2, 0x0, sizeof(x2)); | ||
294 | - memset(&x3, 0x0, sizeof(x3)); | ||
295 | - | ||
296 | - __sync_bool_compare_and_swap(&x1, x2, x3); | ||
297 | - | ||
298 | - return(0); | ||
299 | - } | ||
300 | - ], | ||
301 | - [ | ||
302 | - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1], | ||
303 | - [pthread_t can be used by GCC atomic builtins]) | ||
304 | - AC_MSG_RESULT(yes) | ||
305 | - ], | ||
306 | - [ | ||
307 | - AC_MSG_RESULT(no) | ||
308 | - ] | ||
309 | - ) | ||
310 | - | ||
311 | - AC_MSG_CHECKING(whether Solaris libc atomic functions are available) | ||
312 | - # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following | ||
313 | - # functions are present. | ||
314 | - AC_CHECK_FUNCS(atomic_add_long_nv \ | ||
315 | - atomic_cas_32 \ | ||
316 | - atomic_cas_64 \ | ||
317 | - atomic_cas_ulong \ | ||
318 | - atomic_swap_uchar) | ||
319 | - | ||
320 | - if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \ | ||
321 | - "${ac_cv_func_atomic_cas_32}" = "yes" -a \ | ||
322 | - "${ac_cv_func_atomic_cas_64}" = "yes" -a \ | ||
323 | - "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \ | ||
324 | - "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then | ||
325 | - | ||
326 | - AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], | ||
327 | - [Define to 1 if Solaris libc atomic functions are available] | ||
328 | - ) | ||
329 | - fi | ||
330 | - | ||
331 | - AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions) | ||
332 | - # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not | ||
333 | - AC_TRY_RUN( | ||
334 | - [ | ||
335 | - #include <pthread.h> | ||
336 | - #include <string.h> | ||
337 | - | ||
338 | - int main(int argc, char** argv) { | ||
339 | - pthread_t x1; | ||
340 | - pthread_t x2; | ||
341 | - pthread_t x3; | ||
342 | - | ||
343 | - memset(&x1, 0x0, sizeof(x1)); | ||
344 | - memset(&x2, 0x0, sizeof(x2)); | ||
345 | - memset(&x3, 0x0, sizeof(x3)); | ||
346 | - | ||
347 | - if (sizeof(pthread_t) == 4) { | ||
348 | - | ||
349 | - atomic_cas_32(&x1, x2, x3); | ||
350 | - | ||
351 | - } else if (sizeof(pthread_t) == 8) { | ||
352 | - | ||
353 | - atomic_cas_64(&x1, x2, x3); | ||
354 | - | ||
355 | - } else { | ||
356 | - | ||
357 | - return(1); | ||
358 | - } | ||
359 | - | ||
360 | - return(0); | ||
361 | - } | ||
362 | - ], | ||
363 | - [ | ||
364 | - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1], | ||
365 | - [pthread_t can be used by solaris atomics]) | ||
366 | - AC_MSG_RESULT(yes) | ||
367 | - ], | ||
368 | - [ | ||
369 | - AC_MSG_RESULT(no) | ||
370 | - ] | ||
371 | - ) | ||
372 | - | ||
373 | # this is needed to know which one of atomic_cas_32() or atomic_cas_64() | ||
374 | # to use in the source | ||
375 | AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>]) | ||
376 | |||
377 | - # Check for x86 PAUSE instruction | ||
378 | - AC_MSG_CHECKING(for x86 PAUSE instruction) | ||
379 | - # We have to actually try running the test program, because of a bug | ||
380 | - # in Solaris on x86_64, where it wrongly reports that PAUSE is not | ||
381 | - # supported when trying to run an application. See | ||
382 | - # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684 | ||
383 | - # We use ib_ prefix to avoid collisoins if this code is added to | ||
384 | - # mysql's configure.in. | ||
385 | - AC_TRY_RUN( | ||
386 | - [ | ||
387 | - int main() { | ||
388 | - __asm__ __volatile__ ("pause"); | ||
389 | - return(0); | ||
390 | - } | ||
391 | - ], | ||
392 | - [ | ||
393 | - AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist]) | ||
394 | - AC_MSG_RESULT(yes) | ||
395 | - ], | ||
396 | - [ | ||
397 | - AC_MSG_RESULT(no) | ||
398 | - ], | ||
399 | - [ | ||
400 | - AC_MSG_RESULT(no) | ||
401 | - ] | ||
402 | - ) | ||
403 | ]) | ||
404 | |||
405 | # vim: set ft=config: | ||