Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request rust-lang#2432 from jclulow/illumos
Browse files Browse the repository at this point in the history
add illumos (amd64) support
  • Loading branch information
kinnison authored Oct 28, 2020
2 parents 2ee5409 + f266a96 commit e6ff1df
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
# It runs on Unix shells like {a,ba,da,k,z}sh. It uses the common `local`
# extension. Note: Most shells limit `local` to 1 var per line, contra bash.

if [ "$KSH_VERSION" = 'Version JM 93t+ 2010-03-05' ]; then
# The version of ksh93 that ships with many illumos systems does not
# support the "local" extension. Print a message rather than fail in
# subtle ways later on:
echo 'rustup does not work with this ksh93 version; please try bash!' >&2
exit 1
fi


set -u

# If RUSTUP_UPDATE_ROOT is unset or empty, default it.
Expand Down Expand Up @@ -192,6 +201,24 @@ get_architecture() {
fi
fi

if [ "$_ostype" = SunOS ]; then
# Both Solaris and illumos presently announce as "SunOS" in "uname -s"
# so use "uname -o" to disambiguate. We use the full path to the
# system uname in case the user has coreutils uname first in PATH,
# which has historically sometimes printed the wrong value here.
if [ "$(/usr/bin/uname -o)" = illumos ]; then
_ostype=illumos
fi

# illumos systems have multi-arch userlands, and "uname -m" reports the
# machine hardware name; e.g., "i86pc" on both 32- and 64-bit x86
# systems. Check for the native (widest) instruction set on the
# running kernel:
if [ "$_cputype" = i86pc ]; then
_cputype="$(isainfo -n)"
fi
fi

case "$_ostype" in

Android)
Expand Down Expand Up @@ -219,6 +246,10 @@ get_architecture() {
_ostype=apple-darwin
;;

illumos)
_ostype=unknown-illumos
;;

MINGW* | MSYS* | CYGWIN*)
_ostype=pc-windows-gnu
;;
Expand Down

0 comments on commit e6ff1df

Please sign in to comment.