From: H.Merijn Brand Date: Thu, 16 May 2002 16:42:34 +0000 (+0200) Subject: Re: [ PATCH ] AIX 4.3 / gcc / threads X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a4349beab060ae6e975b158829344a74589cf57b;p=p5sagit%2Fp5-mst-13.2.git Re: [ PATCH ] AIX 4.3 / gcc / threads From: "H.Merijn Brand" Message-Id: <20020516164139.666A.H.M.BRAND@hccnet.nl> gcc 3 version parsing proofing. p4raw-id: //depot/perl@16629 --- diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index 7706141..7c3569f 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -69,12 +69,15 @@ esac # reset _DEC_cc_style= case "$isgcc" in -gcc) _gcc_version=`$cc --version 2>&1 | tr . ' '` - set $_gcc_version +gcc) if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version | sed 's/.*(GCC) *//'` + fi + set $gcc_version if test "$1" -lt 2 -o \( "$1" -eq 2 -a \( "$2" -lt 95 -o \( "$2" -eq 95 -a "$3" -lt 2 \) \) \); then cat >&4 <&1`"" in ccflags="$cc_cppflags" if [ "X$gccversion" = "X" ]; then # Done too late in Configure if hinted - gccversion=`$cc --version | sed 's/.*(GCC) *//` + gccversion=`$cc --version | sed 's/.*(GCC) *//'` fi case "$gccversion" in [012]*) # HP-UX and gcc-2.* break UINT32_MAX :-( diff --git a/hints/svr5.sh b/hints/svr5.sh index 2ddcbb1..47f7aff 100644 --- a/hints/svr5.sh +++ b/hints/svr5.sh @@ -10,8 +10,11 @@ case "$cc" in *gcc*) # "$gccversion" not set yet - vers=`gcc -v 2>&1 | sed -n -e 's@.*version \([^ ][^ ]*\) .*@\1@p'` - case $vers in + if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version | sed 's/.*(GCC) *//'` + fi + case $gccversion in *2.95*) ccflags='-fno-strict-aliasing' # More optimisation provided in gcc-2.95 causes miniperl to segv. diff --git a/hints/vos.sh b/hints/vos.sh index 9860a6f..62510ee 100644 --- a/hints/vos.sh +++ b/hints/vos.sh @@ -108,9 +108,12 @@ echo "Testing whether bug gnu_g++-220 is fixed in your compiler..." # Try compiling the test case. if $cc -o t001 -O $ccflags $ldflags ../hints/t001.c; then gccbug=`$run ./t001` + if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version | sed 's/.*(GCC) *//'` + fi case "$gccbug" in - *fails*) gccversion=`$cc --version` - cat >&4 <&4 <