blob: beba6064e5de103e04311a19c7ff8b633d49944e [file] [log] [blame]
#!/bin/sh
usegcc()
{
cc=gcc
ngflags=" \
-O2 \
-c \
-Wall \
-Wno-parentheses \
-Wno-missing-braces \
-Wno-switch \
-Wno-comment \
-Wno-sign-compare \
"
cflags="$cflags -ggdb"
}
tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}-${CC9:-cc}"
case "$tag" in
*BSD*) usegcc ;;
*Darwin*) usegcc
cflags="$ngflags -g3 -no-cpp-precomp" ;;
*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
exec $cc -I$PLAN9/include $cflags "$@"