plan9port/bin/9c
2003-11-25 02:36:46 +00:00

32 lines
539 B
Bash
Executable file

#!/bin/sh
usegcc()
{
cc=gcc
cflags=" \
-O2 \
-c \
-ggdb \
-Wall \
-Wno-parentheses \
-Wno-missing-braces \
-Wno-switch \
-Wno-sign-compare \
"
}
tag="`uname`-`uname -m`-${CC9:-cc}"
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
exec $cc -I$PLAN9/include $cflags "$@"