mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
115d4c0afc
Be less verbose when allocating uprocs. Don't drop core dump turds all over the place when x11 goes away.
59 lines
1.1 KiB
Bash
Executable file
59 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
usegcc()
|
|
{
|
|
cc=gcc
|
|
ngflags=" \
|
|
-O2 \
|
|
-c \
|
|
-Wall \
|
|
-Wno-parentheses \
|
|
-Wno-missing-braces \
|
|
-Wno-switch \
|
|
-Wno-comment \
|
|
-Wno-sign-compare \
|
|
-Wno-unknown-pragmas \
|
|
-fno-omit-frame-pointer \
|
|
"
|
|
# want to put -fno-optimize-sibling-calls here but
|
|
# that option only works with gcc3+ it seems
|
|
cflags="$ngflags -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__"
|
|
u=`uname`
|
|
v=`uname -r`
|
|
s=`echo $u$v | tr '. ' '__'`
|
|
cflags="$cflags -D__$s__"
|
|
;;
|
|
*SunOS*-gcc) usegcc
|
|
u=`uname`
|
|
v=`uname -r`
|
|
s=`echo $u$v | tr '. ' '__'`
|
|
cflags="$ngflags -g"
|
|
cflags="$cflags -D__$s__"
|
|
;;
|
|
*)
|
|
echo 9c does not know how to compile on "$tag" 1>&2
|
|
exit 1
|
|
esac
|
|
|
|
case "$tag" in
|
|
*SunOS*-cc)
|
|
exec $cc -I$PLAN9/include $cflags "$@" 2>&1 |
|
|
/bin/sed 's/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' 1>&2
|
|
;;
|
|
*)
|
|
exec $cc -I$PLAN9/include $cflags "$@"
|
|
;;
|
|
esac
|
|
|