]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Initial loongarch port
authorLeslie Zhai <zhaixiang@loongson.cn>
Thu, 13 Jul 2023 11:39:22 +0000 (19:39 +0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sun, 16 Jul 2023 10:42:24 +0000 (12:42 +0200)
cmake/detect-arch.c
cmake/detect-arch.cmake

index ff1a05a253d51499e009aa609f2d7ede86bfffaa..903ae5f29ff4614a99478b9d378bf239eb603868 100644 (file)
         #error archfound riscv32
     #endif
 
+// LOONGARCH
+#elif defined(__loongarch_lp64)
+    #error archfound loongarch64
+
 // Emscripten (WebAssembly)
 #elif defined(__EMSCRIPTEN__)
     #error archfound wasm32
index 95f8f45aec37b20404a54a79c5f6cbdb8cd33589..706d13f8779dd596a4379dc3d165f846a4a9a981 100644 (file)
@@ -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)