diff options
| author | Redbeanw44602 <[email protected]> | 2024-08-31 00:11:24 +0800 |
|---|---|---|
| committer | Redbeanw44602 <[email protected]> | 2024-08-31 00:11:24 +0800 |
| commit | 71d380e44438615d1cce4bc8b0603f03e5c93e80 (patch) | |
| tree | b639d5ab346667a45ca91cb4f1817e5c564609af /xmake/modules | |
| parent | e12ef8929c33284a20db64fd4f2b6569ae01cea4 (diff) | |
add missing linux platform triples.
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 14 | ||||
| -rw-r--r-- | xmake/modules/private/action/trybuild/autoconf.lua | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 5cfb1d28d..4346b12ab 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -139,6 +139,20 @@ function _get_configs(package, configs) x86_64 = "x86_64-w64-mingw32" } table.insert(configs, "--host=" .. (triples[package:arch()] or triples.i386)) + elseif package:is_plat("linux") then + local triples = + { + ["arm64-v8a"] = "aarch64-linux-gnu", + i386 = "i686-linux-gnu", + x86_64 = "x86_64-linux-gnu", + armv7 = "arm-linux-gnueabihf", + mips = "mips-linux-gnu", + mips64 = "mips64-linux-gnu", + mipsel = "mipsel-linux-gnu", + mips64el = "mips64el-linux-gnu", + loong64 = "loongarch64-linux-gnu" + } + table.insert(configs, "--host=" .. (triples[package:arch()] or triples.i386)) elseif package:is_plat("cross") and package:targetos() then local host = package:arch() if package:is_arch("arm64") then diff --git a/xmake/modules/private/action/trybuild/autoconf.lua b/xmake/modules/private/action/trybuild/autoconf.lua index 0eba27bf2..da34d7bc9 100644 --- a/xmake/modules/private/action/trybuild/autoconf.lua +++ b/xmake/modules/private/action/trybuild/autoconf.lua @@ -225,6 +225,20 @@ function _get_configs(artifacts_dir) x86_64 = "x86_64-w64-mingw32" } table.insert(configs, "--host=" .. (triples[config.arch()] or triples.i386)) + elseif is_plat("linux") then + local triples = + { + ["arm64-v8a"] = "aarch64-linux-gnu", + i386 = "i686-linux-gnu", + x86_64 = "x86_64-linux-gnu", + armv7 = "arm-linux-gnueabihf", + mips = "mips-linux-gnu", + mips64 = "mips64-linux-gnu", + mipsel = "mipsel-linux-gnu", + mips64el = "mips64el-linux-gnu", + loong64 = "loongarch64-linux-gnu" + } + table.insert(configs, "--host=" .. (triples[config.arch()] or triples.i386)) elseif is_plat("cross") then local host = config.arch() if is_arch("arm64") then |
