From ed49fcb8e77087a12b01cae2bb7841a75a25b0fc Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 19 Feb 2020 23:06:29 +0800 Subject: support cross-compilation for autotools --- xmake/modules/package/tools/autoconf.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmake/modules/package/tools/autoconf.lua') diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index a93bb6a80..3dbc7853a 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -29,7 +29,7 @@ function _get_configs(package, configs) table.insert(configs, "--prefix=" .. package:installdir()) -- add host for cross-complation - if not configs.host and not package:is_plat(os.host()) then + if not configs.host and not package:is_plat(os.subhost()) then if package:is_plat("iphoneos") then local triples = { @@ -71,7 +71,7 @@ end -- get the build environments function buildenvs(package) local envs = {} - if package:is_plat(os.host()) then + if package:is_plat(os.subhost()) then local cflags = table.join(table.wrap(package:config("cxflags")), package:config("cflags")) local cxxflags = table.join(table.wrap(package:config("cxflags")), package:config("cxxflags")) envs.CFLAGS = table.concat(cflags, ' ') -- cgit v1.3.1