/usr/share/tau/utils/archfind is in tau-racy 2.17.3.1.dfsg-4.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | #!/bin/sh
# converted to sh, (12/14/2007)
# Based on parts of tcsh's tc.vers.c && PVM's aimk
# Originally hacked by Bernd Mohr
# Modified by Pete Beckman (3/2/95)
# Modified by Lars Thomas Hansen (2/27/95); very minor fixes for Solaris
# Command line parameters:
# -x provide cross-development architecture name (for cm?, rs6k, etc)
# -l provide long name
# -s SPECIAL. Used to differentiate two very similar architectures
#echo foo
ARCHTESTFILE=$0.c
ARCHLISTFILE=$0.txt
ARCH=
XDEV=
SPECIAL=
# TAU_CCOM may be defined by the caller to the name of the c compiler
# for this user and system, as given on the command line.
#
# Not everyone uses gcc.
if [ "x$TAU_CCOM" = "x" ]; then
TAU_CCOM=cc
fi
if [ `uname -s ` = "Darwin" ]; then
TAU_CCOM=c++
ARCH=apple
fi
if [ `uname -s ` = "HI-UX/MPP" ]; then
ARCH=`$TAU_CCOM -msg=e -E $ARCHTESTFILE | sed -e '/^#/d' -e '/^[ ]*$/d' -e 's/^ARCH//'`
else
if [ "x$ARCH" = "x" ]; then
# ARCH has not been assigned yet.
ARCH=`$TAU_CCOM -w -E $ARCHTESTFILE | sed -e '/^#/d' -e '/^[ ]*$/d' -e 's/^ARCH//'`
fi
fi
# Check for brain-dead solaris compiler
if [ $ARCH = sun4 ]; then
VER=`uname -r | cut -c0-2`
if [ $VER = "5." ]; then
ARCH=solaris2
fi
fi
# Check for TMC cm5
if [ $ARCH = sun4 -o $ARCH = solaris2 ]; then
if [ -e /usr/bin/cmmd-ld ]; then
XDEV="cm5 $XDEV"
fi
fi
# Check for SGI Symmetric Multiprocessing engine
if [ $ARCH = sgi4k -o $ARCH = sgi8k ]; then
# Run "hinv" and check for the number of processors
/bin/hinv 2>&1 | /usr/bsd/head -1 2>&1 | /bin/grep "^1 " >/dev/null 2>&1
if [ $? = 1 ]; then
XDEV="sgimp $XDEV"
fi
fi
# Check for Meiko CS2
if [ $ARCH = solaris2 -a -d /opt/MEIKOcs2 ]; then
XDEV="cs2 $XDEV"
fi
# Check for cray-t3d xdev environment for Cray C90
if [ $ARCH = c90 -a -d /mpp/bin ]; then
XDEV="t3d $XDEV"
fi
# Check for Convex SPP engine
if [ $ARCH = hp9000s800 ]; then
if [ -d /usr/convex ]; then
XDEV="cnxspp $XDEV"
fi
fi
# Check for RS6000 based IBM SPx
if [ $ARCH = rs6000 ]; then
if [ -f /bin/mpcc ]; then
XDEV="sp1 $XDEV"
fi
fi
if [ $ARCH = unknown ]; then
#See if users path finds an 'arch' command, it so, use it! (a little sloppy)
arch >/dev/null 2>&1
if [ $? != 0 ]; then
#This machine does not have an 'arch' command
#Or at least one that correctly sets the arch
#Try another guess....
if [ -e /usr/bin/getcube ]; then
ARCH=i860
fi
else
# 'arch' command found, use it!
ARCH=`arch`
fi
if [ $ARCH = unknown ]; then
if [ `uname -s` = FreeBSD ]; then
ARCH=freebsd
fi
fi
if [ $# = 1 ]; then
if [ "$1" = "-x" ]; then
if [ "x$XDEV" = "x" ]; then
echo none
exit 1
else
echo $XDEV
exit 0
fi
else
if [ "$argv[1]" = "-l" ]; then
grep $ARCH $ARCHLISTFILE
if [ $ARCH = unknown ]; then
exit 1
else
exit 0
fi
else
if [ "$1" = "-s" ]; then
if [ "x$SPECIAL" = "x" ]; then
echo none
exit 1
else
echo $SPECIAL
exit 0
fi
fi
fi
fi
fi
fi
echo $ARCH
if [ $ARCH = unknown ]; then
exit 1
else
exit 0
fi
|