1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/unix/sysv/linux/riscv.
4 arch_minimum_kernel=4.15.0
6 libc_cv_riscv_int_abi=no
9 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11 if ${ac_cv_path_GREP+:} false; then :
12 $as_echo_n "(cached) " >&6
14 if test -z "$GREP"; then
15 ac_path_GREP_found=false
16 # Loop through the user's path and test for each of PROGNAME-LIST
17 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
21 test -z "$as_dir" && as_dir=.
22 for ac_prog in grep ggrep; do
23 for ac_exec_ext in '' $ac_executable_extensions; do
24 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
25 as_fn_executable_p "$ac_path_GREP" || continue
26 # Check for GNU ac_path_GREP and select it if it is found.
27 # Check for GNU $ac_path_GREP
28 case `"$ac_path_GREP" --version 2>&1` in
30 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
33 $as_echo_n 0123456789 >"conftest.in"
36 cat "conftest.in" "conftest.in" >"conftest.tmp"
37 mv "conftest.tmp" "conftest.in"
38 cp "conftest.in" "conftest.nl"
39 $as_echo 'GREP' >> "conftest.nl"
40 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
41 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
42 as_fn_arith $ac_count + 1 && ac_count=$as_val
43 if test $ac_count -gt ${ac_path_GREP_max-0}; then
44 # Best one so far, save it but keep looking for a better one
45 ac_cv_path_GREP="$ac_path_GREP"
46 ac_path_GREP_max=$ac_count
48 # 10*(2^10) chars as input seems more than enough
49 test $ac_count -gt 10 && break
51 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
54 $ac_path_GREP_found && break 3
59 if test -z "$ac_cv_path_GREP"; then
60 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
67 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
68 $as_echo "$ac_cv_path_GREP" >&6; }
69 GREP="$ac_cv_path_GREP"
72 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
73 $as_echo_n "checking for egrep... " >&6; }
74 if ${ac_cv_path_EGREP+:} false; then :
75 $as_echo_n "(cached) " >&6
77 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
78 then ac_cv_path_EGREP="$GREP -E"
80 if test -z "$EGREP"; then
81 ac_path_EGREP_found=false
82 # Loop through the user's path and test for each of PROGNAME-LIST
83 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
84 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
87 test -z "$as_dir" && as_dir=.
88 for ac_prog in egrep; do
89 for ac_exec_ext in '' $ac_executable_extensions; do
90 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
91 as_fn_executable_p "$ac_path_EGREP" || continue
92 # Check for GNU ac_path_EGREP and select it if it is found.
93 # Check for GNU $ac_path_EGREP
94 case `"$ac_path_EGREP" --version 2>&1` in
96 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
99 $as_echo_n 0123456789 >"conftest.in"
102 cat "conftest.in" "conftest.in" >"conftest.tmp"
103 mv "conftest.tmp" "conftest.in"
104 cp "conftest.in" "conftest.nl"
105 $as_echo 'EGREP' >> "conftest.nl"
106 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
107 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
108 as_fn_arith $ac_count + 1 && ac_count=$as_val
109 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
110 # Best one so far, save it but keep looking for a better one
111 ac_cv_path_EGREP="$ac_path_EGREP"
112 ac_path_EGREP_max=$ac_count
114 # 10*(2^10) chars as input seems more than enough
115 test $ac_count -gt 10 && break
117 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
120 $ac_path_EGREP_found && break 3
125 if test -z "$ac_cv_path_EGREP"; then
126 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
129 ac_cv_path_EGREP=$EGREP
134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
135 $as_echo "$ac_cv_path_EGREP" >&6; }
136 EGREP="$ac_cv_path_EGREP"
139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
140 /* end confdefs.h. */
141 __SIZEOF_INT__ __SIZEOF_LONG__ __SIZEOF_POINTER__
144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
145 $EGREP "4 8 8" >/dev/null 2>&1; then :
146 libc_cv_riscv_int_abi=lp64
150 if test $libc_cv_riscv_int_abi = no; then
151 as_fn_error $? "Unable to determine integer ABI" "$LINENO" 5
154 libc_cv_riscv_float_abi=no
155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
156 /* end confdefs.h. */
157 #ifdef __riscv_float_abi_double
162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
163 $EGREP "yes" >/dev/null 2>&1; then :
164 libc_cv_riscv_float_abi=d
168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
169 /* end confdefs.h. */
170 #ifdef __riscv_float_abi_soft
175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
176 $EGREP "yes" >/dev/null 2>&1; then :
177 libc_cv_riscv_float_abi=
181 if test "$libc_cv_riscv_float_abi" = no; then
182 as_fn_error $? "Unable to determine floating-point ABI" "$LINENO" 5
185 config_vars="$config_vars
186 default-abi = $libc_cv_riscv_int_abi$libc_cv_riscv_float_abi"
188 case $libc_cv_riscv_int_abi$libc_cv_riscv_float_abi-$machine in
190 test -n "$libc_cv_slibdir" ||
193 libc_cv_slibdir='/lib64/lp64'
194 libc_cv_rtlddir='/lib'
195 if test "$libdir" = '${exec_prefix}/lib'; then
196 libdir='${exec_prefix}/lib64/lp64';
197 # Locale data can be shared between 32-bit and 64-bit libraries.
198 libc_cv_complocaledir='${exec_prefix}/lib/locale'
204 test -n "$libc_cv_slibdir" ||
207 libc_cv_slibdir='/lib64/lp64d'
208 libc_cv_rtlddir='/lib'
209 if test "$libdir" = '${exec_prefix}/lib'; then
210 libdir='${exec_prefix}/lib64/lp64d';
211 # Locale data can be shared between 32-bit and 64-bit libraries.
212 libc_cv_complocaledir='${exec_prefix}/lib/locale'
219 ldd_rewrite_script=sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed