mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
34 lines
527 B
Text
34 lines
527 B
Text
|
#!/bin/sh
|
||
|
|
||
|
usegcc()
|
||
|
{
|
||
|
cc=gcc
|
||
|
cflags=" \
|
||
|
-O2 \
|
||
|
-I$PLAN9/include \
|
||
|
-c \
|
||
|
-ggdb \
|
||
|
-Wall \
|
||
|
-Wno-parentheses \
|
||
|
-Wno-missing-braces \
|
||
|
-Wno-switch \
|
||
|
"
|
||
|
}
|
||
|
|
||
|
cc=none
|
||
|
tag="`uname`-`uname -m`-${CC:-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 $cflags "$@"
|