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