diff options
Diffstat (limited to 'bin/9l')
-rwxr-xr-x | bin/9l | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -186,7 +186,7 @@ case "$tag" in ld="${CC9:-cc} -g" extralibs="$extralibs -lrt -lpthread -lsocket -lnsl" # Record paths to shared libraries to avoid needing LD_LIBRARY_PATH - for i in "$@" + for i in "$libsl $@" do case "$i" in -L*) @@ -201,6 +201,20 @@ case "$tag" in exit 1 esac +case "$ld" in +gcc) + for i in "$libsl $@" + do + case "$i" in + -L*) + s=`echo $i | sed 's/-L/-Wl,-rpath,/'` + extralibs="$extralibs $s" + ;; + esac + done + ;; +esac + if $verbose then echo $ld -L$PLAN9/lib "$@" $libsl $extralibs |