blob: 2db7be540115d14ad7590986ba16950a20d66a59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
ld=none
extralibs=-lm
tag="`uname`-`uname -m`-${CC:-cc}"
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 ;;
*)
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
|