summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/c.tcl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/c.tcl b/lib/c.tcl
index abc696b9..9ca925b8 100644
--- a/lib/c.tcl
+++ b/lib/c.tcl
@@ -529,11 +529,12 @@ namespace eval c {
}
proc loadlibLd {libname} {
set candidates [split [exec /usr/sbin/ldconfig -p | grep $libname] "\n"]
+ if {[llength $candidates] > 1} {
+ # Is it greater than 1? if so, filter by arch
+ set candidates [lsearch -all -inline $candidates *x86-64*]
+ }
if {[llength $candidates] == 0} {
error "c loadlibLd: Could not find library $libname"
- } elseif {[llength $candidates] > 1} {
- # Is it greater than 1? if so, filter by arch
- set candidates [lsearch -all -inline $candidates *$::tcl_platform(machine)*]
}
loadlib [lindex $candidates 0 end]
}