/usr/lib/mlton/platform is in mlton-compiler 20130715-3.
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 | #!/usr/bin/env bash
set -e
name=`basename "$0"`
dir=`dirname "$0"`
bin=`cd "$dir" && pwd`
die () {
echo >&2 "$1"
exit 1
}
usage () {
die "usage: $name"
}
case "$#" in
0)
;;
*)
usage
;;
esac
uname=`uname`
arch=
case "$uname" in
AIX)
HOST_OS='aix'
arch=`/usr/sbin/lsattr -a type -F deflt -l proc0`
case $arch in
POWER) arch=powerpc64 ;;
esac
;;
CYGWIN*)
HOST_OS='cygwin'
;;
Darwin)
HOST_OS='darwin'
;;
*FreeBSD*)
HOST_OS='freebsd'
;;
GNU)
HOST_OS='hurd'
;;
HP-UX)
HOST_OS='hpux'
;;
Linux)
HOST_OS='linux'
;;
MINGW*)
HOST_OS='mingw'
;;
NetBSD*)
HOST_OS='netbsd'
;;
OpenBSD*)
HOST_OS='openbsd'
;;
SunOS)
HOST_OS='solaris'
for arch in sparc amd64 i386 `uname -m`; do
optisa $arch > /dev/null && break
done
;;
*)
die "Unknown OS $uname."
;;
esac
if [ -z "$arch" ]; then
arch=`uname -m`
fi
case "$arch" in
alpha*)
# not certain about this one; no alpha access
HOST_ARCH=alpha
;;
x86_64*)
HOST_ARCH=amd64
;;
i?86_64)
HOST_ARCH=amd64
;;
amd64)
HOST_ARCH=amd64
;;
arm*)
HOST_ARCH=arm
;;
aarch64)
HOST_ARCH=arm64
;;
parisc*)
HOST_ARCH=hppa
;;
9000/*)
HOST_ARCH=hppa
;;
ia64*)
HOST_ARCH=ia64
;;
m68k*)
HOST_ARCH=m68k
;;
mips64*)
HOST_ARCH=mips64
;;
mips*)
# big-endian and little-endian detect via headers
HOST_ARCH=mips
;;
powerpc64)
HOST_ARCH=powerpc64
;;
ppc64*)
HOST_ARCH=powerpc64
;;
powerpc)
HOST_ARCH=powerpc
;;
ppc*)
HOST_ARCH=powerpc
;;
Power*)
HOST_ARCH=powerpc
;;
s390*)
HOST_ARCH=s390
;;
sparc*)
HOST_ARCH=sparc
;;
sun*)
HOST_ARCH=sparc
;;
i?86*)
HOST_ARCH=x86
;;
*)
die "Unknown arch $arch."
;;
esac
echo "HOST_OS=$HOST_OS HOST_ARCH=$HOST_ARCH"
|