summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/autoconf.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index 02bcec28c..79974822e 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -324,6 +324,9 @@ function buildenvs(package, opt)
envs.CPP = _translate_windows_bin_path(envs.CPP)
envs.RANLIB = _translate_windows_bin_path(envs.RANLIB)
end
+ elseif package:is_plat("macosx") then
+ -- force to apply shflags on macosx https://gmplib.org/manual/Known-Build-Problems
+ envs.CC = envs.CC .. " -arch " .. package:arch()
elseif package:is_plat("cross") or package:has_tool("ar", "ar", "emar") then
-- only for cross-toolchain
envs.CXX = package:build_getenv("cxx")