summaryrefslogtreecommitdiff
path: root/xmake/scripts/tools/gcc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/tools/gcc.lua')
-rw-r--r--xmake/scripts/tools/gcc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/scripts/tools/gcc.lua b/xmake/scripts/tools/gcc.lua
index d02384494..164dfae12 100644
--- a/xmake/scripts/tools/gcc.lua
+++ b/xmake/scripts/tools/gcc.lua
@@ -71,9 +71,9 @@ function gcc.init(self, name)
-- init shflags
if name:find("clang") then
- self.shflags = { "-dynamiclib" }
+ self.shflags = { "-dynamiclib", "-fPIC" }
else
- self.shflags = { "-shared -Wl,-soname" }
+ self.shflags = { "-shared -Wl,-soname", "-fPIC" }
end
-- suppress warning for the clang