Update copyright notices with scripts/update-copyrights.
[glibc.git] / sysdeps / sparc / configure.in
blob080be992dc39f7bf74303df605d0798752cb3bcc
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
7         .text
8 foo:    fmadds          %f1, %f2, %f3, %f5
9         fmaddd          %f2, %f4, %f8, %f10
10         fhadds          %f2, %f3, %f5
11         fhaddd          %f4, %f8, %f10
12         pdistn          %f2, %f4, %g1
13         movdtox         %f10, %o0
14         movstouw        %f9, %o1
15         movstosw        %f7, %o2
16         movxtod         %o3, %f18
17         movwtos         %o4, %f15
18         flcmps          %fcc0, %f3, %f5
19         flcmpd          %fcc1, %f4, %f6
20 EOF
21 dnl
22 if AC_TRY_COMMAND([${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S]); then
23   libc_cv_sparc_as_vis3=yes
24 else
25   libc_cv_sparc_as_vis3=no
27 rm -f conftest*])
28 if test $libc_cv_sparc_as_vis3 = yes; then
29   AC_DEFINE(HAVE_AS_VIS3_SUPPORT)
32 # Check for a GCC emitting GOTDATA relocations.
33 AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl
34 changequote(,)dnl
35 cat > conftest.c <<\EOF
36 int data;
37 int foo(void)
39         return data;
41 EOF
42 changequote([,])dnl
43 dnl
44 libc_cv_sparc_gcc_gotdata=no
45 if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fPIC conftest.c 1>&AS_MESSAGE_LOG_FD); then
46   if grep -q 'gdop_hix22' conftest.s \
47      && grep -q 'gdop_lox10' conftest.s; then
48     libc_cv_sparc_gcc_gotdata=yes
49   fi
51 rm -f conftest*])
52 if test $libc_cv_sparc_gcc_gotdata = yes; then
53   AC_DEFINE(HAVE_GCC_GOTDATA)
56 if test $libc_cv_sparc_gcc_gotdata = yes; then
57   AC_DEFINE(PI_STATIC_AND_HIDDEN)