Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

improve host #5671

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions xmake/modules/package/tools/autoconf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Loading