diff options
Diffstat (limited to 'hints/hpux.sh')
-rw-r--r-- | hints/hpux.sh | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/hints/hpux.sh b/hints/hpux.sh index 8fe709284f..c74b66a34e 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -136,7 +136,28 @@ case `$cc -v 2>&1`"" in esac ;; *) ccisgcc='' - ccversion=`which cc | xargs what | awk '/Compiler/{print $2}/Itanium/{print $6,$7}'` + # What cannot be use in combination with ccache links :( + cc_found="" + for p in `echo $PATH | tr : ' ''` ; do + x="$p/cc" + if [ -f $x ] && [ -x $x ]; then + if [ -h $x ]; then + l=`ls -l $x | sed 's,.*-> ,,'` + case $l in + /*) x=$l ;; + *) x="$p/$l" ;; + esac + fi + x=`echo $x | sed 's,/\./,/,g'` + case $x in + *ccache*) ;; + *) [ -z "$cc_found" ] && cc_found=$x ;; + esac + fi + done + [ -z "$cc_found" ] && cc_found=`which cc` + what $cc_found >&4 + ccversion=`which $cc_found | xargs what | awk '/Compiler/{print $2}/Itanium/{print $6,$7}'` case "$ccflags" in "-Ae "*) ;; *) ccflags="-Ae $cc_cppflags" |