shithub: mc

Download patch

ref: 4db2895318842a451a5036652ea9373667a603b1
parent: 1f2656eeadb7b3230f92fbdfe1f31eebc5f81a71
author: Carlin Bingham <[email protected]>
date: Tue Jan 16 20:24:19 EST 2018

Make mbld use dynamic linker flags from configure

--- a/mbld/deps.myr
+++ b/mbld/deps.myr
@@ -455,18 +455,21 @@
 		std.slpush(&n.cmd, std.sldup(o))
 	;;
 
-	dynlink = 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") && (dynlink || mt.isdyn)
-		std.slpush(&n.cmd, std.sldup("-dynamic-linker"))
-		std.slpush(&n.cmd, std.sldup("/lib64/ld-linux-x86-64.so.2"))
 	;;
 
 }