From: Nicholas Clark Date: Wed, 16 Jun 2004 09:05:57 +0000 (+0000) Subject: Improve the substitution to cc_r for threading so that compilers X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e50adc28ddeb582e1860e49e66ba3adfef175d6;p=p5sagit%2Fp5-mst-13.2.git Improve the substitution to cc_r for threading so that compilers specified with a full path or as a parameter to ccache are changed p4raw-id: //depot/perl@22939 --- diff --git a/hints/aix.sh b/hints/aix.sh index 29f2bdc..e496604 100644 --- a/hints/aix.sh +++ b/hints/aix.sh @@ -231,17 +231,26 @@ case "$usethreads" in *gcc*) ccflags="-D_THREAD_SAFE $ccflags" ;; cc_r) ;; - cc|xl[cC]|xl[cC]_r) + '') cc=cc_r ;; + + *) + + + # No | alternation in aix sed. :-( + newcc=`echo $cc | sed -e 's/cc$/cc_r/' -e 's/xl[cC]$/cc_r/' -e 's/xl[cC]_r$/cc_r/'` + case "$newcc" in + $cc) # No change + ;; + + *cc_r) echo >&4 "Switching cc to cc_r because of POSIX threads." # xlc_r has been known to produce buggy code in AIX 4.3.2. # (e.g. pragma/overload core dumps) Let's suspect xlC_r, too. # --jhi@iki.fi - cc=cc_r + cc="$newcc" ;; - '') cc=cc_r ;; - - *) + *) cat >&4 <