1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/unix/sysv/linux/mips.
5 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8 #if (_MIPS_SIM != _ABIO32)
19 if ac_fn_c_try_compile "$LINENO"
23 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26 #if (_MIPS_SIM != _ABIN32)
37 if ac_fn_c_try_compile "$LINENO"
41 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44 #if (_MIPS_SIM != _ABI64)
55 if ac_fn_c_try_compile "$LINENO"
59 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
62 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
65 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
67 if test -z "$libc_mips_abi"; then
68 as_fn_error $? "could not determine what ABI the compiler is using" "$LINENO" 5
71 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74 #if !defined(__mips_soft_float)
85 if ac_fn_c_try_compile "$LINENO"
89 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
92 #if !defined(__mips_hard_float)
103 if ac_fn_c_try_compile "$LINENO"
107 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
110 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
112 if test -z "$libc_mips_float"; then
113 as_fn_error $? "could not determine if compiler is using hard or soft floating point ABI" "$LINENO" 5
118 libc_cv_mips_modd_spreg=
120 if test x"$libc_mips_abi" = xo32 -a x"$libc_mips_float" = xhard; then
121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
122 /* end confdefs.h. */
124 #if !defined(__mips_fpr)
125 #error Missing FPR sizes
135 if ac_fn_c_try_compile "$LINENO"
137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
138 /* end confdefs.h. */
140 #if (__mips_fpr != 32)
151 if ac_fn_c_try_compile "$LINENO"
155 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
156 /* end confdefs.h. */
158 #if (__mips_fpr != 0) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
159 #error Not FPXX (without odd single-precision registers)
169 if ac_fn_c_try_compile "$LINENO"
173 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
174 /* end confdefs.h. */
176 #if (__mips_fpr != 0)
177 #error Not FPXX (with odd single precision registers)
187 if ac_fn_c_try_compile "$LINENO"
191 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
192 /* end confdefs.h. */
194 #if (__mips_fpr != 64) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
205 if ac_fn_c_try_compile "$LINENO"
209 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
210 /* end confdefs.h. */
212 #if (__mips_fpr != 64)
223 if ac_fn_c_try_compile "$LINENO"
227 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
230 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
233 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
236 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
239 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
241 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
243 if { ac_try='${CC-cc} -mfp64 -xc /dev/null -S -o /dev/null'
244 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
247 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
248 test $ac_status = 0; }; }
250 libc_cv_mips_fp64=yes
252 e) libc_cv_mips_fp64=no ;;
255 if { ac_try='${CC-cc} -Werror -modd-spreg -xc /dev/null -S -o /dev/null'
256 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
259 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
260 test $ac_status = 0; }; }
262 libc_cv_mips_modd_spreg=yes
264 e) libc_cv_mips_modd_spreg=no ;;
268 config_vars="$config_vars
269 o32-fpabi = ${libc_mips_o32_fp}"
270 config_vars="$config_vars
271 has-mpf64 = ${libc_cv_mips_fp64}"
272 config_vars="$config_vars
273 has-modd-spreg = ${libc_cv_mips_modd_spreg}"
275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
276 /* end confdefs.h. */
278 #include <linux/prctl.h>
279 #if !defined(PR_GET_FP_MODE) || !defined(PR_SET_FP_MODE)
280 #error New prctl support for setting FP modes not found
290 if ac_fn_c_try_compile "$LINENO"
292 libc_mips_mode_switch=yes
294 e) libc_mips_mode_switch=no ;;
297 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
298 config_vars="$config_vars
299 mips-mode-switch = ${libc_mips_mode_switch}"
302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
303 printf %s "checking for egrep -e... " >&6; }
304 if test ${ac_cv_path_EGREP_TRADITIONAL+y}
306 printf %s "(cached) " >&6
308 e) if test -z "$EGREP_TRADITIONAL"; then
309 ac_path_EGREP_TRADITIONAL_found=false
310 # Loop through the user's path and test for each of PROGNAME-LIST
311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
312 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
318 *) as_dir=$as_dir/ ;;
320 for ac_prog in grep ggrep
322 for ac_exec_ext in '' $ac_executable_extensions; do
323 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
324 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
325 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
326 # Check for GNU $ac_path_EGREP_TRADITIONAL
327 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
329 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
333 printf %s 0123456789 >"conftest.in"
336 cat "conftest.in" "conftest.in" >"conftest.tmp"
337 mv "conftest.tmp" "conftest.in"
338 cp "conftest.in" "conftest.nl"
339 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
340 "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
341 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
342 as_fn_arith $ac_count + 1 && ac_count=$as_val
343 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
344 # Best one so far, save it but keep looking for a better one
345 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
346 ac_path_EGREP_TRADITIONAL_max=$ac_count
348 # 10*(2^10) chars as input seems more than enough
349 test $ac_count -gt 10 && break
351 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
354 $ac_path_EGREP_TRADITIONAL_found && break 3
359 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
363 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
366 if test "$ac_cv_path_EGREP_TRADITIONAL"
368 ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
370 e) if test -z "$EGREP_TRADITIONAL"; then
371 ac_path_EGREP_TRADITIONAL_found=false
372 # Loop through the user's path and test for each of PROGNAME-LIST
373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
374 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
380 *) as_dir=$as_dir/ ;;
384 for ac_exec_ext in '' $ac_executable_extensions; do
385 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
386 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
387 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
388 # Check for GNU $ac_path_EGREP_TRADITIONAL
389 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
391 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
395 printf %s 0123456789 >"conftest.in"
398 cat "conftest.in" "conftest.in" >"conftest.tmp"
399 mv "conftest.tmp" "conftest.in"
400 cp "conftest.in" "conftest.nl"
401 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
402 "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
403 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
404 as_fn_arith $ac_count + 1 && ac_count=$as_val
405 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
406 # Best one so far, save it but keep looking for a better one
407 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
408 ac_path_EGREP_TRADITIONAL_max=$ac_count
410 # 10*(2^10) chars as input seems more than enough
411 test $ac_count -gt 10 && break
413 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
416 $ac_path_EGREP_TRADITIONAL_found && break 3
421 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
422 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
425 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
433 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
434 EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the 2008 NaN encoding" >&5
437 printf %s "checking whether the compiler is using the 2008 NaN encoding... " >&6; }
438 if test ${libc_cv_mips_nan2008+y}
440 printf %s "(cached) " >&6
442 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
443 /* end confdefs.h. */
445 #ifdef __mips_nan2008
449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
450 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
452 libc_cv_mips_nan2008=yes
454 e) libc_cv_mips_nan2008=no ;;
461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_nan2008" >&5
462 printf "%s\n" "$libc_cv_mips_nan2008" >&6; }
465 if test x"$libc_cv_mips_nan2008" = xyes; then
469 config_vars="$config_vars
470 default-abi = ${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}"
474 test -n "$libc_cv_slibdir" ||
477 libc_cv_slibdir='/lib64'
478 libc_cv_rtlddir='/lib64'
479 if test "$libdir" = '${exec_prefix}/lib'; then
480 libdir='${exec_prefix}/lib64';
481 # Locale data can be shared between 32-bit and 64-bit libraries.
482 libc_cv_complocaledir='${exec_prefix}/lib/locale'
488 test -n "$libc_cv_slibdir" ||
491 libc_cv_slibdir='/lib32'
492 libc_cv_rtlddir='/lib32'
493 if test "$libdir" = '${exec_prefix}/lib'; then
494 libdir='${exec_prefix}/lib32';
495 # Locale data can be shared between 32-bit and 64-bit libraries.
496 libc_cv_complocaledir='${exec_prefix}/lib/locale'
503 libc_cv_gcc_unwind_find_fde=yes
505 if test -z "$arch_minimum_kernel"; then
506 if test x$libc_cv_mips_nan2008 = xyes; then
507 arch_minimum_kernel=4.5.0
511 # Check if we are supposed to run on kernels older than 4.8.0. If so,
512 # force executable stack to avoid potential runtime problems with fpu
514 # NOTE: The check below assumes that in absence of user-provided minimum_kernel
515 # we will default to arch_minimum_kernel which is currently less than 4.8.0 for
516 # all known configurations. If this changes, the check must be updated.
517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler must use executable stack" >&5
518 printf %s "checking whether the compiler must use executable stack... " >&6; }
519 if test ${libc_cv_mips_force_execstack+y}
521 printf %s "(cached) " >&6
523 e) libc_cv_mips_force_execstack=no
524 if test $libc_mips_float = hard; then
525 if test -n "$minimum_kernel"; then
527 min_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
529 if test $min_version -lt 264192; then
530 libc_cv_mips_force_execstack=yes
533 libc_cv_mips_force_execstack=yes
538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_force_execstack" >&5
539 printf "%s\n" "$libc_cv_mips_force_execstack" >&6; }
541 libc_mips_has_gnustack=$libc_cv_as_noexecstack
543 if test $libc_cv_mips_force_execstack = yes; then
544 libc_mips_has_gnustack=no
545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&5
546 printf "%s\n" "$as_me: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&2;}
549 config_vars="$config_vars
550 mips-force-execstack = ${libc_cv_mips_force_execstack}"
551 config_vars="$config_vars
552 mips-has-gnustack = ${libc_mips_has_gnustack}"