1f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich#! /bin/sh 2f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# Attempt to guess a canonical system name. 38366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes# Copyright 1992-2014 Free Software Foundation, Inc. 4f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 58366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughestimestamp='2014-11-04' 6f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 7f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# This file is free software; you can redistribute it and/or modify it 8f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# under the terms of the GNU General Public License as published by 9f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# the Free Software Foundation; either version 3 of the License, or 10f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# (at your option) any later version. 11f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# 12f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# This program is distributed in the hope that it will be useful, but 13f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# WITHOUT ANY WARRANTY; without even the implied warranty of 14f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# General Public License for more details. 16f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# 17f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# You should have received a copy of the GNU General Public License 18f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# along with this program; if not, see <http://www.gnu.org/licenses/>. 19f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# 20f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# As a special exception to the GNU General Public License, if you 21f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# distribute this file as part of a program that contains a 22f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# configuration script generated by Autoconf, you may include it under 23f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# the same distribution terms that you use for the rest of that 24f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# program. This Exception is an additional permission under section 7 25f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# of the GNU General Public License, version 3 ("GPLv3"). 26f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# 278366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. 28f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# 29f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# You can get the latest version of this script from: 30f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 31f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# 328366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes# Please send patches to <config-patches@gnu.org>. 33f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 34f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 35f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichme=`echo "$0" | sed -e 's,.*/,,'` 36f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 37f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichusage="\ 38f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichUsage: $0 [OPTION] 39f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 40f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichOutput the configuration name of the system \`$me' is run on. 41f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 42f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichOperation modes: 43f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich -h, --help print this help, then exit 44f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich -t, --time-stamp print date of last modification, then exit 45f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich -v, --version print version number, then exit 46f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 47f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichReport bugs and patches to <config-patches@gnu.org>." 48f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 49f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichversion="\ 50f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichGNU config.guess ($timestamp) 51f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 52f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichOriginally written by Per Bothner. 538366e8beecf85b8e61b5c1a1369666db7a292eaeElliott HughesCopyright 1992-2014 Free Software Foundation, Inc. 54f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 55f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichThis is free software; see the source for copying conditions. There is NO 56f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 57f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 58f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichhelp=" 59f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichTry \`$me --help' for more information." 60f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 61f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# Parse command line 62f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichwhile test $# -gt 0 ; do 63f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case $1 in 64f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich --time-stamp | --time* | -t ) 65f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo "$timestamp" ; exit ;; 66f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich --version | -v ) 67f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo "$version" ; exit ;; 68f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich --help | --h* | -h ) 69f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo "$usage"; exit ;; 70f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich -- ) # Stop option processing 71f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich shift; break ;; 72f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich - ) # Use stdin as input. 73f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich break ;; 74f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich -* ) 75f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo "$me: invalid option $1$help" >&2 76f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit 1 ;; 77f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich * ) 78f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich break ;; 79f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 80f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichdone 81f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 82f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichif test $# != 0; then 83f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo "$me: too many arguments$help" >&2 84f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit 1 85f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichfi 86f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 87f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichtrap 'exit 1' 1 2 15 88f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 89f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# compiler to aid in system detection is discouraged as it requires 91f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# temporary files to be created and, as you can see below, it is a 92f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# headache to deal with in a portable fashion. 93f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 94f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 95f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# use `HOST_CC' if defined, but it is deprecated. 96f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 97f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# Portable tmp directory creation inspired by the Autoconf team. 98f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 99f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichset_cc_for_build=' 100f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich: ${TMPDIR=/tmp} ; 103f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichdummy=$tmp/dummy ; 108f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichcase $CC_FOR_BUILD,$HOST_CC,$CC in 110f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ,,) echo "int x;" > $dummy.c ; 111f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich for c in cc gcc c89 c99 ; do 112f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CC_FOR_BUILD="$c"; break ; 114f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi ; 115f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich done ; 116f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if test x"$CC_FOR_BUILD" = x ; then 117f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CC_FOR_BUILD=no_compiler_found ; 118f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 119f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 120f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ,,*) CC_FOR_BUILD=$CC ;; 121f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ,*,*) CC_FOR_BUILD=$HOST_CC ;; 122f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichesac ; set_cc_for_build= ;' 123f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 124f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# (ghazi@noc.rutgers.edu 1994-08-24) 126f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 127f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich PATH=$PATH:/.attbin ; export PATH 128f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichfi 129f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 130f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 131f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 132f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 133f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 134f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 135f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichcase "${UNAME_SYSTEM}" in 136f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichLinux|GNU|GNU/*) 137f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # If the system lacks a compiler, then just pick glibc. 138f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # We could probably try harder. 139f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich LIBC=gnu 140f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 141f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 142f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich cat <<-EOF > $dummy.c 143f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #include <features.h> 144f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #if defined(__UCLIBC__) 145f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich LIBC=uclibc 146f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #elif defined(__dietlibc__) 147f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich LIBC=dietlibc 148f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #else 149f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich LIBC=gnu 150f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #endif 151f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich EOF 1528366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 153f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 154f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichesac 155f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 156f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# Note: order is significant - the case branches are not exclusive. 157f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 158f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 159f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:NetBSD:*:*) 160f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # NetBSD (nbsd) targets should (where applicable) match one or 161f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 162f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 163f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # switched to ELF, *-*-netbsd* would select the old 164f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # object file format. This provides both forward 165f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # compatibility and a consistent mechanism for selecting the 166f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # object file format. 167f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # 168f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Note: NetBSD doesn't particularly care about the vendor 169f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # portion of the name. We always set it to "unknown". 170f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sysctl="sysctl -n hw.machine_arch" 171f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 172f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 173f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "${UNAME_MACHINE_ARCH}" in 174f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich armeb) machine=armeb-unknown ;; 175f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich arm*) machine=arm-unknown ;; 176f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sh3el) machine=shl-unknown ;; 177f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sh3eb) machine=sh-unknown ;; 178f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sh5el) machine=sh5le-unknown ;; 179f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 180f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 181f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # The Operating System including object format, if it has switched 182f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # to ELF recently, or will in the future. 183f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "${UNAME_MACHINE_ARCH}" in 184f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich arm*|i386|m68k|ns32k|sh3*|sparc|vax) 185f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 186f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 187f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich | grep -q __ELF__ 188f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 189f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 190f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Return netbsd for either. FIX? 191f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich os=netbsd 192f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 193f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich os=netbsdelf 194f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 195f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 196f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *) 197f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich os=netbsd 198f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 199f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 200f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # The OS release 201f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Debian GNU/NetBSD machines have a different userland, and 202f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # thus, need a distinct triplet. However, they do not need 203f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # kernel version information, so it can be replaced with a 204f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # suitable tag, in the style of linux-gnu. 205f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "${UNAME_VERSION}" in 206f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Debian*) 207f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich release='-gnu' 208f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 209f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *) 210f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 211f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 212f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 213f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 214f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # contains redundant information, the shorter form: 215f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 216f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo "${machine}-${os}${release}" 217f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 218f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:Bitrig:*:*) 219f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 220f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 221f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 222f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:OpenBSD:*:*) 223f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 224f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 225f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 226f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:ekkoBSD:*:*) 227f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 228f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 229f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:SolidBSD:*:*) 230f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 231f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 232f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich macppc:MirBSD:*:*) 233f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-unknown-mirbsd${UNAME_RELEASE} 234f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 235f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:MirBSD:*:*) 236f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 237f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 238f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich alpha:OSF1:*:*) 239f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case $UNAME_RELEASE in 240f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *4.0) 241f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 242f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 243f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *5.*) 244f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 245f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 246f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 247f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # According to Compaq, /usr/sbin/psrinfo has been available on 248f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # OSF/1 and Tru64 systems produced since 1995. I hope that 249f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # covers most systems running today. This code pipes the CPU 250f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # types through head -n 1, so we only detect the type of CPU 0. 251f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 252f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "$ALPHA_CPU_TYPE" in 253f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV4 (21064)") 254f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alpha" ;; 255f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV4.5 (21064)") 256f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alpha" ;; 257f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "LCA4 (21066/21068)") 258f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alpha" ;; 259f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV5 (21164)") 260f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev5" ;; 261f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV5.6 (21164A)") 262f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev56" ;; 263f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV5.6 (21164PC)") 264f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphapca56" ;; 265f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV5.7 (21164PC)") 266f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphapca57" ;; 267f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV6 (21264)") 268f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev6" ;; 269f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV6.7 (21264A)") 270f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev67" ;; 271f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV6.8CB (21264C)") 272f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev68" ;; 273f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV6.8AL (21264B)") 274f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev68" ;; 275f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV6.8CX (21264D)") 276f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev68" ;; 277f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV6.9A (21264/EV69A)") 278f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev69" ;; 279f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV7 (21364)") 280f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev7" ;; 281f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich "EV7.9 (21364A)") 282f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="alphaev79" ;; 283f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 284f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # A Pn.n version is a patched version. 285f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # A Vn.n version is a released version. 286f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # A Tn.n version is a released field test version. 287f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # A Xn.n version is an unreleased experimental baselevel. 288f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # 1.2 uses "1.2" for uname -r. 289f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 290f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 291f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exitcode=$? 292f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich trap '' 0 293f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit $exitcode ;; 294f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Alpha\ *:Windows_NT*:*) 295f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # How do we know it's Interix rather than the generic POSIX subsystem? 296f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Should we change UNAME_MACHINE based on the output of uname instead 297f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # of the specific Alpha model? 298f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo alpha-pc-interix 299f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 300f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 21064:Windows_NT:50:3) 301f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo alpha-dec-winnt3.5 302f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 303f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Amiga*:UNIX_System_V:4.0:*) 304f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-unknown-sysv4 305f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 306f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:[Aa]miga[Oo][Ss]:*:*) 307f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-amigaos 308f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 309f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:[Mm]orph[Oo][Ss]:*:*) 310f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-morphos 311f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 312f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:OS/390:*:*) 313f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i370-ibm-openedition 314f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 315f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:z/VM:*:*) 316f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo s390-ibm-zvmoe 317f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 318f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:OS400:*:*) 319f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-ibm-os400 320f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 321f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 322f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo arm-acorn-riscix${UNAME_RELEASE} 323f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 324f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich arm*:riscos:*:*|arm*:RISCOS:*:*) 325f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo arm-unknown-riscos 326f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 327f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 328f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa1.1-hitachi-hiuxmpp 329f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 330f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 331f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 332f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if test "`(/bin/universe) 2>/dev/null`" = att ; then 333f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo pyramid-pyramid-sysv3 334f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 335f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo pyramid-pyramid-bsd 336f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 337f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 338f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich NILE*:*:*:dcosx) 339f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo pyramid-pyramid-svr4 340f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 341f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich DRS?6000:unix:4.0:6*) 342f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-icl-nx6 343f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 344f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 345f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case `/usr/bin/uname -p` in 346f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sparc) echo sparc-icl-nx7; exit ;; 347f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac ;; 348f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich s390x:SunOS:*:*) 349f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 350f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 351f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sun4H:SunOS:5.*:*) 352f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 353f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 354f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 355f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 356f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 357f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 358f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i386-pc-auroraux${UNAME_RELEASE} 359f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 360f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 361f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 362f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SUN_ARCH="i386" 363f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # If there is a compiler, see if it is configured for 64-bit objects. 364f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 365f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # This test works for both compilers. 366f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 367f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 368f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 369f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich grep IS_64BIT_ARCH >/dev/null 370f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 371f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SUN_ARCH="x86_64" 372f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 373f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 374f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 375f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 376f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sun4*:SunOS:6*:*) 377f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # According to config.sub, this is the proper way to canonicalize 378f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # SunOS6. Hard to guess exactly what SunOS6 will be like, but 379f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # it's likely to be more like Solaris than SunOS4. 380f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 381f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 382f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sun4*:SunOS:*:*) 383f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "`/usr/bin/arch -k`" in 384f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Series*|S4*) 385f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_RELEASE=`uname -v` 386f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 387f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 388f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Japanese Language versions have a version number like `4.1.3-JL'. 389f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 390f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 391f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sun3*:SunOS:*:*) 392f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-sun-sunos${UNAME_RELEASE} 393f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 394f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sun*:*:4.2BSD:*) 395f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 396f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 397f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "`/bin/arch`" in 398f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sun3) 399f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-sun-sunos${UNAME_RELEASE} 400f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 401f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sun4) 402f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-sun-sunos${UNAME_RELEASE} 403f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 404f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 405f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 406f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich aushp:SunOS:*:*) 407f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-auspex-sunos${UNAME_RELEASE} 408f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 409f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # The situation for MiNT is a little confusing. The machine name 410f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # can be virtually everything (everything which is not 411f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # "atarist" or "atariste" at least should have a processor 412f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 413f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # to the lowercase version "mint" (or "freemint"). Finally 414f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # the system name "TOS" denotes a system which is actually not 415f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # MiNT. But MiNT is downward compatible to TOS, so this should 416f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # be no problem. 417f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 418f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-atari-mint${UNAME_RELEASE} 419f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 420f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 421f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-atari-mint${UNAME_RELEASE} 422f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 423f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 424f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-atari-mint${UNAME_RELEASE} 425f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 426f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 427f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-milan-mint${UNAME_RELEASE} 428f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 429f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 430f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-hades-mint${UNAME_RELEASE} 431f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 432f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 433f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-unknown-mint${UNAME_RELEASE} 434f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 435f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich m68k:machten:*:*) 436f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-apple-machten${UNAME_RELEASE} 437f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 438f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich powerpc:machten:*:*) 439f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-apple-machten${UNAME_RELEASE} 440f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 441f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich RISC*:Mach:*:*) 442f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-dec-mach_bsd4.3 443f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 444f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich RISC*:ULTRIX:*:*) 445f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-dec-ultrix${UNAME_RELEASE} 446f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 447f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich VAX*:ULTRIX*:*:*) 448f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo vax-dec-ultrix${UNAME_RELEASE} 449f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 450f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 2020:CLIX:*:* | 2430:CLIX:*:*) 451f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo clipper-intergraph-clix${UNAME_RELEASE} 452f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 453f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich mips:*:*:UMIPS | mips:*:*:RISCos) 454f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 455f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sed 's/^ //' << EOF >$dummy.c 456f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich#ifdef __cplusplus 457f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich#include <stdio.h> /* for printf() prototype */ 458f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich int main (int argc, char *argv[]) { 459f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich#else 460f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich int main (argc, argv) int argc; char *argv[]; { 461f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich#endif 462f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #if defined (host_mips) && defined (MIPSEB) 463f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #if defined (SYSTYPE_SYSV) 464f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 465f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #endif 466f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #if defined (SYSTYPE_SVR4) 467f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 468f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #endif 469f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 470f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 471f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #endif 472f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #endif 473f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit (-1); 474f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich } 475f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichEOF 476f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich $CC_FOR_BUILD -o $dummy $dummy.c && 477f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 478f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SYSTEM_NAME=`$dummy $dummyarg` && 479f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { echo "$SYSTEM_NAME"; exit; } 480f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-mips-riscos${UNAME_RELEASE} 481f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 482f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Motorola:PowerMAX_OS:*:*) 483f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-motorola-powermax 484f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 485f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Motorola:*:4.3:PL8-*) 486f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-harris-powermax 487f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 488f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 489f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-harris-powermax 490f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 491f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Night_Hawk:Power_UNIX:*:*) 492f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-harris-powerunix 493f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 494f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich m88k:CX/UX:7*:*) 495f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m88k-harris-cxux7 496f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 497f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich m88k:*:4*:R4*) 498f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m88k-motorola-sysv4 499f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 500f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich m88k:*:3*:R3*) 501f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m88k-motorola-sysv3 502f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 503f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich AViiON:dgux:*:*) 504f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # DG/UX returns AViiON for all architectures 505f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_PROCESSOR=`/usr/bin/uname -p` 506f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 507f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 508f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 509f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich [ ${TARGET_BINARY_INTERFACE}x = x ] 510f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 511f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m88k-dg-dgux${UNAME_RELEASE} 512f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 513f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m88k-dg-dguxbcs${UNAME_RELEASE} 514f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 515f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 516f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i586-dg-dgux${UNAME_RELEASE} 517f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 518f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 519f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich M88*:DolphinOS:*:*) # DolphinOS (SVR3) 520f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m88k-dolphin-sysv3 521f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 522f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich M88*:*:R3*:*) 523f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Delta 88k system running SVR3 524f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m88k-motorola-sysv3 525f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 526f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 527f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m88k-tektronix-sysv3 528f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 529f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 530f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-tektronix-bsd 531f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 532f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:IRIX*:*:*) 533f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 534f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 535f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 536f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 537f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 538f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:AIX:*:*) 539f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i386-ibm-aix 540f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 541f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ia64:AIX:*:*) 542f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ -x /usr/bin/oslevel ] ; then 543f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich IBM_REV=`/usr/bin/oslevel` 544f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 545f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 546f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 547f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 548f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 549f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:AIX:2:3) 550f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 551f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 552f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sed 's/^ //' << EOF >$dummy.c 553f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #include <sys/systemcfg.h> 554f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 555f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich main() 556f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { 557f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if (!__power_pc()) 558f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit(1); 559f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich puts("powerpc-ibm-aix3.2.5"); 560f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit(0); 561f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich } 562f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichEOF 563f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 564f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 565f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo "$SYSTEM_NAME" 566f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 567f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo rs6000-ibm-aix3.2.5 568f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 569f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 570f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo rs6000-ibm-aix3.2.4 571f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 572f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo rs6000-ibm-aix3.2 573f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 574f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 575f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:AIX:*:[4567]) 576f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 577f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 578f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich IBM_ARCH=rs6000 579f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 580f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich IBM_ARCH=powerpc 581f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 5828366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes if [ -x /usr/bin/lslpp ] ; then 5838366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | 5848366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 585f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 586f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 587f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 588f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${IBM_ARCH}-ibm-aix${IBM_REV} 589f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 590f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:AIX:*:*) 591f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo rs6000-ibm-aix 592f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 593f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ibmrt:4.4BSD:*|romp-ibm:BSD:*) 594f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo romp-ibm-bsd4.4 595f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 596f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 597f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 598f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; # report: romp-ibm BSD 4.3 599f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:BOSX:*:*) 600f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo rs6000-bull-bosx 601f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 602f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich DPX/2?00:B.O.S.:*:*) 603f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-bull-sysv3 604f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 605f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 9000/[34]??:4.3bsd:1.*:*) 606f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-hp-bsd 607f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 608f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 609f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-hp-bsd4.4 610f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 611f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 9000/[34678]??:HP-UX:*:*) 612f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 613f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "${UNAME_MACHINE}" in 614f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 9000/31? ) HP_ARCH=m68000 ;; 615f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 9000/[34]?? ) HP_ARCH=m68k ;; 616f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 9000/[678][0-9][0-9]) 617f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ -x /usr/bin/getconf ]; then 618f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 619f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 620f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "${sc_cpu_version}" in 621f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 622f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 623f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 532) # CPU_PA_RISC2_0 624f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "${sc_kernel_bits}" in 625f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 32) HP_ARCH="hppa2.0n" ;; 626f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 64) HP_ARCH="hppa2.0w" ;; 627f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 628f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac ;; 629f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 630f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 631f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ "${HP_ARCH}" = "" ]; then 632f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 633f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sed 's/^ //' << EOF >$dummy.c 634f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 635f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #define _HPUX_SOURCE 636f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #include <stdlib.h> 637f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #include <unistd.h> 638f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 639f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich int main () 640f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { 641f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #if defined(_SC_KERNEL_BITS) 642f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich long bits = sysconf(_SC_KERNEL_BITS); 643f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #endif 644f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich long cpu = sysconf (_SC_CPU_VERSION); 645f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 646f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich switch (cpu) 647f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { 648f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 649f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 650f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case CPU_PA_RISC2_0: 651f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #if defined(_SC_KERNEL_BITS) 652f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich switch (bits) 653f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { 654f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case 64: puts ("hppa2.0w"); break; 655f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case 32: puts ("hppa2.0n"); break; 656f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich default: puts ("hppa2.0"); break; 657f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich } break; 658f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #else /* !defined(_SC_KERNEL_BITS) */ 659f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich puts ("hppa2.0"); break; 660f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #endif 661f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich default: puts ("hppa1.0"); break; 662f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich } 663f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit (0); 664f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich } 665f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichEOF 666f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 667f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich test -z "$HP_ARCH" && HP_ARCH=hppa 668f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi ;; 669f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 670f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ ${HP_ARCH} = "hppa2.0w" ] 671f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 672f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 673f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 674f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 675f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 676f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # generating 64-bit code. GNU and HP use different nomenclature: 677f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # 678f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # $ CC_FOR_BUILD=cc ./config.guess 679f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # => hppa2.0w-hp-hpux11.23 680f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 681f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # => hppa64-hp-hpux11.23 682f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 683f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 684f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich grep -q __LP64__ 685f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 686f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich HP_ARCH="hppa2.0w" 687f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 688f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich HP_ARCH="hppa64" 689f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 690f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 691f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${HP_ARCH}-hp-hpux${HPUX_REV} 692f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 693f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ia64:HP-UX:*:*) 694f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 695f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ia64-hp-hpux${HPUX_REV} 696f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 697f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 3050*:HI-UX:*:*) 698f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 699f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sed 's/^ //' << EOF >$dummy.c 700f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #include <unistd.h> 701f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich int 702f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich main () 703f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { 704f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich long cpu = sysconf (_SC_CPU_VERSION); 705f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich /* The order matters, because CPU_IS_HP_MC68K erroneously returns 706f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 707f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich results, however. */ 708f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if (CPU_IS_PA_RISC (cpu)) 709f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { 710f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich switch (cpu) 711f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { 712f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 713f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 714f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 715f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich default: puts ("hppa-hitachi-hiuxwe2"); break; 716f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich } 717f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich } 718f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else if (CPU_IS_HP_MC68K (cpu)) 719f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich puts ("m68k-hitachi-hiuxwe2"); 720f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else puts ("unknown-hitachi-hiuxwe2"); 721f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit (0); 722f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich } 723f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichEOF 724f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 725f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich { echo "$SYSTEM_NAME"; exit; } 726f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo unknown-hitachi-hiuxwe2 727f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 728f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 729f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa1.1-hp-bsd 730f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 731f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 9000/8??:4.3bsd:*:*) 732f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa1.0-hp-bsd 733f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 734f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 735f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa1.0-hp-mpeix 736f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 737f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 738f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa1.1-hp-osf 739f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 740f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich hp8??:OSF1:*:*) 741f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa1.0-hp-osf 742f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 743f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:OSF1:*:*) 744f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ -x /usr/sbin/sysversion ] ; then 745f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-osf1mk 746f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 747f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-osf1 748f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 749f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 750f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich parisc*:Lites*:*:*) 751f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa1.1-hp-lites 752f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 753f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 754f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo c1-convex-bsd 755f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 756f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 757f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if getsysinfo -f scalar_acc 758f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then echo c32-convex-bsd 759f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else echo c2-convex-bsd 760f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 761f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 762f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 763f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo c34-convex-bsd 764f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 765f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 766f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo c38-convex-bsd 767f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 768f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 769f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo c4-convex-bsd 770f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 771f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CRAY*Y-MP:*:*:*) 772f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 773f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 774f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CRAY*[A-Z]90:*:*:*) 775f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 776f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 777f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 778f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich -e 's/\.[^.]*$/.X/' 779f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 780f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CRAY*TS:*:*:*) 781f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 782f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 783f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CRAY*T3E:*:*:*) 784f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 785f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 786f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CRAY*SV1:*:*:*) 787f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 788f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 789f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:UNICOS/mp:*:*) 790f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 791f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 792f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 793f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 794f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 795f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 796f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 797f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 798f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 5000:UNIX_System_V:4.*:*) 799f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 800f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 801f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 802f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 803f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 804f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 805f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 806f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sparc*:BSD/OS:*:*) 807f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-unknown-bsdi${UNAME_RELEASE} 808f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 809f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:BSD/OS:*:*) 810f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 811f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 812f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:FreeBSD:*:*) 813f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_PROCESSOR=`/usr/bin/uname -p` 814f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case ${UNAME_PROCESSOR} in 815f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich amd64) 816f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 817f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *) 818f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 819f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 820f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 821f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*:CYGWIN*:*) 822f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-cygwin 823f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 824f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:MINGW64*:*) 825f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-mingw64 826f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 827f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:MINGW*:*) 828f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-mingw32 829f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 8308366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes *:MSYS*:*) 831f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-msys 832f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 833f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*:windows32*:*) 834f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # uname -m includes "-pc" on this system. 835f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-mingw32 836f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 837f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*:PW*:*) 838f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-pw32 839f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 840f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:Interix*:*) 841f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case ${UNAME_MACHINE} in 842f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich x86) 843f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i586-pc-interix${UNAME_RELEASE} 844f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 845f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich authenticamd | genuineintel | EM64T) 846f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo x86_64-unknown-interix${UNAME_RELEASE} 847f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 848f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich IA64) 849f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ia64-unknown-interix${UNAME_RELEASE} 850f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 851f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac ;; 852f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 853f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i${UNAME_MACHINE}-pc-mks 854f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 855f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 8664:Windows_NT:*) 856f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo x86_64-pc-mks 857f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 858f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 859f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # How do we know it's Interix rather than the generic POSIX subsystem? 860f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 861f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # UNAME_MACHINE based on the output of uname instead of i386? 862f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i586-pc-interix 863f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 864f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*:UWIN*:*) 865f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-uwin 866f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 867f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 868f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo x86_64-unknown-cygwin 869f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 870f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich p*:CYGWIN*:*) 871f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpcle-unknown-cygwin 872f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 873f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich prep*:SunOS:5.*:*) 874f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 875f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 876f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:GNU:*:*) 877f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # the GNU system 878f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 879f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 880f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:GNU/*:*:*) 881f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # other systems with GNU libc and userland 882f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 883f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 884f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:Minix:*:*) 885f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-minix 886f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 887f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich aarch64:Linux:*:*) 888f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 889f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 890f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich aarch64_be:Linux:*:*) 891f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE=aarch64_be 892f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 893f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 894f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich alpha:Linux:*:*) 895f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 896f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich EV5) UNAME_MACHINE=alphaev5 ;; 897f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich EV56) UNAME_MACHINE=alphaev56 ;; 898f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich PCA56) UNAME_MACHINE=alphapca56 ;; 899f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich PCA57) UNAME_MACHINE=alphapca56 ;; 900f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich EV6) UNAME_MACHINE=alphaev6 ;; 901f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich EV67) UNAME_MACHINE=alphaev67 ;; 902f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich EV68*) UNAME_MACHINE=alphaev68 ;; 903f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 904f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich objdump --private-headers /bin/sh | grep -q ld.so.1 905f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 906f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 907f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 908f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich arc:Linux:*:* | arceb:Linux:*:*) 909f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 910f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 911f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich arm*:Linux:*:*) 912f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 913f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 914f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich | grep -q __ARM_EABI__ 915f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 916f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 917f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 918f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 919f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich | grep -q __ARM_PCS_VFP 920f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 921f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 922f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 923f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 924f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 925f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 926f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 927f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich avr32*:Linux:*:*) 928f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 929f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 930f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich cris:Linux:*:*) 931f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-axis-linux-${LIBC} 932f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 933f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich crisv32:Linux:*:*) 934f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-axis-linux-${LIBC} 935f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 936f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich frv:Linux:*:*) 937f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 938f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 939f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich hexagon:Linux:*:*) 940f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 941f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 942f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:Linux:*:*) 943f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-linux-${LIBC} 944f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 945f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ia64:Linux:*:*) 946f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 947f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 948f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich m32r*:Linux:*:*) 949f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 950f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 951f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich m68*:Linux:*:*) 952f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 953f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 954f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich mips:Linux:*:* | mips64:Linux:*:*) 955f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 956f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sed 's/^ //' << EOF >$dummy.c 957f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #undef CPU 958f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #undef ${UNAME_MACHINE} 959f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #undef ${UNAME_MACHINE}el 960f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 961f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CPU=${UNAME_MACHINE}el 962f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #else 963f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 964f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CPU=${UNAME_MACHINE} 965f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #else 966f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich CPU= 967f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #endif 968f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich #endif 969f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichEOF 970f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 971f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 972f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ;; 9738366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes openrisc*:Linux:*:*) 9748366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes echo or1k-unknown-linux-${LIBC} 975f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 9768366e8beecf85b8e61b5c1a1369666db7a292eaeElliott Hughes or32:Linux:*:* | or1k*:Linux:*:*) 977f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 978f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 979f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich padre:Linux:*:*) 980f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-unknown-linux-${LIBC} 981f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 982f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich parisc64:Linux:*:* | hppa64:Linux:*:*) 983f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa64-unknown-linux-${LIBC} 984f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 985f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich parisc:Linux:*:* | hppa:Linux:*:*) 986f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Look for CPU level 987f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 988f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 989f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 990f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *) echo hppa-unknown-linux-${LIBC} ;; 991f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 992f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 993f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ppc64:Linux:*:*) 994f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc64-unknown-linux-${LIBC} 995f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 996f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ppc:Linux:*:*) 997f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-unknown-linux-${LIBC} 998f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 999f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ppc64le:Linux:*:*) 1000f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc64le-unknown-linux-${LIBC} 1001f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1002f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich ppcle:Linux:*:*) 1003f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpcle-unknown-linux-${LIBC} 1004f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1005f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich s390:Linux:*:* | s390x:Linux:*:*) 1006f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 1007f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1008f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sh64*:Linux:*:*) 1009f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1010f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1011f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sh*:Linux:*:*) 1012f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1013f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1014f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich sparc:Linux:*:* | sparc64:Linux:*:*) 1015f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1016f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1017f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich tile*:Linux:*:*) 1018f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1019f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1020f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich vax:Linux:*:*) 1021f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-dec-linux-${LIBC} 1022f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1023f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich x86_64:Linux:*:*) 1024f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1025f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1026f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich xtensa*:Linux:*:*) 1027f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1028f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1029f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:DYNIX/ptx:4*:*) 1030f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1031f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # earlier versions are messed up and put the nodename in both 1032f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # sysname and nodename. 1033f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i386-sequent-sysv4 1034f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1035f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:UNIX_SV:4.2MP:2.*) 1036f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Unixware is an offshoot of SVR4, but it has its own version 1037f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # number series starting with 2... 1038f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # I am not positive that other SVR4 systems won't match this, 1039f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # I just have to hope. -- rms. 1040f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Use sysv4.2uw... so that sysv4* matches it. 1041f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1042f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1043f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:OS/2:*:*) 1044f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # If we were able to find `uname', then EMX Unix compatibility 1045f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # is probably installed. 1046f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-os2-emx 1047f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1048f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:XTS-300:*:STOP) 1049f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-stop 1050f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1051f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:atheos:*:*) 1052f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-atheos 1053f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1054f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:syllable:*:*) 1055f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-syllable 1056f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1057f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1058f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i386-unknown-lynxos${UNAME_RELEASE} 1059f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1060f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:*DOS:*:*) 1061f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-msdosdjgpp 1062f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1063f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1064f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1065f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1066f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1067f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 1068f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1069f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1070f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1071f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:*:5:[678]*) 1072f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # UnixWare 7.x, OpenUNIX and OpenServer 6. 1073f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case `/bin/uname -X | grep "^Machine"` in 1074f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *486*) UNAME_MACHINE=i486 ;; 1075f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *Pentium) UNAME_MACHINE=i586 ;; 1076f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1077f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 1078f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1079f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1080f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:*:3.2:*) 1081f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if test -f /usr/options/cb.name; then 1082f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1083f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1084f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich elif /bin/uname -X 2>/dev/null >/dev/null ; then 1085f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1086f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1087f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1088f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && UNAME_MACHINE=i586 1089f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1090f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && UNAME_MACHINE=i686 1091f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1092f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && UNAME_MACHINE=i686 1093f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1094f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 1095f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-sysv32 1096f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1097f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1098f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich pc:*:*:*) 1099f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Left here for compatibility: 1100f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # uname -m prints for DJGPP always 'pc', but it prints nothing about 1101f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # the processor, so we play safe by assuming i586. 1102f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Note: whatever this is, it MUST be the same as what config.sub 1103f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # prints for the "djgpp" host, or else GDB configury will decide that 1104f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # this is a cross-build. 1105f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i586-pc-msdosdjgpp 1106f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1107f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Intel:Mach:3*:*) 1108f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i386-pc-mach3 1109f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1110f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich paragon:*:*:*) 1111f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i860-intel-osf1 1112f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1113f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i860:*:4.*:*) # i860-SVR4 1114f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1115f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1116f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else # Add other i860-SVR4 vendors below as they are discovered. 1117f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1118f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1119f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1120f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich mini*:CTIX:SYS*5:*) 1121f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # "miniframe" 1122f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68010-convergent-sysv 1123f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1124f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich mc68k:UNIX:SYSTEM5:3.51m) 1125f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-convergent-sysv 1126f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1127f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich M680?0:D-NIX:5.3:*) 1128f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-diab-dnix 1129f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1130f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich M68*:*:R3V[5678]*:*) 1131f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1132f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) 1133f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich OS_REL='' 1134f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich test -r /etc/.relid \ 1135f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1136f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1137f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1138f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1139f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1140f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1141f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1142f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && { echo i486-ncr-sysv4; exit; } ;; 1143f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1144f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich OS_REL='.3' 1145f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich test -r /etc/.relid \ 1146f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1147f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1148f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1149f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1150f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1151f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1152f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1153f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1154f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-unknown-lynxos${UNAME_RELEASE} 1155f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1156f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich mc68030:UNIX_System_V:4.*:*) 1157f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-atari-sysv4 1158f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1159f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich TSUNAMI:LynxOS:2.*:*) 1160f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sparc-unknown-lynxos${UNAME_RELEASE} 1161f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1162f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich rs6000:LynxOS:2.*:*) 1163f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo rs6000-unknown-lynxos${UNAME_RELEASE} 1164f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1165f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1166f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-unknown-lynxos${UNAME_RELEASE} 1167f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1168f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SM[BE]S:UNIX_SV:*:*) 1169f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-dde-sysv${UNAME_RELEASE} 1170f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1171f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich RM*:ReliantUNIX-*:*:*) 1172f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-sni-sysv4 1173f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1174f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich RM*:SINIX-*:*:*) 1175f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-sni-sysv4 1176f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1177f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:SINIX-*:*:*) 1178f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if uname -p 2>/dev/null >/dev/null ; then 1179f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE=`(uname -p) 2>/dev/null` 1180f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-sni-sysv4 1181f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 1182f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ns32k-sni-sysv 1183f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1184f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1185f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1186f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # says <Richard.M.Bartel@ccMail.Census.GOV> 1187f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i586-unisys-sysv4 1188f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1189f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:UNIX_System_V:4*:FTX*) 1190f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # From Gerald Hewes <hewes@openmarket.com>. 1191f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # How about differentiating between stratus architectures? -djm 1192f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa1.1-stratus-sysv4 1193f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1194f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:*:*:FTX*) 1195f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # From seanf@swdc.stratus.com. 1196f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i860-stratus-sysv4 1197f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1198f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:VOS:*:*) 1199f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # From Paul.Green@stratus.com. 1200f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-stratus-vos 1201f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1202f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:VOS:*:*) 1203f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # From Paul.Green@stratus.com. 1204f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo hppa1.1-stratus-vos 1205f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1206f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich mc68*:A/UX:*:*) 1207f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo m68k-apple-aux${UNAME_RELEASE} 1208f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1209f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich news*:NEWS-OS:6*:*) 1210f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-sony-newsos6 1211f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1212f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1213f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ -d /usr/nec ]; then 1214f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-nec-sysv${UNAME_RELEASE} 1215f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 1216f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-unknown-sysv${UNAME_RELEASE} 1217f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1218f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1219f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1220f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-be-beos 1221f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1222f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1223f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-apple-beos 1224f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1225f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1226f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i586-pc-beos 1227f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1228f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1229f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i586-pc-haiku 1230f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1231f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich x86_64:Haiku:*:*) 1232f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo x86_64-unknown-haiku 1233f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1234f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SX-4:SUPER-UX:*:*) 1235f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sx4-nec-superux${UNAME_RELEASE} 1236f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1237f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SX-5:SUPER-UX:*:*) 1238f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sx5-nec-superux${UNAME_RELEASE} 1239f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1240f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SX-6:SUPER-UX:*:*) 1241f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sx6-nec-superux${UNAME_RELEASE} 1242f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1243f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SX-7:SUPER-UX:*:*) 1244f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sx7-nec-superux${UNAME_RELEASE} 1245f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1246f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SX-8:SUPER-UX:*:*) 1247f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sx8-nec-superux${UNAME_RELEASE} 1248f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1249f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SX-8R:SUPER-UX:*:*) 1250f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo sx8r-nec-superux${UNAME_RELEASE} 1251f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1252f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich Power*:Rhapsody:*:*) 1253f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo powerpc-apple-rhapsody${UNAME_RELEASE} 1254f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1255f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:Rhapsody:*:*) 1256f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1257f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1258f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:Darwin:*:*) 1259f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1260f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich eval $set_cc_for_build 1261f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if test "$UNAME_PROCESSOR" = unknown ; then 1262f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_PROCESSOR=powerpc 1263f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1264f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 1265f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1266f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1267f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1268f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich grep IS_64BIT_ARCH >/dev/null 1269f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich then 1270f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case $UNAME_PROCESSOR in 1271f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i386) UNAME_PROCESSOR=x86_64 ;; 1272f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich powerpc) UNAME_PROCESSOR=powerpc64 ;; 1273f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac 1274f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1275f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1276f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich elif test "$UNAME_PROCESSOR" = i386 ; then 1277f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # Avoid executing cc on OS X 10.9, as it ships with a stub 1278f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # that puts up a graphical alert prompting to install 1279f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # developer tools. Any system running Mac OS X 10.7 or 1280f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # later (Darwin 11 and later) is required to have a 64-bit 1281f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # processor. This is not true of the ARM version of Darwin 1282f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # that Apple uses in portable devices. 1283f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_PROCESSOR=x86_64 1284f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1285f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1286f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1287f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:procnto*:*:* | *:QNX:[0123456789]*:*) 1288f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_PROCESSOR=`uname -p` 1289f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if test "$UNAME_PROCESSOR" = "x86"; then 1290f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_PROCESSOR=i386 1291f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE=pc 1292f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1293f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1294f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1295f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:QNX:*:4*) 1296f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i386-pc-qnx 1297f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1298f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich NEO-?:NONSTOP_KERNEL:*:*) 1299f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo neo-tandem-nsk${UNAME_RELEASE} 1300f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1301f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich NSE-*:NONSTOP_KERNEL:*:*) 1302f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo nse-tandem-nsk${UNAME_RELEASE} 1303f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1304f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich NSR-?:NONSTOP_KERNEL:*:*) 1305f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo nsr-tandem-nsk${UNAME_RELEASE} 1306f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1307f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:NonStop-UX:*:*) 1308f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-compaq-nonstopux 1309f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1310f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich BS2000:POSIX*:*:*) 1311f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo bs2000-siemens-sysv 1312f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1313f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich DS/*:UNIX_System_V:*:*) 1314f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1315f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1316f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:Plan9:*:*) 1317f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # "uname -m" is not consistent, so use $cputype instead. 386 1318f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # is converted to i386 for consistency with other x86 1319f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich # operating systems. 1320f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich if test "$cputype" = "386"; then 1321f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE=i386 1322f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich else 1323f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE="$cputype" 1324f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich fi 1325f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-plan9 1326f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1327f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:TOPS-10:*:*) 1328f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo pdp10-unknown-tops10 1329f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1330f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:TENEX:*:*) 1331f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo pdp10-unknown-tenex 1332f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1333f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1334f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo pdp10-dec-tops20 1335f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1336f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1337f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo pdp10-xkl-tops20 1338f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1339f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:TOPS-20:*:*) 1340f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo pdp10-unknown-tops20 1341f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1342f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:ITS:*:*) 1343f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo pdp10-unknown-its 1344f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1345f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich SEI:*:*:SEIUX) 1346f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo mips-sei-seiux${UNAME_RELEASE} 1347f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1348f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:DragonFly:*:*) 1349f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1350f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1351f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:*VMS:*:*) 1352f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich UNAME_MACHINE=`(uname -p) 2>/dev/null` 1353f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich case "${UNAME_MACHINE}" in 1354f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich A*) echo alpha-dec-vms ; exit ;; 1355f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich I*) echo ia64-dec-vms ; exit ;; 1356f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich V*) echo vax-dec-vms ; exit ;; 1357f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich esac ;; 1358f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich *:XENIX:*:SysV) 1359f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo i386-pc-xenix 1360f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1361f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:skyos:*:*) 1362f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1363f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1364f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:rdos:*:*) 1365f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-rdos 1366f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1367f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich i*86:AROS:*:*) 1368f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-pc-aros 1369f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1370f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich x86_64:VMkernel:*:*) 1371f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich echo ${UNAME_MACHINE}-unknown-esx 1372f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich exit ;; 1373f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichesac 1374f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1375f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichcat >&2 <<EOF 1376f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich$0: unable to guess system type 1377f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1378f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichThis script, last modified $timestamp, has failed to recognize 1379f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichthe operating system you are using. It is advised that you 1380f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichdownload the most up to date version of the config scripts from 1381f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1382f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1383f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichand 1384f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1385f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1386f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichIf the version you run ($0) is already up to date, please 1387f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichsend the following data and any information you think might be 1388f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichpertinent to <config-patches@gnu.org> in order to provide the needed 1389f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichinformation to handle your system. 1390f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1391f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichconfig.guess timestamp = $timestamp 1392f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1393f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichuname -m = `(uname -m) 2>/dev/null || echo unknown` 1394f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichuname -r = `(uname -r) 2>/dev/null || echo unknown` 1395f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichuname -s = `(uname -s) 2>/dev/null || echo unknown` 1396f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichuname -v = `(uname -v) 2>/dev/null || echo unknown` 1397f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1398f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1399f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1400f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1401f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichhostinfo = `(hostinfo) 2>/dev/null` 1402f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich/bin/universe = `(/bin/universe) 2>/dev/null` 1403f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1404f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich/bin/arch = `(/bin/arch) 2>/dev/null` 1405f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1406f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1407f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1408f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichUNAME_MACHINE = ${UNAME_MACHINE} 1409f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichUNAME_RELEASE = ${UNAME_RELEASE} 1410f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichUNAME_SYSTEM = ${UNAME_SYSTEM} 1411f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichUNAME_VERSION = ${UNAME_VERSION} 1412f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick KralevichEOF 1413f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1414f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevichexit 1 1415f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich 1416f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# Local variables: 1417f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# eval: (add-hook 'write-file-hooks 'time-stamp) 1418f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# time-stamp-start: "timestamp='" 1419f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# time-stamp-format: "%:y-%02m-%02d" 1420f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# time-stamp-end: "'" 1421f73ff17bddb7dc18ff9044773dd65d040e8f4fcfNick Kralevich# End: 1422