1 # This file is generated from configure.in by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/sparc/sparc32/elf.
4 if test "$usetls" != no; then
5 # Check for support of thread-local storage handling in assembler and linker.
6 { $as_echo "$as_me:$LINENO: checking for sparc32 TLS support" >&5
7 $as_echo_n "checking for sparc32 TLS support... " >&6; }
8 if test "${libc_cv_sparc32_tls+set}" = set; then
9 $as_echo_n "(cached) " >&6
11 cat > conftest.s <<\EOF
12 .section ".tdata", "awT", @progbits
15 .section ".tbss", "awT", @nobits
19 baz: sethi %tgd_hi22(foo), %l1
20 add %l1, %tgd_lo10(foo), %l1
21 add %l7, %l1, %o0, %tgd_add(foo)
22 call __tls_get_addr, %tgd_call(foo)
23 sethi %tldm_hi22(bar), %l1
24 add %l1, %tldm_lo10(bar), %l1
25 add %l7, %l1, %o0, %tldm_add(bar)
26 call __tls_get_addr, %tldm_call(bar)
27 sethi %tldo_hix22(bar), %l1
28 xor %l1, %tldo_lox10(bar), %l1
29 add %o0, %l1, %l1, %tldo_add(bar)
30 sethi %tie_hi22(foo), %l1
31 add %l1, %tie_lo10(foo), %l1
32 ld [%l7 + %l1], %l1, %tie_ld(foo)
33 add %g7, %l1, %l1, %tie_add(foo)
34 sethi %tle_hix22(foo), %l1
35 xor %l1, %tle_lox10(foo), %l1
37 if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
38 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
41 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
42 (exit $ac_status); }; }; then
43 libc_cv_sparc32_tls=yes
45 libc_cv_sparc32_tls=no
49 { $as_echo "$as_me:$LINENO: result: $libc_cv_sparc32_tls" >&5
50 $as_echo "$libc_cv_sparc32_tls" >&6; }
51 if test $libc_cv_sparc32_tls = yes; then
52 cat >>confdefs.h <<\_ACEOF
53 #define HAVE_TLS_SUPPORT 1
59 # Check for broken WDISP22 in the linker.
60 { $as_echo "$as_me:$LINENO: checking for sparc32 ld WDISP22 handling" >&5
61 $as_echo_n "checking for sparc32 ld WDISP22 handling... " >&6; }
62 if test "${libc_cv_sparc32_wdisp22+set}" = set; then
63 $as_echo_n "(cached) " >&6
65 echo 'bne foo; nop' > conftest1.s
66 echo '.globl foo; .hidden foo; foo: nop' > conftest2.s
67 libc_cv_sparc32_wdisp22=unknown
68 if { ac_try='${CC-cc} -nostdlib -shared $CFLAGS conftest1.s conftest2.s -o conftest.so 1>&5'
69 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
72 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
73 (exit $ac_status); }; }; then
74 if readelf -r conftest.so | grep -q R_SPARC_WDISP22; then
75 libc_cv_sparc32_wdisp22=broken
77 libc_cv_sparc32_wdisp22=ok
82 { $as_echo "$as_me:$LINENO: result: $libc_cv_sparc32_wdisp22" >&5
83 $as_echo "$libc_cv_sparc32_wdisp22" >&6; }
84 if test $libc_cv_sparc32_wdisp22 != ok; then
85 cat >>confdefs.h <<\_ACEOF
86 #define BROKEN_SPARC_WDISP22 1