From eec1d907ee7f667b924d72231c7fc8fec4b6e439 Mon Sep 17 00:00:00 2001 From: KkemChen Date: Wed, 18 Sep 2024 19:48:18 +0800 Subject: [PATCH] update gcc.lua --- xmake/modules/core/tools/gcc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 9f31c11bed..668e279ee2 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -368,7 +368,7 @@ function nf_linkgroup(self, linkgroup, opt) table.insert(prefix_flags, "-Wl,-Bstatic") table.insert(suffix_flags, 1, "-Wl,-Bdynamic") end - if as_needed then + if not as_needed then -- https://github.com/xmake-io/xmake/issues/5621 table.insert(prefix_flags, "-Wl,--no-as-needed") table.insert(suffix_flags, 1, "-Wl,--as-needed")