diff options
author | Paul Green <Paul.Green@stratus.com> | 2002-04-22 16:35:00 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-23 01:05:37 +0000 |
commit | c50b6f56db28b9899ebe08201288c8d0707ffb6d (patch) | |
tree | 57db306374e35a20a4ed07d0fe82dbfa840d6cba /hints/vos.sh | |
parent | 74f68c8da607d6749d83c3b19f78b04cebfb1a6a (diff) | |
download | perl-c50b6f56db28b9899ebe08201288c8d0707ffb6d.tar.gz |
(Updated) Work around bug in gcc 2.95.2 on hppa targets
Message-Id: <200204230034.UAA01134@mailhub2.stratus.com>
p4raw-id: //depot/perl@16092
Diffstat (limited to 'hints/vos.sh')
-rw-r--r-- | hints/vos.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/hints/vos.sh b/hints/vos.sh index 06dc5552e5..9860a6faac 100644 --- a/hints/vos.sh +++ b/hints/vos.sh @@ -90,3 +90,53 @@ hostcat="cat /system/stcp/hosts" # VOS does not have socketpair() but we supply one in vos.c d_sockpair="define" + +# Once we have the compiler flags defined, Configure will +# execute the following call-back script. See hints/README.hints +# for details. +cat > UU/cc.cbu <<'EOCBU' +# This script UU/cc.cbu will get 'called-back' by Configure after it +# has prompted the user for the C compiler to use. + +# Compile and run the a test case to see if bug gnu_g++-220 is +# present. If so, lower the optimization level when compiling +# pp_pack.c. This works around a bug in unpack. + +echo " " +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` + case "$gccbug" in + *fails*) gccversion=`$cc --version` + 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. + +Disabling optimization for pp_pack.c. +EOF + case "$pp_pack_cflags" in + '') pp_pack_cflags='optimize=' + echo "pp_pack_cflags='optimize=\"\"'" >> config.sh ;; + *) echo "You specified pp_pack_cflags yourself, so we'll go with your value." >&4 ;; + esac + ;; + *) echo "Your compiler is ok." >&4 + ;; + esac +else + echo " " + echo "*** WHOA THERE!!! ***" >&4 + echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4 + case "$knowitall" in + '') + echo " You'd better start hunting for one and let me know about it." >&4 + exit 1 + ;; + esac +fi + +$rm -f t001$_o t001$_exe t001.kp +EOCBU |