freetype: Add 2.4.3
[openembedded.git] / recipes / gcc / gcc-4.4.1 / gcc-improve-tls-macro.patch
blob88f110b030097d4bf23681eee67d37714571ea27
1 This is fudge of following patches from trunk
3 http://gcc.gnu.org/ml/gcc-cvs/2009-07/msg00629.html
4 http://gcc.gnu.org/ml/gcc-cvs/2009-07/msg00606.html
6 It improved the TLS support detection by performing link step
7 because so far it was only probing assembler to determine
8 if TLS was supported.
10 -Khem
11 Index: gcc-4.4.1/config/tls.m4
12 ===================================================================
13 --- gcc-4.4.1.orig/config/tls.m4 2009-01-22 20:58:03.000000000 -0800
14 +++ gcc-4.4.1/config/tls.m4 2009-08-28 15:14:00.419824470 -0700
15 @@ -1,5 +1,6 @@
16 dnl Check whether the target supports TLS.
17 AC_DEFUN([GCC_CHECK_TLS], [
18 + AC_REQUIRE([AC_CANONICAL_HOST])
19 GCC_ENABLE(tls, yes, [], [Use thread-local storage])
20 AC_CACHE_CHECK([whether the target supports thread-local storage],
21 gcc_cv_have_tls, [
22 @@ -66,7 +67,24 @@
23 [dnl This is the cross-compiling case. Assume libc supports TLS if the
24 dnl binutils and the compiler do.
25 AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
26 - [gcc_cv_have_tls=yes], [gcc_cv_have_tls=no])
27 + [chktls_save_LDFLAGS="$LDFLAGS"
28 + dnl Shared library options may depend on the host; this check
29 + dnl is only known to be needed for GNU/Linux.
30 + case $host in
31 + *-*-linux*)
32 + LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
33 + ;;
34 + esac
35 + chktls_save_CFLAGS="$CFLAGS"
36 + CFLAGS="-fPIC $CFLAGS"
37 + dnl If -shared works, test if TLS works in a shared library.
38 + AC_LINK_IFELSE([int f() { return 0; }],
39 + [AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }],
40 + [gcc_cv_have_tls=yes],
41 + [gcc_cv_have_tls=no])],
42 + [gcc_cv_have_tls=yes])
43 + CFLAGS="$chktls_save_CFLAGS"
44 + LDFLAGS="$chktls_save_LDFLAGS"], [gcc_cv_have_tls=no])
46 )])
47 if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then
48 Index: gcc-4.4.1/libgomp/configure
49 ===================================================================
50 --- gcc-4.4.1.orig/libgomp/configure 2009-08-28 16:08:56.936822000 -0700
51 +++ gcc-4.4.1/libgomp/configure 2009-08-28 16:11:50.135833432 -0700
52 @@ -17859,6 +17859,7 @@
54 # See if we support thread-local storage.
57 # Check whether --enable-tls or --disable-tls was given.
58 if test "${enable_tls+set}" = set; then
59 enableval="$enable_tls"
60 @@ -17906,6 +17907,64 @@
61 ac_status=$?
62 echo "$as_me:$LINENO: \$? = $ac_status" >&5
63 (exit $ac_status); }; }; then
64 + chktls_save_LDFLAGS="$LDFLAGS"
65 + case $host in
66 + *-*-linux*)
67 + LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
68 + ;;
69 + esac
70 + chktls_save_CFLAGS="$CFLAGS"
71 + CFLAGS="-fPIC $CFLAGS"
72 + cat >conftest.$ac_ext <<_ACEOF
73 +int f() { return 0; }
74 +_ACEOF
75 +rm -f conftest.$ac_objext conftest$ac_exeext
76 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
77 + (eval $ac_link) 2>conftest.er1
78 + ac_status=$?
79 + grep -v '^ *+' conftest.er1 >conftest.err
80 + rm -f conftest.er1
81 + cat conftest.err >&5
82 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
83 + (exit $ac_status); } &&
84 + { ac_try='test -z "$ac_c_werror_flag"
85 + || test ! -s conftest.err'
86 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87 + (eval $ac_try) 2>&5
88 + ac_status=$?
89 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
90 + (exit $ac_status); }; } &&
91 + { ac_try='test -s conftest$ac_exeext'
92 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
93 + (eval $ac_try) 2>&5
94 + ac_status=$?
95 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
96 + (exit $ac_status); }; }; then
97 + cat >conftest.$ac_ext <<_ACEOF
98 +__thread int a; int b; int f() { return a = b; }
99 +_ACEOF
100 +rm -f conftest.$ac_objext conftest$ac_exeext
101 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
102 + (eval $ac_link) 2>conftest.er1
103 + ac_status=$?
104 + grep -v '^ *+' conftest.er1 >conftest.err
105 + rm -f conftest.er1
106 + cat conftest.err >&5
107 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
108 + (exit $ac_status); } &&
109 + { ac_try='test -z "$ac_c_werror_flag"
110 + || test ! -s conftest.err'
111 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
112 + (eval $ac_try) 2>&5
113 + ac_status=$?
114 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
115 + (exit $ac_status); }; } &&
116 + { ac_try='test -s conftest$ac_exeext'
117 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
118 + (eval $ac_try) 2>&5
119 + ac_status=$?
120 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
121 + (exit $ac_status); }; }; then
122 gcc_cv_have_tls=yes
123 else
124 echo "$as_me: failed program was:" >&5
125 @@ -17915,6 +17974,24 @@
127 rm -f conftest.err conftest.$ac_objext \
128 conftest$ac_exeext conftest.$ac_ext
129 +else
130 + echo "$as_me: failed program was:" >&5
131 +sed 's/^/| /' conftest.$ac_ext >&5
133 +gcc_cv_have_tls=yes
135 +rm -f conftest.err conftest.$ac_objext \
136 + conftest$ac_exeext conftest.$ac_ext
137 + CFLAGS="$chktls_save_CFLAGS"
138 + LDFLAGS="$chktls_save_LDFLAGS"
139 +else
140 + echo "$as_me: failed program was:" >&5
141 +sed 's/^/| /' conftest.$ac_ext >&5
143 +gcc_cv_have_tls=no
145 +rm -f conftest.err conftest.$ac_objext \
146 + conftest$ac_exeext conftest.$ac_ext
149 else
150 Index: gcc-4.4.1/libjava/configure
151 ===================================================================
152 --- gcc-4.4.1.orig/libjava/configure 2009-08-28 16:08:57.052863152 -0700
153 +++ gcc-4.4.1/libjava/configure 2009-08-28 16:12:46.668833365 -0700
154 @@ -27600,6 +27600,7 @@
156 # See if we support thread-local storage.
159 # Check whether --enable-tls or --disable-tls was given.
160 if test "${enable_tls+set}" = set; then
161 enableval="$enable_tls"
162 @@ -27652,6 +27653,74 @@
163 ac_status=$?
164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
165 (exit $ac_status); }; }; then
166 + chktls_save_LDFLAGS="$LDFLAGS"
167 + case $host in
168 + *-*-linux*)
169 + LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
170 + ;;
171 + esac
172 + chktls_save_CFLAGS="$CFLAGS"
173 + CFLAGS="-fPIC $CFLAGS"
174 + if test x$gcc_no_link = xyes; then
175 + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
176 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
177 + { (exit 1); exit 1; }; }
179 +cat >conftest.$ac_ext <<_ACEOF
180 +int f() { return 0; }
181 +_ACEOF
182 +rm -f conftest.$ac_objext conftest$ac_exeext
183 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
184 + (eval $ac_link) 2>conftest.er1
185 + ac_status=$?
186 + grep -v '^ *+' conftest.er1 >conftest.err
187 + rm -f conftest.er1
188 + cat conftest.err >&5
189 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
190 + (exit $ac_status); } &&
191 + { ac_try='test -z "$ac_c_werror_flag"
192 + || test ! -s conftest.err'
193 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
194 + (eval $ac_try) 2>&5
195 + ac_status=$?
196 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
197 + (exit $ac_status); }; } &&
198 + { ac_try='test -s conftest$ac_exeext'
199 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
200 + (eval $ac_try) 2>&5
201 + ac_status=$?
202 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
203 + (exit $ac_status); }; }; then
204 + if test x$gcc_no_link = xyes; then
205 + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
206 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
207 + { (exit 1); exit 1; }; }
209 +cat >conftest.$ac_ext <<_ACEOF
210 +__thread int a; int b; int f() { return a = b; }
211 +_ACEOF
212 +rm -f conftest.$ac_objext conftest$ac_exeext
213 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
214 + (eval $ac_link) 2>conftest.er1
215 + ac_status=$?
216 + grep -v '^ *+' conftest.er1 >conftest.err
217 + rm -f conftest.er1
218 + cat conftest.err >&5
219 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
220 + (exit $ac_status); } &&
221 + { ac_try='test -z "$ac_c_werror_flag"
222 + || test ! -s conftest.err'
223 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
224 + (eval $ac_try) 2>&5
225 + ac_status=$?
226 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
227 + (exit $ac_status); }; } &&
228 + { ac_try='test -s conftest$ac_exeext'
229 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
230 + (eval $ac_try) 2>&5
231 + ac_status=$?
232 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
233 + (exit $ac_status); }; }; then
234 gcc_cv_have_tls=yes
235 else
236 echo "$as_me: failed program was:" >&5
237 @@ -27661,6 +27730,24 @@
239 rm -f conftest.err conftest.$ac_objext \
240 conftest$ac_exeext conftest.$ac_ext
241 +else
242 + echo "$as_me: failed program was:" >&5
243 +sed 's/^/| /' conftest.$ac_ext >&5
245 +gcc_cv_have_tls=yes
247 +rm -f conftest.err conftest.$ac_objext \
248 + conftest$ac_exeext conftest.$ac_ext
249 + CFLAGS="$chktls_save_CFLAGS"
250 + LDFLAGS="$chktls_save_LDFLAGS"
251 +else
252 + echo "$as_me: failed program was:" >&5
253 +sed 's/^/| /' conftest.$ac_ext >&5
255 +gcc_cv_have_tls=no
257 +rm -f conftest.err conftest.$ac_objext \
258 + conftest$ac_exeext conftest.$ac_ext
261 else
262 Index: gcc-4.4.1/libmudflap/configure
263 ===================================================================
264 --- gcc-4.4.1.orig/libmudflap/configure 2009-08-28 16:08:57.116862217 -0700
265 +++ gcc-4.4.1/libmudflap/configure 2009-08-28 16:12:53.952833418 -0700
266 @@ -12740,6 +12740,7 @@
268 # See if we support thread-local storage.
271 # Check whether --enable-tls or --disable-tls was given.
272 if test "${enable_tls+set}" = set; then
273 enableval="$enable_tls"
274 @@ -12787,6 +12788,64 @@
275 ac_status=$?
276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
277 (exit $ac_status); }; }; then
278 + chktls_save_LDFLAGS="$LDFLAGS"
279 + case $host in
280 + *-*-linux*)
281 + LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
282 + ;;
283 + esac
284 + chktls_save_CFLAGS="$CFLAGS"
285 + CFLAGS="-fPIC $CFLAGS"
286 + cat >conftest.$ac_ext <<_ACEOF
287 +int f() { return 0; }
288 +_ACEOF
289 +rm -f conftest.$ac_objext conftest$ac_exeext
290 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
291 + (eval $ac_link) 2>conftest.er1
292 + ac_status=$?
293 + grep -v '^ *+' conftest.er1 >conftest.err
294 + rm -f conftest.er1
295 + cat conftest.err >&5
296 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
297 + (exit $ac_status); } &&
298 + { ac_try='test -z "$ac_c_werror_flag"
299 + || test ! -s conftest.err'
300 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
301 + (eval $ac_try) 2>&5
302 + ac_status=$?
303 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
304 + (exit $ac_status); }; } &&
305 + { ac_try='test -s conftest$ac_exeext'
306 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
307 + (eval $ac_try) 2>&5
308 + ac_status=$?
309 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
310 + (exit $ac_status); }; }; then
311 + cat >conftest.$ac_ext <<_ACEOF
312 +__thread int a; int b; int f() { return a = b; }
313 +_ACEOF
314 +rm -f conftest.$ac_objext conftest$ac_exeext
315 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
316 + (eval $ac_link) 2>conftest.er1
317 + ac_status=$?
318 + grep -v '^ *+' conftest.er1 >conftest.err
319 + rm -f conftest.er1
320 + cat conftest.err >&5
321 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
322 + (exit $ac_status); } &&
323 + { ac_try='test -z "$ac_c_werror_flag"
324 + || test ! -s conftest.err'
325 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
326 + (eval $ac_try) 2>&5
327 + ac_status=$?
328 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
329 + (exit $ac_status); }; } &&
330 + { ac_try='test -s conftest$ac_exeext'
331 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
332 + (eval $ac_try) 2>&5
333 + ac_status=$?
334 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
335 + (exit $ac_status); }; }; then
336 gcc_cv_have_tls=yes
337 else
338 echo "$as_me: failed program was:" >&5
339 @@ -12796,6 +12855,24 @@
341 rm -f conftest.err conftest.$ac_objext \
342 conftest$ac_exeext conftest.$ac_ext
343 +else
344 + echo "$as_me: failed program was:" >&5
345 +sed 's/^/| /' conftest.$ac_ext >&5
347 +gcc_cv_have_tls=yes
349 +rm -f conftest.err conftest.$ac_objext \
350 + conftest$ac_exeext conftest.$ac_ext
351 + CFLAGS="$chktls_save_CFLAGS"
352 + LDFLAGS="$chktls_save_LDFLAGS"
353 +else
354 + echo "$as_me: failed program was:" >&5
355 +sed 's/^/| /' conftest.$ac_ext >&5
357 +gcc_cv_have_tls=no
359 +rm -f conftest.err conftest.$ac_objext \
360 + conftest$ac_exeext conftest.$ac_ext
363 else
364 Index: gcc-4.4.1/libstdc++-v3/configure
365 ===================================================================
366 --- gcc-4.4.1.orig/libstdc++-v3/configure 2009-08-28 16:08:57.176853506 -0700
367 +++ gcc-4.4.1/libstdc++-v3/configure 2009-08-28 16:13:08.792833271 -0700
368 @@ -40678,6 +40678,7 @@
370 # For TLS support.
373 # Check whether --enable-tls or --disable-tls was given.
374 if test "${enable_tls+set}" = set; then
375 enableval="$enable_tls"
376 @@ -40730,6 +40731,74 @@
377 ac_status=$?
378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
379 (exit $ac_status); }; }; then
380 + chktls_save_LDFLAGS="$LDFLAGS"
381 + case $host in
382 + *-*-linux*)
383 + LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
384 + ;;
385 + esac
386 + chktls_save_CFLAGS="$CFLAGS"
387 + CFLAGS="-fPIC $CFLAGS"
388 + if test x$gcc_no_link = xyes; then
389 + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
390 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
391 + { (exit 1); exit 1; }; }
393 +cat >conftest.$ac_ext <<_ACEOF
394 +int f() { return 0; }
395 +_ACEOF
396 +rm -f conftest.$ac_objext conftest$ac_exeext
397 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
398 + (eval $ac_link) 2>conftest.er1
399 + ac_status=$?
400 + grep -v '^ *+' conftest.er1 >conftest.err
401 + rm -f conftest.er1
402 + cat conftest.err >&5
403 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
404 + (exit $ac_status); } &&
405 + { ac_try='test -z "$ac_c_werror_flag"
406 + || test ! -s conftest.err'
407 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
408 + (eval $ac_try) 2>&5
409 + ac_status=$?
410 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
411 + (exit $ac_status); }; } &&
412 + { ac_try='test -s conftest$ac_exeext'
413 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
414 + (eval $ac_try) 2>&5
415 + ac_status=$?
416 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
417 + (exit $ac_status); }; }; then
418 + if test x$gcc_no_link = xyes; then
419 + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
420 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
421 + { (exit 1); exit 1; }; }
423 +cat >conftest.$ac_ext <<_ACEOF
424 +__thread int a; int b; int f() { return a = b; }
425 +_ACEOF
426 +rm -f conftest.$ac_objext conftest$ac_exeext
427 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
428 + (eval $ac_link) 2>conftest.er1
429 + ac_status=$?
430 + grep -v '^ *+' conftest.er1 >conftest.err
431 + rm -f conftest.er1
432 + cat conftest.err >&5
433 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
434 + (exit $ac_status); } &&
435 + { ac_try='test -z "$ac_c_werror_flag"
436 + || test ! -s conftest.err'
437 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
438 + (eval $ac_try) 2>&5
439 + ac_status=$?
440 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
441 + (exit $ac_status); }; } &&
442 + { ac_try='test -s conftest$ac_exeext'
443 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
444 + (eval $ac_try) 2>&5
445 + ac_status=$?
446 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
447 + (exit $ac_status); }; }; then
448 gcc_cv_have_tls=yes
449 else
450 echo "$as_me: failed program was:" >&5
451 @@ -40739,6 +40808,24 @@
453 rm -f conftest.err conftest.$ac_objext \
454 conftest$ac_exeext conftest.$ac_ext
455 +else
456 + echo "$as_me: failed program was:" >&5
457 +sed 's/^/| /' conftest.$ac_ext >&5
459 +gcc_cv_have_tls=yes
461 +rm -f conftest.err conftest.$ac_objext \
462 + conftest$ac_exeext conftest.$ac_ext
463 + CFLAGS="$chktls_save_CFLAGS"
464 + LDFLAGS="$chktls_save_LDFLAGS"
465 +else
466 + echo "$as_me: failed program was:" >&5
467 +sed 's/^/| /' conftest.$ac_ext >&5
469 +gcc_cv_have_tls=no
471 +rm -f conftest.err conftest.$ac_objext \
472 + conftest$ac_exeext conftest.$ac_ext
475 else
476 @@ -76874,6 +76961,7 @@
481 # Check whether --enable-tls or --disable-tls was given.
482 if test "${enable_tls+set}" = set; then
483 enableval="$enable_tls"
484 @@ -76926,6 +77014,74 @@
485 ac_status=$?
486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
487 (exit $ac_status); }; }; then
488 + chktls_save_LDFLAGS="$LDFLAGS"
489 + case $host in
490 + *-*-linux*)
491 + LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
492 + ;;
493 + esac
494 + chktls_save_CFLAGS="$CFLAGS"
495 + CFLAGS="-fPIC $CFLAGS"
496 + if test x$gcc_no_link = xyes; then
497 + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
498 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
499 + { (exit 1); exit 1; }; }
501 +cat >conftest.$ac_ext <<_ACEOF
502 +int f() { return 0; }
503 +_ACEOF
504 +rm -f conftest.$ac_objext conftest$ac_exeext
505 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
506 + (eval $ac_link) 2>conftest.er1
507 + ac_status=$?
508 + grep -v '^ *+' conftest.er1 >conftest.err
509 + rm -f conftest.er1
510 + cat conftest.err >&5
511 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
512 + (exit $ac_status); } &&
513 + { ac_try='test -z "$ac_c_werror_flag"
514 + || test ! -s conftest.err'
515 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
516 + (eval $ac_try) 2>&5
517 + ac_status=$?
518 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
519 + (exit $ac_status); }; } &&
520 + { ac_try='test -s conftest$ac_exeext'
521 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
522 + (eval $ac_try) 2>&5
523 + ac_status=$?
524 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
525 + (exit $ac_status); }; }; then
526 + if test x$gcc_no_link = xyes; then
527 + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
528 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
529 + { (exit 1); exit 1; }; }
531 +cat >conftest.$ac_ext <<_ACEOF
532 +__thread int a; int b; int f() { return a = b; }
533 +_ACEOF
534 +rm -f conftest.$ac_objext conftest$ac_exeext
535 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
536 + (eval $ac_link) 2>conftest.er1
537 + ac_status=$?
538 + grep -v '^ *+' conftest.er1 >conftest.err
539 + rm -f conftest.er1
540 + cat conftest.err >&5
541 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
542 + (exit $ac_status); } &&
543 + { ac_try='test -z "$ac_c_werror_flag"
544 + || test ! -s conftest.err'
545 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
546 + (eval $ac_try) 2>&5
547 + ac_status=$?
548 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
549 + (exit $ac_status); }; } &&
550 + { ac_try='test -s conftest$ac_exeext'
551 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
552 + (eval $ac_try) 2>&5
553 + ac_status=$?
554 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
555 + (exit $ac_status); }; }; then
556 gcc_cv_have_tls=yes
557 else
558 echo "$as_me: failed program was:" >&5
559 @@ -76935,6 +77091,24 @@
561 rm -f conftest.err conftest.$ac_objext \
562 conftest$ac_exeext conftest.$ac_ext
563 +else
564 + echo "$as_me: failed program was:" >&5
565 +sed 's/^/| /' conftest.$ac_ext >&5
567 +gcc_cv_have_tls=yes
569 +rm -f conftest.err conftest.$ac_objext \
570 + conftest$ac_exeext conftest.$ac_ext
571 + CFLAGS="$chktls_save_CFLAGS"
572 + LDFLAGS="$chktls_save_LDFLAGS"
573 +else
574 + echo "$as_me: failed program was:" >&5
575 +sed 's/^/| /' conftest.$ac_ext >&5
577 +gcc_cv_have_tls=no
579 +rm -f conftest.err conftest.$ac_objext \
580 + conftest$ac_exeext conftest.$ac_ext
583 else
584 @@ -94489,6 +94663,7 @@
585 _ACEOF
589 # Check whether --enable-tls or --disable-tls was given.
590 if test "${enable_tls+set}" = set; then
591 enableval="$enable_tls"
592 @@ -94541,6 +94716,74 @@
593 ac_status=$?
594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
595 (exit $ac_status); }; }; then
596 + chktls_save_LDFLAGS="$LDFLAGS"
597 + case $host in
598 + *-*-linux*)
599 + LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
600 + ;;
601 + esac
602 + chktls_save_CFLAGS="$CFLAGS"
603 + CFLAGS="-fPIC $CFLAGS"
604 + if test x$gcc_no_link = xyes; then
605 + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
606 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
607 + { (exit 1); exit 1; }; }
609 +cat >conftest.$ac_ext <<_ACEOF
610 +int f() { return 0; }
611 +_ACEOF
612 +rm -f conftest.$ac_objext conftest$ac_exeext
613 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
614 + (eval $ac_link) 2>conftest.er1
615 + ac_status=$?
616 + grep -v '^ *+' conftest.er1 >conftest.err
617 + rm -f conftest.er1
618 + cat conftest.err >&5
619 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
620 + (exit $ac_status); } &&
621 + { ac_try='test -z "$ac_c_werror_flag"
622 + || test ! -s conftest.err'
623 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
624 + (eval $ac_try) 2>&5
625 + ac_status=$?
626 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
627 + (exit $ac_status); }; } &&
628 + { ac_try='test -s conftest$ac_exeext'
629 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
630 + (eval $ac_try) 2>&5
631 + ac_status=$?
632 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
633 + (exit $ac_status); }; }; then
634 + if test x$gcc_no_link = xyes; then
635 + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
636 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
637 + { (exit 1); exit 1; }; }
639 +cat >conftest.$ac_ext <<_ACEOF
640 +__thread int a; int b; int f() { return a = b; }
641 +_ACEOF
642 +rm -f conftest.$ac_objext conftest$ac_exeext
643 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
644 + (eval $ac_link) 2>conftest.er1
645 + ac_status=$?
646 + grep -v '^ *+' conftest.er1 >conftest.err
647 + rm -f conftest.er1
648 + cat conftest.err >&5
649 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
650 + (exit $ac_status); } &&
651 + { ac_try='test -z "$ac_c_werror_flag"
652 + || test ! -s conftest.err'
653 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
654 + (eval $ac_try) 2>&5
655 + ac_status=$?
656 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
657 + (exit $ac_status); }; } &&
658 + { ac_try='test -s conftest$ac_exeext'
659 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
660 + (eval $ac_try) 2>&5
661 + ac_status=$?
662 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
663 + (exit $ac_status); }; }; then
664 gcc_cv_have_tls=yes
665 else
666 echo "$as_me: failed program was:" >&5
667 @@ -94550,6 +94793,24 @@
669 rm -f conftest.err conftest.$ac_objext \
670 conftest$ac_exeext conftest.$ac_ext
671 +else
672 + echo "$as_me: failed program was:" >&5
673 +sed 's/^/| /' conftest.$ac_ext >&5
675 +gcc_cv_have_tls=yes
677 +rm -f conftest.err conftest.$ac_objext \
678 + conftest$ac_exeext conftest.$ac_ext
679 + CFLAGS="$chktls_save_CFLAGS"
680 + LDFLAGS="$chktls_save_LDFLAGS"
681 +else
682 + echo "$as_me: failed program was:" >&5
683 +sed 's/^/| /' conftest.$ac_ext >&5
685 +gcc_cv_have_tls=no
687 +rm -f conftest.err conftest.$ac_objext \
688 + conftest$ac_exeext conftest.$ac_ext
691 else