summaryrefslogtreecommitdiff
path: root/src/apk_defines.h
diff options
context:
space:
mode:
authorBreno Leitao <breno.leitao@gmail.com>2017-01-16 14:16:04 -0500
committerTimo Teräs <timo.teras@iki.fi>2017-01-17 08:39:06 +0200
commit28a9dcda568c575c569ffa4b68775034b655230a (patch)
tree93418b0de6f730918e42429d59a95adc63116d1b /src/apk_defines.h
parentca368916e0333bf24cdcbdbe42130ec6a92c3f6e (diff)
downloadapk-tools-28a9dcda568c575c569ffa4b68775034b655230a.tar.gz
apk-tools-28a9dcda568c575c569ffa4b68775034b655230a.tar.bz2
apk-tools-28a9dcda568c575c569ffa4b68775034b655230a.tar.xz
apk-tools-28a9dcda568c575c569ffa4b68775034b655230a.zip
Add ppc64le entry in apk defines.
Currently apk only knows about powerpc and ppc64. I am adding support for ppc64le. ppc64le is the based on the ABI v2, which defines the endianess as little, while ppc64 is based on the first 64-bits ABI.
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r--src/apk_defines.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h
index 7215360..50bd063 100644
--- a/src/apk_defines.h
+++ b/src/apk_defines.h
@@ -85,8 +85,10 @@ extern char **apk_argv;
#define APK_DEFAULT_ARCH "x86"
#elif defined(__powerpc__) && !defined(__powerpc64__)
#define APK_DEFAULT_ARCH "ppc"
-#elif defined(__powerpc64__)
+#elif defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define APK_DEFAULT_ARCH "ppc64"
+#elif defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define APK_DEFAULT_ARCH "ppc64le"
#elif defined(__arm__) && defined(__ARM_PCS_VFP) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __ARM_ARCH>=7
#define APK_DEFAULT_ARCH "armv7"
#elif defined(__arm__) && defined(__ARM_PCS_VFP) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__