summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-05 11:10:09 +0800
committerGitHub <[email protected]>2024-01-05 11:10:09 +0800
commit70079330098ef44836a13ff9d26609a3bcd2de48 (patch)
tree42151ddb30d24a2feaa23a8e3adf0f134944f2c6
parent76f21280af93d9826fb2ec43bf19df16cfd7f29e (diff)
parent8e7b00111149713fca06ba548edbd419a79fe778 (diff)
Merge pull request #4569 from xmake-io/loongarch
add more loong64 support
-rwxr-xr-xconfigure2
m---------core/src/tbox/tbox0
-rw-r--r--xmake/modules/private/detect/find_platform.lua2
-rw-r--r--xmake/platforms/cross/xmake.lua2
-rw-r--r--xmake/platforms/linux/xmake.lua2
-rw-r--r--xmake/toolchains/zig/xmake.lua2
6 files changed, 7 insertions, 3 deletions
diff --git a/configure b/configure
index 02ca64403..9f4232d50 100755
--- a/configure
+++ b/configure
@@ -2718,7 +2718,7 @@ Common options:
- 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 --git a/core/src/tbox/tbox b/core/src/tbox/tbox
-Subproject 1ec4e9222b0bdad8f58c90ce471d08b7cb03751
+Subproject cf97d353c6e407819c67c0db88f2a6841afa2d9
diff --git a/xmake/modules/private/detect/find_platform.lua b/xmake/modules/private/detect/find_platform.lua
index 977f93072..e4308a90e 100644
--- a/xmake/modules/private/detect/find_platform.lua
+++ b/xmake/modules/private/detect/find_platform.lua
@@ -66,6 +66,8 @@ function _find_arch_from_cross()
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 --git a/xmake/platforms/cross/xmake.lua b/xmake/platforms/cross/xmake.lua
index 4b65f83b7..c7f27a569 100644
--- a/xmake/platforms/cross/xmake.lua
+++ b/xmake/platforms/cross/xmake.lua
@@ -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 --git a/xmake/platforms/linux/xmake.lua b/xmake/platforms/linux/xmake.lua
index 1fdea4ea7..e4d57b533 100644
--- a/xmake/platforms/linux/xmake.lua
+++ b/xmake/platforms/linux/xmake.lua
@@ -21,7 +21,7 @@
platform("linux")
set_os("linux")
set_hosts("macosx", "linux", "windows", "bsd")
- set_archs("i386", "x86_64", "armv7", "armv7s", "arm64-v8a", "mips", "mips64", "mipsel", "mips64el", "loongarch64")
+ set_archs("i386", "x86_64", "armv7", "armv7s", "arm64-v8a", "mips", "mips64", "mipsel", "mips64el", "loong64")
set_formats("static", "lib$(name).a")
set_formats("object", "$(name).o")
diff --git a/xmake/toolchains/zig/xmake.lua b/xmake/toolchains/zig/xmake.lua
index 2cdd7cb8b..082dcba32 100644
--- a/xmake/toolchains/zig/xmake.lua
+++ b/xmake/toolchains/zig/xmake.lua
@@ -78,6 +78,8 @@ toolchain("zig")
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