diff --git a/src/util/detect_arch.h b/src/util/detect_arch.h index 35385a02b49..166c4aea1d1 100644 --- a/src/util/detect_arch.h +++ b/src/util/detect_arch.h @@ -112,6 +112,14 @@ #endif #endif +#if defined(__loongarch__) +#ifdef __loongarch_lp64 +#define DETECT_ARCH_LOONGARCH64 1 +#else +#error "detect_arch: unknown target loongarch base ABI type" +#endif +#endif + #ifndef DETECT_ARCH_X86 #define DETECT_ARCH_X86 0 #endif @@ -168,4 +176,8 @@ #define DETECT_ARCH_RISCV64 0 #endif +#ifndef DETECT_ARCH_LOONGARCH64 +#define DETECT_ARCH_LOONGARCH64 0 +#endif + #endif /* UTIL_DETECT_ARCH_H_ */