summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNils Andreas Svee <me@lochnair.net>2017-12-10 01:19:26 +0100
committerTimo Teräs <timo.teras@iki.fi>2017-12-11 09:02:50 +0200
commit0700e8318fc5c88c5965320f6085f973e25dbeda (patch)
treee93941e79d717b7a29618546e8bef6d9d83d2b71 /src
parent97d8aab0c2e53ee82589a591637028294a6ab449 (diff)
downloadapk-tools-0700e8318fc5c88c5965320f6085f973e25dbeda.tar.gz
apk-tools-0700e8318fc5c88c5965320f6085f973e25dbeda.tar.bz2
apk-tools-0700e8318fc5c88c5965320f6085f973e25dbeda.tar.xz
apk-tools-0700e8318fc5c88c5965320f6085f973e25dbeda.zip
add detection of mips archs
Diffstat (limited to 'src')
-rw-r--r--src/apk_defines.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h
index f5124e9..02b2042 100644
--- a/src/apk_defines.h
+++ b/src/apk_defines.h
@@ -99,6 +99,14 @@ extern char **apk_argv;
#define APK_DEFAULT_ARCH "aarch64"
#elif defined(__s390x__)
#define APK_DEFAULT_ARCH "s390x"
+#elif defined(__mips64) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define APK_DEFAULT_ARCH "mips64"
+#elif defined(__mips64) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define APK_DEFAULT_ARCH "mips64el"
+#elif defined(__mips__) && __BYTE_ORDER__ == __ORDER_BIG__ENDIAN__
+#define APK_DEFAULT_ARCH "mips"
+#elif defined(__mips__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define APK_DEFAULT_ARCH "mipsel"
#else
#error APK_DEFAULT_ARCH not detected for this architecture
#endif