2003-11-23 18:29:08 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
usegcc()
|
|
|
|
{
|
|
|
|
cc=gcc
|
|
|
|
cflags=" \
|
|
|
|
-O2 \
|
|
|
|
-c \
|
|
|
|
-ggdb \
|
|
|
|
-Wall \
|
|
|
|
-Wno-parentheses \
|
|
|
|
-Wno-missing-braces \
|
|
|
|
-Wno-switch \
|
|
|
|
"
|
|
|
|
}
|
|
|
|
|
2003-11-23 19:49:17 +00:00
|
|
|
tag="`uname`-`uname -m`-${CC9:-cc}"
|
2003-11-23 18:29:08 +00:00
|
|
|
case "$tag" in
|
|
|
|
*BSD*) usegcc ;;
|
|
|
|
*Darwin*) usegcc ;;
|
|
|
|
*HP-UX*) cc=cc; cflags="-g -O -c -Ae" ;;
|
|
|
|
*Linux*) usegcc ;;
|
|
|
|
*OSF1*) cc=cc; cflags="-g -O -c" ;;
|
|
|
|
*SunOS*-cc) cc=cc; cflags="-g -O -c -xCC -D__sun__" ;;
|
|
|
|
*SunOS*-gcc) usegcc ;;
|
|
|
|
*)
|
|
|
|
echo 9c does not know how to compile on "$tag" 1>&2
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
2003-11-25 02:11:11 +00:00
|
|
|
exec $cc -I$PLAN9/include $cflags "$@"
|