From: Jarkko Hietaniemi Date: Wed, 22 May 2002 16:20:38 +0000 (+0000) Subject: UNICOS: using uname -m is wrong since what matters X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fdf4829643c900179386b7b25f562008c3612a69;p=p5sagit%2Fp5-mst-13.2.git UNICOS: using uname -m is wrong since what matters is what CPUs (FPUs) we have. p4raw-id: //depot/perl@16736 --- diff --git a/hints/unicos.sh b/hints/unicos.sh index 8648dce..bff3b22 100644 --- a/hints/unicos.sh +++ b/hints/unicos.sh @@ -9,11 +9,15 @@ esac # The default is to die in runtime on math overflows. # Let's not do that. --jhi ccflags="$ccflags -h matherror=errno" -# Give int((2/3)*3) a chance to be 2, not 1. --jhi -case "`uname -m`" in -"CRAY TS") ;; # -h rounddiv not available here -*) ccflags="$ccflags -h rounddiv" ;; + +# Cray floating point (cfp) CPUs need -h rounddiv +# (It gives int((2/3)*3) a chance to be 2, not 1. --jhi) +# (but IEEE CPUs, IEEE/ieee/CPE1 CPUs should not have -h rounddiv, +# since the compiler on those CPUs doesn't even support the option.) +case "`/etc/cpu -i|grep cfp`" in +*"cfp") ccflags="$ccflags -h rounddiv" ;; esac + # Avoid an optimizer bug where a volatile variables # isn't correctly saved and restored --Mark P. Lutz pp_ctl_cflags='ccflags="$ccflags -h scalar0 -h vector0"'