Mail archive
alpine-aports

[alpine-aports] [apk-tools] [PATCH] add detection of mips archs

From: Nils Andreas Svee <me_at_lochnair.net>
Date: Sun, 10 Dec 2017 01:19:26 +0100

---
 src/apk_defines.h | 8 ++++++++
 1 file changed, 8 insertions(+)
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
_at_@ -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
-- 
2.15.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Dec 10 2017 - 01:19:26 GMT