1# This file is generated from configure.ac by Autoconf. DO NOT EDIT! 2 # Local configure fragment for sysdeps/unix/sysv/linux/mips. 3 4 5cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6/* end confdefs.h. */ 7 8 #if (_MIPS_SIM != _ABIO32) 9 #error Not O32 ABI 10 #endif 11int 12main () 13{ 14 15 ; 16 return 0; 17} 18_ACEOF 19if ac_fn_c_try_compile "$LINENO"; then : 20 libc_mips_abi=o32 21else 22 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23/* end confdefs.h. */ 24 25 #if (_MIPS_SIM != _ABIN32) 26 #error Not N32 ABI 27 #endif 28int 29main () 30{ 31 32 ; 33 return 0; 34} 35_ACEOF 36if ac_fn_c_try_compile "$LINENO"; then : 37 libc_mips_abi=n32 38else 39 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 40/* end confdefs.h. */ 41 42 #if (_MIPS_SIM != _ABI64) 43 #error Not 64 ABI 44 #endif 45int 46main () 47{ 48 49 ; 50 return 0; 51} 52_ACEOF 53if ac_fn_c_try_compile "$LINENO"; then : 54 libc_mips_abi=n64 55fi 56rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 57fi 58rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 59fi 60rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 61 62if test -z "$libc_mips_abi"; then 63 as_fn_error $? "could not determine what ABI the compiler is using" "$LINENO" 5 64fi 65 66cat confdefs.h - <<_ACEOF >conftest.$ac_ext 67/* end confdefs.h. */ 68 69 #if !defined(__mips_soft_float) 70 #error Not soft ABI 71 #endif 72int 73main () 74{ 75 76 ; 77 return 0; 78} 79_ACEOF 80if ac_fn_c_try_compile "$LINENO"; then : 81 libc_mips_float=soft 82else 83 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 84/* end confdefs.h. */ 85 86 #if !defined(__mips_hard_float) 87 #error Not hard ABI 88 #endif 89int 90main () 91{ 92 93 ; 94 return 0; 95} 96_ACEOF 97if ac_fn_c_try_compile "$LINENO"; then : 98 libc_mips_float=hard 99fi 100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 101fi 102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 103 104if test -z "$libc_mips_float"; then 105 as_fn_error $? "could not determine if compiler is using hard or soft floating point ABI" "$LINENO" 5 106fi 107 108libc_mips_o32_fp= 109libc_cv_mips_fp64= 110libc_cv_mips_modd_spreg= 111 112if test x"$libc_mips_abi" = xo32 -a x"$libc_mips_float" = xhard; then 113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 114/* end confdefs.h. */ 115 116 #if !defined(__mips_fpr) 117 #error Missing FPR sizes 118 #endif 119int 120main () 121{ 122 123 ; 124 return 0; 125} 126_ACEOF 127if ac_fn_c_try_compile "$LINENO"; then : 128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 129/* end confdefs.h. */ 130 131 #if (__mips_fpr != 32) 132 #error Not FP32 133 #endif 134int 135main () 136{ 137 138 ; 139 return 0; 140} 141_ACEOF 142if ac_fn_c_try_compile "$LINENO"; then : 143 libc_mips_o32_fp=32 144else 145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 146/* end confdefs.h. */ 147 148 #if (__mips_fpr != 0) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16) 149 #error Not FPXX (without odd single-precision registers) 150 #endif 151int 152main () 153{ 154 155 ; 156 return 0; 157} 158_ACEOF 159if ac_fn_c_try_compile "$LINENO"; then : 160 libc_mips_o32_fp=xx 161else 162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 163/* end confdefs.h. */ 164 165 #if (__mips_fpr != 0) 166 #error Not FPXX (with odd single precision registers) 167 #endif 168int 169main () 170{ 171 172 ; 173 return 0; 174} 175_ACEOF 176if ac_fn_c_try_compile "$LINENO"; then : 177 libc_mips_o32_fp=xxo 178else 179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 180/* end confdefs.h. */ 181 182 #if (__mips_fpr != 64) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16) 183 #error Not FP64A 184 #endif 185int 186main () 187{ 188 189 ; 190 return 0; 191} 192_ACEOF 193if ac_fn_c_try_compile "$LINENO"; then : 194 libc_mips_o32_fp=64a 195else 196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 197/* end confdefs.h. */ 198 199 #if (__mips_fpr != 64) 200 #error Not FP64 201 #endif 202int 203main () 204{ 205 206 ; 207 return 0; 208} 209_ACEOF 210if ac_fn_c_try_compile "$LINENO"; then : 211 libc_mips_o32_fp=64 212fi 213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 214fi 215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 216fi 217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 218fi 219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 220fi 221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 222fi 223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 224 225 if { ac_try='${CC-cc} -mfp64 -xc /dev/null -S -o /dev/null' 226 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 227 (eval $ac_try) 2>&5 228 ac_status=$? 229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 230 test $ac_status = 0; }; }; then : 231 libc_cv_mips_fp64=yes 232else 233 libc_cv_mips_fp64=no 234fi 235 if { ac_try='${CC-cc} -Werror -modd-spreg -xc /dev/null -S -o /dev/null' 236 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 237 (eval $ac_try) 2>&5 238 ac_status=$? 239 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 240 test $ac_status = 0; }; }; then : 241 libc_cv_mips_modd_spreg=yes 242else 243 libc_cv_mips_modd_spreg=no 244fi 245fi 246config_vars="$config_vars 247o32-fpabi = ${libc_mips_o32_fp}" 248config_vars="$config_vars 249has-mpf64 = ${libc_cv_mips_fp64}" 250config_vars="$config_vars 251has-modd-spreg = ${libc_cv_mips_modd_spreg}" 252 253cat confdefs.h - <<_ACEOF >conftest.$ac_ext 254/* end confdefs.h. */ 255 256 #include <linux/prctl.h> 257 #if !defined(PR_GET_FP_MODE) || !defined(PR_SET_FP_MODE) 258 #error New prctl support for setting FP modes not found 259 #endif 260int 261main () 262{ 263 264 ; 265 return 0; 266} 267_ACEOF 268if ac_fn_c_try_compile "$LINENO"; then : 269 libc_mips_mode_switch=yes 270else 271 libc_mips_mode_switch=no 272fi 273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 274config_vars="$config_vars 275mips-mode-switch = ${libc_mips_mode_switch}" 276 277 278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 279$as_echo_n "checking for grep that handles long lines and -e... " >&6; } 280if ${ac_cv_path_GREP+:} false; then : 281 $as_echo_n "(cached) " >&6 282else 283 if test -z "$GREP"; then 284 ac_path_GREP_found=false 285 # Loop through the user's path and test for each of PROGNAME-LIST 286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 287for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 288do 289 IFS=$as_save_IFS 290 test -z "$as_dir" && as_dir=. 291 for ac_prog in grep ggrep; do 292 for ac_exec_ext in '' $ac_executable_extensions; do 293 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 294 as_fn_executable_p "$ac_path_GREP" || continue 295# Check for GNU ac_path_GREP and select it if it is found. 296 # Check for GNU $ac_path_GREP 297case `"$ac_path_GREP" --version 2>&1` in 298*GNU*) 299 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 300*) 301 ac_count=0 302 $as_echo_n 0123456789 >"conftest.in" 303 while : 304 do 305 cat "conftest.in" "conftest.in" >"conftest.tmp" 306 mv "conftest.tmp" "conftest.in" 307 cp "conftest.in" "conftest.nl" 308 $as_echo 'GREP' >> "conftest.nl" 309 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 310 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 311 as_fn_arith $ac_count + 1 && ac_count=$as_val 312 if test $ac_count -gt ${ac_path_GREP_max-0}; then 313 # Best one so far, save it but keep looking for a better one 314 ac_cv_path_GREP="$ac_path_GREP" 315 ac_path_GREP_max=$ac_count 316 fi 317 # 10*(2^10) chars as input seems more than enough 318 test $ac_count -gt 10 && break 319 done 320 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 321esac 322 323 $ac_path_GREP_found && break 3 324 done 325 done 326 done 327IFS=$as_save_IFS 328 if test -z "$ac_cv_path_GREP"; then 329 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 330 fi 331else 332 ac_cv_path_GREP=$GREP 333fi 334 335fi 336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 337$as_echo "$ac_cv_path_GREP" >&6; } 338 GREP="$ac_cv_path_GREP" 339 340 341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 342$as_echo_n "checking for egrep... " >&6; } 343if ${ac_cv_path_EGREP+:} false; then : 344 $as_echo_n "(cached) " >&6 345else 346 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 347 then ac_cv_path_EGREP="$GREP -E" 348 else 349 if test -z "$EGREP"; then 350 ac_path_EGREP_found=false 351 # Loop through the user's path and test for each of PROGNAME-LIST 352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 353for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 354do 355 IFS=$as_save_IFS 356 test -z "$as_dir" && as_dir=. 357 for ac_prog in egrep; do 358 for ac_exec_ext in '' $ac_executable_extensions; do 359 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 360 as_fn_executable_p "$ac_path_EGREP" || continue 361# Check for GNU ac_path_EGREP and select it if it is found. 362 # Check for GNU $ac_path_EGREP 363case `"$ac_path_EGREP" --version 2>&1` in 364*GNU*) 365 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 366*) 367 ac_count=0 368 $as_echo_n 0123456789 >"conftest.in" 369 while : 370 do 371 cat "conftest.in" "conftest.in" >"conftest.tmp" 372 mv "conftest.tmp" "conftest.in" 373 cp "conftest.in" "conftest.nl" 374 $as_echo 'EGREP' >> "conftest.nl" 375 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 376 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 377 as_fn_arith $ac_count + 1 && ac_count=$as_val 378 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 379 # Best one so far, save it but keep looking for a better one 380 ac_cv_path_EGREP="$ac_path_EGREP" 381 ac_path_EGREP_max=$ac_count 382 fi 383 # 10*(2^10) chars as input seems more than enough 384 test $ac_count -gt 10 && break 385 done 386 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 387esac 388 389 $ac_path_EGREP_found && break 3 390 done 391 done 392 done 393IFS=$as_save_IFS 394 if test -z "$ac_cv_path_EGREP"; then 395 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 396 fi 397else 398 ac_cv_path_EGREP=$EGREP 399fi 400 401 fi 402fi 403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 404$as_echo "$ac_cv_path_EGREP" >&6; } 405 EGREP="$ac_cv_path_EGREP" 406 407 408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the 2008 NaN encoding" >&5 409$as_echo_n "checking whether the compiler is using the 2008 NaN encoding... " >&6; } 410if ${libc_cv_mips_nan2008+:} false; then : 411 $as_echo_n "(cached) " >&6 412else 413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 414/* end confdefs.h. */ 415dnl 416#ifdef __mips_nan2008 417yes 418#endif 419_ACEOF 420if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 421 $EGREP "yes" >/dev/null 2>&1; then : 422 libc_cv_mips_nan2008=yes 423else 424 libc_cv_mips_nan2008=no 425fi 426rm -f conftest* 427 428fi 429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_nan2008" >&5 430$as_echo "$libc_cv_mips_nan2008" >&6; } 431 432libc_mips_nan= 433if test x"$libc_cv_mips_nan2008" = xyes; then 434 libc_mips_nan=_2008 435fi 436 437config_vars="$config_vars 438default-abi = ${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}" 439 440case $machine in 441mips/mips64/n64/*) 442 test -n "$libc_cv_slibdir" || 443case "$prefix" in 444/usr | /usr/) 445 libc_cv_slibdir='/lib64' 446 libc_cv_rtlddir='/lib64' 447 if test "$libdir" = '${exec_prefix}/lib'; then 448 libdir='${exec_prefix}/lib64'; 449 # Locale data can be shared between 32-bit and 64-bit libraries. 450 libc_cv_complocaledir='${exec_prefix}/lib/locale' 451 fi 452 ;; 453esac 454 ;; 455mips/mips64/n32/*) 456 test -n "$libc_cv_slibdir" || 457case "$prefix" in 458/usr | /usr/) 459 libc_cv_slibdir='/lib32' 460 libc_cv_rtlddir='/lib32' 461 if test "$libdir" = '${exec_prefix}/lib'; then 462 libdir='${exec_prefix}/lib32'; 463 # Locale data can be shared between 32-bit and 64-bit libraries. 464 libc_cv_complocaledir='${exec_prefix}/lib/locale' 465 fi 466 ;; 467esac 468 ;; 469esac 470 471libc_cv_gcc_unwind_find_fde=yes 472 473if test -z "$arch_minimum_kernel"; then 474 if test x$libc_cv_mips_nan2008 = xyes; then 475 arch_minimum_kernel=4.5.0 476 fi 477fi 478 479# Check if we are supposed to run on kernels older than 4.8.0. If so, 480# force executable stack to avoid potential runtime problems with fpu 481# emulation. 482# NOTE: The check below assumes that in absence of user-provided minimum_kernel 483# we will default to arch_minimum_kernel which is currently less than 4.8.0 for 484# all known configurations. If this changes, the check must be updated. 485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler must use executable stack" >&5 486$as_echo_n "checking whether the compiler must use executable stack... " >&6; } 487if ${libc_cv_mips_force_execstack+:} false; then : 488 $as_echo_n "(cached) " >&6 489else 490 libc_cv_mips_force_execstack=no 491 if test $libc_mips_float = hard; then 492 if test -n "$minimum_kernel"; then 493 494 min_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`)) 495 496 if test $min_version -lt 264192; then 497 libc_cv_mips_force_execstack=yes 498 fi 499 else 500 libc_cv_mips_force_execstack=yes 501 fi 502 fi 503fi 504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_force_execstack" >&5 505$as_echo "$libc_cv_mips_force_execstack" >&6; } 506 507libc_mips_has_gnustack=$libc_cv_as_noexecstack 508 509if test $libc_cv_mips_force_execstack = yes; then 510 libc_mips_has_gnustack=no 511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&5 512$as_echo "$as_me: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&2;} 513fi 514 515config_vars="$config_vars 516mips-force-execstack = ${libc_cv_mips_force_execstack}" 517config_vars="$config_vars 518mips-has-gnustack = ${libc_mips_has_gnustack}" 519