summaryrefslogtreecommitdiff
path: root/src/mem/gems_common/calc_host.sh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-05-11 10:38:43 -0700
committerNathan Binkert <nate@binkert.org>2009-05-11 10:38:43 -0700
commit2f30950143cc70bc42a3c8a4111d7cf8198ec881 (patch)
tree708f6c22edb3c6feb31dd82866c26623a5329580 /src/mem/gems_common/calc_host.sh
parentc70241810d4e4f523f173c1646b008dc40faad8e (diff)
downloadgem5-2f30950143cc70bc42a3c8a4111d7cf8198ec881.tar.xz
ruby: Import ruby and slicc from GEMS
We eventually plan to replace the m5 cache hierarchy with the GEMS hierarchy, but for now we will make both live alongside eachother.
Diffstat (limited to 'src/mem/gems_common/calc_host.sh')
-rwxr-xr-xsrc/mem/gems_common/calc_host.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/mem/gems_common/calc_host.sh b/src/mem/gems_common/calc_host.sh
new file mode 100755
index 000000000..f7a6116c1
--- /dev/null
+++ b/src/mem/gems_common/calc_host.sh
@@ -0,0 +1,38 @@
+#!/bin/csh -f
+
+set OS=`uname -s`
+set HOST_ARCH=`uname -m`
+
+switch ($OS)
+ case Linux:
+ set OS_PART=linux
+ breaksw
+ case SunOS:
+ set OS_PART=sol8-64
+ breaksw
+ case OSF1:
+ set OS_PART=tru64-gcc
+ breaksw
+ default:
+ set OS_PART=`echo $OS | sed 's/ /-/g'`
+endsw
+
+switch ($HOST_ARCH)
+ case i586:
+ set ARCH=x86
+ breaksw
+ case i686:
+ set ARCH=x86
+ breaksw
+ case x86_64:
+ set ARCH=amd64
+ breaksw
+ case sun4u:
+ set ARCH=v9
+ breaksw
+ default:
+ set ARCH=`echo $HOST_ARCH | sed 's/ /-/g'`
+endsw
+
+echo $ARCH-$OS_PART
+