diff --git a/src/architecture.h b/src/architecture.h index 2d2daa7..cbf1795 100644 --- a/src/architecture.h +++ b/src/architecture.h @@ -58,6 +58,7 @@ enum { ARCHITECTURE_TILEGX, ARCHITECTURE_CRIS, ARCHITECTURE_RISCV64, + ARCHITECTURE_LOONGARCH, _ARCHITECTURE_MAX, _ARCHITECTURE_INVALID = -1 }; @@ -150,6 +151,9 @@ int uname_architecture(void); #elif defined(__riscv) && __riscv_xlen == 64 # define native_architecture() ARCHITECTURE_RISCV64 # define define LIB_ARCH_TUPLE "riscv64-linux-gnu" +#elif defined(__loongarch__) && __loongarch_grlen == 64 +# define native_architecture() ARCHITECTURE_LOONGARCH +# define define LIB_ARCH_TUPLE "loongarch64-linux-gnu" #elif defined(__aarch64__) # if __BYTE_ORDER == __BIG_ENDIAN # define native_architecture() ARCHITECTURE_ARM64_BE