From 3950ffe2a485479f6561c27364d3d7df5a21d124 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sun, 24 Jun 2012 22:28:35 +0000 Subject: Imported Upstream version 93u+ --- src/cmd/INIT/cc.ibm.risc | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 src/cmd/INIT/cc.ibm.risc (limited to 'src/cmd/INIT/cc.ibm.risc') diff --git a/src/cmd/INIT/cc.ibm.risc b/src/cmd/INIT/cc.ibm.risc new file mode 100755 index 0000000..17a8f70 --- /dev/null +++ b/src/cmd/INIT/cc.ibm.risc @@ -0,0 +1,63 @@ +: cc wrapper for aix risc xlc : 2009-09-28 : + +hosttype=ibm.risc + +case $HOSTTYPE in +$hosttype-64) + case " $* " in + *" -q64 "*) ;; + *) set -- -q64 "$@" ;; + esac + ;; +*) case " $* " in + *" -q64 "*) HOSTTYPE=$hosttype-64 ;; + *) HOSTTYPE=$hosttype ;; + esac + ;; +esac + +case " $* " in +*" -dumpmachine "*) + echo $HOSTTYPE + exit + ;; +esac + +bin=/usr/vac/bin +cc=$bin/xlc + +ccflags="-brtl -qhalt=e -qsuppress=1506-224:1506-507" +case " $@ " in +*" -G "*) + ccflags="$ccflags -berok" + ;; +esac +if test -x $bin/c99 +then # the xlc optimizer vintage that supports c99 is flawed and causes the ast build to fail # + case " $* " in + *" -O "*) + set '' "$@" '' + shift + while : + do a=$1 + shift + case $a in + '') break ;; + -O) ;; + *) set '' "$@" $a ;; + esac + shift + done + ;; + esac + $cc $ccflags "$@" + code=$? +else export PATH=/bin:$PATH LIBPATH=/usr/lib:/lib + ccflags="$ccflags -blibpath:$LIBPATH" +fi +$cc $ccflags "$@" +code=$? +case $code in +127|255) code=1 ;; +esac +exit $code -- cgit v1.2.3