1# This file is generated from configure.ac by Autoconf. DO NOT EDIT! 2 # Local configure fragment for sysdeps/s390. 3 4{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_tbegin" >&5 5$as_echo_n "checking for __builtin_tbegin... " >&6; } 6if ${libc_cv_gcc_builtin_tbegin+:} false; then : 7 $as_echo_n "(cached) " >&6 8else 9 cat > conftest.c <<\EOF 10#include <htmintrin.h> 11void testtransaction () 12{ 13 if (__builtin_tbegin (0) == _HTM_TBEGIN_STARTED) 14 { 15 __builtin_tend (); 16 } 17} 18EOF 19if { 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 21 (eval $ac_try) 2>&5 22 ac_status=$? 23 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 24 test $ac_status = 0; }; } ; 25then 26 libc_cv_gcc_builtin_tbegin=yes 27else 28 libc_cv_gcc_builtin_tbegin=no 29fi 30rm -f conftest* 31fi 32{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_tbegin" >&5 33$as_echo "$libc_cv_gcc_builtin_tbegin" >&6; } 34 35if 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." 37fi 38 39 40{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 vector instruction support" >&5 41$as_echo_n "checking for S390 vector instruction support... " >&6; } 42if ${libc_cv_asm_s390_vx+:} false; then : 43 $as_echo_n "(cached) " >&6 44else 45 cat > conftest.c <<\EOF 46void testvecinsn () 47{ 48 __asm__ (".machine \"z13\" \n\t" 49 ".machinemode \"zarch_nohighgprs\" \n\t" 50 "vistrbs %%v16,%%v17 \n\t" 51 "locghie %%r1,0" : :); 52} 53EOF 54if { ac_try='${CC-cc} --shared conftest.c -o conftest.o &> /dev/null' 55 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 56 (eval $ac_try) 2>&5 57 ac_status=$? 58 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 59 test $ac_status = 0; }; } ; 60then 61 libc_cv_asm_s390_vx=yes 62else 63 libc_cv_asm_s390_vx=no 64fi 65rm -f conftest* 66fi 67{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_vx" >&5 68$as_echo "$libc_cv_asm_s390_vx" >&6; } 69 70if test "$libc_cv_asm_s390_vx" = yes ; 71then 72 $as_echo "#define HAVE_S390_VX_ASM_SUPPORT 1" >>confdefs.h 73 74else 75 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use binutils with vector-support in order to use optimized implementations." >&5 76$as_echo "$as_me: WARNING: Use binutils with vector-support in order to use optimized implementations." >&2;} 77fi 78 79{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 vector support in gcc" >&5 80$as_echo_n "checking for S390 vector support in gcc... " >&6; } 81if ${libc_cv_gcc_s390_vx+:} false; then : 82 $as_echo_n "(cached) " >&6 83else 84 cat > conftest.c <<\EOF 85void testvecclobber () 86{ 87 __asm__ ("" : : : "v16"); 88} 89EOF 90if { ac_try='${CC-cc} --shared conftest.c -o conftest.o &> /dev/null' 91 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 92 (eval $ac_try) 2>&5 93 ac_status=$? 94 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 95 test $ac_status = 0; }; } ; 96then 97 libc_cv_gcc_s390_vx=yes 98else 99 libc_cv_gcc_s390_vx=no 100fi 101rm -f conftest* 102fi 103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_s390_vx" >&5 104$as_echo "$libc_cv_gcc_s390_vx" >&6; } 105 106if test "$libc_cv_gcc_s390_vx" = yes ; 107then 108 $as_echo "#define HAVE_S390_VX_GCC_SUPPORT 1" >>confdefs.h 109 110fi 111 112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 arch13 zarch instruction support" >&5 113$as_echo_n "checking for S390 arch13 zarch instruction support... " >&6; } 114if ${libc_cv_asm_s390_arch13+:} false; then : 115 $as_echo_n "(cached) " >&6 116else 117 cat > conftest.c <<\EOF 118void testinsn (char *buf) 119{ 120 __asm__ (".machine \"arch13\" \n\t" 121 ".machinemode \"zarch_nohighgprs\" \n\t" 122 "lghi %%r0,16 \n\t" 123 "mvcrl 0(%0),32(%0) \n\t" 124 "vstrs %%v20,%%v20,%%v20,%%v20,0,2" 125 : : "a" (buf) : "memory", "r0"); 126} 127EOF 128if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c 129 -o conftest.o &> /dev/null' 130 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 131 (eval $ac_try) 2>&5 132 ac_status=$? 133 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 134 test $ac_status = 0; }; } ; 135then 136 libc_cv_asm_s390_arch13=yes 137else 138 libc_cv_asm_s390_arch13=no 139fi 140rm -f conftest* 141fi 142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_arch13" >&5 143$as_echo "$libc_cv_asm_s390_arch13" >&6; } 144if test "$libc_cv_asm_s390_arch13" = yes ; 145then 146 $as_echo "#define HAVE_S390_ARCH13_ASM_SUPPORT 1" >>confdefs.h 147 148fi 149 150 151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 z10 zarch instruction support as default" >&5 152$as_echo_n "checking for S390 z10 zarch instruction support as default... " >&6; } 153if ${libc_cv_asm_s390_min_z10_zarch+:} false; then : 154 $as_echo_n "(cached) " >&6 155else 156 cat > conftest.c <<\EOF 157void testinsn (void *a, void *b, int n) 158{ 159 __asm__ ("exrl %2,1f \n\t" 160 "j 2f \n\t" 161 "1: mvc 0(1,%0),0(%1) \n\t" 162 "2:" 163 : : "a" (a), "a" (b), "d" (n) 164 : "memory", "cc"); 165} 166EOF 167if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c 168 -o conftest.o &> /dev/null' 169 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 170 (eval $ac_try) 2>&5 171 ac_status=$? 172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 173 test $ac_status = 0; }; } ; 174then 175 libc_cv_asm_s390_min_z10_zarch=yes 176else 177 libc_cv_asm_s390_min_z10_zarch=no 178fi 179rm -f conftest* 180fi 181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_min_z10_zarch" >&5 182$as_echo "$libc_cv_asm_s390_min_z10_zarch" >&6; } 183 184if test "$libc_cv_asm_s390_min_z10_zarch" = yes ; 185then 186 $as_echo "#define HAVE_S390_MIN_Z10_ZARCH_ASM_SUPPORT 1" >>confdefs.h 187 188fi 189 190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 z196 zarch instruction support as default" >&5 191$as_echo_n "checking for S390 z196 zarch instruction support as default... " >&6; } 192if ${libc_cv_asm_s390_min_z196_zarch+:} false; then : 193 $as_echo_n "(cached) " >&6 194else 195 cat > conftest.c <<\EOF 196float testinsn (double e) 197{ 198 float d; 199 __asm__ ("ledbra %0,5,%1,4" : "=f" (d) : "f" (e) ); 200 return d; 201} 202EOF 203if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c 204 -o conftest.o &> /dev/null' 205 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 206 (eval $ac_try) 2>&5 207 ac_status=$? 208 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 209 test $ac_status = 0; }; } ; 210then 211 libc_cv_asm_s390_min_z196_zarch=yes 212else 213 libc_cv_asm_s390_min_z196_zarch=no 214fi 215rm -f conftest* 216fi 217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_min_z196_zarch" >&5 218$as_echo "$libc_cv_asm_s390_min_z196_zarch" >&6; } 219 220if test "$libc_cv_asm_s390_min_z196_zarch" = yes ; 221then 222 $as_echo "#define HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT 1" >>confdefs.h 223 224fi 225 226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 z13 zarch instruction support as default" >&5 227$as_echo_n "checking for S390 z13 zarch instruction support as default... " >&6; } 228if ${libc_cv_asm_s390_min_z13_zarch+:} false; then : 229 $as_echo_n "(cached) " >&6 230else 231 cat > conftest.c <<\EOF 232int testinsn (void) 233{ 234 int i; 235 __asm__ ("vl %%v16,0(%%r15)\n\t" 236 "vlgvf %0,%%v16,0" 237 : "=d" (i) : : "memory", "v16"); 238 return i; 239} 240EOF 241if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c 242 -o conftest.o &> /dev/null' 243 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 244 (eval $ac_try) 2>&5 245 ac_status=$? 246 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 247 test $ac_status = 0; }; } ; 248then 249 libc_cv_asm_s390_min_z13_zarch=yes 250else 251 libc_cv_asm_s390_min_z13_zarch=no 252fi 253rm -f conftest* 254fi 255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_min_z13_zarch" >&5 256$as_echo "$libc_cv_asm_s390_min_z13_zarch" >&6; } 257 258if test "$libc_cv_asm_s390_min_z13_zarch" = yes ; 259then 260 $as_echo "#define HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT 1" >>confdefs.h 261 262fi 263 264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for S390 arch13 zarch instruction support as default" >&5 265$as_echo_n "checking for S390 arch13 zarch instruction support as default... " >&6; } 266if ${libc_cv_asm_s390_min_arch13_zarch+:} false; then : 267 $as_echo_n "(cached) " >&6 268else 269 cat > conftest.c <<\EOF 270void testinsn (char *buf) 271{ 272 __asm__ ("lghi %%r0,16 \n\t" 273 "mvcrl 0(%0),32(%0) \n\t" 274 "vstrs %%v20,%%v20,%%v20,%%v20,0,2" 275 : : "a" (buf) : "memory", "r0"); 276} 277EOF 278if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c 279 -o conftest.o &> /dev/null' 280 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 281 (eval $ac_try) 2>&5 282 ac_status=$? 283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 284 test $ac_status = 0; }; } ; 285then 286 libc_cv_asm_s390_min_arch13_zarch=yes 287else 288 libc_cv_asm_s390_min_arch13_zarch=no 289fi 290rm -f conftest* 291fi 292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_s390_min_arch13_zarch" >&5 293$as_echo "$libc_cv_asm_s390_min_arch13_zarch" >&6; } 294if test "$libc_cv_asm_s390_min_arch13_zarch" = yes ; 295then 296 $as_echo "#define HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT 1" >>confdefs.h 297 298fi 299 300 301 302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC is sufficient to build libc on s390x" >&5 303$as_echo_n "checking if $CC is sufficient to build libc on s390x... " >&6; } 304if ${libc_cv_compiler_ok_on_s390x+:} false; then : 305 $as_echo_n "(cached) " >&6 306else 307 308cat confdefs.h - <<_ACEOF >conftest.$ac_ext 309/* end confdefs.h. */ 310 311int 312main () 313{ 314 315#if !defined __GNUC__ || __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 1) 316#error insufficient compiler for building on s390x 317#endif 318 319 ; 320 return 0; 321} 322_ACEOF 323if ac_fn_c_try_cpp "$LINENO"; then : 324 libc_cv_compiler_ok_on_s390x=yes 325else 326 libc_cv_compiler_ok_on_s390x=no 327fi 328rm -f conftest.err conftest.i conftest.$ac_ext 329fi 330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_compiler_ok_on_s390x" >&5 331$as_echo "$libc_cv_compiler_ok_on_s390x" >&6; } 332if test "$libc_cv_compiler_ok_on_s390x" != yes; then 333 critic_missing="$critic_missing On s390x, GCC >= 7.1.0 is required." 334fi 335 336test -n "$critic_missing" && as_fn_error $? " 337*** $critic_missing" "$LINENO" 5 338