summaryrefslogtreecommitdiff
path: root/src/mem/gems_common/calc_host.sh
diff options
context:
space:
mode:
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
+