summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2020-07-05 10:38:35 +0800
committerruki <[email protected]>2020-07-05 10:38:35 +0800
commitc0842437b9cb2116284818d56a52e1a60bc68663 (patch)
tree99606b7bac7d846dc18a9561f0c5a2bd21a1563f /xmake/modules
parentc14bfc6fa4e30b2a2af6cb7500bd7b7c16896472 (diff)
add fortran shared library tests
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/core/tools/gfortran.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gfortran.lua b/xmake/modules/core/tools/gfortran.lua
index 16a6dfdb6..aab8848ac 100644
--- a/xmake/modules/core/tools/gfortran.lua
+++ b/xmake/modules/core/tools/gfortran.lua
@@ -20,3 +20,19 @@
-- inherit gcc
inherit("gcc")
+
+-- init it
+function init(self)
+
+ -- init super
+ _super.init(self)
+
+ -- init shflags
+ self:set("fcshflags", "-shared")
+
+ -- add -fPIC for shared
+ if not is_plat("windows", "mingw") then
+ self:add("fcshflags", "-fPIC")
+ self:add("shared.fcflags", "-fPIC")
+ end
+end