mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
18 lines
355 B
Bash
Executable file
18 lines
355 B
Bash
Executable file
#!/bin/sh
|
|
|
|
extralibs=-lm
|
|
tag="${SYSNAME:-`uname`}-${OBJTYPE:-`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
|