summaryrefslogtreecommitdiff
path: root/mbld/deps.myr
diff options
context:
space:
mode:
Diffstat (limited to 'mbld/deps.myr')
-rw-r--r--mbld/deps.myr13
1 files changed, 9 insertions, 4 deletions
diff --git a/mbld/deps.myr b/mbld/deps.myr
index ab90890..cae46b1 100644
--- a/mbld/deps.myr
+++ b/mbld/deps.myr
@@ -427,6 +427,8 @@ const arcmd = {b, n, mt, ar
}
const linkcmd = {b, n, mt, bin, libs, dynlibs, istest
+ var dynlink
+
for c : config.Linkcmd
std.slpush(&n.cmd, std.sldup(c))
;;
@@ -451,18 +453,21 @@ const linkcmd = {b, n, mt, bin, libs, dynlibs, istest
std.slpush(&n.cmd, std.sldup(o))
;;
- addlibs(b, &n.cmd, libs, mt.incpath)
+ dynlink = addlibs(b, &n.cmd, libs, mt.incpath) || mt.isdyn
for l : dynlibs
std.slpush(&n.cmd, std.fmt("-l{}", l))
;;
+ if dynlink
+ for f : config.Dlflags
+ std.slpush(&n.cmd, std.sldup(f))
+ ;;
+ ;;
+
/* OSX warns if we don't add a version */
if std.sleq(opt_sys, "osx")
std.slpush(&n.cmd, std.sldup("-macosx_version_min"))
std.slpush(&n.cmd, std.sldup("10.6"))
- elif std.sleq(opt_sys, "linux") && mt.isdyn
- std.slpush(&n.cmd, std.sldup("-dynamic-linker"))
- std.slpush(&n.cmd, std.sldup("/lib64/ld-linux-x86-64.so.2"))
;;
}