aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/9c5
-rwxr-xr-xbin/9l18
2 files changed, 7 insertions, 16 deletions
diff --git a/bin/9c b/bin/9c
index dc9cc3d8..9104a08c 100755
--- a/bin/9c
+++ b/bin/9c
@@ -15,8 +15,7 @@ usegcc()
"
}
-cc=none
-tag="`uname`-`uname -m`-${CC:-cc}"
+tag="`uname`-`uname -m`-${CC9:-cc}"
case "$tag" in
*BSD*) usegcc ;;
*Darwin*) usegcc ;;
@@ -30,4 +29,4 @@ case "$tag" in
exit 1
esac
-exec cc $cflags "$@"
+exec $cc $cflags "$@"
diff --git a/bin/9l b/bin/9l
index 2db7be54..adc66038 100755
--- a/bin/9l
+++ b/bin/9l
@@ -1,26 +1,18 @@
#!/bin/sh
-ld=none
extralibs=-lm
-tag="`uname`-`uname -m`-${CC:-cc}"
+tag="`uname`-`uname -m`"
case "$tag" in
*FreeBSD*) ld=gcc ;;
*BSD*) ld=gcc ;;
*Linux*) ld=gcc ;;
*Darwin*) ld=gcc ;;
-*SunOS*-cc) ld=cc; extralibs="$extralibs -lrt -lpthread" ;;
-*SunOS*-gcc) ld=gcc ;;
+*SunOS*) ld=${CC9:-cc}
+ extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"
+ ;;
*)
echo do not know how to link on "$tag" 1>&2
exit 1
esac
-case $ld in
-gcc)
- exec gcc \
- -ggdb \
- -L$PLAN9/lib \
- "$@" \
- $extralibs
- ;;
-esac
+exec $ld -L$PLAN9/lib "$@" $extralibs