summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-09-28 00:30:21 +0800
committerruki <[email protected]>2024-09-28 00:30:21 +0800
commita5cd98bb58eb1e122854cfeaca44ac70e13bfa57 (patch)
tree831df35b46a52346a4116cae2abae31a84d58cf9
parent9738030c15c8e4b6d9b4a9001964cdf159155d55 (diff)
improve host
-rw-r--r--xmake/modules/package/tools/autoconf.lua11
1 files changed, 4 insertions, 7 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index 58ea2e4c2..9dc417c16 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -98,14 +98,11 @@ end
-- get configs
function _get_configs(package, configs)
-
- -- add prefix
local configs = configs or {}
table.insert(configs, "--prefix=" .. _translate_paths(package:installdir()))
- -- add host for cross-complation
- if not configs.host and package:is_cross() then
- if package:is_plat("iphoneos", "macosx") then
+ if not configs.host then
+ if package:is_plat("iphoneos", "macosx") and package:is_cross() then
local triples =
{
arm64 = "aarch64-apple-darwin",
@@ -132,14 +129,14 @@ function _get_configs(package, configs)
mips64 = "mips64-linux-android" -- removed in ndk r17
}
table.insert(configs, "--host=" .. (triples[package:arch()] or triples["armeabi-v7a"]))
- elseif package:is_plat("mingw") then
+ elseif package:is_plat("mingw") then -- we always add host for mingw
local triples =
{
i386 = "i686-w64-mingw32",
x86_64 = "x86_64-w64-mingw32"
}
table.insert(configs, "--host=" .. (triples[package:arch()] or triples.i386))
- elseif package:is_plat("linux") then
+ elseif package:is_plat("linux") and package:is_cross() then
local triples =
{
["arm64-v8a"] = "aarch64-linux-gnu",