summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-05-08 12:17:05 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2002-05-08 12:17:05 +0000
commitcf373cc1efe78d6f966acb17d15ddeefc486e290 (patch)
tree9385eac08aeca56185f03982195092278d07f84c /lib
parent3099a03f051a80d4730f8112303613a586583fb5 (diff)
Use the C/C++ compiler instead of /lib/cpp to generate the dependencies for
fortran files. The system's preprocessor had problems with expansions of macros which became very long. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2799 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/make/known-architectures/irix200
1 files changed, 66 insertions, 134 deletions
diff --git a/lib/make/known-architectures/irix b/lib/make/known-architectures/irix
index 5398ebf5..3fce7a06 100644
--- a/lib/make/known-architectures/irix
+++ b/lib/make/known-architectures/irix
@@ -3,16 +3,16 @@
# @file irix
# @date Thu Feb 25 12:20:53 1999
# @author Tom Goodale
-# @desc
-#
-# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/irix,v 1.29 2002-01-05 19:16:38 allen Exp $
+# @desc
+# Known architectures file for SGI Irix systems
+# @enddesc
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/known-architectures/irix,v 1.30 2002-05-08 12:17:05 tradke Exp $
# @@*/
-if test "$CCTK_CONFIG_STAGE" = "preferred-compilers" ; then
+if test "$CCTK_CONFIG_STAGE" = 'preferred-compilers' ; then
-# extract the CPU type from hinv output
-# (assumes all processors are of equal type :-)
+ # 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/'`"
if test -z "$IRIX_BITS" ; then
@@ -23,174 +23,107 @@ if test "$CCTK_CONFIG_STAGE" = "preferred-compilers" ; then
fi
fi
-#case "$IRIX_BITS:$CC" in
-# 64:gcc)
-# echo gcc can\'t compile 64 bit, changing to cc
-# CC=cc
-# CXX=CC
-# LD=CC
-# ;;
-#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
-
+ # use the native SGI compilers by default
if test -z "$CC"; then
echo Setting C compiler to cc
- CC="cc"
+ CC='cc'
fi
if test -z "$CXX"; then
echo Setting C++ compiler to CC
- CXX="CC"
+ CXX='CC'
fi
if test -z "$LD"; then
echo Setting linker to CC
- LD="CC"
+ LD='CC'
fi
-
else
-# Find out which version of the C++ compilers is installed
-
+ # Find out which version of the C++ compiler is installed
IRIX_CVERSION="`versions c++_dev | grep , | tail -1 | sed 's:.*, ::'`"
IRIX_CMAJ="`echo $IRIX_CVERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\1:'`"
IRIX_CMIN="`echo $IRIX_CVERSION | sed 's:\([^. ]*\)\.\([^. ]*\).*:\2:'`"
if test $IRIX_CMAJ -gt 7 -o \( $IRIX_CMAJ -eq 7 -a $IRIX_CMIN -gt 2 \) ; then
- IRIX_CCOMP="new"
+ IRIX_CCOMP='new'
else
- IRIX_CCOMP="old"
+ IRIX_CCOMP='old'
fi
- case $IRIX_BITS in
- 64)
- : ${LIBS="$LIBS malloc perfex fpe $IRIX_FLIBS m"}
- ;;
- 32)
- : ${LIBS="$LIBS malloc fpe $IRIX_FLIBS m"}
- ;;
- *)
- ;;
- esac
-
-
case "$IRIX_CPU" in
4???)
- IRIX_FLAGS="-mips3" ;;
+ IRIX_FLAGS='-mips3' ;;
8???)
- IRIX_FLAGS="-mips3" ;;
+ IRIX_FLAGS='-mips3' ;;
10???)
- IRIX_FLAGS="-mips4 -r10000" ;;
+ IRIX_FLAGS='-mips4 -r10000' ;;
12???)
- case "$IRIX_CCOMP" in
- "old")
- IRIX_FLAGS="-mips4 -r10000" ;;
- *)
- IRIX_FLAGS="-mips4 -r12000" ;;
- esac ;;
+ if test $IRIX_CCOMP = 'old'; then
+ IRIX_FLAGS='-mips4 -r10000'
+ else
+ IRIX_FLAGS='-mips4 -r12000'
+ fi
+ ;;
*)
- IRIX_FLAGS="-mips4" ;;
+ IRIX_FLAGS='-mips4' ;;
esac
- case "$IRIX_BITS:$CC" in
- 64:cc)
- : ${CFLAGS="$CFLAGS -64 $IRIX_FLAGS"}
- : ${CXXFLAGS="$CXXFLAGS -64 $IRIX_FLAGS"}
- : ${C_OPTIMISE_FLAGS="-O3 -INLINE -LNO -OPT:Olimit=100000"}
- : ${CXX_OPTIMISE_FLAGS="-O3 -INLINE -LNO -OPT:Olimit=100000"}
- : ${C_DEBUG_FLAGS="-g3"}
- : ${CXX_DEBUG_FLAGS="-g3"}
- : ${C_WARN_FLAGS="-fullwarn"}
- : ${CXX_WARN_FLAGS="-fullwarn"}
- ;;
- 32:cc)
- : ${CFLAGS="$CFLAGS -n32 $IRIX_FLAGS"}
- : ${CXXFLAGS="$CXXFLAGS -n32 $IRIX_FLAGS"}
- : ${C_OPTIMISE_FLAGS="-O3 -INLINE -LNO -OPT:Olimit=100000"}
- : ${CXX_OPTIMISE_FLAGS="-O3 -INLINE -LNO -OPT:Olimit=100000"}
- : ${C_DEBUG_FLAGS="-g3"}
- : ${CXX_DEBUG_FLAGS="-g3"}
- : ${C_WARN_FLAGS="-fullwarn"}
- : ${CXX_WARN_FLAGS="-fullwarn"}
- ;;
- *)
- ;;
- esac
-
- case "$IRIX_BITS" in
- 64)
- : ${F90FLAGS="$F90FLAGS -r10000 -TARG:proc=r10000 -64 -mips4"}
- : ${F77FLAGS="$F90FLAGS"}
- : ${F90_OPTIMISE_FLAGS="-O3 -OPT:roundoff=3:IEEE_arithmetic=3:const_copy_limit=100000"}
- : ${F77_OPTIMISE_FLAGS="$F90_OPTIMISE_FLAGS"}
- : ${F90_DEBUG_FLAGS="-g3"}
- : ${F77_DEBUG_FLAGS="-g3"}
- : ${F90_WARN_FLAGS="-fullwarn"}
- : ${F77_WARN_FLAGS="-fullwarn"}
- ;;
- 32)
- : ${F90FLAGS="-n32 -mips3"}
- : ${F77FLAGS="$F90FLAGS"}
- : ${F90_OPTIMISE_FLAGS="-O3 -OPT:roundoff=3:IEEE_arithmetic=3:fold_arith_limit=10000:const_copy_limit=100000"}
- : ${F77_OPTIMISE_FLAGS="-O3 -OPT:roundoff=3:IEEE_arithmetic=3:fold_arith_limit=10000:const_copy_limit=100000"}
- : ${F90_DEBUG_FLAGS="-g3"}
- : ${F77_DEBUG_FLAGS="-g3"}
- : ${F90_WARN_FLAGS="-fullwarn"}
- : ${F77_WARN_FLAGS="-fullwarn"}
- ;;
- *)
- ;;
-esac
-
-case "$IRIX_BITS:$LD" in
- 64:CC)
- : ${LDFLAGS="$LDFLAGS -64 -Wl,\"-woff 84\",\"-woff 85\""}
- ;;
- 32:CC)
- : ${LDFLAGS="$LDFLAGS -n32 -Wl,\"-woff 84\",\"-woff 85\""}
- ;;
- *)
- ;;
-esac
-
-# Find out which version of the Fortran compilers is installed
-
+ # 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"
+ IRIX_FLIBS='fortran ftn ftn90'
else
- IRIX_FLIBS="ftn ftn90"
+ IRIX_FLIBS='ftn ftn90'
fi
- case $IRIX_BITS in
- 64)
- LIBS="$LIBS malloc perfex fpe $IRIX_FLIBS m"
- ;;
- 32)
- LIBS="$LIBS malloc fpe $IRIX_FLIBS m"
- ;;
- *)
- ;;
- esac
+ # now set the compiler flags
+ if test $IRIX_BITS = 64; then
+ IRIX_BITS_FLAG='-64'
+ : ${F90FLAGS="-r10000 -TARG:proc=r10000 $IRIX_BITS_FLAG -mips4"}
+ : ${F90_OPTIMISE_FLAGS='-O3 -OPT:roundoff=3:IEEE_arithmetic=3:const_copy_limit=100000'}
+ : ${LIBS="malloc perfex fpe $IRIX_FLIBS m"}
+ else
+ IRIX_BITS_FLAG='-n32'
+ : ${F90FLAGS="$IRIX_BITS_FLAG -mips3"}
+ : ${F90_OPTIMISE_FLAGS='-O3 -OPT:roundoff=3:IEEE_arithmetic=3:fold_arith_limit=10000:const_copy_limit=100000'}
+ : ${LIBS="malloc fpe $IRIX_FLIBS m"}
+ fi
+ if test $CC = 'cc'; then
+ : ${CFLAGS="$IRIX_BITS_FLAG $IRIX_FLAGS"}
+ : ${C_OPTIMISE_FLAGS='-O3 -INLINE -LNO -OPT:Olimit=100000'}
+ : ${C_DEBUG_FLAGS='-g3'}
+ : ${C_WARN_FLAGS='-fullwarn'}
+ fi
+ if test $CXX = 'CC'; then
+ : ${CXXFLAGS="$IRIX_BITS_FLAG $IRIX_FLAGS"}
+ : ${CXX_OPTIMISE_FLAGS='-O3 -INLINE -LNO -OPT:Olimit=100000'}
+ : ${CXX_DEBUG_FLAGS='-g3'}
+ : ${CXX_WARN_FLAGS='-fullwarn'}
+ fi
+ if test $LD = 'CC'; then
+ : ${LDFLAGS="$IRIX_BITS_FLAG -Wl,\"-woff 84,85\""}
+ fi
+ : ${F77FLAGS="$F90FLAGS"}
+ : ${F77_OPTIMISE_FLAGS="$F90_OPTIMISE_FLAGS"}
+ : ${F90_DEBUG_FLAGS='-g3'}
+ : ${F77_DEBUG_FLAGS='-g3'}
+ : ${F90_WARN_FLAGS='-fullwarn'}
+ : ${F77_WARN_FLAGS='-fullwarn'}
+ : ${F77_DEPEND='$(CC) -E -M $@ $(CPPFLAGS)'}
+ : ${F90_DEPEND='$(CXX) -E -M $@ $(CPPFLAGS)'}
-# Cache stuff
+ # Cache stuff
if test -z "$L2_CACHELINE_BYTES" ; then
L2_CACHELINE_BYTES=128
echo "Setting L2_CACHELINE_BYTES to $L2_CACHELINE_BYTES"
@@ -202,14 +135,13 @@ esac
L2_CACHE_SIZE="$TEMP_CACHE_SIZE*1024"
echo "Setting L2_CACHE_SIZE to $L2_CACHE_SIZE bytes"
else
- echo "Unable to determine L2 Cache size on this machine. "
+ echo 'Unable to determine L2 Cache size on this machine.'
fi
fi
-# MPI stuff
-
+ # MPI stuff
if test -n "$MPI" ; then
- NATIVE_MPI_LIBS="mpi"
+ NATIVE_MPI_LIBS='mpi'
fi
fi