15 -Wno-unknown-pragmas \
16 -fno-omit-frame-pointer \
18 # want to put -fno-optimize-sibling-calls here but
19 # that option only works with gcc3+ it seems
20 cflags="$ngflags -ggdb"
23 tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}-${CC9:-cc}"
27 cflags="$ngflags -g3 -no-cpp-precomp" ;;
28 *HP-UX*) cc=cc; cflags="-g -O -c -Ae" ;;
30 case "${SYSVERSION:-`uname -r`}" in
32 cflags="$cflags -D__Linux26__"
36 *OSF1*) cc=cc; cflags="-g -O -c" ;;
38 cflags="-mt -g -O -c -xCC -D__sun__"
41 s=`echo $u$v | tr '. ' '__'`
42 cflags="$cflags -D__$s__"
47 s=`echo $u$v | tr '. ' '__'`
49 cflags="$cflags -D__$s__"
52 echo 9c does not know how to compile on "$tag" 1>&2
56 # N.B. Must use temp file to avoid pipe; pipe loses status.
57 xtmp=/tmp/9c.$$.$USER.out
58 $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" >$xtmp 2>&1
60 grep -v '__p9l_autolib_' $xtmp |
61 sed 's/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g'
62 rm -f $xtmp $xtmp.status