diff options
| author | ruki <[email protected]> | 2020-11-01 21:18:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-01 21:18:36 +0800 |
| commit | 5462f2e0b3e87b80829f28de585616da419539a0 (patch) | |
| tree | c0e786bfa0b1d6022aea180eacd89db8e50ec5bb /xmake/modules/package/tools/autoconf.lua | |
| parent | 08d63614f1769ff53ba862ae82715be8c95c9bff (diff) | |
improve autoconf for cross
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 8dc9f4b4c..2f15cbf89 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -82,6 +82,15 @@ 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("cross") then + local host = package:arch() + if package:is_arch("arm64") then + host = "aarch64" + elseif package:is_arch("arm.*") then + host = "arm" + end + host = host .. "-" .. package:os() + table.insert(configs, "--host=" .. host) end end return configs @@ -109,6 +118,7 @@ function buildenvs(package) local cflags = table.join(table.wrap(package:build_getenv("cxflags")), package:build_getenv("cflags")) local cxxflags = table.join(table.wrap(package:build_getenv("cxflags")), package:build_getenv("cxxflags")) envs.CC = package:build_getenv("cc") + envs.CXX = package:build_getenv("cxx") envs.AS = package:build_getenv("as") envs.AR = package:build_getenv("ar") envs.LD = package:build_getenv("ld") |
