mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
18 lines
331 B
Bash
Executable file
18 lines
331 B
Bash
Executable file
#!/bin/sh
|
|
|
|
extralibs=-lm
|
|
tag="`uname`-`uname -m`"
|
|
case "$tag" in
|
|
*FreeBSD*) ld=gcc ;;
|
|
*BSD*) ld=gcc ;;
|
|
*Linux*) ld=gcc ;;
|
|
*Darwin*) ld=gcc ;;
|
|
*SunOS*) ld="${CC9:-cc} -g"
|
|
extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"
|
|
;;
|
|
*)
|
|
echo do not know how to link on "$tag" 1>&2
|
|
exit 1
|
|
esac
|
|
|
|
exec $ld -L$PLAN9/lib "$@" $extralibs
|