diff options
Diffstat (limited to 'bin/9c')
-rwxr-xr-x | bin/9c | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -0,0 +1,33 @@ +#!/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 "$@" |