From eff75a2ecc134c54cb6524f09144acaa2b3624aa Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Thu, 11 Sep 2014 11:50:51 +1000 Subject: [PATCH] Don't link module LIBS to jimsh/libjim Some libraries are only required for specific dynamic modules, so don't include them when linking jimsh or libjim.so Reported-by: Stuart Cassoff Signed-off-by: Steve Bennett --- autosetup/local.tcl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autosetup/local.tcl b/autosetup/local.tcl index 36aff868..a5da8b03 100644 --- a/autosetup/local.tcl +++ b/autosetup/local.tcl @@ -55,6 +55,9 @@ proc check-extension-status {ext required} { array set depinfo {m 0 y 0 n 0} + # Stash the current value of LIBS + set LIBS [get-define LIBS] + # Check direct dependencies if [ext-get $ext check 1] { # "check" conditions are met @@ -63,6 +66,12 @@ proc check-extension-status {ext required} { incr depinfo(n) } + if {$ext in $withinfo(mod)} { + # This is a module, so ignore LIBS + # LDLIBS_$ext will contain the appropriate libs for this module + define LIBS $LIBS + } + if {$depinfo(n) == 0} { # Now extension dependencies foreach i [ext-get $ext dep] {