diff options
author | Ariadne Conill <ariadne@dereferenced.org> | 2021-07-06 13:29:02 -0600 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2021-07-06 13:29:02 -0600 |
commit | 34162d01fd781e1d19620def3080c415bdb609e0 (patch) | |
tree | 3fee280c3464197c994cbc03a00f0d1ef3a0603f /src | |
parent | 22a81e8fb5b6dc6463d1fe62e077eaa7fcb4079b (diff) | |
download | apk-tools-34162d01fd781e1d19620def3080c415bdb609e0.tar.gz apk-tools-34162d01fd781e1d19620def3080c415bdb609e0.tar.bz2 apk-tools-34162d01fd781e1d19620def3080c415bdb609e0.tar.xz apk-tools-34162d01fd781e1d19620def3080c415bdb609e0.zip |
define APK_DEFAULT_ARCH for loongarch targets
Macros used have been taken from Loongson's work-in-progress GCC 12
port.
Diffstat (limited to 'src')
-rw-r--r-- | src/apk_defines.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h index 8901919..bc2863b 100644 --- a/src/apk_defines.h +++ b/src/apk_defines.h @@ -125,6 +125,12 @@ static inline int IS_ERR_OR_NULL(const void *ptr) { return IS_ERR(ptr) || !ptr; #define APK_DEFAULT_ARCH "riscv32" #elif defined(__riscv) && __riscv_xlen == 64 #define APK_DEFAULT_ARCH "riscv64" +#elif defined(__loongarch__) && defined(__loongarch32) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define APK_DEFAULT_ARCH "loongarch32" +#elif defined(__loongarch__) && defined(__loongarchx32) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define APK_DEFAULT_ARCH "loongarchx32" +#elif defined(__loongarch__) && defined(__loongarch64) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define APK_DEFAULT_ARCH "loongarch64" #else #error APK_DEFAULT_ARCH not detected for this architecture #endif |