]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/riscv/configure
RISC-V: Fix `test' operand error with soft-float ABI being configured
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / riscv / configure
1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/unix/sysv/linux/riscv.
3
4 arch_minimum_kernel=4.15.0
5
6 libc_cv_riscv_int_abi=no
7
8
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
13 else
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
19 do
20 IFS=$as_save_IFS
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
29 *GNU*)
30 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
31 *)
32 ac_count=0
33 $as_echo_n 0123456789 >"conftest.in"
34 while :
35 do
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
47 fi
48 # 10*(2^10) chars as input seems more than enough
49 test $ac_count -gt 10 && break
50 done
51 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
52 esac
53
54 $ac_path_GREP_found && break 3
55 done
56 done
57 done
58 IFS=$as_save_IFS
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
61 fi
62 else
63 ac_cv_path_GREP=$GREP
64 fi
65
66 fi
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"
70
71
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
76 else
77 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
78 then ac_cv_path_EGREP="$GREP -E"
79 else
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
85 do
86 IFS=$as_save_IFS
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
95 *GNU*)
96 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
97 *)
98 ac_count=0
99 $as_echo_n 0123456789 >"conftest.in"
100 while :
101 do
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
113 fi
114 # 10*(2^10) chars as input seems more than enough
115 test $ac_count -gt 10 && break
116 done
117 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
118 esac
119
120 $ac_path_EGREP_found && break 3
121 done
122 done
123 done
124 IFS=$as_save_IFS
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
127 fi
128 else
129 ac_cv_path_EGREP=$EGREP
130 fi
131
132 fi
133 fi
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"
137
138
139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
140 /* end confdefs.h. */
141 __SIZEOF_INT__ __SIZEOF_LONG__ __SIZEOF_POINTER__
142
143 _ACEOF
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
147 fi
148 rm -f conftest*
149
150 if test $libc_cv_riscv_int_abi = no; then
151 as_fn_error $? "Unable to determine integer ABI" "$LINENO" 5
152 fi
153
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
158 yes
159 #endif
160
161 _ACEOF
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
165 fi
166 rm -f conftest*
167
168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
169 /* end confdefs.h. */
170 #ifdef __riscv_float_abi_soft
171 yes
172 #endif
173
174 _ACEOF
175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
176 $EGREP "yes" >/dev/null 2>&1; then :
177 libc_cv_riscv_float_abi=
178 fi
179 rm -f conftest*
180
181 if test "$libc_cv_riscv_float_abi" = no; then
182 as_fn_error $? "Unable to determine floating-point ABI" "$LINENO" 5
183 fi
184
185 config_vars="$config_vars
186 default-abi = $libc_cv_riscv_int_abi$libc_cv_riscv_float_abi"
187
188 case $libc_cv_riscv_int_abi$libc_cv_riscv_float_abi-$machine in
189 lp64-riscv/rv64/*)
190 test -n "$libc_cv_slibdir" ||
191 case "$prefix" in
192 /usr | /usr/)
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'
199 fi
200 ;;
201 esac
202 ;;
203 lp64d-riscv/rv64/*)
204 test -n "$libc_cv_slibdir" ||
205 case "$prefix" in
206 /usr | /usr/)
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'
213 fi
214 ;;
215 esac
216 ;;
217 esac
218
219 ldd_rewrite_script=sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed