1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/s390.
4 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_tbegin" >&5
5 $as_echo_n "checking for __builtin_tbegin... " >&6; }
6 if ${libc_cv_gcc_builtin_tbegin+:} false; then :
7 $as_echo_n "(cached) " >&6
9 cat > conftest.c <<\EOF
10 #include <htmintrin.h>
11 void testtransaction ()
13 if (__builtin_tbegin (0) == _HTM_TBEGIN_STARTED)
19 if { ac_try='${CC-cc} -mhtm -O2 -S conftest.c -o - | grep -w tbegin > /dev/null'
20 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
23 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24 test $ac_status = 0; }; } ;
26 libc_cv_gcc_builtin_tbegin=yes
28 libc_cv_gcc_builtin_tbegin=no
32 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_tbegin" >&5
33 $as_echo "$libc_cv_gcc_builtin_tbegin" >&6; }
35 if test "$libc_cv_gcc_builtin_tbegin" = no ; then
36 critic_missing="$critic_missing The used GCC has no support for __builtin_tbegin, which is needed for lock-elision on target S390."
41 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 vector instruction support" >&5
42 $as_echo_n "checking for S390 vector instruction support... " >&6; }
43 if ${libc_cv_asm_s390_vx+:} false; then :
44 $as_echo_n "(cached) " >&6
47 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52 __asm__ (".machine \"z13\" \n\t"
53 ".machinemode \"zarch_nohighgprs\" \n\t"
54 "vistrbs %%v16,%%v17 \n\t"
55 "locghie %%r1,0" : :);
59 if ac_fn_c_try_compile "$LINENO"; then :
60 libc_cv_asm_s390_vx=yes
62 libc_cv_asm_s390_vx=no
64 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_vx" >&5
67 $as_echo "$libc_cv_asm_s390_vx" >&6; }
68 if test "$libc_cv_asm_s390_vx" = yes ;
70 $as_echo "#define HAVE_S390_VX_ASM_SUPPORT 1" >>confdefs.h
73 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use binutils with vector-support in order to use optimized implementations." >&5
74 $as_echo "$as_me: WARNING: Use binutils with vector-support in order to use optimized implementations." >&2;}
78 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 vector support in gcc" >&5
79 $as_echo_n "checking for S390 vector support in gcc... " >&6; }
80 if ${libc_cv_gcc_s390_vx+:} false; then :
81 $as_echo_n "(cached) " >&6
84 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
87 void testvecclobber ()
89 __asm__ ("" : : : "v16");
93 if ac_fn_c_try_compile "$LINENO"; then :
94 libc_cv_gcc_s390_vx=yes
96 libc_cv_gcc_s390_vx=no
98 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_s390_vx" >&5
101 $as_echo "$libc_cv_gcc_s390_vx" >&6; }
102 if test "$libc_cv_gcc_s390_vx" = yes ;
104 $as_echo "#define HAVE_S390_VX_GCC_SUPPORT 1" >>confdefs.h
109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 arch13 zarch instruction support" >&5
110 $as_echo_n "checking for S390 arch13 zarch instruction support... " >&6; }
111 if ${libc_cv_asm_s390_arch13+:} false; then :
112 $as_echo_n "(cached) " >&6
115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
116 /* end confdefs.h. */
118 void testinsn (char *buf)
120 __asm__ (".machine \"arch13\" \n\t"
121 ".machinemode \"zarch_nohighgprs\" \n\t"
123 "mvcrl 0(%0),32(%0) \n\t"
124 "vstrs %%v20,%%v20,%%v20,%%v20,0,2"
125 : : "a" (buf) : "memory", "r0");
129 if ac_fn_c_try_compile "$LINENO"; then :
130 libc_cv_asm_s390_arch13=yes
132 libc_cv_asm_s390_arch13=no
134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_arch13" >&5
137 $as_echo "$libc_cv_asm_s390_arch13" >&6; }
138 if test "$libc_cv_asm_s390_arch13" = yes ;
140 $as_echo "#define HAVE_S390_ARCH13_ASM_SUPPORT 1" >>confdefs.h
145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 z10 zarch instruction support as default" >&5
146 $as_echo_n "checking for S390 z10 zarch instruction support as default... " >&6; }
147 if ${libc_cv_asm_s390_min_z10_zarch+:} false; then :
148 $as_echo_n "(cached) " >&6
151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
152 /* end confdefs.h. */
154 void testinsn (void *a, void *b, int n)
156 __asm__ ("exrl %2,1f \n\t"
158 "1: mvc 0(1,%0),0(%1) \n\t"
160 : : "a" (a), "a" (b), "d" (n)
165 if ac_fn_c_try_compile "$LINENO"; then :
166 libc_cv_asm_s390_min_z10_zarch=yes
168 libc_cv_asm_s390_min_z10_zarch=no
170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_min_z10_zarch" >&5
173 $as_echo "$libc_cv_asm_s390_min_z10_zarch" >&6; }
174 if test "$libc_cv_asm_s390_min_z10_zarch" = yes ;
176 $as_echo "#define HAVE_S390_MIN_Z10_ZARCH_ASM_SUPPORT 1" >>confdefs.h
181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 z196 zarch instruction support as default" >&5
182 $as_echo_n "checking for S390 z196 zarch instruction support as default... " >&6; }
183 if ${libc_cv_asm_s390_min_z196_zarch+:} false; then :
184 $as_echo_n "(cached) " >&6
187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
188 /* end confdefs.h. */
190 float testinsn (double e)
193 __asm__ ("ledbra %0,5,%1,4" : "=f" (d) : "f" (e) );
198 if ac_fn_c_try_compile "$LINENO"; then :
199 libc_cv_asm_s390_min_z196_zarch=yes
201 libc_cv_asm_s390_min_z196_zarch=no
203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_min_z196_zarch" >&5
206 $as_echo "$libc_cv_asm_s390_min_z196_zarch" >&6; }
207 if test "$libc_cv_asm_s390_min_z196_zarch" = yes ;
209 $as_echo "#define HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT 1" >>confdefs.h
214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 z13 zarch instruction support as default" >&5
215 $as_echo_n "checking for S390 z13 zarch instruction support as default... " >&6; }
216 if ${libc_cv_asm_s390_min_z13_zarch+:} false; then :
217 $as_echo_n "(cached) " >&6
220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
221 /* end confdefs.h. */
226 __asm__ ("vl %%v16,0(%%r15)\n\t"
228 : "=d" (i) : : "memory", "v16");
233 if ac_fn_c_try_compile "$LINENO"; then :
234 libc_cv_asm_s390_min_z13_zarch=yes
236 libc_cv_asm_s390_min_z13_zarch=no
238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_min_z13_zarch" >&5
241 $as_echo "$libc_cv_asm_s390_min_z13_zarch" >&6; }
242 if test "$libc_cv_asm_s390_min_z13_zarch" = yes ;
244 $as_echo "#define HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT 1" >>confdefs.h
249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 arch13 zarch instruction support as default" >&5
250 $as_echo_n "checking for S390 arch13 zarch instruction support as default... " >&6; }
251 if ${libc_cv_asm_s390_min_arch13_zarch+:} false; then :
252 $as_echo_n "(cached) " >&6
255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
256 /* end confdefs.h. */
258 void testinsn (char *buf)
260 __asm__ ("lghi %%r0,16 \n\t"
261 "mvcrl 0(%0),32(%0) \n\t"
262 "vstrs %%v20,%%v20,%%v20,%%v20,0,2"
263 : : "a" (buf) : "memory", "r0");
267 if ac_fn_c_try_compile "$LINENO"; then :
268 libc_cv_asm_s390_min_arch13_zarch=yes
270 libc_cv_asm_s390_min_arch13_zarch=no
272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_min_arch13_zarch" >&5
275 $as_echo "$libc_cv_asm_s390_min_arch13_zarch" >&6; }
276 if test "$libc_cv_asm_s390_min_arch13_zarch" = yes ;
278 $as_echo "#define HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT 1" >>confdefs.h
284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC is sufficient to build libc on s390x" >&5
285 $as_echo_n "checking if $CC is sufficient to build libc on s390x... " >&6; }
286 if ${libc_cv_compiler_ok_on_s390x+:} false; then :
287 $as_echo_n "(cached) " >&6
290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
291 /* end confdefs.h. */
297 #if !defined __GNUC__ || __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 1)
298 #error insufficient compiler for building on s390x
305 if ac_fn_c_try_cpp "$LINENO"; then :
306 libc_cv_compiler_ok_on_s390x=yes
308 libc_cv_compiler_ok_on_s390x=no
310 rm -f conftest.err conftest.i conftest.$ac_ext
312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_compiler_ok_on_s390x" >&5
313 $as_echo "$libc_cv_compiler_ok_on_s390x" >&6; }
314 if test "$libc_cv_compiler_ok_on_s390x" != yes; then
315 critic_missing="$critic_missing On s390x, GCC >= 7.1.0 is required."
318 test -n "$critic_missing" && as_fn_error $? "
319 *** $critic_missing" "$LINENO" 5