diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-06-24 22:28:35 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-06-24 22:28:35 +0000 |
commit | 3950ffe2a485479f6561c27364d3d7df5a21d124 (patch) | |
tree | 468c6e14449d1b1e279222ec32f676b0311917d2 /src/cmd/INIT/cc.ibm.risc | |
download | ksh-upstream.tar.gz |
Imported Upstream version 93u+upstream
Diffstat (limited to 'src/cmd/INIT/cc.ibm.risc')
-rwxr-xr-x | src/cmd/INIT/cc.ibm.risc | 63 |
1 files changed, 63 insertions, 0 deletions
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 |