Skip to content

Commit

Permalink
Merge pull request #5007 from SirLynix/patch-14
Browse files Browse the repository at this point in the history
Fix autoconfs not handling shflags and arflags
  • Loading branch information
waruqi authored Apr 24, 2024
2 parents dd1abe3 + c628db6 commit c1037f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xmake/modules/package/tools/autoconf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,13 @@ function buildenvs(package, opt)
cxxflags = table.join(table.wrap(package:config("cxflags")), package:config("cxxflags"))
asflags = table.copy(table.wrap(package:config("asflags")))
ldflags = table.copy(table.wrap(package:config("ldflags")))
shflags = table.copy(table.wrap(package:config("shflags")))
if package:is_plat("linux") and package:is_arch("i386") then
table.insert(cflags, "-m32")
table.insert(cxxflags, "-m32")
table.insert(asflags, "-m32")
table.insert(ldflags, "-m32")
table.insert(shflags, "-m32")
end
table.join2(cflags, opt.cflags)
table.join2(cflags, opt.cxflags)
Expand All @@ -239,10 +241,12 @@ function buildenvs(package, opt)
table.join2(cppflags, opt.cppflags) -- @see https://github.com/xmake-io/xmake/issues/1688
table.join2(asflags, opt.asflags)
table.join2(ldflags, opt.ldflags)
table.join2(shflags, opt.shflags)
table.join2(cflags, _get_cflags_from_packagedeps(package, opt))
table.join2(cxxflags, _get_cflags_from_packagedeps(package, opt))
table.join2(cppflags, _get_cflags_from_packagedeps(package, opt))
table.join2(ldflags, _get_ldflags_from_packagedeps(package, opt))
table.join2(shflags, _get_ldflags_from_packagedeps(package, opt))
else
cross = true
cppflags = {}
Expand Down Expand Up @@ -318,6 +322,7 @@ function buildenvs(package, opt)
table.join2(cflags, package:_generate_sanitizer_configs("address", "cc").cflags)
table.join2(cxxflags, package:_generate_sanitizer_configs("address", "cxx").cxxflags)
table.join2(ldflags, package:_generate_sanitizer_configs("address").ldflags)
table.join2(shflags, package:_generate_sanitizer_configs("address").shflags)
end
if cflags then
envs.CFLAGS = table.concat(_translate_paths(cflags), ' ')
Expand Down

0 comments on commit c1037f5

Please sign in to comment.