diff options
Diffstat (limited to 'lib/make/known-architectures/irix')
-rw-r--r-- | lib/make/known-architectures/irix | 140 |
1 files changed, 79 insertions, 61 deletions
diff --git a/lib/make/known-architectures/irix b/lib/make/known-architectures/irix index 0cd42f70..0b680978 100644 --- a/lib/make/known-architectures/irix +++ b/lib/make/known-architectures/irix @@ -6,33 +6,20 @@ # @desc # # @enddesc -# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/irix,v 1.12 1999-09-14 16:17:38 goodale Exp $ +# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/irix,v 1.13 1999-10-11 13:49:08 goodale Exp $ # @@*/ +if test "$CCTK_CONFIG_STAGE" = "preferred-compilers" ; then + # extract the CPU type from hinv output # (assumes all processors are of equal type :-) -IRIX_CPU="`hinv -t cpu | tail -1 | sed 's/^[^R]*R\([01-9]*\).*$/\1/'`" - - -# Find out which version of the Fortran compilers is installed + IRIX_CPU="`hinv -t cpu | tail -1 | sed 's/^[^R]*R\([01-9]*\).*$/\1/'`" -IRIX_FVERSION="`versions ftn_dev | grep , | tail -1 | sed 's:.*, ::'`" - -IRIX_FMAJ="`echo $IRIX_FVERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\1:'`" -IRIX_FMIN="`echo $IRIX_FVERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\2:'`" - -if test $IRIX_FMAJ -gt 7 -o \( $IRIX_FMAJ -eq 7 -a $IRIX_FMIN -ge 2 \) ; then - IRIX_FLIBS="fortran ftn ftn90" -else - IRIX_FLIBS="ftn ftn90" -fi - - -if test -n "`uname | grep 64`" ; then - IRIX_BITS=64 -else - IRIX_BITS=32 -fi + if test -n "`uname | grep 64`" ; then + IRIX_BITS=64 + else + IRIX_BITS=32 + fi #case "$IRIX_BITS:$CC" in # 64:gcc) @@ -43,74 +30,105 @@ fi # ;; #esac -if test "$CC" = "gcc" ; then - echo "There seem to be some problems with the GNU compiler under irix, switching to cc" - echo "If you don't like this, you can edit your make.config.defn file." - CC=cc - CXX=CC - LD=CC -fi +# if test "$CC" = "gcc" ; then +# echo "There seem to be some problems with the GNU compiler under irix, switching to cc" +# echo "If you don't like this, you can edit your make.config.defn file." +# CC=cc +# CXX=CC +# LD=CC +# fi + + if test -z "$CC"; then + echo Setting C compiler to cc + CC="cc" + fi + if test -z "$CXX"; then + echo Setting C++ compiler to CC + CXX="CC" + fi + if test -z "$LD"; then + echo Setting linker to CC + LD="CC" + fi -case "$IRIX_BITS:$CC" in + + +else + + case "$IRIX_BITS:$CC" in 64:cc) - CFLAGS="$CFLAGS -O3 -64 -mips4 -r10000" - CXXFLAGS="$CXXFLAGS -O3 -64 -mips4 -r10000" - ;; + CFLAGS="$CFLAGS -O3 -64 -mips4 -r10000" + CXXFLAGS="$CXXFLAGS -O3 -64 -mips4 -r10000" + ;; 32:cc) - CFLAGS="$CFLAGS -O3 -n32 -mips3" - CXXFLAGS="$CXXFLAGS -O3 -n32 -mips3" - ;; + CFLAGS="$CFLAGS -O3 -n32 -mips3" + CXXFLAGS="$CXXFLAGS -O3 -n32 -mips3" + ;; *) - ;; -esac + ;; + esac -case "$IRIX_BITS" in + case "$IRIX_BITS" in 64) - F90FLAGS="$F90FLAGS -O3 \ + F90FLAGS="$F90FLAGS -O3 \ -OPT:roundoff=3:IEEE_arithmetic=3:const_copy_limit=100000 \ -r10000 -TARG:proc=r10000 \ -64 -mips4" - F77FLAGS="$F90FLAGS" - ;; + F77FLAGS="$F90FLAGS" + ;; 32) - F90FLAGS="-O3 \ + F90FLAGS="-O3 \ -OPT:roundoff=3:IEEE_arithmetic=3:fold_arith_limit=10000:const_copy_limit=100000 \ -n32 -mips3" - F77FLAGS="$F90FLAGS" - ;; + F77FLAGS="$F90FLAGS" + ;; *) - ;; + ;; esac case "$IRIX_BITS:$LD" in 64:CC) - LDFLAGS="$LDFLAGS -64 -Wl,\"-woff 84\",\"-woff 85\"" - ;; + LDFLAGS="$LDFLAGS -64 -Wl,\"-woff 84\",\"-woff 85\"" + ;; 32:CC) - LDFLAGS="$LDFLAGS -n32 -Wl,\"-woff 84\",\"-woff 85\"" - ;; + LDFLAGS="$LDFLAGS -n32 -Wl,\"-woff 84\",\"-woff 85\"" + ;; *) - ;; + ;; esac -case $IRIX_BITS in +# Find out which version of the Fortran compilers is installed + + IRIX_FVERSION="`versions ftn_dev | grep , | tail -1 | sed 's:.*, ::'`" + + IRIX_FMAJ="`echo $IRIX_FVERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\1:'`" + IRIX_FMIN="`echo $IRIX_FVERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\2:'`" + + if test $IRIX_FMAJ -gt 7 -o \( $IRIX_FMAJ -eq 7 -a $IRIX_FMIN -ge 2 \) ; then + IRIX_FLIBS="fortran ftn ftn90" + else + IRIX_FLIBS="ftn ftn90" + fi + + case $IRIX_BITS in 64) - LIBS="$LIBS malloc perfex fpe $IRIX_FLIBS m" - ;; + LIBS="$LIBS malloc perfex fpe $IRIX_FLIBS m" + ;; 32) - LIBS="$LIBS malloc fpe $IRIX_FLIBS m" - ;; + LIBS="$LIBS malloc fpe $IRIX_FLIBS m" + ;; *) - ;; -esac + ;; + esac # MPI stuff -if test -n "$MPI" ; then + if test -n "$MPI" ; then if test "$MPI" = "NATIVE" ; then - MPI_LIBS="mpi" + MPI_LIBS="mpi" fi -fi + fi +fi
\ No newline at end of file |