diff options
| author | ruki <[email protected]> | 2024-11-13 23:20:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-11-13 23:20:09 +0800 |
| commit | 37107f795f835fbd559b65edd486b5f6faf24226 (patch) | |
| tree | 6540ef3839da5b136f893bdfed1ced8f2e575473 /xmake/modules/package/tools/autoconf.lua | |
| parent | 3b4a8beb71f7ebce1b1e83ff4c6bd10e02ce928b (diff) | |
improve default pic for packages
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 9dc417c16..345b0fde9 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -162,7 +162,7 @@ function _get_configs(package, configs) table.insert(configs, "--host=" .. host) end end - if package:is_plat("linux", "bsd") and + if not package:is_plat("windows", "mingw") and package:config("pic") ~= false and _has_with_pic(package) then table.insert(configs, "--with-pic") end @@ -319,7 +319,7 @@ function buildenvs(package, opt) envs.CPP = package:build_getenv("cpp") envs.RANLIB = package:build_getenv("ranlib") end - if package:is_plat("linux", "bsd") and + if not package:is_plat("windows", "mingw") and package:config("pic") ~= false and not _has_with_pic(package) then table.insert(cflags, "-fPIC") table.insert(cxxflags, "-fPIC") |
