aboutsummaryrefslogtreecommitdiff
path: root/bin/9l
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-25 23:03:22 +0000
committerrsc <devnull@localhost>2004-03-25 23:03:22 +0000
commitcb27443abf3d6af6ab52377c71c843e619928433 (patch)
tree437129c581c3a2fbee75c5e52388b2bcf1cedb5e /bin/9l
parent0023dde3260f4d6b085bed7d90bf8b1ca0daf77b (diff)
downloadplan9port-cb27443abf3d6af6ab52377c71c843e619928433.tar.gz
plan9port-cb27443abf3d6af6ab52377c71c843e619928433.tar.bz2
plan9port-cb27443abf3d6af6ab52377c71c843e619928433.zip
Today's changes.
Diffstat (limited to 'bin/9l')
-rwxr-xr-xbin/9l14
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/9l b/bin/9l
index e510e4d6..a7924e74 100755
--- a/bin/9l
+++ b/bin/9l
@@ -3,12 +3,24 @@
extralibs=-lm
tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}"
case "$tag" in
-*FreeBSD*) ld=gcc ;;
+*OpenBSD*) ld=gcc
+ extralibs="$extralibs -lpthread"
+ ;;
*BSD*) ld=gcc ;;
*Linux*) ld=gcc ;;
*Darwin*) ld=gcc ;;
*SunOS*) ld="${CC9:-cc} -g"
extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"
+ # Record paths to shared libraries to avoid needing LD_LIBRARY_PATH
+ for i in "$@"
+ do
+ case "$i" in
+ -L*)
+ s=`echo $i | sed 's/-L/-R/'`
+ extralibs="$extralibs $s"
+ ;;
+ esac
+ done
;;
*)
echo do not know how to link on "$tag" 1>&2