aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-16 20:56:40 +0000
committerrsc <devnull@localhost>2005-01-16 20:56:40 +0000
commit54bcb7e9a2cc125c800c30075895315da9dc7c0a (patch)
treeb8d0ce7a6ea55c1d97b2abaed02c0d939cb75f71 /bin
parenta0d2173ce4c9b9d530352f3890898ad3af19ae06 (diff)
downloadplan9port-54bcb7e9a2cc125c800c30075895315da9dc7c0a.tar.gz
plan9port-54bcb7e9a2cc125c800c30075895315da9dc7c0a.tar.bz2
plan9port-54bcb7e9a2cc125c800c30075895315da9dc7c0a.zip
use -Wl,-rpath for gcc
Diffstat (limited to 'bin')
-rwxr-xr-xbin/9l16
1 files changed, 15 insertions, 1 deletions
diff --git a/bin/9l b/bin/9l
index 62e106e2..cd3d0ac9 100755
--- a/bin/9l
+++ b/bin/9l
@@ -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