Package: xmake
Version: 2.8.6+ds-1
Severity: normal
X-Debbugs-Cc: liuxi...@loongson.cn

Dear Maintainer,

  Please add loong64 support, patch file is attached.

Thanks

diff -ruN xmake-2.8.6+ds-bk/configure xmake-2.8.6+ds/configure
--- xmake-2.8.6+ds-bk/configure	2023-12-26 02:44:24.000000000 +0000
+++ xmake-2.8.6+ds/configure	2024-01-04 05:11:00.444510453 +0000
@@ -2718,7 +2718,7 @@
                             - linux
   --arch=ARCH             Compile for the given architecture. (default: '"${_target_arch_default}"')
                             - msys: i386 x86_64
-                            - cross: i386 x86_64 arm arm64 mips mips64 riscv riscv64 s390x ppc ppc64 sh4
+                            - cross: i386 x86_64 arm arm64 mips mips64 riscv riscv64 loong64 s390x ppc ppc64 sh4
                             - bsd: i386 x86_64
                             - mingw: i386 x86_64 arm arm64
                             - macosx: x86_64 arm64
diff -ruN xmake-2.8.6+ds-bk/xmake/modules/private/detect/find_platform.lua xmake-2.8.6+ds/xmake/modules/private/detect/find_platform.lua
--- xmake-2.8.6+ds-bk/xmake/modules/private/detect/find_platform.lua	2023-12-26 02:44:25.000000000 +0000
+++ xmake-2.8.6+ds/xmake/modules/private/detect/find_platform.lua	2024-01-04 05:14:53.550969342 +0000
@@ -66,6 +66,8 @@
             arch = "riscv64"
         elseif cross:find("riscv", 1, true) then
             arch = "riscv"
+        elseif cross:find("loong64", 1, true) then
+            arch = "loong64"
         elseif cross:find("s390x", 1, true) then
             arch = "s390x"
         elseif cross:find("powerpc64", 1, true) then
diff -ruN xmake-2.8.6+ds-bk/xmake/platforms/cross/xmake.lua xmake-2.8.6+ds/xmake/platforms/cross/xmake.lua
--- xmake-2.8.6+ds-bk/xmake/platforms/cross/xmake.lua	2023-12-26 02:44:25.000000000 +0000
+++ xmake-2.8.6+ds/xmake/platforms/cross/xmake.lua	2024-01-04 05:14:09.995257298 +0000
@@ -20,7 +20,7 @@
 
 platform("cross")
     set_hosts("macosx", "linux", "windows", "bsd")
-    set_archs("i386", "x86_64", "arm", "arm64", "mips", "mips64", "riscv", "riscv64", "s390x", "ppc", "ppc64", "sh4")
+    set_archs("i386", "x86_64", "arm", "arm64", "mips", "mips64", "riscv", "riscv64", "loong64", "s390x", "ppc", "ppc64", "sh4")
 
     set_formats("static", "lib$(name).a")
     set_formats("object", "$(name).o")
diff -ruN xmake-2.8.6+ds-bk/xmake/toolchains/zig/xmake.lua xmake-2.8.6+ds/xmake/toolchains/zig/xmake.lua
--- xmake-2.8.6+ds-bk/xmake/toolchains/zig/xmake.lua	2023-12-26 02:44:25.000000000 +0000
+++ xmake-2.8.6+ds/xmake/toolchains/zig/xmake.lua	2024-01-04 05:11:32.312299769 +0000
@@ -78,6 +78,8 @@
             arch = "i386"
         elseif toolchain:is_arch("riscv64") then
             arch = "riscv64"
+        elseif toolchain:is_arch("loong64") then
+            arch = "loong64"
         elseif toolchain:is_arch("mips.*") then
             arch = toolchain:arch()
         elseif toolchain:is_arch("ppc64") then

Reply via email to