diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2002-05-16 18:42:34 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-16 13:44:03 +0000 |
commit | a4349beab060ae6e975b158829344a74589cf57b (patch) | |
tree | 575ef8358f74498962e05e47769bc6c54ed1cca5 /hints | |
parent | fefd7080dbb7bc74916ad5ba8b63e3bdeeb86c38 (diff) | |
download | perl-a4349beab060ae6e975b158829344a74589cf57b.tar.gz |
Re: [ PATCH ] AIX 4.3 / gcc / threads
From: "H.Merijn Brand" <h.m.brand@hccnet.nl>
Message-Id: <20020516164139.666A.H.M.BRAND@hccnet.nl>
gcc 3 version parsing proofing.
p4raw-id: //depot/perl@16629
Diffstat (limited to 'hints')
-rw-r--r-- | hints/dec_osf.sh | 9 | ||||
-rw-r--r-- | hints/hpux.sh | 2 | ||||
-rw-r--r-- | hints/svr5.sh | 7 | ||||
-rw-r--r-- | hints/vos.sh | 7 |
4 files changed, 17 insertions, 8 deletions
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index 7706141ff2..7c3569f70c 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 <<EOF -*** Your cc seems to be gcc and its version ($_gcc_version) seems to be +*** Your cc seems to be gcc and its version ($gcc_version) seems to be *** less than 2.95.2. This is not a good idea since old versions of gcc *** are known to produce buggy code when compiling Perl (and no doubt for *** other programs, too). diff --git a/hints/hpux.sh b/hints/hpux.sh index a76c680c3b..c08cdf9e77 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -76,7 +76,7 @@ case `$cc -v 2>&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 2ddcbb10ba..47f7aff2c1 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 9860a6faac..62510ee0d1 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 <<EOF + *fails*) cat >&4 <<EOF This C compiler ($gccversion) is known to have optimizer problems when compiling pp_pack.c. The Stratus bug number for this problem is gnu_g++-220. |