1
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2
# Local configure fragment for sysdeps/sparc.
4
# Check for support of VIS3 et al. instructions in the assembler.
5
AC_CACHE_CHECK(for sparc assembler VIS3 support, libc_cv_sparc_as_vis3, [dnl
6
cat > conftest.S <<\EOF
8
foo: fmadds %f1, %f2, %f3, %f5
9
fmaddd %f2, %f4, %f8, %f10
18
flcmps %fcc0, %f3, %f5
19
flcmpd %fcc1, %f4, %f6
22
if AC_TRY_COMMAND([${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S]); then
23
libc_cv_sparc_as_vis3=yes
25
libc_cv_sparc_as_vis3=no
28
if test $libc_cv_sparc_as_vis3 = yes; then
29
AC_DEFINE(HAVE_AS_VIS3_SUPPORT)
32
# Check for support of thread-local storage handling in assembler and linker.
33
AC_CACHE_CHECK(for sparc TLS support, libc_cv_sparc_tls, [dnl
35
cat > conftest.S <<\EOF
36
.section ".tdata", "awT", @progbits
39
.section ".tbss", "awT", @nobits
43
baz: sethi %tgd_hi22(foo), %l1
44
add %l1, %tgd_lo10(foo), %l1
45
add %l7, %l1, %o0, %tgd_add(foo)
46
call __tls_get_addr, %tgd_call(foo)
47
sethi %tldm_hi22(bar), %l1
48
add %l1, %tldm_lo10(bar), %l1
49
add %l7, %l1, %o0, %tldm_add(bar)
50
call __tls_get_addr, %tldm_call(bar)
51
sethi %tldo_hix22(bar), %l1
52
xor %l1, %tldo_lox10(bar), %l1
53
add %o0, %l1, %l1, %tldo_add(bar)
54
sethi %tie_hi22(foo), %l1
55
add %l1, %tie_lo10(foo), %l1
57
ldx [%l7 + %l1], %l1, %tie_ldx(foo)
59
ld [%l7 + %l1], %l1, %tie_ld(foo)
61
add %g7, %l1, %l1, %tie_add(foo)
62
sethi %tle_hix22(foo), %l1
63
xor %l1, %tle_lox10(foo), %l1
67
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.S 1>&AS_MESSAGE_LOG_FD); then
73
if test $libc_cv_sparc_tls = no; then
74
AC_MSG_ERROR([the assembler must support TLS])
77
# Check for a GCC emitting GOTDATA relocations.
78
AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl
80
cat > conftest.c <<\EOF
89
libc_cv_sparc_gcc_gotdata=no
90
if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fPIC conftest.c 1>&AS_MESSAGE_LOG_FD); then
91
if grep -q 'gdop_hix22' conftest.s \
92
&& grep -q 'gdop_lox10' conftest.s; then
93
libc_cv_sparc_gcc_gotdata=yes
97
if test $libc_cv_sparc_gcc_gotdata = yes; then
98
AC_DEFINE(HAVE_GCC_GOTDATA)
101
if test $libc_cv_sparc_gcc_gotdata = yes; then
102
AC_DEFINE(PI_STATIC_AND_HIDDEN)