This file is indexed.

/usr/share/tau/utils/archfind is in tau-racy 2.16.4-1.5.

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
154
#!/bin/csh -fb

# 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
set ARCHTESTFILE=$0.c
set ARCHLISTFILE=$0.txt
set XDEV=
set 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 ( ${?TAU_CCOM} == "0" ) then
  set TAU_CCOM=cc
endif

if ( `uname -s ` == "Darwin" ) then
  set TAU_CCOM=c++
endif

if ( `uname -s ` == "HI-UX/MPP" ) then 
  set ARCH=`$TAU_CCOM -msg=e -E $ARCHTESTFILE | sed -e '/^#/d' -e '/^[ ]*$/d' -e 's/^ARCH//'` 
else
  set ARCH=`$TAU_CCOM -w -E $ARCHTESTFILE | sed -e '/^#/d' -e '/^[ ]*$/d' -e 's/^ARCH//'` 
endif 
# I HATE THIS CRAP!!!!
# The !@!^&*% SUN Solaris compiler (slumpro) does not seem to define any
# unique -D<defines> that separates it from cc for SunOS machines.
# They simply define -Dunix -Dsun -Dsparc.  So how the ^%$#@!** are
# you supposed to know if you are compiling code that uses the new
# solaris include files, or uses the old SunOS include files?  At least
# the gcc people know how to build a good compiler, and have 
# added -D__svr4__ to their standard cpp defines.  To top it off, SUNPRO
# is optional, and costs money!!  If I ever say something good about
# SUN please slap me around until I come to my senses.

# Check for brain-dead solaris compiler
if ( $ARCH == sun4 ) then
  if ( `uname -r` =~ 5.* ) then
    set ARCH=solaris2
  endif
endif

# Check for TMC cm5
if ($ARCH == sun4 || $ARCH == solaris2) then
  if ( -e /usr/bin/cmmd-ld ) then
    set XDEV="cm5 $XDEV"
  endif
endif

# Check for SGI Symmetric Multiprocessing engine
if ($ARCH == sgi4k || $ARCH == sgi8k) then
  # Run "hinv" and check for the number of processors
  /bin/hinv |& /usr/bsd/head -1 |& /bin/grep "^1 " >& /dev/null
  if ($status == 1) then
    set XDEV="sgimp $XDEV"
  endif
endif

# Check for Meiko CS2
if ($ARCH == solaris2 && -d /opt/MEIKOcs2) then
  set XDEV="cs2 $XDEV"
endif

# Check for cray-t3d xdev environment for Cray C90
if ($ARCH == c90 && -d /mpp/bin) then
  set XDEV="t3d $XDEV"
endif
 
# Check for Convex SPP engine
if ($ARCH == hp9000s800) then
  if (-d /usr/convex) then
    set XDEV="cnxspp $XDEV"
  endif
endif

# Check for RS6000 based IBM SPx
if ($ARCH == rs6000) then
  if (-f /bin/mpcc) then
    set XDEV="sp1 $XDEV"
  endif
endif

if ($ARCH == unknown) then
#See if users path finds an 'arch' command, it so, use it! (a little sloppy)
  arch > &/dev/null
  if ($status) 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) set ARCH=i860 
  else
# 'arch' command found, use it!
    set ARCH = `arch`
  endif
endif

if ($ARCH == unknown) then
  if (`uname -s` == FreeBSD) then
    set ARCH=freebsd
  endif
endif


if ( $#argv == 1 ) then
  if ( "$argv[1]" == "-x" ) then
    if ( "$XDEV" == "" ) then
      echo none
      exit 1
    else
      echo $XDEV
      exit 0
    endif  
  else
    if ( "$argv[1]" == "-l" ) then
      grep $ARCH $ARCHLISTFILE
      if ($ARCH == unknown) then
        exit 1
      else
        exit 0
      endif  
    else
      if ( "$argv[1]" == "-s" ) then
        if ( "$SPECIAL" == "" ) then
          echo none
          exit 1
        else
          echo $SPECIAL
          exit 0
        endif  
      endif
    endif
  endif
endif

echo $ARCH
if ($ARCH == unknown) then
  exit 1
else
  exit 0
endif