@@ -197,6 +197,7 @@ get_architecture() {
197
197
198
198
Linux)
199
199
_ostype=unknown-linux-gnu
200
+ _bitness=$( get_bitness)
200
201
;;
201
202
202
203
FreeBSD)
@@ -265,22 +266,15 @@ get_architecture() {
265
266
;;
266
267
267
268
mips)
268
- _cputype=" $( get_endianness $_cputype " " ' el ' ) "
269
+ _cputype=$( get_endianness mips ' ' el )
269
270
;;
270
271
271
272
mips64)
272
- _bitness=" $( get_bitness) "
273
- if [ " $_bitness " -eq 32 ]; then
274
- if [ " $_ostype " = " unknown-linux-gnu" ]; then
275
- # 64-bit kernel with 32-bit userland
276
- # endianness suffix is appended later
277
- _cputype=mips
278
- fi
279
- else
273
+ if [ " $_bitness " -eq 64 ]; then
280
274
# only n64 ABI is supported for now
281
275
_ostype=" ${_ostype} abi64"
276
+ _cputype=$( get_endianness mips64 ' ' el)
282
277
fi
283
- _cputype=" $( get_endianness " $_cputype " " " ' el' ) "
284
278
;;
285
279
286
280
ppc)
@@ -300,18 +294,19 @@ get_architecture() {
300
294
301
295
esac
302
296
303
- # Detect 64-bit linux with 32-bit userland for x86
304
- if [ " $_ostype " = unknown-linux-gnu ] && [ " $_cputype " = x86_64 ]; then
305
- if [ " $( get_bitness) " = " 32" ]; then
306
- _cputype=i686
307
- fi
308
- fi
309
-
310
- # Detect 64-bit linux with 32-bit userland for powerpc
311
- if [ $_ostype = unknown-linux-gnu ] && [ $_cputype = powerpc64 ]; then
312
- if [ " $( get_bitness) " = " 32" ]; then
313
- local _cputype=powerpc
314
- fi
297
+ # Detect 64-bit linux with 32-bit userland
298
+ if [ " ${_ostype} " = unknown-linux-gnu ] && [ " ${_bitness} " -eq 32 ]; then
299
+ case $_cputype in
300
+ x86_64)
301
+ _cputype=i686
302
+ ;;
303
+ mips64)
304
+ _cputype=$( get_endianness mips ' ' el)
305
+ ;;
306
+ powerpc64)
307
+ _cputype=powerpc
308
+ ;;
309
+ esac
315
310
fi
316
311
317
312
# Detect armv7 but without the CPU features Rust needs in that build,
0 commit comments