Skip to content

Commit 5740f94

Browse files
committed
Detect mips CPUs in ./configure
This mirrors existing logic already in src/bootstrap/bootstrap.py
1 parent ac5046c commit 5740f94

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: configure

+12
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,18 @@ case $CFG_CPUTYPE in
541541
CFG_CPUTYPE=x86_64
542542
;;
543543

544+
mips | mips64)
545+
if [ "$CFG_CPUTYPE" = "mips64" ]; then
546+
CFG_OSTYPE="${CFG_OSTYPE}abi64"
547+
fi
548+
ENDIAN=$(printf '\1' | od -dAn)
549+
if [ "$ENDIAN" -eq 1 ]; then
550+
CFG_CPUTYPE="${CFG_CPUTYPE}el"
551+
elif [ "$ENDIAN" -ne 256 ]; then
552+
err "unknown endianness: $ENDIAN (expecting 1 for little or 256 for big)"
553+
fi
554+
;;
555+
544556
BePC)
545557
CFG_CPUTYPE=i686
546558
;;

0 commit comments

Comments
 (0)