summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-12-10 22:57:02 +0800
committerruki <[email protected]>2017-12-10 22:57:02 +0800
commit881147427074c7038f3329a7a289762e74541bae (patch)
treef42932a28c20c765e5028bc75c02e82c4c56cf36
parent84810ffba81a4f242a8d7d849f2c6fe62110cee4 (diff)
support arm linux
-rw-r--r--core/src/tbox/src/tbox/prefix/arch.h7
-rw-r--r--xmake/platforms/linux/load.lua1
2 files changed, 5 insertions, 3 deletions
diff --git a/core/src/tbox/src/tbox/prefix/arch.h b/core/src/tbox/src/tbox/prefix/arch.h
index 224f6f211..4ebe36bd3 100644
--- a/core/src/tbox/src/tbox/prefix/arch.h
+++ b/core/src/tbox/src/tbox/prefix/arch.h
@@ -112,9 +112,12 @@
# define TB_ARCH_ARM_VERSION __ARM_ARCH
# if __ARM_ARCH >= 8
# define TB_ARCH_ARM_v8
-# if defined(__arm64) || defined(__arm64__)
+# if defined(__arm64) || defined(__arm64__)
# define TB_ARCH_ARM64
# define TB_ARCH_STRING "arm64"
+# elif (defined(__aarch64__) && __aarch64__)
+# define TB_ARCH_ARM64
+# define TB_ARCH_STRING "arm64-v8a"
# else
# define TB_ARCH_STRING "armv7s"
# endif
@@ -135,7 +138,7 @@
# else
# error unknown arm arch version
# endif
-# if !defined(TB_ARCH_ARM64) && (defined(__arm64) || defined(__arm64__))
+# if !defined(TB_ARCH_ARM64) && (defined(__arm64) || defined(__arm64__) || (defined(__aarch64__) && __aarch64__))
# define TB_ARCH_ARM64
# ifndef TB_ARCH_STRING
# define TB_ARCH_STRING "arm64"
diff --git a/xmake/platforms/linux/load.lua b/xmake/platforms/linux/load.lua
index b91c7148e..655fa083f 100644
--- a/xmake/platforms/linux/load.lua
+++ b/xmake/platforms/linux/load.lua
@@ -48,7 +48,6 @@ function main()
if arch then
if arch == "x86_64" then archflags = "-m64"
elseif arch == "i386" then archflags = "-m32"
- else archflags = "-arch " .. arch
end
end