Changeset 008733 in git
- Timestamp:
- Jun 30, 2010, 2:25:19 PM (13 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
- Children:
- 4cfe968e9f2c139f34f69fccb257823023c3890e
- Parents:
- 879cc3cdc8d8c8a1af32e08d773dd1d1340c74b3
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-06-30 14:25:19+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:21+01:00
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
config.guess
r879cc3c r008733 1 1 #! /bin/sh 2 2 # Attempt to guess a canonical system name. 3 # 4 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 5 # Free Software Foundation, Inc. 6 # 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 5 # Free Software Foundation, Inc. 6 7 timestamp='2009-12-30' 8 7 9 # This file is free software; you can redistribute it and/or modify it 8 10 # under the terms of the GNU General Public License as published by … … 17 19 # You should have received a copy of the GNU General Public License 18 20 # along with this program; if not, write to the Free Software 19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 22 # 02110-1301, USA. 20 23 # 21 24 # As a special exception to the GNU General Public License, if you … … 24 27 # the same distribution terms that you use for the rest of that program. 25 28 26 # Written by Per Bothner <bothner@cygnus.com>. 27 # The master version of this file is at the FSF in /home/gd/gnu/lib. 29 30 # Originally written by Per Bothner. Please send patches (context 31 # diff format) to <config-patches@gnu.org> and include a ChangeLog 32 # entry. 28 33 # 29 34 # This script attempts to guess a canonical system name similar to … … 31 36 # exits with 0. Otherwise, it exits with 1. 32 37 # 33 # The plan is that this can be called by configure scripts if you 34 # don't specify an explicit system type (host/target name). 35 # 36 # Only a few systems have been added to this list; please add others 37 # (but try to keep the structure clean). 38 # 38 # You can get the latest version of this script from: 39 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 40 41 me=`echo "$0" | sed -e 's,.*/,,'` 42 43 usage="\ 44 Usage: $0 [OPTION] 45 46 Output the configuration name of the system \`$me' is run on. 47 48 Operation modes: 49 -h, --help print this help, then exit 50 -t, --time-stamp print date of last modification, then exit 51 -v, --version print version number, then exit 52 53 Report bugs and patches to <config-patches@gnu.org>." 54 55 version="\ 56 GNU config.guess ($timestamp) 57 58 Originally written by Per Bothner. 59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 60 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 61 Software Foundation, Inc. 62 63 This is free software; see the source for copying conditions. There is NO 64 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 65 66 help=" 67 Try \`$me --help' for more information." 68 69 # Parse command line 70 while test $# -gt 0 ; do 71 case $1 in 72 --time-stamp | --time* | -t ) 73 echo "$timestamp" ; exit ;; 74 --version | -v ) 75 echo "$version" ; exit ;; 76 --help | --h* | -h ) 77 echo "$usage"; exit ;; 78 -- ) # Stop option processing 79 shift; break ;; 80 - ) # Use stdin as input. 81 break ;; 82 -* ) 83 echo "$me: invalid option $1$help" >&2 84 exit 1 ;; 85 * ) 86 break ;; 87 esac 88 done 89 90 if test $# != 0; then 91 echo "$me: too many arguments$help" >&2 92 exit 1 93 fi 94 95 trap 'exit 1' 1 2 15 96 97 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a 98 # compiler to aid in system detection is discouraged as it requires 99 # temporary files to be created and, as you can see below, it is a 100 # headache to deal with in a portable fashion. 101 102 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 103 # use `HOST_CC' if defined, but it is deprecated. 104 105 # Portable tmp directory creation inspired by the Autoconf team. 106 107 set_cc_for_build=' 108 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 109 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 110 : ${TMPDIR=/tmp} ; 111 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 112 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 113 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 114 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 115 dummy=$tmp/dummy ; 116 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 117 case $CC_FOR_BUILD,$HOST_CC,$CC in 118 ,,) echo "int x;" > $dummy.c ; 119 for c in cc gcc c89 c99 ; do 120 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 121 CC_FOR_BUILD="$c"; break ; 122 fi ; 123 done ; 124 if test x"$CC_FOR_BUILD" = x ; then 125 CC_FOR_BUILD=no_compiler_found ; 126 fi 127 ;; 128 ,,*) CC_FOR_BUILD=$CC ;; 129 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 130 esac ; set_cc_for_build= ;' 39 131 40 132 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 41 # (ghazi@noc.rutgers.edu 8/24/94.)133 # (ghazi@noc.rutgers.edu 1994-08-24) 42 134 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 43 135 PATH=$PATH:/.attbin ; export PATH … … 46 138 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 47 139 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 48 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown140 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 49 141 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 50 142 51 trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 143 case "${UNAME_SYSTEM}" in 144 Linux|GNU/*) 145 eval $set_cc_for_build 146 cat <<-EOF > $dummy.c 147 #include <features.h> 148 #ifdef __UCLIBC__ 149 # ifdef __UCLIBC_CONFIG_VERSION__ 150 LIBC=uclibc __UCLIBC_CONFIG_VERSION__ 151 # else 152 LIBC=uclibc 153 # endif 154 #else 155 # ifdef __dietlibc__ 156 LIBC=dietlibc 157 # else 158 LIBC=gnu 159 # endif 160 #endif 161 EOF 162 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 163 ;; 164 esac 165 166 # Note: order is significant - the case branches are not exclusive. 52 167 53 168 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 54 i?86:*:*:*) 55 echo 'xwqilkn(){}' >dummy.c 56 ${CC-cc} dummy.c -S 2>/dev/null 57 if test "$?" = 0 ; then 58 u=`grep xwqilkn dummy.s | head -1 | sed 's;[^_]*\([_]*\)xwqilkn;\1;'` 59 cat <<EOF >dummy1.s 60 .globl ${u}cpuid 61 ${u}cpuid: 62 pushl %esi 63 pushl %ebx 64 movl 16(%esp),%eax 65 .word 0xa20f 66 movl 12(%esp),%esi 67 movl %ebx,(%esi) 68 movl %edx,4(%esi) 69 movl %ecx,8(%esi) 70 popl %ebx 71 popl %esi 72 ret 73 EOF 74 cat <<EOF >dummy2.c 75 main () 76 { 77 char vendor_string[13]; 78 char dummy_string[12]; 79 long fms; 80 int family, model; 81 char *modelstr; 82 83 cpuid (vendor_string, 0); 84 vendor_string[12] = 0; 85 86 fms = cpuid (dummy_string, 1); 87 88 family = (fms >> 8) & 15; 89 model = (fms >> 4) & 15; 90 91 modelstr = "i486"; 92 if (strcmp (vendor_string, "GenuineIntel") == 0) 93 { 94 switch (family) 95 { 96 case 5: 97 if (model <= 2) 98 modelstr = "pentium"; 99 else if (model >= 4) 100 modelstr = "pentiummmx"; 101 break; 102 case 6: 103 if (model == 1) 104 modelstr = "pentiumpro"; 105 else if (model <= 5) 106 modelstr = "pentium2"; 107 else 108 modelstr = "pentium3"; 109 break; 110 } 111 } 112 else if (strcmp (vendor_string, "AuthenticAMD") == 0) 113 { 114 switch (family) 115 { 116 case 5: 117 if (model <= 3) 118 modelstr = "k5"; 119 else if (model <= 7) 120 modelstr = "k6"; 121 else if (model <= 8) 122 modelstr = "k62"; 123 else if (model <= 9) 124 modelstr = "k63"; 125 break; 126 case 6: 127 modelstr = "athlon"; 128 break; 129 } 130 } 131 else if (strcmp (vendor_string, "CyrixInstead") == 0) 132 { 133 /* Should recognize Cyrix' processors too. */ 134 } 135 136 printf ("%s\n", modelstr); 137 return 0; 138 } 139 EOF 140 ${CC-cc} dummy1.s dummy2.c -o dummy 2>/dev/null 141 if test "$?" = 0 ; then 142 X86CPU=`./dummy` 143 fi 144 fi 145 146 # Default to believing uname -m if the program fails to compile or 147 # run. Will fail to run on 386 since cpuid was only added on 486. 148 if test -z "$X86CPU" 149 then 150 X86CPU="$UNAME_MACHINE" 151 fi 152 rm -f dummy.c dummy.s dummy1.s dummy2.c dummy 153 ;; 154 esac 155 156 # Note: order is significant - the case branches are not exclusive. 157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 169 *:NetBSD:*:*) 170 # NetBSD (nbsd) targets should (where applicable) match one or 171 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 172 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 173 # switched to ELF, *-*-netbsd* would select the old 174 # object file format. This provides both forward 175 # compatibility and a consistent mechanism for selecting the 176 # object file format. 177 # 178 # Note: NetBSD doesn't particularly care about the vendor 179 # portion of the name. We always set it to "unknown". 180 sysctl="sysctl -n hw.machine_arch" 181 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 182 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 183 case "${UNAME_MACHINE_ARCH}" in 184 armeb) machine=armeb-unknown ;; 185 arm*) machine=arm-unknown ;; 186 sh3el) machine=shl-unknown ;; 187 sh3eb) machine=sh-unknown ;; 188 sh5el) machine=sh5le-unknown ;; 189 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 190 esac 191 # The Operating System including object format, if it has switched 192 # to ELF recently, or will in the future. 193 case "${UNAME_MACHINE_ARCH}" in 194 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 195 eval $set_cc_for_build 196 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 197 | grep -q __ELF__ 198 then 199 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 200 # Return netbsd for either. FIX? 201 os=netbsd 202 else 203 os=netbsdelf 204 fi 205 ;; 206 *) 207 os=netbsd 208 ;; 209 esac 210 # The OS release 211 # Debian GNU/NetBSD machines have a different userland, and 212 # thus, need a distinct triplet. However, they do not need 213 # kernel version information, so it can be replaced with a 214 # suitable tag, in the style of linux-gnu. 215 case "${UNAME_VERSION}" in 216 Debian*) 217 release='-gnu' 218 ;; 219 *) 220 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 221 ;; 222 esac 223 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 224 # contains redundant information, the shorter form: 225 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 226 echo "${machine}-${os}${release}" 227 exit ;; 228 *:OpenBSD:*:*) 229 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 230 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 231 exit ;; 232 *:ekkoBSD:*:*) 233 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 234 exit ;; 235 *:SolidBSD:*:*) 236 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 237 exit ;; 238 macppc:MirBSD:*:*) 239 echo powerpc-unknown-mirbsd${UNAME_RELEASE} 240 exit ;; 241 *:MirBSD:*:*) 242 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 243 exit ;; 158 244 alpha:OSF1:*:*) 159 if test $UNAME_RELEASE = "V4.0"; then 245 case $UNAME_RELEASE in 246 *4.0) 160 247 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 161 fi 248 ;; 249 *5.*) 250 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 251 ;; 252 esac 253 # According to Compaq, /usr/sbin/psrinfo has been available on 254 # OSF/1 and Tru64 systems produced since 1995. I hope that 255 # covers most systems running today. This code pipes the CPU 256 # types through head -n 1, so we only detect the type of CPU 0. 257 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 258 case "$ALPHA_CPU_TYPE" in 259 "EV4 (21064)") 260 UNAME_MACHINE="alpha" ;; 261 "EV4.5 (21064)") 262 UNAME_MACHINE="alpha" ;; 263 "LCA4 (21066/21068)") 264 UNAME_MACHINE="alpha" ;; 265 "EV5 (21164)") 266 UNAME_MACHINE="alphaev5" ;; 267 "EV5.6 (21164A)") 268 UNAME_MACHINE="alphaev56" ;; 269 "EV5.6 (21164PC)") 270 UNAME_MACHINE="alphapca56" ;; 271 "EV5.7 (21164PC)") 272 UNAME_MACHINE="alphapca57" ;; 273 "EV6 (21264)") 274 UNAME_MACHINE="alphaev6" ;; 275 "EV6.7 (21264A)") 276 UNAME_MACHINE="alphaev67" ;; 277 "EV6.8CB (21264C)") 278 UNAME_MACHINE="alphaev68" ;; 279 "EV6.8AL (21264B)") 280 UNAME_MACHINE="alphaev68" ;; 281 "EV6.8CX (21264D)") 282 UNAME_MACHINE="alphaev68" ;; 283 "EV6.9A (21264/EV69A)") 284 UNAME_MACHINE="alphaev69" ;; 285 "EV7 (21364)") 286 UNAME_MACHINE="alphaev7" ;; 287 "EV7.9 (21364A)") 288 UNAME_MACHINE="alphaev79" ;; 289 esac 290 # A Pn.n version is a patched version. 162 291 # A Vn.n version is a released version. 163 292 # A Tn.n version is a released field test version. 164 293 # A Xn.n version is an unreleased experimental baselevel. 165 294 # 1.2 uses "1.2" for uname -r. 166 cat <<EOF >dummy.s 167 .globl main 168 .ent main 169 main: 170 .frame \$30,0,\$26,0 171 .prologue 0 172 .long 0x47e03d80 # implver $0 173 lda \$2,259 174 .long 0x47e20c21 # amask $2,$1 175 srl \$1,8,\$2 176 sll \$2,2,\$2 177 sll \$0,3,\$0 178 addl \$1,\$0,\$0 179 addl \$2,\$0,\$0 180 ret \$31,(\$26),1 181 .end main 182 EOF 183 ${CC-cc} dummy.s -o dummy 2>/dev/null 184 if test "$?" = 0 ; then 185 ./dummy 186 case "$?" in 187 7) 188 UNAME_MACHINE="alpha" 189 ;; 190 15) 191 UNAME_MACHINE="alphaev5" 192 ;; 193 14) 194 UNAME_MACHINE="alphaev56" 195 ;; 196 10) 197 UNAME_MACHINE="alphapca56" 198 ;; 199 16) 200 UNAME_MACHINE="alphaev6" 201 ;; 202 esac 203 fi 204 rm -f dummy.s dummy 205 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` 206 exit 0 ;; 207 alpha:NetBSD:*:* | alpha:FreeBSD:*:*) 208 cat <<EOF >dummy.s 209 .globl main 210 .ent main 211 main: 212 .frame \$30,0,\$26,0 213 .prologue 0 214 .long 0x47e03d80 # implver $0 215 lda \$2,259 216 .long 0x47e20c21 # amask $2,$1 217 srl \$1,8,\$2 218 sll \$2,2,\$2 219 sll \$0,3,\$0 220 addl \$1,\$0,\$0 221 addl \$2,\$0,\$0 222 ret \$31,(\$26),1 223 .end main 224 EOF 225 ${CC-cc} dummy.s -o dummy 2>/dev/null 226 if test "$?" = 0 ; then 227 ./dummy 228 case "$?" in 229 7) 230 UNAME_MACHINE="alpha" 231 ;; 232 15) 233 UNAME_MACHINE="alphaev5" 234 ;; 235 14) 236 UNAME_MACHINE="alphaev56" 237 ;; 238 10) 239 UNAME_MACHINE="alphapca56" 240 ;; 241 16) 242 UNAME_MACHINE="alphaev6" 243 ;; 244 esac 245 fi 246 rm -f dummy.s dummy 247 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM}${UNAME_RELEASE} | sed -e 's/^[VTX]//' -e 's/[-(].*//' | tr [[A-Z]] [[a-z]]` 248 exit 0 ;; 295 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 296 exit ;; 297 Alpha\ *:Windows_NT*:*) 298 # How do we know it's Interix rather than the generic POSIX subsystem? 299 # Should we change UNAME_MACHINE based on the output of uname instead 300 # of the specific Alpha model? 301 echo alpha-pc-interix 302 exit ;; 249 303 21064:Windows_NT:50:3) 250 304 echo alpha-dec-winnt3.5 251 exit 0;;305 exit ;; 252 306 Amiga*:UNIX_System_V:4.0:*) 253 echo m68k-cbm-sysv4 254 exit 0;; 255 amiga:NetBSD:*:*) 256 echo m68k-cbm-netbsd${UNAME_RELEASE} 257 exit 0 ;; 258 amiga:OpenBSD:*:*) 259 echo m68k-unknown-openbsd${UNAME_RELEASE} 260 exit 0 ;; 261 arc64:OpenBSD:*:*) 262 echo mips64el-unknown-openbsd${UNAME_RELEASE} 263 exit 0 ;; 264 arc:OpenBSD:*:*) 265 echo mipsel-unknown-openbsd${UNAME_RELEASE} 266 exit 0 ;; 267 hkmips:OpenBSD:*:*) 268 echo mips-unknown-openbsd${UNAME_RELEASE} 269 exit 0 ;; 270 pmax:OpenBSD:*:*) 271 echo mipsel-unknown-openbsd${UNAME_RELEASE} 272 exit 0 ;; 273 sgi:OpenBSD:*:*) 274 echo mips-unknown-openbsd${UNAME_RELEASE} 275 exit 0 ;; 276 wgrisc:OpenBSD:*:*) 277 echo mipsel-unknown-openbsd${UNAME_RELEASE} 278 exit 0 ;; 307 echo m68k-unknown-sysv4 308 exit ;; 309 *:[Aa]miga[Oo][Ss]:*:*) 310 echo ${UNAME_MACHINE}-unknown-amigaos 311 exit ;; 312 *:[Mm]orph[Oo][Ss]:*:*) 313 echo ${UNAME_MACHINE}-unknown-morphos 314 exit ;; 315 *:OS/390:*:*) 316 echo i370-ibm-openedition 317 exit ;; 318 *:z/VM:*:*) 319 echo s390-ibm-zvmoe 320 exit ;; 321 *:OS400:*:*) 322 echo powerpc-ibm-os400 323 exit ;; 279 324 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 280 325 echo arm-acorn-riscix${UNAME_RELEASE} 281 exit 0;;282 arm 32:NetBSD:*:*)283 echo arm-unknown- netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`284 exit 0;;285 SR2?01:HI-UX/MPP:*:* )326 exit ;; 327 arm:riscos:*:*|arm:RISCOS:*:*) 328 echo arm-unknown-riscos 329 exit ;; 330 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 286 331 echo hppa1.1-hitachi-hiuxmpp 287 exit 0;;288 Pyramid*:OSx*:*:* |MIS*:OSx*:*:*)332 exit ;; 333 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 289 334 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 290 335 if test "`(/bin/universe) 2>/dev/null`" = att ; then … … 293 338 echo pyramid-pyramid-bsd 294 339 fi 295 exit 0;;296 NILE :*:*:dcosx)340 exit ;; 341 NILE*:*:*:dcosx) 297 342 echo pyramid-pyramid-svr4 298 exit 0 ;; 299 sun4[md]:SunOS:5.*:*) 300 echo sparcv8-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 301 exit 0 ;; 302 sun4u:SunOS:5.*:*) 303 echo sparcv9-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 304 exit 0 ;; 343 exit ;; 344 DRS?6000:unix:4.0:6*) 345 echo sparc-icl-nx6 346 exit ;; 347 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 348 case `/usr/bin/uname -p` in 349 sparc) echo sparc-icl-nx7; exit ;; 350 esac ;; 351 s390x:SunOS:*:*) 352 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 353 exit ;; 354 sun4H:SunOS:5.*:*) 355 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 356 exit ;; 305 357 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 306 358 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 307 exit 0 ;; 308 i86pc:SunOS:5.*:*) 309 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 310 exit 0 ;; 311 sun4[md]:SunOS:*:*) 312 case "`/usr/bin/arch -k`" in 313 Series*|S4*) 314 UNAME_RELEASE=`uname -v` 315 ;; 316 esac 317 # Japanese Language versions have a version number like `4.1.3-JL'. 318 echo sparcv8-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 319 exit 0 ;; 359 exit ;; 360 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 361 echo i386-pc-auroraux${UNAME_RELEASE} 362 exit ;; 363 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 364 eval $set_cc_for_build 365 SUN_ARCH="i386" 366 # If there is a compiler, see if it is configured for 64-bit objects. 367 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 368 # This test works for both compilers. 369 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 370 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 371 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 372 grep IS_64BIT_ARCH >/dev/null 373 then 374 SUN_ARCH="x86_64" 375 fi 376 fi 377 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 378 exit ;; 379 sun4*:SunOS:6*:*) 380 # According to config.sub, this is the proper way to canonicalize 381 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 382 # it's likely to be more like Solaris than SunOS4. 383 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 384 exit ;; 320 385 sun4*:SunOS:*:*) 321 386 case "`/usr/bin/arch -k`" in … … 326 391 # Japanese Language versions have a version number like `4.1.3-JL'. 327 392 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 328 exit 0;;393 exit ;; 329 394 sun3*:SunOS:*:*) 330 395 echo m68k-sun-sunos${UNAME_RELEASE} 331 exit 0;;396 exit ;; 332 397 sun*:*:4.2BSD:*) 333 UNAME_RELEASE=`( head -1/etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`398 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 334 399 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 335 400 case "`/bin/arch`" in … … 341 406 ;; 342 407 esac 343 exit 0;;408 exit ;; 344 409 aushp:SunOS:*:*) 345 410 echo sparc-auspex-sunos${UNAME_RELEASE} 346 exit 0 ;; 347 atari*:NetBSD:*:*) 348 echo m68k-atari-netbsd${UNAME_RELEASE} 349 exit 0 ;; 350 atari*:OpenBSD:*:*) 351 echo m68k-unknown-openbsd${UNAME_RELEASE} 352 exit 0 ;; 353 sun3*:NetBSD:*:*) 354 echo m68k-sun-netbsd${UNAME_RELEASE} 355 exit 0 ;; 356 sun3*:OpenBSD:*:*) 357 echo m68k-unknown-openbsd${UNAME_RELEASE} 358 exit 0 ;; 359 mac68k:NetBSD:*:*) 360 echo m68k-apple-netbsd${UNAME_RELEASE} 361 exit 0 ;; 362 mac68k:OpenBSD:*:*) 363 echo m68k-unknown-openbsd${UNAME_RELEASE} 364 exit 0 ;; 365 macppc:NetBSD:*:*) 366 echo powerpc-apple-netbsd${UNAME_RELEASE} 367 exit 0 ;; 368 mvme68k:OpenBSD:*:*) 369 echo m68k-unknown-openbsd${UNAME_RELEASE} 370 exit 0 ;; 371 mvme88k:OpenBSD:*:*) 372 echo m88k-unknown-openbsd${UNAME_RELEASE} 373 exit 0 ;; 411 exit ;; 412 # The situation for MiNT is a little confusing. The machine name 413 # can be virtually everything (everything which is not 414 # "atarist" or "atariste" at least should have a processor 415 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 416 # to the lowercase version "mint" (or "freemint"). Finally 417 # the system name "TOS" denotes a system which is actually not 418 # MiNT. But MiNT is downward compatible to TOS, so this should 419 # be no problem. 420 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 421 echo m68k-atari-mint${UNAME_RELEASE} 422 exit ;; 423 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 424 echo m68k-atari-mint${UNAME_RELEASE} 425 exit ;; 426 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 427 echo m68k-atari-mint${UNAME_RELEASE} 428 exit ;; 429 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 430 echo m68k-milan-mint${UNAME_RELEASE} 431 exit ;; 432 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 433 echo m68k-hades-mint${UNAME_RELEASE} 434 exit ;; 435 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 436 echo m68k-unknown-mint${UNAME_RELEASE} 437 exit ;; 438 m68k:machten:*:*) 439 echo m68k-apple-machten${UNAME_RELEASE} 440 exit ;; 374 441 powerpc:machten:*:*) 375 442 echo powerpc-apple-machten${UNAME_RELEASE} 376 exit 0;;443 exit ;; 377 444 RISC*:Mach:*:*) 378 445 echo mips-dec-mach_bsd4.3 379 exit 0;;446 exit ;; 380 447 RISC*:ULTRIX:*:*) 381 448 echo mips-dec-ultrix${UNAME_RELEASE} 382 exit 0;;449 exit ;; 383 450 VAX*:ULTRIX*:*:*) 384 451 echo vax-dec-ultrix${UNAME_RELEASE} 385 exit 0;;386 2020:CLIX:*:* )452 exit ;; 453 2020:CLIX:*:* | 2430:CLIX:*:*) 387 454 echo clipper-intergraph-clix${UNAME_RELEASE} 388 exit 0;;455 exit ;; 389 456 mips:*:*:UMIPS | mips:*:*:RISCos) 390 sed 's/^ //' << EOF >dummy.c 391 int main (argc, argv) int argc; char **argv; { 457 eval $set_cc_for_build 458 sed 's/^ //' << EOF >$dummy.c 459 #ifdef __cplusplus 460 #include <stdio.h> /* for printf() prototype */ 461 int main (int argc, char *argv[]) { 462 #else 463 int main (argc, argv) int argc; char *argv[]; { 464 #endif 392 465 #if defined (host_mips) && defined (MIPSEB) 393 466 #if defined (SYSTYPE_SYSV) … … 404 477 } 405 478 EOF 406 $ {CC-cc} dummy.c -o dummy \407 && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \408 && rm dummy.c dummy && exit 0409 rm -f dummy.c dummy479 $CC_FOR_BUILD -o $dummy $dummy.c && 480 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 481 SYSTEM_NAME=`$dummy $dummyarg` && 482 { echo "$SYSTEM_NAME"; exit; } 410 483 echo mips-mips-riscos${UNAME_RELEASE} 411 exit 0 ;; 484 exit ;; 485 Motorola:PowerMAX_OS:*:*) 486 echo powerpc-motorola-powermax 487 exit ;; 488 Motorola:*:4.3:PL8-*) 489 echo powerpc-harris-powermax 490 exit ;; 491 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 492 echo powerpc-harris-powermax 493 exit ;; 412 494 Night_Hawk:Power_UNIX:*:*) 413 495 echo powerpc-harris-powerunix 414 exit 0;;496 exit ;; 415 497 m88k:CX/UX:7*:*) 416 498 echo m88k-harris-cxux7 417 exit 0;;499 exit ;; 418 500 m88k:*:4*:R4*) 419 501 echo m88k-motorola-sysv4 420 exit 0;;502 exit ;; 421 503 m88k:*:3*:R3*) 422 504 echo m88k-motorola-sysv3 423 exit 0;;505 exit ;; 424 506 AViiON:dgux:*:*) 425 507 # DG/UX returns AViiON for all architectures 426 508 UNAME_PROCESSOR=`/usr/bin/uname -p` 427 if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then 428 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ 429 -o ${TARGET_BINARY_INTERFACE}x = x ] ; then 509 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 510 then 511 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 512 [ ${TARGET_BINARY_INTERFACE}x = x ] 513 then 430 514 echo m88k-dg-dgux${UNAME_RELEASE} 515 else 516 echo m88k-dg-dguxbcs${UNAME_RELEASE} 517 fi 431 518 else 432 echo m88k-dg-dguxbcs${UNAME_RELEASE} 433 fi 434 else echo i586-dg-dgux${UNAME_RELEASE} 435 fi 436 exit 0 ;; 519 echo i586-dg-dgux${UNAME_RELEASE} 520 fi 521 exit ;; 437 522 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 438 523 echo m88k-dolphin-sysv3 439 exit 0;;524 exit ;; 440 525 M88*:*:R3*:*) 441 526 # Delta 88k system running SVR3 442 527 echo m88k-motorola-sysv3 443 exit 0;;528 exit ;; 444 529 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 445 530 echo m88k-tektronix-sysv3 446 exit 0;;531 exit ;; 447 532 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 448 533 echo m68k-tektronix-bsd 449 exit 0;;534 exit ;; 450 535 *:IRIX*:*:*) 451 536 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 452 exit 0;;537 exit ;; 453 538 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 454 echo romp-ibm-aix 455 exit 0 ;;# Note that: echo "'`uname -s`'" gives 'AIX '456 i ?86:AIX:*:*)539 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 540 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 541 i*86:AIX:*:*) 457 542 echo i386-ibm-aix 458 exit 0 ;; 543 exit ;; 544 ia64:AIX:*:*) 545 if [ -x /usr/bin/oslevel ] ; then 546 IBM_REV=`/usr/bin/oslevel` 547 else 548 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 549 fi 550 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 551 exit ;; 459 552 *:AIX:2:3) 460 553 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 461 sed 's/^ //' << EOF >dummy.c 554 eval $set_cc_for_build 555 sed 's/^ //' << EOF >$dummy.c 462 556 #include <sys/systemcfg.h> 463 557 … … 470 564 } 471 565 EOF 472 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 473 rm -f dummy.c dummy 474 echo rs6000-ibm-aix3.2.5 566 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 567 then 568 echo "$SYSTEM_NAME" 569 else 570 echo rs6000-ibm-aix3.2.5 571 fi 475 572 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 476 573 echo rs6000-ibm-aix3.2.4 … … 478 575 echo rs6000-ibm-aix3.2 479 576 fi 480 exit 0 ;; 481 *:AIX:*:4) 482 sed 's/^ //' << EOF >dummy.c 483 #include <stdio.h> 484 #include <sys/systemcfg.h> 485 main () 486 { 487 if (_system_configuration.architecture == POWER_RS 488 || _system_configuration.implementation == POWER_601) 489 puts ("power"); 490 else 491 { 492 if (_system_configuration.width == 64) 493 puts ("powerpc64"); 494 else 495 puts ("powerpc"); 496 } 497 exit (0); 498 } 499 EOF 500 ${CC-cc} dummy.c -o dummy 501 IBM_ARCH=`./dummy` 502 rm -f dummy.c dummy 577 exit ;; 578 *:AIX:*:[456]) 579 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 580 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 581 IBM_ARCH=rs6000 582 else 583 IBM_ARCH=powerpc 584 fi 503 585 if [ -x /usr/bin/oslevel ] ; then 504 586 IBM_REV=`/usr/bin/oslevel` 505 587 else 506 IBM_REV= 4.${UNAME_RELEASE}588 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 507 589 fi 508 590 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 509 exit 0;;591 exit ;; 510 592 *:AIX:*:*) 511 593 echo rs6000-ibm-aix 512 exit 0;;594 exit ;; 513 595 ibmrt:4.4BSD:*|romp-ibm:BSD:*) 514 596 echo romp-ibm-bsd4.4 515 exit 0;;516 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and597 exit ;; 598 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 517 599 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 518 exit 0 ;;# report: romp-ibm BSD 4.3600 exit ;; # report: romp-ibm BSD 4.3 519 601 *:BOSX:*:*) 520 602 echo rs6000-bull-bosx 521 exit 0;;603 exit ;; 522 604 DPX/2?00:B.O.S.:*:*) 523 605 echo m68k-bull-sysv3 524 exit 0;;606 exit ;; 525 607 9000/[34]??:4.3bsd:1.*:*) 526 608 echo m68k-hp-bsd 527 exit 0;;609 exit ;; 528 610 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 529 611 echo m68k-hp-bsd4.4 530 exit 0 ;; 531 9000/[3478]??:HP-UX:*:*) 612 exit ;; 613 9000/[34678]??:HP-UX:*:*) 614 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 532 615 case "${UNAME_MACHINE}" in 533 616 9000/31? ) HP_ARCH=m68000 ;; 534 617 9000/[34]?? ) HP_ARCH=m68k ;; 535 9000/6?? ) HP_ARCH=hppa1.0 ;; 536 9000/78? ) HP_ARCH=hppa2.0 ;; 537 9000/7?? ) HP_ARCH=hppa1.1 ;; 538 9000/8[67]1 | 9000/80[24] | 9000/8[10]0 | 9000/8[78]9 | 9000/893 ) 539 HP_ARCH=hppa2.0 ;; 540 9000/8?[13679] ) HP_ARCH=hppa1.1 ;; 541 9000/8?? ) HP_ARCH=hppa1.0 ;; 618 9000/[678][0-9][0-9]) 619 if [ -x /usr/bin/getconf ]; then 620 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 621 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 622 case "${sc_cpu_version}" in 623 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 624 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 625 532) # CPU_PA_RISC2_0 626 case "${sc_kernel_bits}" in 627 32) HP_ARCH="hppa2.0n" ;; 628 64) HP_ARCH="hppa2.0w" ;; 629 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 630 esac ;; 631 esac 632 fi 633 if [ "${HP_ARCH}" = "" ]; then 634 eval $set_cc_for_build 635 sed 's/^ //' << EOF >$dummy.c 636 637 #define _HPUX_SOURCE 638 #include <stdlib.h> 639 #include <unistd.h> 640 641 int main () 642 { 643 #if defined(_SC_KERNEL_BITS) 644 long bits = sysconf(_SC_KERNEL_BITS); 645 #endif 646 long cpu = sysconf (_SC_CPU_VERSION); 647 648 switch (cpu) 649 { 650 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 651 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 652 case CPU_PA_RISC2_0: 653 #if defined(_SC_KERNEL_BITS) 654 switch (bits) 655 { 656 case 64: puts ("hppa2.0w"); break; 657 case 32: puts ("hppa2.0n"); break; 658 default: puts ("hppa2.0"); break; 659 } break; 660 #else /* !defined(_SC_KERNEL_BITS) */ 661 puts ("hppa2.0"); break; 662 #endif 663 default: puts ("hppa1.0"); break; 664 } 665 exit (0); 666 } 667 EOF 668 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 669 test -z "$HP_ARCH" && HP_ARCH=hppa 670 fi ;; 542 671 esac 672 if [ ${HP_ARCH} = "hppa2.0w" ] 673 then 674 eval $set_cc_for_build 675 676 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 677 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 678 # generating 64-bit code. GNU and HP use different nomenclature: 679 # 680 # $ CC_FOR_BUILD=cc ./config.guess 681 # => hppa2.0w-hp-hpux11.23 682 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 683 # => hppa64-hp-hpux11.23 684 685 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 686 grep -q __LP64__ 687 then 688 HP_ARCH="hppa2.0w" 689 else 690 HP_ARCH="hppa64" 691 fi 692 fi 693 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 694 exit ;; 695 ia64:HP-UX:*:*) 543 696 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 544 echo ${HP_ARCH}-hp-hpux${HPUX_REV}545 exit 0;;697 echo ia64-hp-hpux${HPUX_REV} 698 exit ;; 546 699 3050*:HI-UX:*:*) 547 sed 's/^ //' << EOF >dummy.c 700 eval $set_cc_for_build 701 sed 's/^ //' << EOF >$dummy.c 548 702 #include <unistd.h> 549 703 int … … 570 724 } 571 725 EOF 572 $ {CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0573 rm -f dummy.c dummy726 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 727 { echo "$SYSTEM_NAME"; exit; } 574 728 echo unknown-hitachi-hiuxwe2 575 exit 0;;729 exit ;; 576 730 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 577 731 echo hppa1.1-hp-bsd 578 exit 0;;732 exit ;; 579 733 9000/8??:4.3bsd:*:*) 580 734 echo hppa1.0-hp-bsd 581 exit 0 ;; 735 exit ;; 736 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 737 echo hppa1.0-hp-mpeix 738 exit ;; 582 739 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 583 740 echo hppa1.1-hp-osf 584 exit 0;;741 exit ;; 585 742 hp8??:OSF1:*:*) 586 743 echo hppa1.0-hp-osf 587 exit 0;;588 i ?86:OSF1:*:*)744 exit ;; 745 i*86:OSF1:*:*) 589 746 if [ -x /usr/sbin/sysversion ] ; then 590 747 echo ${UNAME_MACHINE}-unknown-osf1mk … … 592 749 echo ${UNAME_MACHINE}-unknown-osf1 593 750 fi 594 exit 0;;751 exit ;; 595 752 parisc*:Lites*:*:*) 596 753 echo hppa1.1-hp-lites 597 exit 0;;754 exit ;; 598 755 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 599 756 echo c1-convex-bsd 600 exit 0;;757 exit ;; 601 758 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 602 759 if getsysinfo -f scalar_acc … … 604 761 else echo c2-convex-bsd 605 762 fi 606 exit 0;;763 exit ;; 607 764 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 608 765 echo c34-convex-bsd 609 exit 0;;766 exit ;; 610 767 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 611 768 echo c38-convex-bsd 612 exit 0;;769 exit ;; 613 770 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 614 771 echo c4-convex-bsd 615 exit 0 ;; 616 CRAY*X-MP:*:*:*) 617 echo xmp-cray-unicos 618 exit 0 ;; 772 exit ;; 619 773 CRAY*Y-MP:*:*:*) 620 echo ymp-cray-unicos${UNAME_RELEASE} 621 exit 0;;774 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 775 exit ;; 622 776 CRAY*[A-Z]90:*:*:*) 623 777 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 624 778 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 625 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ 626 exit 0 ;; 779 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 780 -e 's/\.[^.]*$/.X/' 781 exit ;; 627 782 CRAY*TS:*:*:*) 628 echo t90-cray-unicos${UNAME_RELEASE} 629 exit 0 ;; 630 CRAY-2:*:*:*) 631 echo cray2-cray-unicos 632 exit 0 ;; 633 CRAY*T3D:*:*) 634 echo alpha-cray-unicos 635 exit 0 ;; 636 CRAY*T3E:*:*) 637 echo alphaev5-cray-unicos 638 exit 0 ;; 639 F300:UNIX_System_V:*:*) 640 FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` 783 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 784 exit ;; 785 CRAY*T3E:*:*:*) 786 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 787 exit ;; 788 CRAY*SV1:*:*:*) 789 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 790 exit ;; 791 *:UNICOS/mp:*:*) 792 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 793 exit ;; 794 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 795 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 796 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 641 797 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 642 echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 643 exit 0 ;; 644 F301:UNIX_System_V:*:*) 645 echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` 646 exit 0 ;; 647 hp3[0-9][05]:NetBSD:*:*) 648 echo m68k-hp-netbsd${UNAME_RELEASE} 649 exit 0 ;; 650 hp300:OpenBSD:*:*) 651 echo m68k-unknown-openbsd${UNAME_RELEASE} 652 exit 0 ;; 653 i?86:BSD/386:*:* | *:BSD/OS:*:*) 798 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 799 exit ;; 800 5000:UNIX_System_V:4.*:*) 801 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 802 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 803 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 804 exit ;; 805 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 654 806 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 655 exit 0 ;; 656 i386:FreeBSD:*:*) 657 echo ${X86CPU}-pc-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 658 exit 0 ;; 807 exit ;; 808 sparc*:BSD/OS:*:*) 809 echo sparc-unknown-bsdi${UNAME_RELEASE} 810 exit ;; 811 *:BSD/OS:*:*) 812 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 813 exit ;; 659 814 *:FreeBSD:*:*) 660 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 661 exit 0 ;; 662 i386:NetBSD:*:*) 663 echo ${X86CPU}-pc-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 664 exit 0 ;; 665 *:NetBSD:*:*) 666 echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 667 exit 0 ;; 668 i386:OpenBSD:*:*) 669 echo ${X86CPU}-pc-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 670 exit 0 ;; 671 *:OpenBSD:*:*) 672 echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 673 exit 0 ;; 815 case ${UNAME_MACHINE} in 816 pc98) 817 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 818 amd64) 819 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 820 *) 821 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 822 esac 823 exit ;; 674 824 i*:CYGWIN*:*) 675 echo ${UNAME_MACHINE}-pc-cygwin 32676 exit 0;;677 i*:MINGW*:*)825 echo ${UNAME_MACHINE}-pc-cygwin 826 exit ;; 827 *:MINGW*:*) 678 828 echo ${UNAME_MACHINE}-pc-mingw32 679 exit 0 ;; 829 exit ;; 830 i*:windows32*:*) 831 # uname -m includes "-pc" on this system. 832 echo ${UNAME_MACHINE}-mingw32 833 exit ;; 834 i*:PW*:*) 835 echo ${UNAME_MACHINE}-pc-pw32 836 exit ;; 837 *:Interix*:*) 838 case ${UNAME_MACHINE} in 839 x86) 840 echo i586-pc-interix${UNAME_RELEASE} 841 exit ;; 842 authenticamd | genuineintel | EM64T) 843 echo x86_64-unknown-interix${UNAME_RELEASE} 844 exit ;; 845 IA64) 846 echo ia64-unknown-interix${UNAME_RELEASE} 847 exit ;; 848 esac ;; 849 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 850 echo i${UNAME_MACHINE}-pc-mks 851 exit ;; 852 8664:Windows_NT:*) 853 echo x86_64-pc-mks 854 exit ;; 855 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 856 # How do we know it's Interix rather than the generic POSIX subsystem? 857 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 858 # UNAME_MACHINE based on the output of uname instead of i386? 859 echo i586-pc-interix 860 exit ;; 861 i*:UWIN*:*) 862 echo ${UNAME_MACHINE}-pc-uwin 863 exit ;; 864 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 865 echo x86_64-unknown-cygwin 866 exit ;; 680 867 p*:CYGWIN*:*) 681 echo powerpcle-unknown-cygwin 32682 exit 0;;868 echo powerpcle-unknown-cygwin 869 exit ;; 683 870 prep*:SunOS:5.*:*) 684 871 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 685 exit 0;;872 exit ;; 686 873 *:GNU:*:*) 687 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 688 exit 0 ;; 689 *:Linux:*:*) 690 # uname on the ARM produces all sorts of strangeness, and we need to 691 # filter it out. 692 case "$UNAME_MACHINE" in 693 arm* | sa110*) UNAME_MACHINE="arm" ;; 874 # the GNU system 875 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 876 exit ;; 877 *:GNU/*:*:*) 878 # other systems with GNU libc and userland 879 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 880 exit ;; 881 i*86:Minix:*:*) 882 echo ${UNAME_MACHINE}-pc-minix 883 exit ;; 884 alpha:Linux:*:*) 885 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 886 EV5) UNAME_MACHINE=alphaev5 ;; 887 EV56) UNAME_MACHINE=alphaev56 ;; 888 PCA56) UNAME_MACHINE=alphapca56 ;; 889 PCA57) UNAME_MACHINE=alphapca56 ;; 890 EV6) UNAME_MACHINE=alphaev6 ;; 891 EV67) UNAME_MACHINE=alphaev67 ;; 892 EV68*) UNAME_MACHINE=alphaev68 ;; 893 esac 894 objdump --private-headers /bin/sh | grep -q ld.so.1 895 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 896 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 897 exit ;; 898 arm*:Linux:*:*) 899 eval $set_cc_for_build 900 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 901 | grep -q __ARM_EABI__ 902 then 903 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 904 else 905 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 906 fi 907 exit ;; 908 avr32*:Linux:*:*) 909 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 910 exit ;; 911 cris:Linux:*:*) 912 echo cris-axis-linux-${LIBC} 913 exit ;; 914 crisv32:Linux:*:*) 915 echo crisv32-axis-linux-${LIBC} 916 exit ;; 917 frv:Linux:*:*) 918 echo frv-unknown-linux-${LIBC} 919 exit ;; 920 i*86:Linux:*:*) 921 echo ${UNAME_MACHINE}-pc-linux-${LIBC} 922 exit ;; 923 ia64:Linux:*:*) 924 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 925 exit ;; 926 m32r*:Linux:*:*) 927 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 928 exit ;; 929 m68*:Linux:*:*) 930 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 931 exit ;; 932 mips:Linux:*:* | mips64:Linux:*:*) 933 eval $set_cc_for_build 934 sed 's/^ //' << EOF >$dummy.c 935 #undef CPU 936 #undef ${UNAME_MACHINE} 937 #undef ${UNAME_MACHINE}el 938 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 939 CPU=${UNAME_MACHINE}el 940 #else 941 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 942 CPU=${UNAME_MACHINE} 943 #else 944 CPU= 945 #endif 946 #endif 947 EOF 948 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 949 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 950 ;; 951 or32:Linux:*:*) 952 echo or32-unknown-linux-${LIBC} 953 exit ;; 954 padre:Linux:*:*) 955 echo sparc-unknown-linux-${LIBC} 956 exit ;; 957 parisc64:Linux:*:* | hppa64:Linux:*:*) 958 echo hppa64-unknown-linux-${LIBC} 959 exit ;; 960 parisc:Linux:*:* | hppa:Linux:*:*) 961 # Look for CPU level 962 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 963 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 964 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 965 *) echo hppa-unknown-linux-${LIBC} ;; 694 966 esac 695 696 # The BFD linker knows what the default object file format is, so 697 # first see if it will tell us. 698 ld_help_string=`ld --help 2>&1` 699 ld_supported_emulations=`echo $ld_help_string \ 700 | sed -ne '/supported emulations:/!d 701 s/[ ][ ]*/ /g 702 s/.*supported emulations: *// 703 s/ .*// 704 p'` 705 case "$ld_supported_emulations" in 706 i?86linux) echo "${X86CPU}-pc-linux-gnuaout" ; exit 0 ;; 707 i?86coff) echo "${X86CPU}-pc-linux-gnucoff" ; exit 0 ;; 708 sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; 709 armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; 710 m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; 711 elf32ppc) 712 # Determine Lib Version 713 cat >dummy.c <<EOF 714 #include <features.h> 715 #if defined(__GLIBC__) 716 extern char __libc_version[]; 717 extern char __libc_release[]; 718 #endif 719 main(argc, argv) 720 int argc; 721 char *argv[]; 722 { 723 #if defined(__GLIBC__) 724 printf("%s %s\n", __libc_version, __libc_release); 725 #else 726 printf("unkown\n"); 727 #endif 728 return 0; 729 } 730 EOF 731 LIBC="" 732 ${CC-cc} dummy.c -o dummy 2>/dev/null 733 if test "$?" = 0 ; then 734 ./dummy | grep 1\.99 > /dev/null 735 if test "$?" = 0 ; then 736 LIBC="libc1" 737 fi 738 fi 739 rm -f dummy.c dummy 740 echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;; 741 esac 742 743 if test "${UNAME_MACHINE}" = "alpha" ; then 744 sed 's/^ //' <<EOF >dummy.s 745 .globl main 746 .ent main 747 main: 748 .frame \$30,0,\$26,0 749 .prologue 0 750 .long 0x47e03d80 # implver $0 751 lda \$2,259 752 .long 0x47e20c21 # amask $2,$1 753 srl \$1,8,\$2 754 sll \$2,2,\$2 755 sll \$0,3,\$0 756 addl \$1,\$0,\$0 757 addl \$2,\$0,\$0 758 ret \$31,(\$26),1 759 .end main 760 EOF 761 LIBC="" 762 ${CC-cc} dummy.s -o dummy 2>/dev/null 763 if test "$?" = 0 ; then 764 ./dummy 765 case "$?" in 766 7) 767 UNAME_MACHINE="alpha" 768 ;; 769 15) 770 UNAME_MACHINE="alphaev5" 771 ;; 772 14) 773 UNAME_MACHINE="alphaev56" 774 ;; 775 10) 776 UNAME_MACHINE="alphapca56" 777 ;; 778 16) 779 UNAME_MACHINE="alphaev6" 780 ;; 781 esac 782 783 objdump --private-headers dummy | \ 784 grep ld.so.1 > /dev/null 785 if test "$?" = 0 ; then 786 LIBC="libc1" 787 fi 788 fi 789 rm -f dummy.s dummy 790 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 791 elif test "${UNAME_MACHINE}" = "mips" ; then 792 cat >dummy.c <<EOF 793 main(argc, argv) 794 int argc; 795 char *argv[]; 796 { 797 #ifdef __MIPSEB__ 798 printf ("%s-unknown-linux-gnu\n", argv[1]); 799 #endif 800 #ifdef __MIPSEL__ 801 printf ("%sel-unknown-linux-gnu\n", argv[1]); 802 #endif 803 return 0; 804 } 805 EOF 806 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 807 rm -f dummy.c dummy 808 else 809 # Either a pre-BFD a.out linker (linux-gnuoldld) 810 # or one that does not give us useful --help. 811 # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. 812 # If ld does not provide *any* "supported emulations:" 813 # that means it is gnuoldld. 814 echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" 815 test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 816 817 case "${UNAME_MACHINE}" in 818 i?86) 819 VENDOR=pc; 820 UNAME_MACHINE=${X86CPU} 821 ;; 822 *) 823 VENDOR=unknown; 824 ;; 825 esac 826 # Determine whether the default compiler is a.out or elf 827 cat >dummy.c <<EOF 828 #include <features.h> 829 main(argc, argv) 830 int argc; 831 char *argv[]; 832 { 833 #ifdef __ELF__ 834 # ifdef __GLIBC__ 835 # if __GLIBC__ >= 2 836 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); 837 # else 838 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); 839 # endif 840 # else 841 printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); 842 # endif 843 #else 844 printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); 845 #endif 846 return 0; 847 } 848 EOF 849 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 850 rm -f dummy.c dummy 851 fi ;; 852 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions 853 # are messed up and put the nodename in both sysname and nodename. 854 i?86:DYNIX/ptx:4*:*) 967 exit ;; 968 ppc64:Linux:*:*) 969 echo powerpc64-unknown-linux-${LIBC} 970 exit ;; 971 ppc:Linux:*:*) 972 echo powerpc-unknown-linux-${LIBC} 973 exit ;; 974 s390:Linux:*:* | s390x:Linux:*:*) 975 echo ${UNAME_MACHINE}-ibm-linux 976 exit ;; 977 sh64*:Linux:*:*) 978 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 979 exit ;; 980 sh*:Linux:*:*) 981 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 982 exit ;; 983 sparc:Linux:*:* | sparc64:Linux:*:*) 984 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 985 exit ;; 986 vax:Linux:*:*) 987 echo ${UNAME_MACHINE}-dec-linux-${LIBC} 988 exit ;; 989 x86_64:Linux:*:*) 990 echo x86_64-unknown-linux-${LIBC} 991 exit ;; 992 xtensa*:Linux:*:*) 993 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 994 exit ;; 995 i*86:DYNIX/ptx:4*:*) 996 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 997 # earlier versions are messed up and put the nodename in both 998 # sysname and nodename. 855 999 echo i386-sequent-sysv4 856 exit 0;;857 i ?86:UNIX_SV:4.2MP:2.*)1000 exit ;; 1001 i*86:UNIX_SV:4.2MP:2.*) 858 1002 # Unixware is an offshoot of SVR4, but it has its own version 859 1003 # number series starting with 2... … … 862 1006 # Use sysv4.2uw... so that sysv4* matches it. 863 1007 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 864 exit 0 ;; 865 i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) 1008 exit ;; 1009 i*86:OS/2:*:*) 1010 # If we were able to find `uname', then EMX Unix compatibility 1011 # is probably installed. 1012 echo ${UNAME_MACHINE}-pc-os2-emx 1013 exit ;; 1014 i*86:XTS-300:*:STOP) 1015 echo ${UNAME_MACHINE}-unknown-stop 1016 exit ;; 1017 i*86:atheos:*:*) 1018 echo ${UNAME_MACHINE}-unknown-atheos 1019 exit ;; 1020 i*86:syllable:*:*) 1021 echo ${UNAME_MACHINE}-pc-syllable 1022 exit ;; 1023 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1024 echo i386-unknown-lynxos${UNAME_RELEASE} 1025 exit ;; 1026 i*86:*DOS:*:*) 1027 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1028 exit ;; 1029 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1030 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 866 1031 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 867 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL EASE}1032 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 868 1033 else 869 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} 870 fi 871 exit 0 ;; 872 i?86:*:5:7) 873 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` 874 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 875 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ 876 && UNAME_MACHINE=i586 877 (/bin/uname -X|egrep '^Machine.*PentII' >/dev/null) \ 878 && UNAME_MACHINE=i686 879 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ 880 && UNAME_MACHINE=i686 881 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE} 882 exit 0 ;; 883 i?86:*:3.2:*) 1034 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1035 fi 1036 exit ;; 1037 i*86:*:5:[678]*) 1038 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1039 case `/bin/uname -X | grep "^Machine"` in 1040 *486*) UNAME_MACHINE=i486 ;; 1041 *Pentium) UNAME_MACHINE=i586 ;; 1042 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1043 esac 1044 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1045 exit ;; 1046 i*86:*:3.2:*) 884 1047 if test -f /usr/options/cb.name; then 885 1048 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 886 1049 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 887 1050 elif /bin/uname -X 2>/dev/null >/dev/null ; then 888 UNAME_REL=`(/bin/uname -X| egrep Release|sed -e 's/.*= //')`889 (/bin/uname -X| egrep i80486 >/dev/null) && UNAME_MACHINE=i486890 (/bin/uname -X| egrep '^Machine.*Pentium' >/dev/null) \1051 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1052 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1053 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 891 1054 && UNAME_MACHINE=i586 892 (/bin/uname -X| egrep '^Machine.*PentII' >/dev/null) \1055 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 893 1056 && UNAME_MACHINE=i686 894 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \895 1057 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1058 && UNAME_MACHINE=i686 896 1059 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 897 1060 else 898 1061 echo ${UNAME_MACHINE}-pc-sysv32 899 1062 fi 900 exit 0;;1063 exit ;; 901 1064 pc:*:*:*) 1065 # Left here for compatibility: 902 1066 # uname -m prints for DJGPP always 'pc', but it prints nothing about 903 # the processor, so we play safe by assuming i386. 904 echo i386-pc-msdosdjgpp 905 exit 0 ;; 1067 # the processor, so we play safe by assuming i586. 1068 # Note: whatever this is, it MUST be the same as what config.sub 1069 # prints for the "djgpp" host, or else GDB configury will decide that 1070 # this is a cross-build. 1071 echo i586-pc-msdosdjgpp 1072 exit ;; 906 1073 Intel:Mach:3*:*) 907 1074 echo i386-pc-mach3 908 exit 0;;1075 exit ;; 909 1076 paragon:*:*:*) 910 1077 echo i860-intel-osf1 911 exit 0;;1078 exit ;; 912 1079 i860:*:4.*:*) # i860-SVR4 913 1080 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then … … 916 1083 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 917 1084 fi 918 exit 0;;1085 exit ;; 919 1086 mini*:CTIX:SYS*5:*) 920 1087 # "miniframe" 921 1088 echo m68010-convergent-sysv 922 exit 0 ;; 923 M68*:*:R3V[567]*:*) 924 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 925 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) 1089 exit ;; 1090 mc68k:UNIX:SYSTEM5:3.51m) 1091 echo m68k-convergent-sysv 1092 exit ;; 1093 M680?0:D-NIX:5.3:*) 1094 echo m68k-diab-dnix 1095 exit ;; 1096 M68*:*:R3V[5678]*:*) 1097 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1098 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) 926 1099 OS_REL='' 927 1100 test -r /etc/.relid \ 928 1101 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 929 1102 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 930 && echo i486-ncr-sysv4.3${OS_REL} && exit 01103 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 931 1104 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 932 && echo i586-ncr-sysv4.3${OS_REL} && exit 0;;1105 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 933 1106 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 934 1107 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 935 && echo i486-ncr-sysv4 && exit 0 ;; 936 m68*:LynxOS:2.*:*) 1108 && { echo i486-ncr-sysv4; exit; } ;; 1109 NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1110 OS_REL='.3' 1111 test -r /etc/.relid \ 1112 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1113 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1114 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1115 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1116 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1117 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1118 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1119 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 937 1120 echo m68k-unknown-lynxos${UNAME_RELEASE} 938 exit 0;;1121 exit ;; 939 1122 mc68030:UNIX_System_V:4.*:*) 940 1123 echo m68k-atari-sysv4 941 exit 0 ;; 942 i?86:LynxOS:2.*:*) 943 echo i386-unknown-lynxos${UNAME_RELEASE} 944 exit 0 ;; 1124 exit ;; 945 1125 TSUNAMI:LynxOS:2.*:*) 946 1126 echo sparc-unknown-lynxos${UNAME_RELEASE} 947 exit 0;;948 rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)1127 exit ;; 1128 rs6000:LynxOS:2.*:*) 949 1129 echo rs6000-unknown-lynxos${UNAME_RELEASE} 950 exit 0 ;; 1130 exit ;; 1131 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1132 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1133 exit ;; 951 1134 SM[BE]S:UNIX_SV:*:*) 952 1135 echo mips-dde-sysv${UNAME_RELEASE} 953 exit 0 ;; 1136 exit ;; 1137 RM*:ReliantUNIX-*:*:*) 1138 echo mips-sni-sysv4 1139 exit ;; 954 1140 RM*:SINIX-*:*:*) 955 1141 echo mips-sni-sysv4 956 exit 0;;1142 exit ;; 957 1143 *:SINIX-*:*:*) 958 1144 if uname -p 2>/dev/null >/dev/null ; then … … 962 1148 echo ns32k-sni-sysv 963 1149 fi 964 exit 0;;965 PENTIUM: CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort966 1150 exit ;; 1151 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1152 # says <Richard.M.Bartel@ccMail.Census.GOV> 967 1153 echo i586-unisys-sysv4 968 exit 0;;1154 exit ;; 969 1155 *:UNIX_System_V:4*:FTX*) 970 1156 # From Gerald Hewes <hewes@openmarket.com>. 971 1157 # How about differentiating between stratus architectures? -djm 972 1158 echo hppa1.1-stratus-sysv4 973 exit 0;;1159 exit ;; 974 1160 *:*:*:FTX*) 975 1161 # From seanf@swdc.stratus.com. 976 1162 echo i860-stratus-sysv4 977 exit 0 ;; 1163 exit ;; 1164 i*86:VOS:*:*) 1165 # From Paul.Green@stratus.com. 1166 echo ${UNAME_MACHINE}-stratus-vos 1167 exit ;; 1168 *:VOS:*:*) 1169 # From Paul.Green@stratus.com. 1170 echo hppa1.1-stratus-vos 1171 exit ;; 978 1172 mc68*:A/UX:*:*) 979 1173 echo m68k-apple-aux${UNAME_RELEASE} 980 exit 0;;981 news*:NEWS-OS: *:6*)1174 exit ;; 1175 news*:NEWS-OS:6*:*) 982 1176 echo mips-sony-newsos6 983 exit 0;;984 R 3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)1177 exit ;; 1178 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 985 1179 if [ -d /usr/nec ]; then 986 1180 echo mips-nec-sysv${UNAME_RELEASE} … … 988 1182 echo mips-unknown-sysv${UNAME_RELEASE} 989 1183 fi 990 exit 0;;1184 exit ;; 991 1185 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 992 1186 echo powerpc-be-beos 993 exit 0;;1187 exit ;; 994 1188 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 995 1189 echo powerpc-apple-beos 996 exit 0 ;; 1190 exit ;; 1191 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1192 echo i586-pc-beos 1193 exit ;; 1194 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1195 echo i586-pc-haiku 1196 exit ;; 1197 SX-4:SUPER-UX:*:*) 1198 echo sx4-nec-superux${UNAME_RELEASE} 1199 exit ;; 1200 SX-5:SUPER-UX:*:*) 1201 echo sx5-nec-superux${UNAME_RELEASE} 1202 exit ;; 1203 SX-6:SUPER-UX:*:*) 1204 echo sx6-nec-superux${UNAME_RELEASE} 1205 exit ;; 1206 SX-7:SUPER-UX:*:*) 1207 echo sx7-nec-superux${UNAME_RELEASE} 1208 exit ;; 1209 SX-8:SUPER-UX:*:*) 1210 echo sx8-nec-superux${UNAME_RELEASE} 1211 exit ;; 1212 SX-8R:SUPER-UX:*:*) 1213 echo sx8r-nec-superux${UNAME_RELEASE} 1214 exit ;; 1215 Power*:Rhapsody:*:*) 1216 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1217 exit ;; 1218 *:Rhapsody:*:*) 1219 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1220 exit ;; 1221 *:Darwin:*:*) 1222 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1223 case $UNAME_PROCESSOR in 1224 i386) 1225 eval $set_cc_for_build 1226 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1227 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1228 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1229 grep IS_64BIT_ARCH >/dev/null 1230 then 1231 UNAME_PROCESSOR="x86_64" 1232 fi 1233 fi ;; 1234 unknown) UNAME_PROCESSOR=powerpc ;; 1235 esac 1236 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1237 exit ;; 1238 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1239 UNAME_PROCESSOR=`uname -p` 1240 if test "$UNAME_PROCESSOR" = "x86"; then 1241 UNAME_PROCESSOR=i386 1242 UNAME_MACHINE=pc 1243 fi 1244 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1245 exit ;; 1246 *:QNX:*:4*) 1247 echo i386-pc-qnx 1248 exit ;; 1249 NSE-?:NONSTOP_KERNEL:*:*) 1250 echo nse-tandem-nsk${UNAME_RELEASE} 1251 exit ;; 1252 NSR-?:NONSTOP_KERNEL:*:*) 1253 echo nsr-tandem-nsk${UNAME_RELEASE} 1254 exit ;; 1255 *:NonStop-UX:*:*) 1256 echo mips-compaq-nonstopux 1257 exit ;; 1258 BS2000:POSIX*:*:*) 1259 echo bs2000-siemens-sysv 1260 exit ;; 1261 DS/*:UNIX_System_V:*:*) 1262 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1263 exit ;; 1264 *:Plan9:*:*) 1265 # "uname -m" is not consistent, so use $cputype instead. 386 1266 # is converted to i386 for consistency with other x86 1267 # operating systems. 1268 if test "$cputype" = "386"; then 1269 UNAME_MACHINE=i386 1270 else 1271 UNAME_MACHINE="$cputype" 1272 fi 1273 echo ${UNAME_MACHINE}-unknown-plan9 1274 exit ;; 1275 *:TOPS-10:*:*) 1276 echo pdp10-unknown-tops10 1277 exit ;; 1278 *:TENEX:*:*) 1279 echo pdp10-unknown-tenex 1280 exit ;; 1281 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1282 echo pdp10-dec-tops20 1283 exit ;; 1284 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1285 echo pdp10-xkl-tops20 1286 exit ;; 1287 *:TOPS-20:*:*) 1288 echo pdp10-unknown-tops20 1289 exit ;; 1290 *:ITS:*:*) 1291 echo pdp10-unknown-its 1292 exit ;; 1293 SEI:*:*:SEIUX) 1294 echo mips-sei-seiux${UNAME_RELEASE} 1295 exit ;; 1296 *:DragonFly:*:*) 1297 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1298 exit ;; 1299 *:*VMS:*:*) 1300 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1301 case "${UNAME_MACHINE}" in 1302 A*) echo alpha-dec-vms ; exit ;; 1303 I*) echo ia64-dec-vms ; exit ;; 1304 V*) echo vax-dec-vms ; exit ;; 1305 esac ;; 1306 *:XENIX:*:SysV) 1307 echo i386-pc-xenix 1308 exit ;; 1309 i*86:skyos:*:*) 1310 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1311 exit ;; 1312 i*86:rdos:*:*) 1313 echo ${UNAME_MACHINE}-pc-rdos 1314 exit ;; 1315 i*86:AROS:*:*) 1316 echo ${UNAME_MACHINE}-pc-aros 1317 exit ;; 997 1318 esac 998 1319 … … 1000 1321 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1001 1322 1002 cat >dummy.c <<EOF 1323 eval $set_cc_for_build 1324 cat >$dummy.c <<EOF 1003 1325 #ifdef _SEQUENT_ 1004 1326 # include <sys/types.h> … … 1025 1347 1026 1348 #if defined (__arm) && defined (__acorn) && defined (__unix) 1027 printf ("arm-acorn-riscix "); exit (0);1349 printf ("arm-acorn-riscix\n"); exit (0); 1028 1350 #endif 1029 1351 … … 1038 1360 int version; 1039 1361 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1040 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1362 if (version < 4) 1363 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1364 else 1365 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1041 1366 exit (0); 1042 1367 #endif … … 1083 1408 1084 1409 #if defined (vax) 1085 #if !defined (ultrix) 1086 printf ("vax-dec-bsd\n"); exit (0); 1087 #else 1088 printf ("vax-dec-ultrix\n"); exit (0); 1089 #endif 1410 # if !defined (ultrix) 1411 # include <sys/param.h> 1412 # if defined (BSD) 1413 # if BSD == 43 1414 printf ("vax-dec-bsd4.3\n"); exit (0); 1415 # else 1416 # if BSD == 199006 1417 printf ("vax-dec-bsd4.3reno\n"); exit (0); 1418 # else 1419 printf ("vax-dec-bsd\n"); exit (0); 1420 # endif 1421 # endif 1422 # else 1423 printf ("vax-dec-bsd\n"); exit (0); 1424 # endif 1425 # else 1426 printf ("vax-dec-ultrix\n"); exit (0); 1427 # endif 1090 1428 #endif 1091 1429 … … 1098 1436 EOF 1099 1437 1100 $ {CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 01101 rm -f dummy.c dummy 1438 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1439 { echo "$SYSTEM_NAME"; exit; } 1102 1440 1103 1441 # Apollos put the system type in the environment. 1104 1442 1105 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }1443 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1106 1444 1107 1445 # Convex versions that predate uname can use getsysinfo(1) … … 1112 1450 c1*) 1113 1451 echo c1-convex-bsd 1114 exit 0;;1452 exit ;; 1115 1453 c2*) 1116 1454 if getsysinfo -f scalar_acc … … 1118 1456 else echo c2-convex-bsd 1119 1457 fi 1120 exit 0;;1458 exit ;; 1121 1459 c34*) 1122 1460 echo c34-convex-bsd 1123 exit 0;;1461 exit ;; 1124 1462 c38*) 1125 1463 echo c38-convex-bsd 1126 exit 0;;1464 exit ;; 1127 1465 c4*) 1128 1466 echo c4-convex-bsd 1129 exit 0;;1467 exit ;; 1130 1468 esac 1131 1469 fi 1132 1470 1133 #echo '(Unable to guess system type)' 1>&2 1471 cat >&2 <<EOF 1472 $0: unable to guess system type 1473 1474 This script, last modified $timestamp, has failed to recognize 1475 the operating system you are using. It is advised that you 1476 download the most up to date version of the config scripts from 1477 1478 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1479 and 1480 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1481 1482 If the version you run ($0) is already up to date, please 1483 send the following data and any information you think might be 1484 pertinent to <config-patches@gnu.org> in order to provide the needed 1485 information to handle your system. 1486 1487 config.guess timestamp = $timestamp 1488 1489 uname -m = `(uname -m) 2>/dev/null || echo unknown` 1490 uname -r = `(uname -r) 2>/dev/null || echo unknown` 1491 uname -s = `(uname -s) 2>/dev/null || echo unknown` 1492 uname -v = `(uname -v) 2>/dev/null || echo unknown` 1493 1494 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1495 /bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1496 1497 hostinfo = `(hostinfo) 2>/dev/null` 1498 /bin/universe = `(/bin/universe) 2>/dev/null` 1499 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1500 /bin/arch = `(/bin/arch) 2>/dev/null` 1501 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1502 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1503 1504 UNAME_MACHINE = ${UNAME_MACHINE} 1505 UNAME_RELEASE = ${UNAME_RELEASE} 1506 UNAME_SYSTEM = ${UNAME_SYSTEM} 1507 UNAME_VERSION = ${UNAME_VERSION} 1508 EOF 1134 1509 1135 1510 exit 1 1511 1512 # Local variables: 1513 # eval: (add-hook 'write-file-hooks 'time-stamp) 1514 # time-stamp-start: "timestamp='" 1515 # time-stamp-format: "%:y-%02m-%02d" 1516 # time-stamp-end: "'" 1517 # End: -
config.sub
r879cc3c r008733 1 1 #! /bin/sh 2 # Configuration validation subroutine script , version 1.1.3 # 4 # Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 20002 # Configuration validation subroutine script. 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 5 5 # Free Software Foundation, Inc. 6 # 6 7 timestamp='2010-01-22' 8 7 9 # This file is (in principle) common to ALL GNU software. 8 10 # The presence of a machine in this file suggests that SOME GNU software … … 21 23 # You should have received a copy of the GNU General Public License 22 24 # along with this program; if not, write to the Free Software 23 # Foundation, Inc., 5 9 Temple Place - Suite 330,24 # Boston, MA 02111-1307, USA.25 25 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 26 # 02110-1301, USA. 27 # 26 28 # As a special exception to the GNU General Public License, if you 27 29 # distribute this file as part of a program that contains a … … 29 31 # the same distribution terms that you use for the rest of that program. 30 32 33 34 # Please send patches to <config-patches@gnu.org>. Submit a context 35 # diff and a properly formatted GNU ChangeLog entry. 36 # 31 37 # Configuration subroutine to validate and canonicalize a configuration type. 32 38 # Supply the specified configuration type as an argument. 33 39 # If it is invalid, we print an error message on stderr and exit with code 1. 34 40 # Otherwise, we print the canonical config type on stdout and succeed. 41 42 # You can get the latest version of this script from: 43 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 35 44 36 45 # This file is supposed to be the same for all GNU packages … … 49 58 # It is wrong to echo any other type of specification. 50 59 51 if [ x$1 = x ] 52 then 53 echo Configuration name missing. 1>&2 54 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 55 echo "or $0 ALIAS" 1>&2 56 echo where ALIAS is a recognized configuration type. 1>&2 57 exit 1 58 fi 59 60 # First pass through any local machine types. 61 case $1 in 62 *local*) 63 echo $1 64 exit 0 65 ;; 66 *) 67 ;; 60 me=`echo "$0" | sed -e 's,.*/,,'` 61 62 usage="\ 63 Usage: $0 [OPTION] CPU-MFR-OPSYS 64 $0 [OPTION] ALIAS 65 66 Canonicalize a configuration name. 67 68 Operation modes: 69 -h, --help print this help, then exit 70 -t, --time-stamp print date of last modification, then exit 71 -v, --version print version number, then exit 72 73 Report bugs and patches to <config-patches@gnu.org>." 74 75 version="\ 76 GNU config.sub ($timestamp) 77 78 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 79 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 80 Software Foundation, Inc. 81 82 This is free software; see the source for copying conditions. There is NO 83 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 84 85 help=" 86 Try \`$me --help' for more information." 87 88 # Parse command line 89 while test $# -gt 0 ; do 90 case $1 in 91 --time-stamp | --time* | -t ) 92 echo "$timestamp" ; exit ;; 93 --version | -v ) 94 echo "$version" ; exit ;; 95 --help | --h* | -h ) 96 echo "$usage"; exit ;; 97 -- ) # Stop option processing 98 shift; break ;; 99 - ) # Use stdin as input. 100 break ;; 101 -* ) 102 echo "$me: invalid option $1$help" 103 exit 1 ;; 104 105 *local*) 106 # First pass through any local machine types. 107 echo $1 108 exit ;; 109 110 * ) 111 break ;; 112 esac 113 done 114 115 case $# in 116 0) echo "$me: missing argument$help" >&2 117 exit 1;; 118 1) ;; 119 *) echo "$me: too many arguments$help" >&2 120 exit 1;; 68 121 esac 69 122 … … 72 125 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 73 126 case $maybe_os in 74 linux-gnu*) 127 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 128 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 129 kopensolaris*-gnu* | \ 130 storm-chaos* | os2-emx* | rtmk-nova*) 75 131 os=-$maybe_os 76 132 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` … … 98 154 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 99 155 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 100 -apple )156 -apple | -axis | -knuth | -cray | -microblaze) 101 157 os= 102 158 basic_machine=$1 103 159 ;; 160 -bluegene*) 161 os=-cnk 162 ;; 163 -sim | -cisco | -oki | -wec | -winbond) 164 os= 165 basic_machine=$1 166 ;; 167 -scout) 168 ;; 169 -wrs) 170 os=-vxworks 171 basic_machine=$1 172 ;; 173 -chorusos*) 174 os=-chorusos 175 basic_machine=$1 176 ;; 177 -chorusrdb) 178 os=-chorusrdb 179 basic_machine=$1 180 ;; 104 181 -hiux*) 105 182 os=-hiuxwe2 106 183 ;; 184 -sco6) 185 os=-sco5v6 186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 187 ;; 107 188 -sco5) 108 os= sco3.2v5189 os=-sco3.2v5 109 190 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 110 191 ;; … … 121 202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 122 203 ;; 204 -sco5v6*) 205 # Don't forget version if it is 3.2v4 or newer. 206 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 207 ;; 123 208 -sco*) 124 209 os=-sco3.2v2 125 210 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 126 211 ;; 212 -udk*) 213 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 214 ;; 127 215 -isc) 128 216 os=-isc2.2 … … 146 234 -psos*) 147 235 os=-psos 236 ;; 237 -mint | -mint[0-9]*) 238 basic_machine=m68k-atari 239 os=-mint 148 240 ;; 149 241 esac … … 153 245 # Recognize the basic CPU types without company name. 154 246 # Some are omitted here because they have special meanings below. 155 tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ 156 | arme[lb] | pyramid | mn10200 | mn10300 \ 157 | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ 158 | hppa2.0 \ 159 | alpha | alphaev5 | alphaev56 | ev6 | we32k | ns16k | clipper \ 160 | i370 | sh | powerpc | powerpcle | powerpc64 | 1750a | dsp16xx | pdp11 \ 161 | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ 162 | mipstx39 | mipstx39el \ 163 | sparc | sparclet | sparclite | sparc64 | v850) 247 1750a | 580 \ 248 | a29k \ 249 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 250 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 251 | am33_2.0 \ 252 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 253 | bfin \ 254 | c4x | clipper \ 255 | d10v | d30v | dlx | dsp16xx | dvp \ 256 | fido | fr30 | frv \ 257 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 258 | i370 | i860 | i960 | ia64 \ 259 | ip2k | iq2000 \ 260 | lm32 \ 261 | m32c | m32r | m32rle | m68000 | m68k | m88k \ 262 | maxq | mb | microblaze | mcore | mep | metag \ 263 | mips | mipsbe | mipseb | mipsel | mipsle \ 264 | mips16 \ 265 | mips64 | mips64el \ 266 | mips64octeon | mips64octeonel \ 267 | mips64orion | mips64orionel \ 268 | mips64r5900 | mips64r5900el \ 269 | mips64vr | mips64vrel \ 270 | mips64vr4100 | mips64vr4100el \ 271 | mips64vr4300 | mips64vr4300el \ 272 | mips64vr5000 | mips64vr5000el \ 273 | mips64vr5900 | mips64vr5900el \ 274 | mipsisa32 | mipsisa32el \ 275 | mipsisa32r2 | mipsisa32r2el \ 276 | mipsisa64 | mipsisa64el \ 277 | mipsisa64r2 | mipsisa64r2el \ 278 | mipsisa64sb1 | mipsisa64sb1el \ 279 | mipsisa64sr71k | mipsisa64sr71kel \ 280 | mipstx39 | mipstx39el \ 281 | mn10200 | mn10300 \ 282 | moxie \ 283 | mt \ 284 | msp430 \ 285 | nios | nios2 \ 286 | ns16k | ns32k \ 287 | or32 \ 288 | pdp10 | pdp11 | pj | pjl \ 289 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 290 | pyramid \ 291 | rx \ 292 | score \ 293 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 294 | sh64 | sh64le \ 295 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 296 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 297 | spu | strongarm \ 298 | tahoe | thumb | tic4x | tic80 | tron \ 299 | ubicom32 \ 300 | v850 | v850e \ 301 | we32k \ 302 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 303 | z8k | z80) 164 304 basic_machine=$basic_machine-unknown 165 305 ;; 166 sparcv[89] | supersparc | microsparc | ultrasparc) 306 m6811 | m68hc11 | m6812 | m68hc12 | picochip) 307 # Motorola 68HC11/12. 167 308 basic_machine=$basic_machine-unknown 168 ;; 309 os=-none 310 ;; 311 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 312 ;; 313 ms1) 314 basic_machine=mt-unknown 315 ;; 316 169 317 # We use `pc' rather than `unknown' 170 318 # because (1) that's what they normally are, and 171 319 # (2) the word "unknown" tends to confuse beginning users. 172 i [34]86 | pentium[23] | k5 | k6 | k6[23] | athlon)320 i*86 | x86_64) 173 321 basic_machine=$basic_machine-pc 174 322 ;; … … 179 327 ;; 180 328 # Recognize the basic CPU types with company name. 181 vax-* | tahoe-* | i[34]86-* | pentium[23]-* | i860-* | m32r-* | m68k-* | m68000-* \ 182 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ 183 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ 184 | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ 185 | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ 186 | alpha-* | alphaev5-* | alphaev56-* | alphaev6-* | we32k-* | cydra-* \ 187 | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ 188 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* | powerpc64-* \ 189 | sparc64-* | mips64-* | mipsel-* \ 190 | mips64el-* | mips64orion-* | mips64orionel-* \ 191 | mipstx39-* | mipstx39el-* \ 192 | f301-* | k6-* | k6[23]-* | athlon-*) 193 ;; 194 sparcv[89]-* | supersparc-* | microsparc-* | ultrasparc-*) 329 580-* \ 330 | a29k-* \ 331 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 332 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 333 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 334 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 335 | avr-* | avr32-* \ 336 | bfin-* | bs2000-* \ 337 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 338 | clipper-* | craynv-* | cydra-* \ 339 | d10v-* | d30v-* | dlx-* \ 340 | elxsi-* \ 341 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 342 | h8300-* | h8500-* \ 343 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 344 | i*86-* | i860-* | i960-* | ia64-* \ 345 | ip2k-* | iq2000-* \ 346 | lm32-* \ 347 | m32c-* | m32r-* | m32rle-* \ 348 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 349 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ 350 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 351 | mips16-* \ 352 | mips64-* | mips64el-* \ 353 | mips64octeon-* | mips64octeonel-* \ 354 | mips64orion-* | mips64orionel-* \ 355 | mips64r5900-* | mips64r5900el-* \ 356 | mips64vr-* | mips64vrel-* \ 357 | mips64vr4100-* | mips64vr4100el-* \ 358 | mips64vr4300-* | mips64vr4300el-* \ 359 | mips64vr5000-* | mips64vr5000el-* \ 360 | mips64vr5900-* | mips64vr5900el-* \ 361 | mipsisa32-* | mipsisa32el-* \ 362 | mipsisa32r2-* | mipsisa32r2el-* \ 363 | mipsisa64-* | mipsisa64el-* \ 364 | mipsisa64r2-* | mipsisa64r2el-* \ 365 | mipsisa64sb1-* | mipsisa64sb1el-* \ 366 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 367 | mipstx39-* | mipstx39el-* \ 368 | mmix-* \ 369 | mt-* \ 370 | msp430-* \ 371 | nios-* | nios2-* \ 372 | none-* | np1-* | ns16k-* | ns32k-* \ 373 | orion-* \ 374 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 375 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 376 | pyramid-* \ 377 | romp-* | rs6000-* | rx-* \ 378 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 379 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 380 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 381 | sparclite-* \ 382 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 383 | tahoe-* | thumb-* \ 384 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 385 | tile-* | tilegx-* \ 386 | tron-* \ 387 | ubicom32-* \ 388 | v850-* | v850e-* | vax-* \ 389 | we32k-* \ 390 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 391 | xstormy16-* | xtensa*-* \ 392 | ymp-* \ 393 | z8k-* | z80-*) 394 ;; 395 # Recognize the basic CPU types without company name, with glob match. 396 xtensa*) 397 basic_machine=$basic_machine-unknown 195 398 ;; 196 399 # Recognize the various machine names and aliases which stand 197 400 # for a CPU type and a company and sometimes even an OS. 401 386bsd) 402 basic_machine=i386-unknown 403 os=-bsd 404 ;; 198 405 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 199 406 basic_machine=m68000-att … … 201 408 3b*) 202 409 basic_machine=we32k-att 410 ;; 411 a29khif) 412 basic_machine=a29k-amd 413 os=-udi 414 ;; 415 abacus) 416 basic_machine=abacus-unknown 417 ;; 418 adobe68k) 419 basic_machine=m68010-adobe 420 os=-scout 203 421 ;; 204 422 alliant | fx80) … … 212 430 os=-bsd 213 431 ;; 432 amd64) 433 basic_machine=x86_64-pc 434 ;; 435 amd64-*) 436 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 437 ;; 214 438 amdahl) 215 439 basic_machine=580-amdahl … … 217 441 ;; 218 442 amiga | amiga-*) 219 basic_machine=m68k- cbm443 basic_machine=m68k-unknown 220 444 ;; 221 445 amigaos | amigados) 222 basic_machine=m68k- cbm446 basic_machine=m68k-unknown 223 447 os=-amigaos 224 448 ;; 225 449 amigaunix | amix) 226 basic_machine=m68k- cbm450 basic_machine=m68k-unknown 227 451 os=-sysv4 228 452 ;; … … 231 455 os=-sysv 232 456 ;; 457 apollo68bsd) 458 basic_machine=m68k-apollo 459 os=-bsd 460 ;; 461 aros) 462 basic_machine=i386-pc 463 os=-aros 464 ;; 233 465 aux) 234 466 basic_machine=m68k-apple … … 239 471 os=-dynix 240 472 ;; 473 blackfin) 474 basic_machine=bfin-unknown 475 os=-linux 476 ;; 477 blackfin-*) 478 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 479 os=-linux 480 ;; 481 bluegene*) 482 basic_machine=powerpc-ibm 483 os=-cnk 484 ;; 485 c90) 486 basic_machine=c90-cray 487 os=-unicos 488 ;; 489 cegcc) 490 basic_machine=arm-unknown 491 os=-cegcc 492 ;; 241 493 convex-c1) 242 494 basic_machine=c1-convex … … 259 511 os=-bsd 260 512 ;; 261 cray | ymp)262 basic_machine= ymp-cray513 cray | j90) 514 basic_machine=j90-cray 263 515 os=-unicos 264 516 ;; 265 cray 2)266 basic_machine=cray 2-cray267 os=-unicos 268 ;; 269 [ctj]90-cray)270 basic_machine=c 90-cray271 os=- unicos517 craynv) 518 basic_machine=craynv-cray 519 os=-unicosmp 520 ;; 521 cr16) 522 basic_machine=cr16-unknown 523 os=-elf 272 524 ;; 273 525 crds | unos) 274 526 basic_machine=m68k-crds 275 527 ;; 528 crisv32 | crisv32-* | etraxfs*) 529 basic_machine=crisv32-axis 530 ;; 531 cris | cris-* | etrax*) 532 basic_machine=cris-axis 533 ;; 534 crx) 535 basic_machine=crx-unknown 536 os=-elf 537 ;; 276 538 da30 | da30-*) 277 539 basic_machine=m68k-da30 … … 279 541 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 280 542 basic_machine=mips-dec 543 ;; 544 decsystem10* | dec10*) 545 basic_machine=pdp10-dec 546 os=-tops10 547 ;; 548 decsystem20* | dec20*) 549 basic_machine=pdp10-dec 550 os=-tops20 281 551 ;; 282 552 delta | 3300 | motorola-3300 | motorola-delta \ … … 288 558 os=-sysv3 289 559 ;; 560 dicos) 561 basic_machine=i686-pc 562 os=-dicos 563 ;; 564 djgpp) 565 basic_machine=i586-pc 566 os=-msdosdjgpp 567 ;; 290 568 dpx20 | dpx20-*) 291 569 basic_machine=rs6000-bull … … 307 585 basic_machine=ns32k-encore 308 586 ;; 587 es1800 | OSE68k | ose68k | ose | OSE) 588 basic_machine=m68k-ericsson 589 os=-ose 590 ;; 309 591 fx2800) 310 592 basic_machine=i860-alliant … … 317 599 os=-sysv 318 600 ;; 601 go32) 602 basic_machine=i386-pc 603 os=-go32 604 ;; 319 605 h3050r* | hiux*) 320 606 basic_machine=hppa1.1-hitachi … … 325 611 os=-hms 326 612 ;; 613 h8300xray) 614 basic_machine=h8300-hitachi 615 os=-xray 616 ;; 617 h8500hms) 618 basic_machine=h8500-hitachi 619 os=-hms 620 ;; 327 621 harris) 328 622 basic_machine=m88k-harris … … 340 634 os=-hpux 341 635 ;; 636 hp3k9[0-9][0-9] | hp9[0-9][0-9]) 637 basic_machine=hppa1.0-hp 638 ;; 342 639 hp9k2[0-9][0-9] | hp9k31[0-9]) 343 640 basic_machine=m68000-hp … … 346 643 basic_machine=m68k-hp 347 644 ;; 348 hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) 645 hp9k6[0-9][0-9] | hp6[0-9][0-9]) 646 basic_machine=hppa1.0-hp 647 ;; 648 hp9k7[0-79][0-9] | hp7[0-79][0-9]) 649 basic_machine=hppa1.1-hp 650 ;; 651 hp9k78[0-9] | hp78[0-9]) 652 # FIXME: really hppa2.0-hp 653 basic_machine=hppa1.1-hp 654 ;; 655 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 656 # FIXME: really hppa2.0-hp 657 basic_machine=hppa1.1-hp 658 ;; 659 hp9k8[0-9][13679] | hp8[0-9][13679]) 349 660 basic_machine=hppa1.1-hp 350 661 ;; … … 355 666 os=-nextstep3 356 667 ;; 668 hppaosf) 669 basic_machine=hppa1.1-hp 670 os=-osf 671 ;; 672 hppro) 673 basic_machine=hppa1.1-hp 674 os=-proelf 675 ;; 357 676 i370-ibm* | ibm*) 358 677 basic_machine=i370-ibm 359 os=-mvs360 678 ;; 361 679 # I'm not sure what "Sysv32" means. Should this be sysv3.2? 362 i [3456]86v32)680 i*86v32) 363 681 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 364 682 os=-sysv32 365 683 ;; 366 i [3456]86v4*)684 i*86v4*) 367 685 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 368 686 os=-sysv4 369 687 ;; 370 i [3456]86v)688 i*86v) 371 689 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 372 690 os=-sysv 373 691 ;; 374 i [3456]86sol2)692 i*86sol2) 375 693 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 376 694 os=-solaris2 695 ;; 696 i386mach) 697 basic_machine=i386-mach 698 os=-mach 699 ;; 700 i386-vsta | vsta) 701 basic_machine=i386-unknown 702 os=-vsta 377 703 ;; 378 704 iris | iris4d) … … 390 716 os=-sysv 391 717 ;; 392 macppc*) 393 basic_machine=powerpc-apple 718 m68knommu) 719 basic_machine=m68k-unknown 720 os=-linux 721 ;; 722 m68knommu-*) 723 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 724 os=-linux 394 725 ;; 395 726 m88k-omron*) … … 404 735 os=-sysv 405 736 ;; 737 microblaze) 738 basic_machine=microblaze-xilinx 739 ;; 740 mingw32) 741 basic_machine=i386-pc 742 os=-mingw32 743 ;; 744 mingw32ce) 745 basic_machine=arm-unknown 746 os=-mingw32ce 747 ;; 406 748 miniframe) 407 749 basic_machine=m68000-convergent 408 750 ;; 409 mipsel*-linux*) 410 basic_machine=mipsel-unknown 411 os=-linux-gnu 412 ;; 413 mips*-linux*) 414 basic_machine=mips-unknown 415 os=-linux-gnu 751 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 752 basic_machine=m68k-atari 753 os=-mint 754 ;; 755 mipsEE* | ee | ps2) 756 basic_machine=mips64r5900el-scei 757 case $os in 758 -linux*) 759 ;; 760 *) 761 os=-elf 762 ;; 763 esac 764 ;; 765 iop) 766 basic_machine=mipsel-scei 767 os=-irx 768 ;; 769 dvp) 770 basic_machine=dvp-scei 771 os=-elf 416 772 ;; 417 773 mips3*-*) … … 420 776 mips3*) 421 777 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 778 ;; 779 monitor) 780 basic_machine=m68k-rom68k 781 os=-coff 782 ;; 783 morphos) 784 basic_machine=powerpc-unknown 785 os=-morphos 786 ;; 787 msdos) 788 basic_machine=i386-pc 789 os=-msdos 790 ;; 791 ms1-*) 792 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 793 ;; 794 mvs) 795 basic_machine=i370-ibm 796 os=-mvs 422 797 ;; 423 798 ncr3000) … … 425 800 os=-sysv4 426 801 ;; 802 netbsd386) 803 basic_machine=i386-unknown 804 os=-netbsd 805 ;; 806 netwinder) 807 basic_machine=armv4l-rebel 808 os=-linux 809 ;; 427 810 news | news700 | news800 | news900) 428 811 basic_machine=m68k-sony … … 436 819 basic_machine=mips-sony 437 820 os=-newsos 821 ;; 822 necv70) 823 basic_machine=v70-nec 824 os=-sysv 438 825 ;; 439 826 next | m*-next ) … … 462 849 os=-nindy 463 850 ;; 851 mon960) 852 basic_machine=i960-intel 853 os=-mon960 854 ;; 855 nonstopux) 856 basic_machine=mips-compaq 857 os=-nonstopux 858 ;; 464 859 np1) 465 860 basic_machine=np1-gould 861 ;; 862 nsr-tandem) 863 basic_machine=nsr-tandem 864 ;; 865 op50n-* | op60c-*) 866 basic_machine=hppa1.1-oki 867 os=-proelf 868 ;; 869 openrisc | openrisc-*) 870 basic_machine=or32-unknown 871 ;; 872 os400) 873 basic_machine=powerpc-ibm 874 os=-os400 875 ;; 876 OSE68000 | ose68000) 877 basic_machine=m68000-ericsson 878 os=-ose 879 ;; 880 os68k) 881 basic_machine=m68k-none 882 os=-os68k 466 883 ;; 467 884 pa-hitachi) … … 473 890 os=-osf 474 891 ;; 892 parisc) 893 basic_machine=hppa-unknown 894 os=-linux 895 ;; 896 parisc-*) 897 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 898 os=-linux 899 ;; 475 900 pbd) 476 901 basic_machine=sparc-tti … … 479 904 basic_machine=m68k-tti 480 905 ;; 481 906 pc532 | pc532-*) 482 907 basic_machine=ns32k-pc532 483 908 ;; 484 pentiummmx | p55) 485 basic_machine=pentiummmx-pc 486 ;; 487 pentium | p5 | i586) 488 basic_machine=pentium-pc 489 ;; 490 pentiumpro | p6) 491 basic_machine=pentiumpro-pc 492 ;; 493 pentiummmx-* | p55-*) 494 basic_machine=pentiummmx-`echo $basic_machine | sed 's/^[^-]*-//'` 495 ;; 496 pentium-* | p5-* | i586-*) 497 basic_machine=pentium-`echo $basic_machine | sed 's/^[^-]*-//'` 498 ;; 499 pentiumpro-* | p6-*) 500 basic_machine=pentiumpro-`echo $basic_machine | sed 's/^[^-]*-//'` 501 ;; 502 nexen) 503 # We don't have specific support for Nexgen yet, so just call it a Pentium 504 basic_machine=i586-nexgen 909 pc98) 910 basic_machine=i386-pc 911 ;; 912 pc98-*) 913 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 914 ;; 915 pentium | p5 | k5 | k6 | nexgen | viac3) 916 basic_machine=i586-pc 917 ;; 918 pentiumpro | p6 | 6x86 | athlon | athlon_*) 919 basic_machine=i686-pc 920 ;; 921 pentiumii | pentium2 | pentiumiii | pentium3) 922 basic_machine=i686-pc 923 ;; 924 pentium4) 925 basic_machine=i786-pc 926 ;; 927 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 928 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 929 ;; 930 pentiumpro-* | p6-* | 6x86-* | athlon-*) 931 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 932 ;; 933 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 934 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 935 ;; 936 pentium4-*) 937 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 505 938 ;; 506 939 pn) 507 940 basic_machine=pn-gould 508 941 ;; 509 power) basic_machine= rs6000-ibm942 power) basic_machine=power-ibm 510 943 ;; 511 944 ppc) basic_machine=powerpc-unknown 512 945 ;; 513 946 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 514 ;;515 ppc64) basic_machine=powerpc64-unknown516 ;;517 ppc64-*)518 basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`519 947 ;; 520 948 ppcle | powerpclittle | ppc-le | powerpc-little) 521 949 basic_machine=powerpcle-unknown 522 950 ;; 523 951 ppcle-* | powerpclittle-*) 524 952 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 525 953 ;; 954 ppc64) basic_machine=powerpc64-unknown 955 ;; 956 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 957 ;; 958 ppc64le | powerpc64little | ppc64-le | powerpc64-little) 959 basic_machine=powerpc64le-unknown 960 ;; 961 ppc64le-* | powerpc64little-*) 962 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 963 ;; 526 964 ps2) 527 965 basic_machine=i386-ibm 528 966 ;; 967 pw32) 968 basic_machine=i586-unknown 969 os=-pw32 970 ;; 971 rdos) 972 basic_machine=i386-pc 973 os=-rdos 974 ;; 975 rom68k) 976 basic_machine=m68k-rom68k 977 os=-coff 978 ;; 529 979 rm[46]00) 530 980 basic_machine=mips-siemens … … 532 982 rtpc | rtpc-*) 533 983 basic_machine=romp-ibm 984 ;; 985 s390 | s390-*) 986 basic_machine=s390-ibm 987 ;; 988 s390x | s390x-*) 989 basic_machine=s390x-ibm 990 ;; 991 sa29200) 992 basic_machine=a29k-amd 993 os=-udi 994 ;; 995 sb1) 996 basic_machine=mipsisa64sb1-unknown 997 ;; 998 sb1el) 999 basic_machine=mipsisa64sb1el-unknown 1000 ;; 1001 sde) 1002 basic_machine=mipsisa32-sde 1003 os=-elf 1004 ;; 1005 sei) 1006 basic_machine=mips-sei 1007 os=-seiux 534 1008 ;; 535 1009 sequent) … … 540 1014 os=-hms 541 1015 ;; 1016 sh5el) 1017 basic_machine=sh5le-unknown 1018 ;; 1019 sh64) 1020 basic_machine=sh64-unknown 1021 ;; 1022 sparclite-wrs | simso-wrs) 1023 basic_machine=sparclite-wrs 1024 os=-vxworks 1025 ;; 542 1026 sps7) 543 1027 basic_machine=m68k-bull … … 547 1031 basic_machine=spur-unknown 548 1032 ;; 1033 st2000) 1034 basic_machine=m68k-tandem 1035 ;; 1036 stratus) 1037 basic_machine=i860-stratus 1038 os=-sysv4 1039 ;; 549 1040 sun2) 550 1041 basic_machine=m68000-sun … … 587 1078 basic_machine=i386-sun 588 1079 ;; 1080 sv1) 1081 basic_machine=sv1-cray 1082 os=-unicos 1083 ;; 589 1084 symmetry) 590 1085 basic_machine=i386-sequent 591 1086 os=-dynix 592 1087 ;; 1088 t3e) 1089 basic_machine=alphaev5-cray 1090 os=-unicos 1091 ;; 1092 t90) 1093 basic_machine=t90-cray 1094 os=-unicos 1095 ;; 1096 tic54x | c54x*) 1097 basic_machine=tic54x-unknown 1098 os=-coff 1099 ;; 1100 tic55x | c55x*) 1101 basic_machine=tic55x-unknown 1102 os=-coff 1103 ;; 1104 tic6x | c6x*) 1105 basic_machine=tic6x-unknown 1106 os=-coff 1107 ;; 1108 # This must be matched before tile*. 1109 tilegx*) 1110 basic_machine=tilegx-unknown 1111 os=-linux-gnu 1112 ;; 1113 tile*) 1114 basic_machine=tile-unknown 1115 os=-linux-gnu 1116 ;; 593 1117 tx39) 594 1118 basic_machine=mipstx39-unknown … … 597 1121 basic_machine=mipstx39el-unknown 598 1122 ;; 1123 toad1) 1124 basic_machine=pdp10-xkl 1125 os=-tops20 1126 ;; 599 1127 tower | tower-32) 600 1128 basic_machine=m68k-ncr 1129 ;; 1130 tpf) 1131 basic_machine=s390x-ibm 1132 os=-tpf 601 1133 ;; 602 1134 udi29k) … … 608 1140 os=-sym1 609 1141 ;; 1142 v810 | necv810) 1143 basic_machine=v810-nec 1144 os=-none 1145 ;; 610 1146 vaxv) 611 1147 basic_machine=vax-dec … … 617 1153 ;; 618 1154 vpp*|vx|vx-*) 619 620 1155 basic_machine=f301-fujitsu 1156 ;; 621 1157 vxworks960) 622 1158 basic_machine=i960-wrs … … 631 1167 os=-vxworks 632 1168 ;; 633 xmp) 634 basic_machine=xmp-cray 1169 w65*) 1170 basic_machine=w65-wdc 1171 os=-none 1172 ;; 1173 w89k-*) 1174 basic_machine=hppa1.1-winbond 1175 os=-proelf 1176 ;; 1177 xbox) 1178 basic_machine=i686-pc 1179 os=-mingw32 1180 ;; 1181 xps | xps100) 1182 basic_machine=xps100-honeywell 1183 ;; 1184 ymp) 1185 basic_machine=ymp-cray 635 1186 os=-unicos 636 1187 ;; 637 xps | xps100) 638 basic_machine=xps100-honeywell 1188 z8k-*-coff) 1189 basic_machine=z8k-unknown 1190 os=-sim 1191 ;; 1192 z80-*-coff) 1193 basic_machine=z80-unknown 1194 os=-sim 639 1195 ;; 640 1196 none) … … 645 1201 # Here we handle the default manufacturer of certain CPU types. It is in 646 1202 # some cases the only manufacturer, in others, it is the most popular. 647 mips) 648 if [ x$os = x-linux-gnu ]; then 649 basic_machine=mips-unknown 650 else 651 basic_machine=mips-mips 652 fi 1203 w89k) 1204 basic_machine=hppa1.1-winbond 1205 ;; 1206 op50n) 1207 basic_machine=hppa1.1-oki 1208 ;; 1209 op60c) 1210 basic_machine=hppa1.1-oki 653 1211 ;; 654 1212 romp) 655 1213 basic_machine=romp-ibm 656 1214 ;; 1215 mmix) 1216 basic_machine=mmix-knuth 1217 ;; 657 1218 rs6000) 658 1219 basic_machine=rs6000-ibm … … 661 1222 basic_machine=vax-dec 662 1223 ;; 1224 pdp10) 1225 # there are many clones, so DEC is not a safe bet 1226 basic_machine=pdp10-unknown 1227 ;; 663 1228 pdp11) 664 1229 basic_machine=pdp11-dec … … 667 1232 basic_machine=we32k-att 668 1233 ;; 669 sparc) 1234 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 1235 basic_machine=sh-unknown 1236 ;; 1237 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 670 1238 basic_machine=sparc-sun 671 1239 ;; 672 1240 cydra) 673 1241 basic_machine=cydra-cydrome 674 1242 ;; … … 678 1246 orion105) 679 1247 basic_machine=clipper-highlevel 1248 ;; 1249 mac | mpw | mac-mpw) 1250 basic_machine=m68k-apple 1251 ;; 1252 pmac | pmac-mpw) 1253 basic_machine=powerpc-apple 1254 ;; 1255 *-unknown) 1256 # Make sure to match an already-canonicalized machine name. 680 1257 ;; 681 1258 *) … … 705 1282 # that might get confused with valid system types. 706 1283 # -solaris* is a basic system type, with this one exception. 1284 -auroraux) 1285 os=-auroraux 1286 ;; 707 1287 -solaris1 | -solaris1.*) 708 1288 os=`echo $os | sed -e 's|solaris1|sunos4|'` … … 725 1305 # -sysv* is not here because it comes later, after sysvr4. 726 1306 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 727 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 728 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 1307 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1308 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 1309 | -sym* | -kopensolaris* \ 729 1310 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 730 | -aos* \1311 | -aos* | -aros* \ 731 1312 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 732 1313 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 733 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ 734 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ 1314 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1315 | -openbsd* | -solidbsd* \ 1316 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1317 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 735 1318 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 736 1319 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 737 | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 738 | -mingw32* | -linux-gnu* | -uxpv*) 1320 | -chorusos* | -chorusrdb* | -cegcc* \ 1321 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1322 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ 1323 | -uxpv* | -beos* | -mpeix* | -udk* \ 1324 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1325 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1326 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \ 1327 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1328 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1329 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1330 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 739 1331 # Remember, each alternative MUST END IN *, to match a version number. 1332 ;; 1333 -qnx*) 1334 case $basic_machine in 1335 x86-* | i*86-*) 1336 ;; 1337 *) 1338 os=-nto$os 1339 ;; 1340 esac 1341 ;; 1342 -nto-qnx*) 1343 ;; 1344 -nto*) 1345 os=`echo $os | sed -e 's|nto|nto-qnx|'` 1346 ;; 1347 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1348 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 1349 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1350 ;; 1351 -mac*) 1352 os=`echo $os | sed -e 's|mac|macos|'` 1353 ;; 1354 -linux-dietlibc) 1355 os=-linux-dietlibc 740 1356 ;; 741 1357 -linux*) … … 748 1364 os=`echo $os | sed -e 's|sunos6|solaris3|'` 749 1365 ;; 1366 -opened*) 1367 os=-openedition 1368 ;; 1369 -os400*) 1370 os=-os400 1371 ;; 1372 -wince*) 1373 os=-wince 1374 ;; 750 1375 -osfrose*) 751 1376 os=-osfrose … … 763 1388 os=-aos 764 1389 ;; 1390 -atheos*) 1391 os=-atheos 1392 ;; 1393 -syllable*) 1394 os=-syllable 1395 ;; 1396 -386bsd) 1397 os=-bsd 1398 ;; 765 1399 -ctix* | -uts*) 766 1400 os=-sysv 767 1401 ;; 1402 -nova*) 1403 os=-rtmk-nova 1404 ;; 768 1405 -ns2 ) 769 os=-nextstep2 1406 os=-nextstep2 1407 ;; 1408 -nsk*) 1409 os=-nsk 770 1410 ;; 771 1411 # Preserve the version number of sinix5. … … 776 1416 os=-sysv4 777 1417 ;; 1418 -tpf*) 1419 os=-tpf 1420 ;; 778 1421 -triton*) 779 1422 os=-sysv3 … … 794 1437 -sysv*) 795 1438 ;; 1439 -ose*) 1440 os=-ose 1441 ;; 1442 -es1800*) 1443 os=-ose 1444 ;; 796 1445 -xenix) 797 1446 os=-xenix 798 1447 ;; 1448 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1449 os=-mint 1450 ;; 1451 -aros*) 1452 os=-aros 1453 ;; 1454 -kaos*) 1455 os=-kaos 1456 ;; 1457 -zvmoe) 1458 os=-zvmoe 1459 ;; 1460 -dicos*) 1461 os=-dicos 1462 ;; 1463 -nacl*) 1464 ;; 799 1465 -none) 800 1466 ;; … … 819 1485 820 1486 case $basic_machine in 1487 score-*) 1488 os=-elf 1489 ;; 1490 spu-*) 1491 os=-elf 1492 ;; 821 1493 *-acorn) 822 1494 os=-riscix1.2 823 1495 ;; 1496 arm*-rebel) 1497 os=-linux 1498 ;; 824 1499 arm*-semi) 825 1500 os=-aout 826 1501 ;; 827 pdp11-*) 1502 c4x-* | tic4x-*) 1503 os=-coff 1504 ;; 1505 # This must come before the *-dec entry. 1506 pdp10-*) 1507 os=-tops20 1508 ;; 1509 pdp11-*) 828 1510 os=-none 829 1511 ;; … … 843 1525 # os=-sunos4 844 1526 ;; 1527 m68*-cisco) 1528 os=-aout 1529 ;; 1530 mep-*) 1531 os=-elf 1532 ;; 1533 mips*-cisco) 1534 os=-elf 1535 ;; 1536 mips*-*) 1537 os=-elf 1538 ;; 1539 or32-*) 1540 os=-coff 1541 ;; 845 1542 *-tti) # must be before sparc entry or we get the wrong os. 846 1543 os=-sysv3 … … 849 1546 os=-sunos4.1.1 850 1547 ;; 1548 *-be) 1549 os=-beos 1550 ;; 1551 *-haiku) 1552 os=-haiku 1553 ;; 851 1554 *-ibm) 852 1555 os=-aix 853 1556 ;; 1557 *-knuth) 1558 os=-mmixware 1559 ;; 1560 *-wec) 1561 os=-proelf 1562 ;; 1563 *-winbond) 1564 os=-proelf 1565 ;; 1566 *-oki) 1567 os=-proelf 1568 ;; 854 1569 *-hp) 855 1570 os=-hpux … … 894 1609 os=-nextstep3 895 1610 ;; 896 1611 *-gould) 897 1612 os=-sysv 898 1613 ;; 899 1614 *-highlevel) 900 1615 os=-bsd 901 1616 ;; … … 903 1618 os=-bsd 904 1619 ;; 905 1620 *-sgi) 906 1621 os=-irix 907 1622 ;; 908 1623 *-siemens) 909 1624 os=-sysv4 910 1625 ;; … … 912 1627 os=-rtu 913 1628 ;; 914 f30 1-fujitsu)1629 f30[01]-fujitsu | f700-fujitsu) 915 1630 os=-uxpv 1631 ;; 1632 *-rom68k) 1633 os=-coff 1634 ;; 1635 *-*bug) 1636 os=-coff 1637 ;; 1638 *-apple) 1639 os=-macos 1640 ;; 1641 *-atari*) 1642 os=-mint 916 1643 ;; 917 1644 *) … … 933 1660 vendor=sun 934 1661 ;; 935 - aix*)1662 -cnk*|-aix*) 936 1663 vendor=ibm 1664 ;; 1665 -beos*) 1666 vendor=be 937 1667 ;; 938 1668 -hpux*) 939 1669 vendor=hp 940 1670 ;; 1671 -mpeix*) 1672 vendor=hp 1673 ;; 941 1674 -hiux*) 942 1675 vendor=hitachi … … 954 1687 vendor=ns 955 1688 ;; 956 -mvs*) 1689 -mvs* | -opened*) 1690 vendor=ibm 1691 ;; 1692 -os400*) 957 1693 vendor=ibm 958 1694 ;; … … 960 1696 vendor=sequent 961 1697 ;; 962 -vxsim* | -vxworks*) 1698 -tpf*) 1699 vendor=ibm 1700 ;; 1701 -vxsim* | -vxworks* | -windiss*) 963 1702 vendor=wrs 964 1703 ;; … … 966 1705 vendor=apple 967 1706 ;; 1707 -hms*) 1708 vendor=hitachi 1709 ;; 1710 -mpw* | -macos*) 1711 vendor=apple 1712 ;; 1713 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1714 vendor=atari 1715 ;; 1716 -vos*) 1717 vendor=stratus 1718 ;; 968 1719 esac 969 1720 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` … … 972 1723 973 1724 echo $basic_machine$os 1725 exit 1726 1727 # Local variables: 1728 # eval: (add-hook 'write-file-hooks 'time-stamp) 1729 # time-stamp-start: "timestamp='" 1730 # time-stamp-format: "%:y-%02m-%02d" 1731 # time-stamp-end: "'" 1732 # End:
Note: See TracChangeset
for help on using the changeset viewer.