Index: tool/buildtclext.tcl ================================================================== --- tool/buildtclext.tcl +++ tool/buildtclext.tcl @@ -105,11 +105,11 @@ # #puts "using $LIBDIR/tclConfig.sh" set fd [open $LIBDIR/tclConfig.sh rb] set tclConfig [read $fd] close $fd - + # Extract parameter we will need from the tclConfig.sh file # set TCLMAJOR 8 regexp {TCL_MAJOR_VERSION='(\d)'} $tclConfig all TCLMAJOR set SUFFIX so @@ -138,18 +138,21 @@ regexp {TCL_SHLIB_LD='([^']+)'} $tclConfig all cmd set LDFLAGS "$INC -DUSE_TCL_STUBS" if {[string length $OPTS]>1} { append LDFLAGS $OPTS } - set CMD [subst $cmd] if {$TCLMAJOR>8} { set OUT libtcl9sqlite$VERSION.$SUFFIX } else { set OUT libsqlite$VERSION.$SUFFIX } + set @ $OUT; # Workaround for https://sqlite.org/forum/forumpost/0683a49cb02f31a1 + # in which Gentoo edits their tclConfig.sh to include an soname + # linker flag which includes ${@} (the target file's name). + set CMD [subst $cmd] } - + # Show information about prior installs # if {$infoonly} { set cnt 0 foreach dir $auto_path {