diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 7ffb355e780..02666beecdc 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -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) @@ -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 = {} @@ -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), ' ')