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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26 #if (_MIPS_SIM != _ABIN32)
37 if ac_fn_c_try_compile "$LINENO"
41 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
61 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
63 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
65 if test -z "$libc_mips_abi"; then
66 as_fn_error $? "could not determine what ABI the compiler is using" "$LINENO" 5
69 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72 #if !defined(__mips_soft_float)
83 if ac_fn_c_try_compile "$LINENO"
87 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
90 #if !defined(__mips_hard_float)
101 if ac_fn_c_try_compile "$LINENO"
105 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
107 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
109 if test -z "$libc_mips_float"; then
110 as_fn_error $? "could not determine if compiler is using hard or soft floating point ABI" "$LINENO" 5
115 libc_cv_mips_modd_spreg=
117 if test x"$libc_mips_abi" = xo32 -a x"$libc_mips_float" = xhard; then
118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
119 /* end confdefs.h. */
121 #if !defined(__mips_fpr)
122 #error Missing FPR sizes
132 if ac_fn_c_try_compile "$LINENO"
134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
135 /* end confdefs.h. */
137 #if (__mips_fpr != 32)
148 if ac_fn_c_try_compile "$LINENO"
152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
153 /* end confdefs.h. */
155 #if (__mips_fpr != 0) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
156 #error Not FPXX (without odd single-precision registers)
166 if ac_fn_c_try_compile "$LINENO"
170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
171 /* end confdefs.h. */
173 #if (__mips_fpr != 0)
174 #error Not FPXX (with odd single precision registers)
184 if ac_fn_c_try_compile "$LINENO"
188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
189 /* end confdefs.h. */
191 #if (__mips_fpr != 64) || !defined(_MIPS_SPFPSET) || (_MIPS_SPFPSET != 16)
202 if ac_fn_c_try_compile "$LINENO"
206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
207 /* end confdefs.h. */
209 #if (__mips_fpr != 64)
220 if ac_fn_c_try_compile "$LINENO"
224 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
226 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
228 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
232 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
234 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
236 if { ac_try='${CC-cc} -mfp64 -xc /dev/null -S -o /dev/null'
237 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
240 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
241 test $ac_status = 0; }; }
243 libc_cv_mips_fp64=yes
247 if { ac_try='${CC-cc} -Werror -modd-spreg -xc /dev/null -S -o /dev/null'
248 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
251 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
252 test $ac_status = 0; }; }
254 libc_cv_mips_modd_spreg=yes
256 libc_cv_mips_modd_spreg=no
259 config_vars="$config_vars
260 o32-fpabi = ${libc_mips_o32_fp}"
261 config_vars="$config_vars
262 has-mpf64 = ${libc_cv_mips_fp64}"
263 config_vars="$config_vars
264 has-modd-spreg = ${libc_cv_mips_modd_spreg}"
266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
267 /* end confdefs.h. */
269 #include <linux/prctl.h>
270 #if !defined(PR_GET_FP_MODE) || !defined(PR_SET_FP_MODE)
271 #error New prctl support for setting FP modes not found
281 if ac_fn_c_try_compile "$LINENO"
283 libc_mips_mode_switch=yes
285 libc_mips_mode_switch=no
287 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
288 config_vars="$config_vars
289 mips-mode-switch = ${libc_mips_mode_switch}"
292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
293 printf %s "checking for grep that handles long lines and -e... " >&6; }
294 if test ${ac_cv_path_GREP+y}
296 printf %s "(cached) " >&6
298 if test -z "$GREP"; then
299 ac_path_GREP_found=false
300 # Loop through the user's path and test for each of PROGNAME-LIST
301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
302 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
308 *) as_dir=$as_dir/ ;;
310 for ac_prog in grep ggrep
312 for ac_exec_ext in '' $ac_executable_extensions; do
313 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
314 as_fn_executable_p "$ac_path_GREP" || continue
315 # Check for GNU ac_path_GREP and select it if it is found.
316 # Check for GNU $ac_path_GREP
317 case `"$ac_path_GREP" --version 2>&1` in
319 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
322 printf %s 0123456789 >"conftest.in"
325 cat "conftest.in" "conftest.in" >"conftest.tmp"
326 mv "conftest.tmp" "conftest.in"
327 cp "conftest.in" "conftest.nl"
328 printf "%s\n" 'GREP' >> "conftest.nl"
329 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
330 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
331 as_fn_arith $ac_count + 1 && ac_count=$as_val
332 if test $ac_count -gt ${ac_path_GREP_max-0}; then
333 # Best one so far, save it but keep looking for a better one
334 ac_cv_path_GREP="$ac_path_GREP"
335 ac_path_GREP_max=$ac_count
337 # 10*(2^10) chars as input seems more than enough
338 test $ac_count -gt 10 && break
340 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
343 $ac_path_GREP_found && break 3
348 if test -z "$ac_cv_path_GREP"; then
349 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
352 ac_cv_path_GREP=$GREP
356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
357 printf "%s\n" "$ac_cv_path_GREP" >&6; }
358 GREP="$ac_cv_path_GREP"
361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
362 printf %s "checking for egrep... " >&6; }
363 if test ${ac_cv_path_EGREP+y}
365 printf %s "(cached) " >&6
367 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
368 then ac_cv_path_EGREP="$GREP -E"
370 if test -z "$EGREP"; then
371 ac_path_EGREP_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="$as_dir$ac_prog$ac_exec_ext"
386 as_fn_executable_p "$ac_path_EGREP" || continue
387 # Check for GNU ac_path_EGREP and select it if it is found.
388 # Check for GNU $ac_path_EGREP
389 case `"$ac_path_EGREP" --version 2>&1` in
391 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
394 printf %s 0123456789 >"conftest.in"
397 cat "conftest.in" "conftest.in" >"conftest.tmp"
398 mv "conftest.tmp" "conftest.in"
399 cp "conftest.in" "conftest.nl"
400 printf "%s\n" 'EGREP' >> "conftest.nl"
401 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
402 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
403 as_fn_arith $ac_count + 1 && ac_count=$as_val
404 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
405 # Best one so far, save it but keep looking for a better one
406 ac_cv_path_EGREP="$ac_path_EGREP"
407 ac_path_EGREP_max=$ac_count
409 # 10*(2^10) chars as input seems more than enough
410 test $ac_count -gt 10 && break
412 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
415 $ac_path_EGREP_found && break 3
420 if test -z "$ac_cv_path_EGREP"; then
421 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
424 ac_cv_path_EGREP=$EGREP
429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
430 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
431 EGREP="$ac_cv_path_EGREP"
434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the 2008 NaN encoding" >&5
435 printf %s "checking whether the compiler is using the 2008 NaN encoding... " >&6; }
436 if test ${libc_cv_mips_nan2008+y}
438 printf %s "(cached) " >&6
440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
441 /* end confdefs.h. */
443 #ifdef __mips_nan2008
447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
448 $EGREP "yes" >/dev/null 2>&1
450 libc_cv_mips_nan2008=yes
452 libc_cv_mips_nan2008=no
457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_nan2008" >&5
458 printf "%s\n" "$libc_cv_mips_nan2008" >&6; }
461 if test x"$libc_cv_mips_nan2008" = xyes; then
465 config_vars="$config_vars
466 default-abi = ${libc_mips_abi}_${libc_mips_float}${libc_mips_nan}"
470 test -n "$libc_cv_slibdir" ||
473 libc_cv_slibdir='/lib64'
474 libc_cv_rtlddir='/lib64'
475 if test "$libdir" = '${exec_prefix}/lib'; then
476 libdir='${exec_prefix}/lib64';
477 # Locale data can be shared between 32-bit and 64-bit libraries.
478 libc_cv_complocaledir='${exec_prefix}/lib/locale'
484 test -n "$libc_cv_slibdir" ||
487 libc_cv_slibdir='/lib32'
488 libc_cv_rtlddir='/lib32'
489 if test "$libdir" = '${exec_prefix}/lib'; then
490 libdir='${exec_prefix}/lib32';
491 # Locale data can be shared between 32-bit and 64-bit libraries.
492 libc_cv_complocaledir='${exec_prefix}/lib/locale'
499 libc_cv_gcc_unwind_find_fde=yes
501 if test -z "$arch_minimum_kernel"; then
502 if test x$libc_cv_mips_nan2008 = xyes; then
503 arch_minimum_kernel=4.5.0
507 # Check if we are supposed to run on kernels older than 4.8.0. If so,
508 # force executable stack to avoid potential runtime problems with fpu
510 # NOTE: The check below assumes that in absence of user-provided minimum_kernel
511 # we will default to arch_minimum_kernel which is currently less than 4.8.0 for
512 # all known configurations. If this changes, the check must be updated.
513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler must use executable stack" >&5
514 printf %s "checking whether the compiler must use executable stack... " >&6; }
515 if test ${libc_cv_mips_force_execstack+y}
517 printf %s "(cached) " >&6
519 libc_cv_mips_force_execstack=no
520 if test $libc_mips_float = hard; then
521 if test -n "$minimum_kernel"; then
523 min_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
525 if test $min_version -lt 264192; then
526 libc_cv_mips_force_execstack=yes
529 libc_cv_mips_force_execstack=yes
533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mips_force_execstack" >&5
534 printf "%s\n" "$libc_cv_mips_force_execstack" >&6; }
536 libc_mips_has_gnustack=$libc_cv_as_noexecstack
538 if test $libc_cv_mips_force_execstack = yes; then
539 libc_mips_has_gnustack=no
540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&5
541 printf "%s\n" "$as_me: WARNING: forcing executable stack for pre-4.8.0 Linux kernels" >&2;}
544 config_vars="$config_vars
545 mips-force-execstack = ${libc_cv_mips_force_execstack}"
546 config_vars="$config_vars
547 mips-has-gnustack = ${libc_mips_has_gnustack}"