Remove powerpc, sparc fdim inlines (bug 22987).
[glibc.git] / sysdeps / s390 / configure.ac
blob1cdb0212825a3f1877c789b62364932e5ec37eae
1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/s390.
4 dnl It is always possible to access static and hidden symbols in an
5 dnl position independent way.
6 AC_DEFINE(PI_STATIC_AND_HIDDEN)
8 AC_CACHE_CHECK(for __builtin_tbegin, libc_cv_gcc_builtin_tbegin, [dnl
9 cat > conftest.c <<\EOF
10 #include <htmintrin.h>
11 void testtransaction ()
13   if (__builtin_tbegin (0) == _HTM_TBEGIN_STARTED)
14     {
15       __builtin_tend ();
16     }
18 EOF
19 dnl
20 dnl test, if the tbegin instruction is used by __builtin_tbegin
21 if AC_TRY_COMMAND([${CC-cc} -mhtm -O2 -S conftest.c -o - | grep -w tbegin > /dev/null]) ;
22 then
23   libc_cv_gcc_builtin_tbegin=yes
24 else
25   libc_cv_gcc_builtin_tbegin=no
27 rm -f conftest* ])
29 if test "$libc_cv_gcc_builtin_tbegin" = no ; then
30    critic_missing="$critic_missing The used GCC has no support for __builtin_tbegin, which is needed for lock-elision on target S390."
34 AC_CACHE_CHECK(for S390 vector instruction support, libc_cv_asm_s390_vx, [dnl
35 cat > conftest.c <<\EOF
36 void testvecinsn ()
38     __asm__ (".machine \"z13\" \n\t"
39              ".machinemode \"zarch_nohighgprs\" \n\t"
40              "vistrbs %%v16,%%v17 \n\t"
41              "locghie %%r1,0" : :);
43 EOF
44 dnl
45 dnl test, if assembler supports S390 vector instructions
46 if AC_TRY_COMMAND([${CC-cc} --shared conftest.c -o conftest.o &> /dev/null]) ;
47 then
48   libc_cv_asm_s390_vx=yes
49 else
50   libc_cv_asm_s390_vx=no
52 rm -f conftest* ])
54 if test "$libc_cv_asm_s390_vx" = yes ;
55 then
56   AC_DEFINE(HAVE_S390_VX_ASM_SUPPORT)
57 else
58   AC_MSG_WARN([Use binutils with vector-support in order to use optimized implementations.])
61 AC_CACHE_CHECK(for S390 vector support in gcc, libc_cv_gcc_s390_vx, [dnl
62 cat > conftest.c <<\EOF
63 void testvecclobber ()
65   __asm__ ("" : : : "v16");
67 EOF
68 dnl
69 dnl test, if gcc supports S390 vector registers as clobber in inline assembly
70 if AC_TRY_COMMAND([${CC-cc} --shared conftest.c -o conftest.o &> /dev/null]) ;
71 then
72   libc_cv_gcc_s390_vx=yes
73 else
74   libc_cv_gcc_s390_vx=no
76 rm -f conftest* ])
78 if test "$libc_cv_gcc_s390_vx" = yes ;
79 then
80   AC_DEFINE(HAVE_S390_VX_GCC_SUPPORT)
83 AC_CACHE_CHECK(for S390 z196 zarch instruction support as default,
84                libc_cv_asm_s390_min_z196_zarch, [dnl
85 cat > conftest.c <<\EOF
86 float testinsn (double e)
88     float d;
89     __asm__ ("ledbra %0,5,%1,4" : "=f" (d) : "f" (e) );
90     return d;
92 EOF
93 dnl
94 dnl test, if assembler supports S390 z196 zarch instructions as default
95 if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c
96                         -o conftest.o &> /dev/null]) ;
97 then
98   libc_cv_asm_s390_min_z196_zarch=yes
99 else
100   libc_cv_asm_s390_min_z196_zarch=no
102 rm -f conftest* ])
104 if test "$libc_cv_asm_s390_min_z196_zarch" = yes ;
105 then
106   AC_DEFINE(HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT)
109 test -n "$critic_missing" && AC_MSG_ERROR([
110 *** $critic_missing])