diff options
| author | ruki <[email protected]> | 2017-12-10 22:57:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-12-10 22:57:02 +0800 |
| commit | 881147427074c7038f3329a7a289762e74541bae (patch) | |
| tree | f42932a28c20c765e5028bc75c02e82c4c56cf36 | |
| parent | 84810ffba81a4f242a8d7d849f2c6fe62110cee4 (diff) | |
support arm linux
| -rw-r--r-- | core/src/tbox/src/tbox/prefix/arch.h | 7 | ||||
| -rw-r--r-- | xmake/platforms/linux/load.lua | 1 |
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 |
