Dear maintainers,

I have submitted a PR to liboqs upstream, _https://github.com/open-quantum-safe/liboqs/pull/2010_.

I updated the patch in Debian synchronously, the patchcan be found in the attachment.

If you have any questions, you can contact me at any time.

Thanks!

Description: Add loong64 support
Author: Xiaojuan Zhai <zhaixiaoj...@loongson.cn>

---

--- liboqs-0.8.0.orig/CMakeLists.txt
+++ liboqs-0.8.0/CMakeLists.txt
@@ -86,6 +86,12 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s
     if(${OQS_DIST_BUILD})
         set(OQS_DIST_S390X_BUILD ON)
     endif()
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64")
+    set(ARCH "loongarch64")
+    set(ARCH_LOONGARCH64 ON)
+    if(${OQS_DIST_BUILD})
+        set(OQS_DIST_LOONGARCH64_BUILD ON)
+    endif()
 elseif(OQS_PERMIT_UNSUPPORTED_ARCHITECTURE)
     message(WARNING "Unknown or unsupported processor: " ${CMAKE_SYSTEM_PROCESSOR})
     message(WARNING "Compilation on an unsupported processor should only be used for testing, as it may result an insecure configuration, for example due to variable-time instructions leaking secret information.")
--- liboqs-0.8.0.orig/src/common/common.c
+++ liboqs-0.8.0/src/common/common.c
@@ -185,6 +185,11 @@ static void set_available_cpu_extensions
 	/* mark that this function has been called */
 	cpu_ext_data[OQS_CPU_EXT_INIT] = 1;
 }
+#elif defined(OQS_DIST_LOONGARCH64_BUILD)
+static void set_available_cpu_extensions(void) {
+	/* mark that this function has been called */
+	cpu_ext_data[OQS_CPU_EXT_INIT] = 1;
+}
 #elif defined(OQS_DIST_BUILD)
 static void set_available_cpu_extensions(void) {
 }

Reply via email to