From: Leslie Zhai Date: Thu, 13 Jul 2023 11:39:22 +0000 (+0800) Subject: Initial loongarch port X-Git-Tag: 2.1.4~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70da27b86ed5b74369f00ca033d9651c37a17f7e;p=thirdparty%2Fzlib-ng.git Initial loongarch port --- diff --git a/cmake/detect-arch.c b/cmake/detect-arch.c index ff1a05a25..903ae5f29 100644 --- a/cmake/detect-arch.c +++ b/cmake/detect-arch.c @@ -101,6 +101,10 @@ #error archfound riscv32 #endif +// LOONGARCH +#elif defined(__loongarch_lp64) + #error archfound loongarch64 + // Emscripten (WebAssembly) #elif defined(__EMSCRIPTEN__) #error archfound wasm32 diff --git a/cmake/detect-arch.cmake b/cmake/detect-arch.cmake index 95f8f45ae..706d13f87 100644 --- a/cmake/detect-arch.cmake +++ b/cmake/detect-arch.cmake @@ -90,6 +90,9 @@ elseif("${ARCH}" MATCHES "rs6000") elseif("${ARCH}" MATCHES "riscv(32|64)") set(BASEARCH "riscv") set(BASEARCH_RISCV_FOUND TRUE) +elseif("${ARCH}" MATCHES "loongarch64") + set(BASEARCH "loongarch") + set(BASEARCH_LOONGARCH_FOUND TRUE) elseif("${ARCH}" MATCHES "wasm32") set(BASEARCH "wasm32") set(BASEARCH_WASM32_FOUND TRUE)