[MLton-commit] r6507
Ville Laurikari
ville at mlton.org
Wed Mar 26 00:02:55 PST 2008
Solaris `uname' cannot distinguish between x86 and amd64 but `optisa'
can.
----------------------------------------------------------------------
U mlton/trunk/bin/platform
----------------------------------------------------------------------
Modified: mlton/trunk/bin/platform
===================================================================
--- mlton/trunk/bin/platform 2008-03-25 13:25:41 UTC (rev 6506)
+++ mlton/trunk/bin/platform 2008-03-26 08:02:55 UTC (rev 6507)
@@ -24,12 +24,12 @@
esac
uname=`uname`
-arch_flag=-m
+arch=
case "$uname" in
AIX)
HOST_OS='aix'
- arch_flag=-p
+ arch=`uname -p`
;;
CYGWIN*)
HOST_OS='cygwin'
@@ -57,13 +57,18 @@
;;
SunOS)
HOST_OS='solaris'
+ for arch in sparc amd64 i386 `uname -m`; do
+ optisa $arch > /dev/null && break
+ done
;;
*)
die "Unknown OS $uname."
;;
esac
-arch=`uname $arch_flag`
+if [ -z "$arch" ]; then
+ arch=`uname -m`
+fi
case "$arch" in
alpha*)
More information about the MLton-commit
mailing list