aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-07 18:06:47 +0000
committerrsc <devnull@localhost>2005-01-07 18:06:47 +0000
commit7d0dbb314f77b79bb729162a59a6ea3d93807eb9 (patch)
tree421a7744b8bf4acedd1fb33162d336c82760592e /bin
parent21621d7e20e557591384a15496f530e491932c0d (diff)
downloadplan9port-7d0dbb314f77b79bb729162a59a6ea3d93807eb9.tar.gz
plan9port-7d0dbb314f77b79bb729162a59a6ea3d93807eb9.tar.bz2
plan9port-7d0dbb314f77b79bb729162a59a6ea3d93807eb9.zip
freebsd5
Diffstat (limited to 'bin')
-rwxr-xr-xbin/9l63
1 files changed, 39 insertions, 24 deletions
diff --git a/bin/9l b/bin/9l
index 52fed0e9..1c5f1cdf 100755
--- a/bin/9l
+++ b/bin/9l
@@ -136,34 +136,49 @@ fi
extralibs="-lm"
tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}"
case "$tag" in
-*OpenBSD*) ld=gcc
- extralibs="$extralibs -lutil -lpthread"
+*OpenBSD*)
+ ld=gcc
+ extralibs="$extralibs -lutil -lpthread"
+ ;;
+*FreeBSD*)
+ ld=gcc
+ extralibs="$extralibs -lutil"
+ case "`uname -r`" in
+ [5-9].*)
+ extralibs="$extralibs -lpthread"
;;
-*BSD*) ld=gcc
- extralibs="$extralibs -lutil"
+ esac
+ ;;
+*BSD*)
+ ld=gcc
+ extralibs="$extralibs -lutil"
+ ;;
+*Linux*)
+ ld=gcc
+ extralibs="$extralibs -lutil"
+ case "`uname -r`" in
+ 2.6.*)
+ extralibs="$extralibs -lpthread"
;;
-*Linux*) ld=gcc
- extralibs="$extralibs -lutil"
- case "`uname -r`" in
- 2.6.*)
- extralibs="$extralibs -lpthread"
+ esac
+ ;;
+*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
- ;;
-*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
- ;;
+ done
+ ;;
*)
echo do not know how to link on "$tag" 1>&2
exit 1