config.sub revision 576bae58
114c0a534Smrg#! /bin/sh 214c0a534Smrg# Configuration validation subroutine script. 314c0a534Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4576bae58Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 5bf2eeab3Smrg# Free Software Foundation, Inc. 614c0a534Smrg 7576bae58Smrgtimestamp='2010-09-11' 814c0a534Smrg 914c0a534Smrg# This file is (in principle) common to ALL GNU software. 1014c0a534Smrg# The presence of a machine in this file suggests that SOME GNU software 1114c0a534Smrg# can handle that machine. It does not imply ALL GNU software can. 1214c0a534Smrg# 1314c0a534Smrg# This file is free software; you can redistribute it and/or modify 1414c0a534Smrg# it under the terms of the GNU General Public License as published by 1514c0a534Smrg# the Free Software Foundation; either version 2 of the License, or 1614c0a534Smrg# (at your option) any later version. 1714c0a534Smrg# 1814c0a534Smrg# This program is distributed in the hope that it will be useful, 1914c0a534Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2014c0a534Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2114c0a534Smrg# GNU General Public License for more details. 2214c0a534Smrg# 2314c0a534Smrg# You should have received a copy of the GNU General Public License 2414c0a534Smrg# along with this program; if not, write to the Free Software 2514c0a534Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 2614c0a534Smrg# 02110-1301, USA. 2714c0a534Smrg# 2814c0a534Smrg# As a special exception to the GNU General Public License, if you 2914c0a534Smrg# distribute this file as part of a program that contains a 3014c0a534Smrg# configuration script generated by Autoconf, you may include it under 3114c0a534Smrg# the same distribution terms that you use for the rest of that program. 3214c0a534Smrg 3314c0a534Smrg 3414c0a534Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 35576bae58Smrg# diff and a properly formatted GNU ChangeLog entry. 3614c0a534Smrg# 3714c0a534Smrg# Configuration subroutine to validate and canonicalize a configuration type. 3814c0a534Smrg# Supply the specified configuration type as an argument. 3914c0a534Smrg# If it is invalid, we print an error message on stderr and exit with code 1. 4014c0a534Smrg# Otherwise, we print the canonical config type on stdout and succeed. 4114c0a534Smrg 42576bae58Smrg# You can get the latest version of this script from: 43576bae58Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 44576bae58Smrg 4514c0a534Smrg# This file is supposed to be the same for all GNU packages 4614c0a534Smrg# and recognize all the CPU types, system types and aliases 4714c0a534Smrg# that are meaningful with *any* GNU software. 4814c0a534Smrg# Each package is responsible for reporting which valid configurations 4914c0a534Smrg# it does not support. The user should be able to distinguish 5014c0a534Smrg# a failure to support a valid configuration from a meaningless 5114c0a534Smrg# configuration. 5214c0a534Smrg 5314c0a534Smrg# The goal of this file is to map all the various variations of a given 5414c0a534Smrg# machine specification into a single specification in the form: 5514c0a534Smrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 5614c0a534Smrg# or in some cases, the newer four-part form: 5714c0a534Smrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 5814c0a534Smrg# It is wrong to echo any other type of specification. 5914c0a534Smrg 6014c0a534Smrgme=`echo "$0" | sed -e 's,.*/,,'` 6114c0a534Smrg 6214c0a534Smrgusage="\ 6314c0a534SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS 6414c0a534Smrg $0 [OPTION] ALIAS 6514c0a534Smrg 6614c0a534SmrgCanonicalize a configuration name. 6714c0a534Smrg 6814c0a534SmrgOperation modes: 6914c0a534Smrg -h, --help print this help, then exit 7014c0a534Smrg -t, --time-stamp print date of last modification, then exit 7114c0a534Smrg -v, --version print version number, then exit 7214c0a534Smrg 7314c0a534SmrgReport bugs and patches to <config-patches@gnu.org>." 7414c0a534Smrg 7514c0a534Smrgversion="\ 7614c0a534SmrgGNU config.sub ($timestamp) 7714c0a534Smrg 78576bae58SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 79576bae58Smrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 80576bae58SmrgSoftware Foundation, Inc. 8114c0a534Smrg 8214c0a534SmrgThis is free software; see the source for copying conditions. There is NO 8314c0a534Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 8414c0a534Smrg 8514c0a534Smrghelp=" 8614c0a534SmrgTry \`$me --help' for more information." 8714c0a534Smrg 8814c0a534Smrg# Parse command line 8914c0a534Smrgwhile test $# -gt 0 ; do 9014c0a534Smrg case $1 in 9114c0a534Smrg --time-stamp | --time* | -t ) 9214c0a534Smrg echo "$timestamp" ; exit ;; 9314c0a534Smrg --version | -v ) 9414c0a534Smrg echo "$version" ; exit ;; 9514c0a534Smrg --help | --h* | -h ) 9614c0a534Smrg echo "$usage"; exit ;; 9714c0a534Smrg -- ) # Stop option processing 9814c0a534Smrg shift; break ;; 9914c0a534Smrg - ) # Use stdin as input. 10014c0a534Smrg break ;; 10114c0a534Smrg -* ) 10214c0a534Smrg echo "$me: invalid option $1$help" 10314c0a534Smrg exit 1 ;; 10414c0a534Smrg 10514c0a534Smrg *local*) 10614c0a534Smrg # First pass through any local machine types. 10714c0a534Smrg echo $1 10814c0a534Smrg exit ;; 10914c0a534Smrg 11014c0a534Smrg * ) 11114c0a534Smrg break ;; 11214c0a534Smrg esac 11314c0a534Smrgdone 11414c0a534Smrg 11514c0a534Smrgcase $# in 11614c0a534Smrg 0) echo "$me: missing argument$help" >&2 11714c0a534Smrg exit 1;; 11814c0a534Smrg 1) ;; 11914c0a534Smrg *) echo "$me: too many arguments$help" >&2 12014c0a534Smrg exit 1;; 12114c0a534Smrgesac 12214c0a534Smrg 12314c0a534Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 12414c0a534Smrg# Here we must recognize all the valid KERNEL-OS combinations. 12514c0a534Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 12614c0a534Smrgcase $maybe_os in 127576bae58Smrg nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 128576bae58Smrg linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 129576bae58Smrg knetbsd*-gnu* | netbsd*-gnu* | \ 130bf2eeab3Smrg kopensolaris*-gnu* | \ 131bf2eeab3Smrg storm-chaos* | os2-emx* | rtmk-nova*) 13214c0a534Smrg os=-$maybe_os 13314c0a534Smrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 13414c0a534Smrg ;; 13514c0a534Smrg *) 13614c0a534Smrg basic_machine=`echo $1 | sed 's/-[^-]*$//'` 13714c0a534Smrg if [ $basic_machine != $1 ] 13814c0a534Smrg then os=`echo $1 | sed 's/.*-/-/'` 13914c0a534Smrg else os=; fi 14014c0a534Smrg ;; 14114c0a534Smrgesac 14214c0a534Smrg 14314c0a534Smrg### Let's recognize common machines as not being operating systems so 14414c0a534Smrg### that things like config.sub decstation-3100 work. We also 14514c0a534Smrg### recognize some manufacturers as not being operating systems, so we 14614c0a534Smrg### can provide default operating systems below. 14714c0a534Smrgcase $os in 14814c0a534Smrg -sun*os*) 14914c0a534Smrg # Prevent following clause from handling this invalid input. 15014c0a534Smrg ;; 15114c0a534Smrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 15214c0a534Smrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 15314c0a534Smrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 15414c0a534Smrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 15514c0a534Smrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 15614c0a534Smrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 157576bae58Smrg -apple | -axis | -knuth | -cray | -microblaze) 15814c0a534Smrg os= 15914c0a534Smrg basic_machine=$1 16014c0a534Smrg ;; 161576bae58Smrg -bluegene*) 162576bae58Smrg os=-cnk 163576bae58Smrg ;; 16414c0a534Smrg -sim | -cisco | -oki | -wec | -winbond) 16514c0a534Smrg os= 16614c0a534Smrg basic_machine=$1 16714c0a534Smrg ;; 16814c0a534Smrg -scout) 16914c0a534Smrg ;; 17014c0a534Smrg -wrs) 17114c0a534Smrg os=-vxworks 17214c0a534Smrg basic_machine=$1 17314c0a534Smrg ;; 17414c0a534Smrg -chorusos*) 17514c0a534Smrg os=-chorusos 17614c0a534Smrg basic_machine=$1 17714c0a534Smrg ;; 17814c0a534Smrg -chorusrdb) 17914c0a534Smrg os=-chorusrdb 18014c0a534Smrg basic_machine=$1 18114c0a534Smrg ;; 18214c0a534Smrg -hiux*) 18314c0a534Smrg os=-hiuxwe2 18414c0a534Smrg ;; 185bf2eeab3Smrg -sco6) 186bf2eeab3Smrg os=-sco5v6 187bf2eeab3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 188bf2eeab3Smrg ;; 18914c0a534Smrg -sco5) 19014c0a534Smrg os=-sco3.2v5 19114c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19214c0a534Smrg ;; 19314c0a534Smrg -sco4) 19414c0a534Smrg os=-sco3.2v4 19514c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19614c0a534Smrg ;; 19714c0a534Smrg -sco3.2.[4-9]*) 19814c0a534Smrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 19914c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20014c0a534Smrg ;; 20114c0a534Smrg -sco3.2v[4-9]*) 20214c0a534Smrg # Don't forget version if it is 3.2v4 or newer. 20314c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20414c0a534Smrg ;; 205bf2eeab3Smrg -sco5v6*) 206bf2eeab3Smrg # Don't forget version if it is 3.2v4 or newer. 207bf2eeab3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 208bf2eeab3Smrg ;; 20914c0a534Smrg -sco*) 21014c0a534Smrg os=-sco3.2v2 21114c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21214c0a534Smrg ;; 21314c0a534Smrg -udk*) 21414c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21514c0a534Smrg ;; 21614c0a534Smrg -isc) 21714c0a534Smrg os=-isc2.2 21814c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21914c0a534Smrg ;; 22014c0a534Smrg -clix*) 22114c0a534Smrg basic_machine=clipper-intergraph 22214c0a534Smrg ;; 22314c0a534Smrg -isc*) 22414c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 22514c0a534Smrg ;; 22614c0a534Smrg -lynx*) 22714c0a534Smrg os=-lynxos 22814c0a534Smrg ;; 22914c0a534Smrg -ptx*) 23014c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 23114c0a534Smrg ;; 23214c0a534Smrg -windowsnt*) 23314c0a534Smrg os=`echo $os | sed -e 's/windowsnt/winnt/'` 23414c0a534Smrg ;; 23514c0a534Smrg -psos*) 23614c0a534Smrg os=-psos 23714c0a534Smrg ;; 23814c0a534Smrg -mint | -mint[0-9]*) 23914c0a534Smrg basic_machine=m68k-atari 24014c0a534Smrg os=-mint 24114c0a534Smrg ;; 24214c0a534Smrgesac 24314c0a534Smrg 24414c0a534Smrg# Decode aliases for certain CPU-COMPANY combinations. 24514c0a534Smrgcase $basic_machine in 24614c0a534Smrg # Recognize the basic CPU types without company name. 24714c0a534Smrg # Some are omitted here because they have special meanings below. 24814c0a534Smrg 1750a | 580 \ 24914c0a534Smrg | a29k \ 25014c0a534Smrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 25114c0a534Smrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 25214c0a534Smrg | am33_2.0 \ 253bf2eeab3Smrg | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 25414c0a534Smrg | bfin \ 25514c0a534Smrg | c4x | clipper \ 25614c0a534Smrg | d10v | d30v | dlx | dsp16xx \ 257bf2eeab3Smrg | fido | fr30 | frv \ 25814c0a534Smrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 25914c0a534Smrg | i370 | i860 | i960 | ia64 \ 26014c0a534Smrg | ip2k | iq2000 \ 261bf2eeab3Smrg | lm32 \ 262bf2eeab3Smrg | m32c | m32r | m32rle | m68000 | m68k | m88k \ 263bf2eeab3Smrg | maxq | mb | microblaze | mcore | mep | metag \ 26414c0a534Smrg | mips | mipsbe | mipseb | mipsel | mipsle \ 26514c0a534Smrg | mips16 \ 26614c0a534Smrg | mips64 | mips64el \ 267bf2eeab3Smrg | mips64octeon | mips64octeonel \ 26814c0a534Smrg | mips64orion | mips64orionel \ 269bf2eeab3Smrg | mips64r5900 | mips64r5900el \ 270bf2eeab3Smrg | mips64vr | mips64vrel \ 27114c0a534Smrg | mips64vr4100 | mips64vr4100el \ 27214c0a534Smrg | mips64vr4300 | mips64vr4300el \ 27314c0a534Smrg | mips64vr5000 | mips64vr5000el \ 27414c0a534Smrg | mips64vr5900 | mips64vr5900el \ 27514c0a534Smrg | mipsisa32 | mipsisa32el \ 27614c0a534Smrg | mipsisa32r2 | mipsisa32r2el \ 27714c0a534Smrg | mipsisa64 | mipsisa64el \ 27814c0a534Smrg | mipsisa64r2 | mipsisa64r2el \ 27914c0a534Smrg | mipsisa64sb1 | mipsisa64sb1el \ 28014c0a534Smrg | mipsisa64sr71k | mipsisa64sr71kel \ 28114c0a534Smrg | mipstx39 | mipstx39el \ 28214c0a534Smrg | mn10200 | mn10300 \ 283bf2eeab3Smrg | moxie \ 284bf2eeab3Smrg | mt \ 28514c0a534Smrg | msp430 \ 286576bae58Smrg | nds32 | nds32le | nds32be \ 287bf2eeab3Smrg | nios | nios2 \ 28814c0a534Smrg | ns16k | ns32k \ 28914c0a534Smrg | or32 \ 29014c0a534Smrg | pdp10 | pdp11 | pj | pjl \ 29114c0a534Smrg | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 29214c0a534Smrg | pyramid \ 293576bae58Smrg | rx \ 294bf2eeab3Smrg | score \ 295bf2eeab3Smrg | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 29614c0a534Smrg | sh64 | sh64le \ 297bf2eeab3Smrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 298bf2eeab3Smrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 299bf2eeab3Smrg | spu | strongarm \ 300576bae58Smrg | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 301576bae58Smrg | ubicom32 \ 30214c0a534Smrg | v850 | v850e \ 30314c0a534Smrg | we32k \ 304bf2eeab3Smrg | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 305bf2eeab3Smrg | z8k | z80) 30614c0a534Smrg basic_machine=$basic_machine-unknown 30714c0a534Smrg ;; 308576bae58Smrg c54x) 309576bae58Smrg basic_machine=tic54x-unknown 310576bae58Smrg ;; 311576bae58Smrg c55x) 312576bae58Smrg basic_machine=tic55x-unknown 313576bae58Smrg ;; 314576bae58Smrg c6x) 315576bae58Smrg basic_machine=tic6x-unknown 316576bae58Smrg ;; 317576bae58Smrg m6811 | m68hc11 | m6812 | m68hc12 | picochip) 31814c0a534Smrg # Motorola 68HC11/12. 31914c0a534Smrg basic_machine=$basic_machine-unknown 32014c0a534Smrg os=-none 32114c0a534Smrg ;; 32214c0a534Smrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 32314c0a534Smrg ;; 324bf2eeab3Smrg ms1) 325bf2eeab3Smrg basic_machine=mt-unknown 326bf2eeab3Smrg ;; 32714c0a534Smrg 32814c0a534Smrg # We use `pc' rather than `unknown' 32914c0a534Smrg # because (1) that's what they normally are, and 33014c0a534Smrg # (2) the word "unknown" tends to confuse beginning users. 33114c0a534Smrg i*86 | x86_64) 33214c0a534Smrg basic_machine=$basic_machine-pc 33314c0a534Smrg ;; 33414c0a534Smrg # Object if more than one company name word. 33514c0a534Smrg *-*-*) 33614c0a534Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 33714c0a534Smrg exit 1 33814c0a534Smrg ;; 33914c0a534Smrg # Recognize the basic CPU types with company name. 34014c0a534Smrg 580-* \ 34114c0a534Smrg | a29k-* \ 34214c0a534Smrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 34314c0a534Smrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 34414c0a534Smrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 34514c0a534Smrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 346bf2eeab3Smrg | avr-* | avr32-* \ 34714c0a534Smrg | bfin-* | bs2000-* \ 348576bae58Smrg | c[123]* | c30-* | [cjt]90-* | c4x-* \ 34914c0a534Smrg | clipper-* | craynv-* | cydra-* \ 35014c0a534Smrg | d10v-* | d30v-* | dlx-* \ 35114c0a534Smrg | elxsi-* \ 352bf2eeab3Smrg | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 35314c0a534Smrg | h8300-* | h8500-* \ 35414c0a534Smrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 35514c0a534Smrg | i*86-* | i860-* | i960-* | ia64-* \ 35614c0a534Smrg | ip2k-* | iq2000-* \ 357bf2eeab3Smrg | lm32-* \ 358bf2eeab3Smrg | m32c-* | m32r-* | m32rle-* \ 35914c0a534Smrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 360576bae58Smrg | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ 36114c0a534Smrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 36214c0a534Smrg | mips16-* \ 36314c0a534Smrg | mips64-* | mips64el-* \ 364bf2eeab3Smrg | mips64octeon-* | mips64octeonel-* \ 36514c0a534Smrg | mips64orion-* | mips64orionel-* \ 366bf2eeab3Smrg | mips64r5900-* | mips64r5900el-* \ 367bf2eeab3Smrg | mips64vr-* | mips64vrel-* \ 36814c0a534Smrg | mips64vr4100-* | mips64vr4100el-* \ 36914c0a534Smrg | mips64vr4300-* | mips64vr4300el-* \ 37014c0a534Smrg | mips64vr5000-* | mips64vr5000el-* \ 37114c0a534Smrg | mips64vr5900-* | mips64vr5900el-* \ 37214c0a534Smrg | mipsisa32-* | mipsisa32el-* \ 37314c0a534Smrg | mipsisa32r2-* | mipsisa32r2el-* \ 37414c0a534Smrg | mipsisa64-* | mipsisa64el-* \ 37514c0a534Smrg | mipsisa64r2-* | mipsisa64r2el-* \ 37614c0a534Smrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 37714c0a534Smrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 37814c0a534Smrg | mipstx39-* | mipstx39el-* \ 37914c0a534Smrg | mmix-* \ 380bf2eeab3Smrg | mt-* \ 38114c0a534Smrg | msp430-* \ 382576bae58Smrg | nds32-* | nds32le-* | nds32be-* \ 383bf2eeab3Smrg | nios-* | nios2-* \ 38414c0a534Smrg | none-* | np1-* | ns16k-* | ns32k-* \ 38514c0a534Smrg | orion-* \ 38614c0a534Smrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 38714c0a534Smrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 38814c0a534Smrg | pyramid-* \ 389576bae58Smrg | romp-* | rs6000-* | rx-* \ 390bf2eeab3Smrg | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 39114c0a534Smrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 392bf2eeab3Smrg | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 39314c0a534Smrg | sparclite-* \ 394bf2eeab3Smrg | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 39514c0a534Smrg | tahoe-* | thumb-* \ 396576bae58Smrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 397576bae58Smrg | tile-* | tilegx-* \ 39814c0a534Smrg | tron-* \ 399576bae58Smrg | ubicom32-* \ 40014c0a534Smrg | v850-* | v850e-* | vax-* \ 40114c0a534Smrg | we32k-* \ 402bf2eeab3Smrg | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 403bf2eeab3Smrg | xstormy16-* | xtensa*-* \ 40414c0a534Smrg | ymp-* \ 405bf2eeab3Smrg | z8k-* | z80-*) 40614c0a534Smrg ;; 407bf2eeab3Smrg # Recognize the basic CPU types without company name, with glob match. 408bf2eeab3Smrg xtensa*) 409bf2eeab3Smrg basic_machine=$basic_machine-unknown 41014c0a534Smrg ;; 41114c0a534Smrg # Recognize the various machine names and aliases which stand 41214c0a534Smrg # for a CPU type and a company and sometimes even an OS. 41314c0a534Smrg 386bsd) 41414c0a534Smrg basic_machine=i386-unknown 41514c0a534Smrg os=-bsd 41614c0a534Smrg ;; 41714c0a534Smrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 41814c0a534Smrg basic_machine=m68000-att 41914c0a534Smrg ;; 42014c0a534Smrg 3b*) 42114c0a534Smrg basic_machine=we32k-att 42214c0a534Smrg ;; 42314c0a534Smrg a29khif) 42414c0a534Smrg basic_machine=a29k-amd 42514c0a534Smrg os=-udi 42614c0a534Smrg ;; 42714c0a534Smrg abacus) 42814c0a534Smrg basic_machine=abacus-unknown 42914c0a534Smrg ;; 43014c0a534Smrg adobe68k) 43114c0a534Smrg basic_machine=m68010-adobe 43214c0a534Smrg os=-scout 43314c0a534Smrg ;; 43414c0a534Smrg alliant | fx80) 43514c0a534Smrg basic_machine=fx80-alliant 43614c0a534Smrg ;; 43714c0a534Smrg altos | altos3068) 43814c0a534Smrg basic_machine=m68k-altos 43914c0a534Smrg ;; 44014c0a534Smrg am29k) 44114c0a534Smrg basic_machine=a29k-none 44214c0a534Smrg os=-bsd 44314c0a534Smrg ;; 44414c0a534Smrg amd64) 44514c0a534Smrg basic_machine=x86_64-pc 44614c0a534Smrg ;; 44714c0a534Smrg amd64-*) 44814c0a534Smrg basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 44914c0a534Smrg ;; 45014c0a534Smrg amdahl) 45114c0a534Smrg basic_machine=580-amdahl 45214c0a534Smrg os=-sysv 45314c0a534Smrg ;; 45414c0a534Smrg amiga | amiga-*) 45514c0a534Smrg basic_machine=m68k-unknown 45614c0a534Smrg ;; 45714c0a534Smrg amigaos | amigados) 45814c0a534Smrg basic_machine=m68k-unknown 45914c0a534Smrg os=-amigaos 46014c0a534Smrg ;; 46114c0a534Smrg amigaunix | amix) 46214c0a534Smrg basic_machine=m68k-unknown 46314c0a534Smrg os=-sysv4 46414c0a534Smrg ;; 46514c0a534Smrg apollo68) 46614c0a534Smrg basic_machine=m68k-apollo 46714c0a534Smrg os=-sysv 46814c0a534Smrg ;; 46914c0a534Smrg apollo68bsd) 47014c0a534Smrg basic_machine=m68k-apollo 47114c0a534Smrg os=-bsd 47214c0a534Smrg ;; 473bf2eeab3Smrg aros) 474bf2eeab3Smrg basic_machine=i386-pc 475bf2eeab3Smrg os=-aros 476bf2eeab3Smrg ;; 47714c0a534Smrg aux) 47814c0a534Smrg basic_machine=m68k-apple 47914c0a534Smrg os=-aux 48014c0a534Smrg ;; 48114c0a534Smrg balance) 48214c0a534Smrg basic_machine=ns32k-sequent 48314c0a534Smrg os=-dynix 48414c0a534Smrg ;; 485bf2eeab3Smrg blackfin) 486bf2eeab3Smrg basic_machine=bfin-unknown 487bf2eeab3Smrg os=-linux 488bf2eeab3Smrg ;; 489bf2eeab3Smrg blackfin-*) 490bf2eeab3Smrg basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 491bf2eeab3Smrg os=-linux 492bf2eeab3Smrg ;; 493576bae58Smrg bluegene*) 494576bae58Smrg basic_machine=powerpc-ibm 495576bae58Smrg os=-cnk 496576bae58Smrg ;; 497576bae58Smrg c54x-*) 498576bae58Smrg basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 499576bae58Smrg ;; 500576bae58Smrg c55x-*) 501576bae58Smrg basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 502576bae58Smrg ;; 503576bae58Smrg c6x-*) 504576bae58Smrg basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 505576bae58Smrg ;; 50614c0a534Smrg c90) 50714c0a534Smrg basic_machine=c90-cray 50814c0a534Smrg os=-unicos 50914c0a534Smrg ;; 510bf2eeab3Smrg cegcc) 511bf2eeab3Smrg basic_machine=arm-unknown 512bf2eeab3Smrg os=-cegcc 513bf2eeab3Smrg ;; 51414c0a534Smrg convex-c1) 51514c0a534Smrg basic_machine=c1-convex 51614c0a534Smrg os=-bsd 51714c0a534Smrg ;; 51814c0a534Smrg convex-c2) 51914c0a534Smrg basic_machine=c2-convex 52014c0a534Smrg os=-bsd 52114c0a534Smrg ;; 52214c0a534Smrg convex-c32) 52314c0a534Smrg basic_machine=c32-convex 52414c0a534Smrg os=-bsd 52514c0a534Smrg ;; 52614c0a534Smrg convex-c34) 52714c0a534Smrg basic_machine=c34-convex 52814c0a534Smrg os=-bsd 52914c0a534Smrg ;; 53014c0a534Smrg convex-c38) 53114c0a534Smrg basic_machine=c38-convex 53214c0a534Smrg os=-bsd 53314c0a534Smrg ;; 53414c0a534Smrg cray | j90) 53514c0a534Smrg basic_machine=j90-cray 53614c0a534Smrg os=-unicos 53714c0a534Smrg ;; 53814c0a534Smrg craynv) 53914c0a534Smrg basic_machine=craynv-cray 54014c0a534Smrg os=-unicosmp 54114c0a534Smrg ;; 542bf2eeab3Smrg cr16) 543bf2eeab3Smrg basic_machine=cr16-unknown 54414c0a534Smrg os=-elf 54514c0a534Smrg ;; 54614c0a534Smrg crds | unos) 54714c0a534Smrg basic_machine=m68k-crds 54814c0a534Smrg ;; 54914c0a534Smrg crisv32 | crisv32-* | etraxfs*) 55014c0a534Smrg basic_machine=crisv32-axis 55114c0a534Smrg ;; 55214c0a534Smrg cris | cris-* | etrax*) 55314c0a534Smrg basic_machine=cris-axis 55414c0a534Smrg ;; 55514c0a534Smrg crx) 55614c0a534Smrg basic_machine=crx-unknown 55714c0a534Smrg os=-elf 55814c0a534Smrg ;; 55914c0a534Smrg da30 | da30-*) 56014c0a534Smrg basic_machine=m68k-da30 56114c0a534Smrg ;; 56214c0a534Smrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 56314c0a534Smrg basic_machine=mips-dec 56414c0a534Smrg ;; 56514c0a534Smrg decsystem10* | dec10*) 56614c0a534Smrg basic_machine=pdp10-dec 56714c0a534Smrg os=-tops10 56814c0a534Smrg ;; 56914c0a534Smrg decsystem20* | dec20*) 57014c0a534Smrg basic_machine=pdp10-dec 57114c0a534Smrg os=-tops20 57214c0a534Smrg ;; 57314c0a534Smrg delta | 3300 | motorola-3300 | motorola-delta \ 57414c0a534Smrg | 3300-motorola | delta-motorola) 57514c0a534Smrg basic_machine=m68k-motorola 57614c0a534Smrg ;; 57714c0a534Smrg delta88) 57814c0a534Smrg basic_machine=m88k-motorola 57914c0a534Smrg os=-sysv3 58014c0a534Smrg ;; 581bf2eeab3Smrg dicos) 582bf2eeab3Smrg basic_machine=i686-pc 583bf2eeab3Smrg os=-dicos 584bf2eeab3Smrg ;; 58514c0a534Smrg djgpp) 58614c0a534Smrg basic_machine=i586-pc 58714c0a534Smrg os=-msdosdjgpp 58814c0a534Smrg ;; 58914c0a534Smrg dpx20 | dpx20-*) 59014c0a534Smrg basic_machine=rs6000-bull 59114c0a534Smrg os=-bosx 59214c0a534Smrg ;; 59314c0a534Smrg dpx2* | dpx2*-bull) 59414c0a534Smrg basic_machine=m68k-bull 59514c0a534Smrg os=-sysv3 59614c0a534Smrg ;; 59714c0a534Smrg ebmon29k) 59814c0a534Smrg basic_machine=a29k-amd 59914c0a534Smrg os=-ebmon 60014c0a534Smrg ;; 60114c0a534Smrg elxsi) 60214c0a534Smrg basic_machine=elxsi-elxsi 60314c0a534Smrg os=-bsd 60414c0a534Smrg ;; 60514c0a534Smrg encore | umax | mmax) 60614c0a534Smrg basic_machine=ns32k-encore 60714c0a534Smrg ;; 60814c0a534Smrg es1800 | OSE68k | ose68k | ose | OSE) 60914c0a534Smrg basic_machine=m68k-ericsson 61014c0a534Smrg os=-ose 61114c0a534Smrg ;; 61214c0a534Smrg fx2800) 61314c0a534Smrg basic_machine=i860-alliant 61414c0a534Smrg ;; 61514c0a534Smrg genix) 61614c0a534Smrg basic_machine=ns32k-ns 61714c0a534Smrg ;; 61814c0a534Smrg gmicro) 61914c0a534Smrg basic_machine=tron-gmicro 62014c0a534Smrg os=-sysv 62114c0a534Smrg ;; 62214c0a534Smrg go32) 62314c0a534Smrg basic_machine=i386-pc 62414c0a534Smrg os=-go32 62514c0a534Smrg ;; 62614c0a534Smrg h3050r* | hiux*) 62714c0a534Smrg basic_machine=hppa1.1-hitachi 62814c0a534Smrg os=-hiuxwe2 62914c0a534Smrg ;; 63014c0a534Smrg h8300hms) 63114c0a534Smrg basic_machine=h8300-hitachi 63214c0a534Smrg os=-hms 63314c0a534Smrg ;; 63414c0a534Smrg h8300xray) 63514c0a534Smrg basic_machine=h8300-hitachi 63614c0a534Smrg os=-xray 63714c0a534Smrg ;; 63814c0a534Smrg h8500hms) 63914c0a534Smrg basic_machine=h8500-hitachi 64014c0a534Smrg os=-hms 64114c0a534Smrg ;; 64214c0a534Smrg harris) 64314c0a534Smrg basic_machine=m88k-harris 64414c0a534Smrg os=-sysv3 64514c0a534Smrg ;; 64614c0a534Smrg hp300-*) 64714c0a534Smrg basic_machine=m68k-hp 64814c0a534Smrg ;; 64914c0a534Smrg hp300bsd) 65014c0a534Smrg basic_machine=m68k-hp 65114c0a534Smrg os=-bsd 65214c0a534Smrg ;; 65314c0a534Smrg hp300hpux) 65414c0a534Smrg basic_machine=m68k-hp 65514c0a534Smrg os=-hpux 65614c0a534Smrg ;; 65714c0a534Smrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 65814c0a534Smrg basic_machine=hppa1.0-hp 65914c0a534Smrg ;; 66014c0a534Smrg hp9k2[0-9][0-9] | hp9k31[0-9]) 66114c0a534Smrg basic_machine=m68000-hp 66214c0a534Smrg ;; 66314c0a534Smrg hp9k3[2-9][0-9]) 66414c0a534Smrg basic_machine=m68k-hp 66514c0a534Smrg ;; 66614c0a534Smrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 66714c0a534Smrg basic_machine=hppa1.0-hp 66814c0a534Smrg ;; 66914c0a534Smrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 67014c0a534Smrg basic_machine=hppa1.1-hp 67114c0a534Smrg ;; 67214c0a534Smrg hp9k78[0-9] | hp78[0-9]) 67314c0a534Smrg # FIXME: really hppa2.0-hp 67414c0a534Smrg basic_machine=hppa1.1-hp 67514c0a534Smrg ;; 67614c0a534Smrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 67714c0a534Smrg # FIXME: really hppa2.0-hp 67814c0a534Smrg basic_machine=hppa1.1-hp 67914c0a534Smrg ;; 68014c0a534Smrg hp9k8[0-9][13679] | hp8[0-9][13679]) 68114c0a534Smrg basic_machine=hppa1.1-hp 68214c0a534Smrg ;; 68314c0a534Smrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 68414c0a534Smrg basic_machine=hppa1.0-hp 68514c0a534Smrg ;; 68614c0a534Smrg hppa-next) 68714c0a534Smrg os=-nextstep3 68814c0a534Smrg ;; 68914c0a534Smrg hppaosf) 69014c0a534Smrg basic_machine=hppa1.1-hp 69114c0a534Smrg os=-osf 69214c0a534Smrg ;; 69314c0a534Smrg hppro) 69414c0a534Smrg basic_machine=hppa1.1-hp 69514c0a534Smrg os=-proelf 69614c0a534Smrg ;; 69714c0a534Smrg i370-ibm* | ibm*) 69814c0a534Smrg basic_machine=i370-ibm 69914c0a534Smrg ;; 70014c0a534Smrg# I'm not sure what "Sysv32" means. Should this be sysv3.2? 70114c0a534Smrg i*86v32) 70214c0a534Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 70314c0a534Smrg os=-sysv32 70414c0a534Smrg ;; 70514c0a534Smrg i*86v4*) 70614c0a534Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 70714c0a534Smrg os=-sysv4 70814c0a534Smrg ;; 70914c0a534Smrg i*86v) 71014c0a534Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 71114c0a534Smrg os=-sysv 71214c0a534Smrg ;; 71314c0a534Smrg i*86sol2) 71414c0a534Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 71514c0a534Smrg os=-solaris2 71614c0a534Smrg ;; 71714c0a534Smrg i386mach) 71814c0a534Smrg basic_machine=i386-mach 71914c0a534Smrg os=-mach 72014c0a534Smrg ;; 72114c0a534Smrg i386-vsta | vsta) 72214c0a534Smrg basic_machine=i386-unknown 72314c0a534Smrg os=-vsta 72414c0a534Smrg ;; 72514c0a534Smrg iris | iris4d) 72614c0a534Smrg basic_machine=mips-sgi 72714c0a534Smrg case $os in 72814c0a534Smrg -irix*) 72914c0a534Smrg ;; 73014c0a534Smrg *) 73114c0a534Smrg os=-irix4 73214c0a534Smrg ;; 73314c0a534Smrg esac 73414c0a534Smrg ;; 73514c0a534Smrg isi68 | isi) 73614c0a534Smrg basic_machine=m68k-isi 73714c0a534Smrg os=-sysv 73814c0a534Smrg ;; 739bf2eeab3Smrg m68knommu) 740bf2eeab3Smrg basic_machine=m68k-unknown 741bf2eeab3Smrg os=-linux 742bf2eeab3Smrg ;; 743bf2eeab3Smrg m68knommu-*) 744bf2eeab3Smrg basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 745bf2eeab3Smrg os=-linux 746bf2eeab3Smrg ;; 74714c0a534Smrg m88k-omron*) 74814c0a534Smrg basic_machine=m88k-omron 74914c0a534Smrg ;; 75014c0a534Smrg magnum | m3230) 75114c0a534Smrg basic_machine=mips-mips 75214c0a534Smrg os=-sysv 75314c0a534Smrg ;; 75414c0a534Smrg merlin) 75514c0a534Smrg basic_machine=ns32k-utek 75614c0a534Smrg os=-sysv 75714c0a534Smrg ;; 758576bae58Smrg microblaze) 759576bae58Smrg basic_machine=microblaze-xilinx 760576bae58Smrg ;; 76114c0a534Smrg mingw32) 76214c0a534Smrg basic_machine=i386-pc 76314c0a534Smrg os=-mingw32 76414c0a534Smrg ;; 765bf2eeab3Smrg mingw32ce) 766bf2eeab3Smrg basic_machine=arm-unknown 767bf2eeab3Smrg os=-mingw32ce 768bf2eeab3Smrg ;; 76914c0a534Smrg miniframe) 77014c0a534Smrg basic_machine=m68000-convergent 77114c0a534Smrg ;; 77214c0a534Smrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 77314c0a534Smrg basic_machine=m68k-atari 77414c0a534Smrg os=-mint 77514c0a534Smrg ;; 77614c0a534Smrg mips3*-*) 77714c0a534Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 77814c0a534Smrg ;; 77914c0a534Smrg mips3*) 78014c0a534Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 78114c0a534Smrg ;; 78214c0a534Smrg monitor) 78314c0a534Smrg basic_machine=m68k-rom68k 78414c0a534Smrg os=-coff 78514c0a534Smrg ;; 78614c0a534Smrg morphos) 78714c0a534Smrg basic_machine=powerpc-unknown 78814c0a534Smrg os=-morphos 78914c0a534Smrg ;; 79014c0a534Smrg msdos) 79114c0a534Smrg basic_machine=i386-pc 79214c0a534Smrg os=-msdos 79314c0a534Smrg ;; 794bf2eeab3Smrg ms1-*) 795bf2eeab3Smrg basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 796bf2eeab3Smrg ;; 79714c0a534Smrg mvs) 79814c0a534Smrg basic_machine=i370-ibm 79914c0a534Smrg os=-mvs 80014c0a534Smrg ;; 80114c0a534Smrg ncr3000) 80214c0a534Smrg basic_machine=i486-ncr 80314c0a534Smrg os=-sysv4 80414c0a534Smrg ;; 80514c0a534Smrg netbsd386) 80614c0a534Smrg basic_machine=i386-unknown 80714c0a534Smrg os=-netbsd 80814c0a534Smrg ;; 80914c0a534Smrg netwinder) 81014c0a534Smrg basic_machine=armv4l-rebel 81114c0a534Smrg os=-linux 81214c0a534Smrg ;; 81314c0a534Smrg news | news700 | news800 | news900) 81414c0a534Smrg basic_machine=m68k-sony 81514c0a534Smrg os=-newsos 81614c0a534Smrg ;; 81714c0a534Smrg news1000) 81814c0a534Smrg basic_machine=m68030-sony 81914c0a534Smrg os=-newsos 82014c0a534Smrg ;; 82114c0a534Smrg news-3600 | risc-news) 82214c0a534Smrg basic_machine=mips-sony 82314c0a534Smrg os=-newsos 82414c0a534Smrg ;; 82514c0a534Smrg necv70) 82614c0a534Smrg basic_machine=v70-nec 82714c0a534Smrg os=-sysv 82814c0a534Smrg ;; 82914c0a534Smrg next | m*-next ) 83014c0a534Smrg basic_machine=m68k-next 83114c0a534Smrg case $os in 83214c0a534Smrg -nextstep* ) 83314c0a534Smrg ;; 83414c0a534Smrg -ns2*) 83514c0a534Smrg os=-nextstep2 83614c0a534Smrg ;; 83714c0a534Smrg *) 83814c0a534Smrg os=-nextstep3 83914c0a534Smrg ;; 84014c0a534Smrg esac 84114c0a534Smrg ;; 84214c0a534Smrg nh3000) 84314c0a534Smrg basic_machine=m68k-harris 84414c0a534Smrg os=-cxux 84514c0a534Smrg ;; 84614c0a534Smrg nh[45]000) 84714c0a534Smrg basic_machine=m88k-harris 84814c0a534Smrg os=-cxux 84914c0a534Smrg ;; 85014c0a534Smrg nindy960) 85114c0a534Smrg basic_machine=i960-intel 85214c0a534Smrg os=-nindy 85314c0a534Smrg ;; 85414c0a534Smrg mon960) 85514c0a534Smrg basic_machine=i960-intel 85614c0a534Smrg os=-mon960 85714c0a534Smrg ;; 85814c0a534Smrg nonstopux) 85914c0a534Smrg basic_machine=mips-compaq 86014c0a534Smrg os=-nonstopux 86114c0a534Smrg ;; 86214c0a534Smrg np1) 86314c0a534Smrg basic_machine=np1-gould 86414c0a534Smrg ;; 865576bae58Smrg neo-tandem) 866576bae58Smrg basic_machine=neo-tandem 867576bae58Smrg ;; 868576bae58Smrg nse-tandem) 869576bae58Smrg basic_machine=nse-tandem 870576bae58Smrg ;; 87114c0a534Smrg nsr-tandem) 87214c0a534Smrg basic_machine=nsr-tandem 87314c0a534Smrg ;; 87414c0a534Smrg op50n-* | op60c-*) 87514c0a534Smrg basic_machine=hppa1.1-oki 87614c0a534Smrg os=-proelf 87714c0a534Smrg ;; 87814c0a534Smrg openrisc | openrisc-*) 87914c0a534Smrg basic_machine=or32-unknown 88014c0a534Smrg ;; 88114c0a534Smrg os400) 88214c0a534Smrg basic_machine=powerpc-ibm 88314c0a534Smrg os=-os400 88414c0a534Smrg ;; 88514c0a534Smrg OSE68000 | ose68000) 88614c0a534Smrg basic_machine=m68000-ericsson 88714c0a534Smrg os=-ose 88814c0a534Smrg ;; 88914c0a534Smrg os68k) 89014c0a534Smrg basic_machine=m68k-none 89114c0a534Smrg os=-os68k 89214c0a534Smrg ;; 89314c0a534Smrg pa-hitachi) 89414c0a534Smrg basic_machine=hppa1.1-hitachi 89514c0a534Smrg os=-hiuxwe2 89614c0a534Smrg ;; 89714c0a534Smrg paragon) 89814c0a534Smrg basic_machine=i860-intel 89914c0a534Smrg os=-osf 90014c0a534Smrg ;; 901bf2eeab3Smrg parisc) 902bf2eeab3Smrg basic_machine=hppa-unknown 903bf2eeab3Smrg os=-linux 904bf2eeab3Smrg ;; 905bf2eeab3Smrg parisc-*) 906bf2eeab3Smrg basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 907bf2eeab3Smrg os=-linux 908bf2eeab3Smrg ;; 90914c0a534Smrg pbd) 91014c0a534Smrg basic_machine=sparc-tti 91114c0a534Smrg ;; 91214c0a534Smrg pbb) 91314c0a534Smrg basic_machine=m68k-tti 91414c0a534Smrg ;; 91514c0a534Smrg pc532 | pc532-*) 91614c0a534Smrg basic_machine=ns32k-pc532 91714c0a534Smrg ;; 918bf2eeab3Smrg pc98) 919bf2eeab3Smrg basic_machine=i386-pc 920bf2eeab3Smrg ;; 921bf2eeab3Smrg pc98-*) 922bf2eeab3Smrg basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 923bf2eeab3Smrg ;; 92414c0a534Smrg pentium | p5 | k5 | k6 | nexgen | viac3) 92514c0a534Smrg basic_machine=i586-pc 92614c0a534Smrg ;; 92714c0a534Smrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 92814c0a534Smrg basic_machine=i686-pc 92914c0a534Smrg ;; 93014c0a534Smrg pentiumii | pentium2 | pentiumiii | pentium3) 93114c0a534Smrg basic_machine=i686-pc 93214c0a534Smrg ;; 93314c0a534Smrg pentium4) 93414c0a534Smrg basic_machine=i786-pc 93514c0a534Smrg ;; 93614c0a534Smrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 93714c0a534Smrg basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 93814c0a534Smrg ;; 93914c0a534Smrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 94014c0a534Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 94114c0a534Smrg ;; 94214c0a534Smrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 94314c0a534Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 94414c0a534Smrg ;; 94514c0a534Smrg pentium4-*) 94614c0a534Smrg basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 94714c0a534Smrg ;; 94814c0a534Smrg pn) 94914c0a534Smrg basic_machine=pn-gould 95014c0a534Smrg ;; 95114c0a534Smrg power) basic_machine=power-ibm 95214c0a534Smrg ;; 95314c0a534Smrg ppc) basic_machine=powerpc-unknown 95414c0a534Smrg ;; 95514c0a534Smrg ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 95614c0a534Smrg ;; 95714c0a534Smrg ppcle | powerpclittle | ppc-le | powerpc-little) 95814c0a534Smrg basic_machine=powerpcle-unknown 95914c0a534Smrg ;; 96014c0a534Smrg ppcle-* | powerpclittle-*) 96114c0a534Smrg basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 96214c0a534Smrg ;; 96314c0a534Smrg ppc64) basic_machine=powerpc64-unknown 96414c0a534Smrg ;; 96514c0a534Smrg ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 96614c0a534Smrg ;; 96714c0a534Smrg ppc64le | powerpc64little | ppc64-le | powerpc64-little) 96814c0a534Smrg basic_machine=powerpc64le-unknown 96914c0a534Smrg ;; 97014c0a534Smrg ppc64le-* | powerpc64little-*) 97114c0a534Smrg basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 97214c0a534Smrg ;; 97314c0a534Smrg ps2) 97414c0a534Smrg basic_machine=i386-ibm 97514c0a534Smrg ;; 97614c0a534Smrg pw32) 97714c0a534Smrg basic_machine=i586-unknown 97814c0a534Smrg os=-pw32 97914c0a534Smrg ;; 980bf2eeab3Smrg rdos) 981bf2eeab3Smrg basic_machine=i386-pc 982bf2eeab3Smrg os=-rdos 983bf2eeab3Smrg ;; 98414c0a534Smrg rom68k) 98514c0a534Smrg basic_machine=m68k-rom68k 98614c0a534Smrg os=-coff 98714c0a534Smrg ;; 98814c0a534Smrg rm[46]00) 98914c0a534Smrg basic_machine=mips-siemens 99014c0a534Smrg ;; 99114c0a534Smrg rtpc | rtpc-*) 99214c0a534Smrg basic_machine=romp-ibm 99314c0a534Smrg ;; 99414c0a534Smrg s390 | s390-*) 99514c0a534Smrg basic_machine=s390-ibm 99614c0a534Smrg ;; 99714c0a534Smrg s390x | s390x-*) 99814c0a534Smrg basic_machine=s390x-ibm 99914c0a534Smrg ;; 100014c0a534Smrg sa29200) 100114c0a534Smrg basic_machine=a29k-amd 100214c0a534Smrg os=-udi 100314c0a534Smrg ;; 100414c0a534Smrg sb1) 100514c0a534Smrg basic_machine=mipsisa64sb1-unknown 100614c0a534Smrg ;; 100714c0a534Smrg sb1el) 100814c0a534Smrg basic_machine=mipsisa64sb1el-unknown 100914c0a534Smrg ;; 1010bf2eeab3Smrg sde) 1011bf2eeab3Smrg basic_machine=mipsisa32-sde 1012bf2eeab3Smrg os=-elf 1013bf2eeab3Smrg ;; 101414c0a534Smrg sei) 101514c0a534Smrg basic_machine=mips-sei 101614c0a534Smrg os=-seiux 101714c0a534Smrg ;; 101814c0a534Smrg sequent) 101914c0a534Smrg basic_machine=i386-sequent 102014c0a534Smrg ;; 102114c0a534Smrg sh) 102214c0a534Smrg basic_machine=sh-hitachi 102314c0a534Smrg os=-hms 102414c0a534Smrg ;; 1025bf2eeab3Smrg sh5el) 1026bf2eeab3Smrg basic_machine=sh5le-unknown 1027bf2eeab3Smrg ;; 102814c0a534Smrg sh64) 102914c0a534Smrg basic_machine=sh64-unknown 103014c0a534Smrg ;; 103114c0a534Smrg sparclite-wrs | simso-wrs) 103214c0a534Smrg basic_machine=sparclite-wrs 103314c0a534Smrg os=-vxworks 103414c0a534Smrg ;; 103514c0a534Smrg sps7) 103614c0a534Smrg basic_machine=m68k-bull 103714c0a534Smrg os=-sysv2 103814c0a534Smrg ;; 103914c0a534Smrg spur) 104014c0a534Smrg basic_machine=spur-unknown 104114c0a534Smrg ;; 104214c0a534Smrg st2000) 104314c0a534Smrg basic_machine=m68k-tandem 104414c0a534Smrg ;; 104514c0a534Smrg stratus) 104614c0a534Smrg basic_machine=i860-stratus 104714c0a534Smrg os=-sysv4 104814c0a534Smrg ;; 104914c0a534Smrg sun2) 105014c0a534Smrg basic_machine=m68000-sun 105114c0a534Smrg ;; 105214c0a534Smrg sun2os3) 105314c0a534Smrg basic_machine=m68000-sun 105414c0a534Smrg os=-sunos3 105514c0a534Smrg ;; 105614c0a534Smrg sun2os4) 105714c0a534Smrg basic_machine=m68000-sun 105814c0a534Smrg os=-sunos4 105914c0a534Smrg ;; 106014c0a534Smrg sun3os3) 106114c0a534Smrg basic_machine=m68k-sun 106214c0a534Smrg os=-sunos3 106314c0a534Smrg ;; 106414c0a534Smrg sun3os4) 106514c0a534Smrg basic_machine=m68k-sun 106614c0a534Smrg os=-sunos4 106714c0a534Smrg ;; 106814c0a534Smrg sun4os3) 106914c0a534Smrg basic_machine=sparc-sun 107014c0a534Smrg os=-sunos3 107114c0a534Smrg ;; 107214c0a534Smrg sun4os4) 107314c0a534Smrg basic_machine=sparc-sun 107414c0a534Smrg os=-sunos4 107514c0a534Smrg ;; 107614c0a534Smrg sun4sol2) 107714c0a534Smrg basic_machine=sparc-sun 107814c0a534Smrg os=-solaris2 107914c0a534Smrg ;; 108014c0a534Smrg sun3 | sun3-*) 108114c0a534Smrg basic_machine=m68k-sun 108214c0a534Smrg ;; 108314c0a534Smrg sun4) 108414c0a534Smrg basic_machine=sparc-sun 108514c0a534Smrg ;; 108614c0a534Smrg sun386 | sun386i | roadrunner) 108714c0a534Smrg basic_machine=i386-sun 108814c0a534Smrg ;; 108914c0a534Smrg sv1) 109014c0a534Smrg basic_machine=sv1-cray 109114c0a534Smrg os=-unicos 109214c0a534Smrg ;; 109314c0a534Smrg symmetry) 109414c0a534Smrg basic_machine=i386-sequent 109514c0a534Smrg os=-dynix 109614c0a534Smrg ;; 109714c0a534Smrg t3e) 109814c0a534Smrg basic_machine=alphaev5-cray 109914c0a534Smrg os=-unicos 110014c0a534Smrg ;; 110114c0a534Smrg t90) 110214c0a534Smrg basic_machine=t90-cray 110314c0a534Smrg os=-unicos 110414c0a534Smrg ;; 1105576bae58Smrg # This must be matched before tile*. 1106576bae58Smrg tilegx*) 1107576bae58Smrg basic_machine=tilegx-unknown 1108576bae58Smrg os=-linux-gnu 110914c0a534Smrg ;; 1110bf2eeab3Smrg tile*) 1111bf2eeab3Smrg basic_machine=tile-unknown 1112bf2eeab3Smrg os=-linux-gnu 1113bf2eeab3Smrg ;; 111414c0a534Smrg tx39) 111514c0a534Smrg basic_machine=mipstx39-unknown 111614c0a534Smrg ;; 111714c0a534Smrg tx39el) 111814c0a534Smrg basic_machine=mipstx39el-unknown 111914c0a534Smrg ;; 112014c0a534Smrg toad1) 112114c0a534Smrg basic_machine=pdp10-xkl 112214c0a534Smrg os=-tops20 112314c0a534Smrg ;; 112414c0a534Smrg tower | tower-32) 112514c0a534Smrg basic_machine=m68k-ncr 112614c0a534Smrg ;; 112714c0a534Smrg tpf) 112814c0a534Smrg basic_machine=s390x-ibm 112914c0a534Smrg os=-tpf 113014c0a534Smrg ;; 113114c0a534Smrg udi29k) 113214c0a534Smrg basic_machine=a29k-amd 113314c0a534Smrg os=-udi 113414c0a534Smrg ;; 113514c0a534Smrg ultra3) 113614c0a534Smrg basic_machine=a29k-nyu 113714c0a534Smrg os=-sym1 113814c0a534Smrg ;; 113914c0a534Smrg v810 | necv810) 114014c0a534Smrg basic_machine=v810-nec 114114c0a534Smrg os=-none 114214c0a534Smrg ;; 114314c0a534Smrg vaxv) 114414c0a534Smrg basic_machine=vax-dec 114514c0a534Smrg os=-sysv 114614c0a534Smrg ;; 114714c0a534Smrg vms) 114814c0a534Smrg basic_machine=vax-dec 114914c0a534Smrg os=-vms 115014c0a534Smrg ;; 115114c0a534Smrg vpp*|vx|vx-*) 115214c0a534Smrg basic_machine=f301-fujitsu 115314c0a534Smrg ;; 115414c0a534Smrg vxworks960) 115514c0a534Smrg basic_machine=i960-wrs 115614c0a534Smrg os=-vxworks 115714c0a534Smrg ;; 115814c0a534Smrg vxworks68) 115914c0a534Smrg basic_machine=m68k-wrs 116014c0a534Smrg os=-vxworks 116114c0a534Smrg ;; 116214c0a534Smrg vxworks29k) 116314c0a534Smrg basic_machine=a29k-wrs 116414c0a534Smrg os=-vxworks 116514c0a534Smrg ;; 116614c0a534Smrg w65*) 116714c0a534Smrg basic_machine=w65-wdc 116814c0a534Smrg os=-none 116914c0a534Smrg ;; 117014c0a534Smrg w89k-*) 117114c0a534Smrg basic_machine=hppa1.1-winbond 117214c0a534Smrg os=-proelf 117314c0a534Smrg ;; 117414c0a534Smrg xbox) 117514c0a534Smrg basic_machine=i686-pc 117614c0a534Smrg os=-mingw32 117714c0a534Smrg ;; 117814c0a534Smrg xps | xps100) 117914c0a534Smrg basic_machine=xps100-honeywell 118014c0a534Smrg ;; 118114c0a534Smrg ymp) 118214c0a534Smrg basic_machine=ymp-cray 118314c0a534Smrg os=-unicos 118414c0a534Smrg ;; 118514c0a534Smrg z8k-*-coff) 118614c0a534Smrg basic_machine=z8k-unknown 118714c0a534Smrg os=-sim 118814c0a534Smrg ;; 1189bf2eeab3Smrg z80-*-coff) 1190bf2eeab3Smrg basic_machine=z80-unknown 1191bf2eeab3Smrg os=-sim 1192bf2eeab3Smrg ;; 119314c0a534Smrg none) 119414c0a534Smrg basic_machine=none-none 119514c0a534Smrg os=-none 119614c0a534Smrg ;; 119714c0a534Smrg 119814c0a534Smrg# Here we handle the default manufacturer of certain CPU types. It is in 119914c0a534Smrg# some cases the only manufacturer, in others, it is the most popular. 120014c0a534Smrg w89k) 120114c0a534Smrg basic_machine=hppa1.1-winbond 120214c0a534Smrg ;; 120314c0a534Smrg op50n) 120414c0a534Smrg basic_machine=hppa1.1-oki 120514c0a534Smrg ;; 120614c0a534Smrg op60c) 120714c0a534Smrg basic_machine=hppa1.1-oki 120814c0a534Smrg ;; 120914c0a534Smrg romp) 121014c0a534Smrg basic_machine=romp-ibm 121114c0a534Smrg ;; 121214c0a534Smrg mmix) 121314c0a534Smrg basic_machine=mmix-knuth 121414c0a534Smrg ;; 121514c0a534Smrg rs6000) 121614c0a534Smrg basic_machine=rs6000-ibm 121714c0a534Smrg ;; 121814c0a534Smrg vax) 121914c0a534Smrg basic_machine=vax-dec 122014c0a534Smrg ;; 122114c0a534Smrg pdp10) 122214c0a534Smrg # there are many clones, so DEC is not a safe bet 122314c0a534Smrg basic_machine=pdp10-unknown 122414c0a534Smrg ;; 122514c0a534Smrg pdp11) 122614c0a534Smrg basic_machine=pdp11-dec 122714c0a534Smrg ;; 122814c0a534Smrg we32k) 122914c0a534Smrg basic_machine=we32k-att 123014c0a534Smrg ;; 1231bf2eeab3Smrg sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 123214c0a534Smrg basic_machine=sh-unknown 123314c0a534Smrg ;; 1234bf2eeab3Smrg sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 123514c0a534Smrg basic_machine=sparc-sun 123614c0a534Smrg ;; 123714c0a534Smrg cydra) 123814c0a534Smrg basic_machine=cydra-cydrome 123914c0a534Smrg ;; 124014c0a534Smrg orion) 124114c0a534Smrg basic_machine=orion-highlevel 124214c0a534Smrg ;; 124314c0a534Smrg orion105) 124414c0a534Smrg basic_machine=clipper-highlevel 124514c0a534Smrg ;; 124614c0a534Smrg mac | mpw | mac-mpw) 124714c0a534Smrg basic_machine=m68k-apple 124814c0a534Smrg ;; 124914c0a534Smrg pmac | pmac-mpw) 125014c0a534Smrg basic_machine=powerpc-apple 125114c0a534Smrg ;; 125214c0a534Smrg *-unknown) 125314c0a534Smrg # Make sure to match an already-canonicalized machine name. 125414c0a534Smrg ;; 125514c0a534Smrg *) 125614c0a534Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 125714c0a534Smrg exit 1 125814c0a534Smrg ;; 125914c0a534Smrgesac 126014c0a534Smrg 126114c0a534Smrg# Here we canonicalize certain aliases for manufacturers. 126214c0a534Smrgcase $basic_machine in 126314c0a534Smrg *-digital*) 126414c0a534Smrg basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 126514c0a534Smrg ;; 126614c0a534Smrg *-commodore*) 126714c0a534Smrg basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 126814c0a534Smrg ;; 126914c0a534Smrg *) 127014c0a534Smrg ;; 127114c0a534Smrgesac 127214c0a534Smrg 127314c0a534Smrg# Decode manufacturer-specific aliases for certain operating systems. 127414c0a534Smrg 127514c0a534Smrgif [ x"$os" != x"" ] 127614c0a534Smrgthen 127714c0a534Smrgcase $os in 127814c0a534Smrg # First match some system type aliases 127914c0a534Smrg # that might get confused with valid system types. 128014c0a534Smrg # -solaris* is a basic system type, with this one exception. 1281576bae58Smrg -auroraux) 1282576bae58Smrg os=-auroraux 1283576bae58Smrg ;; 128414c0a534Smrg -solaris1 | -solaris1.*) 128514c0a534Smrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 128614c0a534Smrg ;; 128714c0a534Smrg -solaris) 128814c0a534Smrg os=-solaris2 128914c0a534Smrg ;; 129014c0a534Smrg -svr4*) 129114c0a534Smrg os=-sysv4 129214c0a534Smrg ;; 129314c0a534Smrg -unixware*) 129414c0a534Smrg os=-sysv4.2uw 129514c0a534Smrg ;; 129614c0a534Smrg -gnu/linux*) 129714c0a534Smrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 129814c0a534Smrg ;; 129914c0a534Smrg # First accept the basic system types. 130014c0a534Smrg # The portable systems comes first. 130114c0a534Smrg # Each alternative MUST END IN A *, to match a version number. 130214c0a534Smrg # -sysv* is not here because it comes later, after sysvr4. 130314c0a534Smrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1304576bae58Smrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1305576bae58Smrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 1306576bae58Smrg | -sym* | -kopensolaris* \ 130714c0a534Smrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1308bf2eeab3Smrg | -aos* | -aros* \ 130914c0a534Smrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 131014c0a534Smrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1311bf2eeab3Smrg | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1312bf2eeab3Smrg | -openbsd* | -solidbsd* \ 131314c0a534Smrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 131414c0a534Smrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 131514c0a534Smrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 131614c0a534Smrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1317bf2eeab3Smrg | -chorusos* | -chorusrdb* | -cegcc* \ 131814c0a534Smrg | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1319576bae58Smrg | -mingw32* | -linux-gnu* | -linux-android* \ 1320576bae58Smrg | -linux-newlib* | -linux-uclibc* \ 1321bf2eeab3Smrg | -uxpv* | -beos* | -mpeix* | -udk* \ 132214c0a534Smrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 132314c0a534Smrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 132414c0a534Smrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 132514c0a534Smrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 132614c0a534Smrg | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 132714c0a534Smrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1328576bae58Smrg | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 132914c0a534Smrg # Remember, each alternative MUST END IN *, to match a version number. 133014c0a534Smrg ;; 133114c0a534Smrg -qnx*) 133214c0a534Smrg case $basic_machine in 133314c0a534Smrg x86-* | i*86-*) 133414c0a534Smrg ;; 133514c0a534Smrg *) 133614c0a534Smrg os=-nto$os 133714c0a534Smrg ;; 133814c0a534Smrg esac 133914c0a534Smrg ;; 134014c0a534Smrg -nto-qnx*) 134114c0a534Smrg ;; 134214c0a534Smrg -nto*) 134314c0a534Smrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 134414c0a534Smrg ;; 134514c0a534Smrg -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 134614c0a534Smrg | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 134714c0a534Smrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 134814c0a534Smrg ;; 134914c0a534Smrg -mac*) 135014c0a534Smrg os=`echo $os | sed -e 's|mac|macos|'` 135114c0a534Smrg ;; 135214c0a534Smrg -linux-dietlibc) 135314c0a534Smrg os=-linux-dietlibc 135414c0a534Smrg ;; 135514c0a534Smrg -linux*) 135614c0a534Smrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 135714c0a534Smrg ;; 135814c0a534Smrg -sunos5*) 135914c0a534Smrg os=`echo $os | sed -e 's|sunos5|solaris2|'` 136014c0a534Smrg ;; 136114c0a534Smrg -sunos6*) 136214c0a534Smrg os=`echo $os | sed -e 's|sunos6|solaris3|'` 136314c0a534Smrg ;; 136414c0a534Smrg -opened*) 136514c0a534Smrg os=-openedition 136614c0a534Smrg ;; 136714c0a534Smrg -os400*) 136814c0a534Smrg os=-os400 136914c0a534Smrg ;; 137014c0a534Smrg -wince*) 137114c0a534Smrg os=-wince 137214c0a534Smrg ;; 137314c0a534Smrg -osfrose*) 137414c0a534Smrg os=-osfrose 137514c0a534Smrg ;; 137614c0a534Smrg -osf*) 137714c0a534Smrg os=-osf 137814c0a534Smrg ;; 137914c0a534Smrg -utek*) 138014c0a534Smrg os=-bsd 138114c0a534Smrg ;; 138214c0a534Smrg -dynix*) 138314c0a534Smrg os=-bsd 138414c0a534Smrg ;; 138514c0a534Smrg -acis*) 138614c0a534Smrg os=-aos 138714c0a534Smrg ;; 138814c0a534Smrg -atheos*) 138914c0a534Smrg os=-atheos 139014c0a534Smrg ;; 139114c0a534Smrg -syllable*) 139214c0a534Smrg os=-syllable 139314c0a534Smrg ;; 139414c0a534Smrg -386bsd) 139514c0a534Smrg os=-bsd 139614c0a534Smrg ;; 139714c0a534Smrg -ctix* | -uts*) 139814c0a534Smrg os=-sysv 139914c0a534Smrg ;; 140014c0a534Smrg -nova*) 140114c0a534Smrg os=-rtmk-nova 140214c0a534Smrg ;; 140314c0a534Smrg -ns2 ) 140414c0a534Smrg os=-nextstep2 140514c0a534Smrg ;; 140614c0a534Smrg -nsk*) 140714c0a534Smrg os=-nsk 140814c0a534Smrg ;; 140914c0a534Smrg # Preserve the version number of sinix5. 141014c0a534Smrg -sinix5.*) 141114c0a534Smrg os=`echo $os | sed -e 's|sinix|sysv|'` 141214c0a534Smrg ;; 141314c0a534Smrg -sinix*) 141414c0a534Smrg os=-sysv4 141514c0a534Smrg ;; 141614c0a534Smrg -tpf*) 141714c0a534Smrg os=-tpf 141814c0a534Smrg ;; 141914c0a534Smrg -triton*) 142014c0a534Smrg os=-sysv3 142114c0a534Smrg ;; 142214c0a534Smrg -oss*) 142314c0a534Smrg os=-sysv3 142414c0a534Smrg ;; 142514c0a534Smrg -svr4) 142614c0a534Smrg os=-sysv4 142714c0a534Smrg ;; 142814c0a534Smrg -svr3) 142914c0a534Smrg os=-sysv3 143014c0a534Smrg ;; 143114c0a534Smrg -sysvr4) 143214c0a534Smrg os=-sysv4 143314c0a534Smrg ;; 143414c0a534Smrg # This must come after -sysvr4. 143514c0a534Smrg -sysv*) 143614c0a534Smrg ;; 143714c0a534Smrg -ose*) 143814c0a534Smrg os=-ose 143914c0a534Smrg ;; 144014c0a534Smrg -es1800*) 144114c0a534Smrg os=-ose 144214c0a534Smrg ;; 144314c0a534Smrg -xenix) 144414c0a534Smrg os=-xenix 144514c0a534Smrg ;; 144614c0a534Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 144714c0a534Smrg os=-mint 144814c0a534Smrg ;; 144914c0a534Smrg -aros*) 145014c0a534Smrg os=-aros 145114c0a534Smrg ;; 145214c0a534Smrg -kaos*) 145314c0a534Smrg os=-kaos 145414c0a534Smrg ;; 145514c0a534Smrg -zvmoe) 145614c0a534Smrg os=-zvmoe 145714c0a534Smrg ;; 1458bf2eeab3Smrg -dicos*) 1459bf2eeab3Smrg os=-dicos 1460bf2eeab3Smrg ;; 1461576bae58Smrg -nacl*) 1462576bae58Smrg ;; 146314c0a534Smrg -none) 146414c0a534Smrg ;; 146514c0a534Smrg *) 146614c0a534Smrg # Get rid of the `-' at the beginning of $os. 146714c0a534Smrg os=`echo $os | sed 's/[^-]*-//'` 146814c0a534Smrg echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 146914c0a534Smrg exit 1 147014c0a534Smrg ;; 147114c0a534Smrgesac 147214c0a534Smrgelse 147314c0a534Smrg 147414c0a534Smrg# Here we handle the default operating systems that come with various machines. 147514c0a534Smrg# The value should be what the vendor currently ships out the door with their 147614c0a534Smrg# machine or put another way, the most popular os provided with the machine. 147714c0a534Smrg 147814c0a534Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 147914c0a534Smrg# "-sun"), then you have to tell the case statement up towards the top 148014c0a534Smrg# that MANUFACTURER isn't an operating system. Otherwise, code above 148114c0a534Smrg# will signal an error saying that MANUFACTURER isn't an operating 148214c0a534Smrg# system, and we'll never get to this point. 148314c0a534Smrg 148414c0a534Smrgcase $basic_machine in 1485bf2eeab3Smrg score-*) 1486bf2eeab3Smrg os=-elf 1487bf2eeab3Smrg ;; 1488bf2eeab3Smrg spu-*) 1489bf2eeab3Smrg os=-elf 1490bf2eeab3Smrg ;; 149114c0a534Smrg *-acorn) 149214c0a534Smrg os=-riscix1.2 149314c0a534Smrg ;; 149414c0a534Smrg arm*-rebel) 149514c0a534Smrg os=-linux 149614c0a534Smrg ;; 149714c0a534Smrg arm*-semi) 149814c0a534Smrg os=-aout 149914c0a534Smrg ;; 1500bf2eeab3Smrg c4x-* | tic4x-*) 1501bf2eeab3Smrg os=-coff 1502bf2eeab3Smrg ;; 1503576bae58Smrg tic54x-*) 1504576bae58Smrg os=-coff 1505576bae58Smrg ;; 1506576bae58Smrg tic55x-*) 1507576bae58Smrg os=-coff 1508576bae58Smrg ;; 1509576bae58Smrg tic6x-*) 1510576bae58Smrg os=-coff 1511576bae58Smrg ;; 151214c0a534Smrg # This must come before the *-dec entry. 151314c0a534Smrg pdp10-*) 151414c0a534Smrg os=-tops20 151514c0a534Smrg ;; 151614c0a534Smrg pdp11-*) 151714c0a534Smrg os=-none 151814c0a534Smrg ;; 151914c0a534Smrg *-dec | vax-*) 152014c0a534Smrg os=-ultrix4.2 152114c0a534Smrg ;; 152214c0a534Smrg m68*-apollo) 152314c0a534Smrg os=-domain 152414c0a534Smrg ;; 152514c0a534Smrg i386-sun) 152614c0a534Smrg os=-sunos4.0.2 152714c0a534Smrg ;; 152814c0a534Smrg m68000-sun) 152914c0a534Smrg os=-sunos3 153014c0a534Smrg # This also exists in the configure program, but was not the 153114c0a534Smrg # default. 153214c0a534Smrg # os=-sunos4 153314c0a534Smrg ;; 153414c0a534Smrg m68*-cisco) 153514c0a534Smrg os=-aout 153614c0a534Smrg ;; 1537bf2eeab3Smrg mep-*) 1538bf2eeab3Smrg os=-elf 1539bf2eeab3Smrg ;; 154014c0a534Smrg mips*-cisco) 154114c0a534Smrg os=-elf 154214c0a534Smrg ;; 154314c0a534Smrg mips*-*) 154414c0a534Smrg os=-elf 154514c0a534Smrg ;; 154614c0a534Smrg or32-*) 154714c0a534Smrg os=-coff 154814c0a534Smrg ;; 154914c0a534Smrg *-tti) # must be before sparc entry or we get the wrong os. 155014c0a534Smrg os=-sysv3 155114c0a534Smrg ;; 155214c0a534Smrg sparc-* | *-sun) 155314c0a534Smrg os=-sunos4.1.1 155414c0a534Smrg ;; 155514c0a534Smrg *-be) 155614c0a534Smrg os=-beos 155714c0a534Smrg ;; 155814c0a534Smrg *-haiku) 155914c0a534Smrg os=-haiku 156014c0a534Smrg ;; 156114c0a534Smrg *-ibm) 156214c0a534Smrg os=-aix 156314c0a534Smrg ;; 156414c0a534Smrg *-knuth) 156514c0a534Smrg os=-mmixware 156614c0a534Smrg ;; 156714c0a534Smrg *-wec) 156814c0a534Smrg os=-proelf 156914c0a534Smrg ;; 157014c0a534Smrg *-winbond) 157114c0a534Smrg os=-proelf 157214c0a534Smrg ;; 157314c0a534Smrg *-oki) 157414c0a534Smrg os=-proelf 157514c0a534Smrg ;; 157614c0a534Smrg *-hp) 157714c0a534Smrg os=-hpux 157814c0a534Smrg ;; 157914c0a534Smrg *-hitachi) 158014c0a534Smrg os=-hiux 158114c0a534Smrg ;; 158214c0a534Smrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 158314c0a534Smrg os=-sysv 158414c0a534Smrg ;; 158514c0a534Smrg *-cbm) 158614c0a534Smrg os=-amigaos 158714c0a534Smrg ;; 158814c0a534Smrg *-dg) 158914c0a534Smrg os=-dgux 159014c0a534Smrg ;; 159114c0a534Smrg *-dolphin) 159214c0a534Smrg os=-sysv3 159314c0a534Smrg ;; 159414c0a534Smrg m68k-ccur) 159514c0a534Smrg os=-rtu 159614c0a534Smrg ;; 159714c0a534Smrg m88k-omron*) 159814c0a534Smrg os=-luna 159914c0a534Smrg ;; 160014c0a534Smrg *-next ) 160114c0a534Smrg os=-nextstep 160214c0a534Smrg ;; 160314c0a534Smrg *-sequent) 160414c0a534Smrg os=-ptx 160514c0a534Smrg ;; 160614c0a534Smrg *-crds) 160714c0a534Smrg os=-unos 160814c0a534Smrg ;; 160914c0a534Smrg *-ns) 161014c0a534Smrg os=-genix 161114c0a534Smrg ;; 161214c0a534Smrg i370-*) 161314c0a534Smrg os=-mvs 161414c0a534Smrg ;; 161514c0a534Smrg *-next) 161614c0a534Smrg os=-nextstep3 161714c0a534Smrg ;; 161814c0a534Smrg *-gould) 161914c0a534Smrg os=-sysv 162014c0a534Smrg ;; 162114c0a534Smrg *-highlevel) 162214c0a534Smrg os=-bsd 162314c0a534Smrg ;; 162414c0a534Smrg *-encore) 162514c0a534Smrg os=-bsd 162614c0a534Smrg ;; 162714c0a534Smrg *-sgi) 162814c0a534Smrg os=-irix 162914c0a534Smrg ;; 163014c0a534Smrg *-siemens) 163114c0a534Smrg os=-sysv4 163214c0a534Smrg ;; 163314c0a534Smrg *-masscomp) 163414c0a534Smrg os=-rtu 163514c0a534Smrg ;; 163614c0a534Smrg f30[01]-fujitsu | f700-fujitsu) 163714c0a534Smrg os=-uxpv 163814c0a534Smrg ;; 163914c0a534Smrg *-rom68k) 164014c0a534Smrg os=-coff 164114c0a534Smrg ;; 164214c0a534Smrg *-*bug) 164314c0a534Smrg os=-coff 164414c0a534Smrg ;; 164514c0a534Smrg *-apple) 164614c0a534Smrg os=-macos 164714c0a534Smrg ;; 164814c0a534Smrg *-atari*) 164914c0a534Smrg os=-mint 165014c0a534Smrg ;; 165114c0a534Smrg *) 165214c0a534Smrg os=-none 165314c0a534Smrg ;; 165414c0a534Smrgesac 165514c0a534Smrgfi 165614c0a534Smrg 165714c0a534Smrg# Here we handle the case where we know the os, and the CPU type, but not the 165814c0a534Smrg# manufacturer. We pick the logical manufacturer. 165914c0a534Smrgvendor=unknown 166014c0a534Smrgcase $basic_machine in 166114c0a534Smrg *-unknown) 166214c0a534Smrg case $os in 166314c0a534Smrg -riscix*) 166414c0a534Smrg vendor=acorn 166514c0a534Smrg ;; 166614c0a534Smrg -sunos*) 166714c0a534Smrg vendor=sun 166814c0a534Smrg ;; 1669576bae58Smrg -cnk*|-aix*) 167014c0a534Smrg vendor=ibm 167114c0a534Smrg ;; 167214c0a534Smrg -beos*) 167314c0a534Smrg vendor=be 167414c0a534Smrg ;; 167514c0a534Smrg -hpux*) 167614c0a534Smrg vendor=hp 167714c0a534Smrg ;; 167814c0a534Smrg -mpeix*) 167914c0a534Smrg vendor=hp 168014c0a534Smrg ;; 168114c0a534Smrg -hiux*) 168214c0a534Smrg vendor=hitachi 168314c0a534Smrg ;; 168414c0a534Smrg -unos*) 168514c0a534Smrg vendor=crds 168614c0a534Smrg ;; 168714c0a534Smrg -dgux*) 168814c0a534Smrg vendor=dg 168914c0a534Smrg ;; 169014c0a534Smrg -luna*) 169114c0a534Smrg vendor=omron 169214c0a534Smrg ;; 169314c0a534Smrg -genix*) 169414c0a534Smrg vendor=ns 169514c0a534Smrg ;; 169614c0a534Smrg -mvs* | -opened*) 169714c0a534Smrg vendor=ibm 169814c0a534Smrg ;; 169914c0a534Smrg -os400*) 170014c0a534Smrg vendor=ibm 170114c0a534Smrg ;; 170214c0a534Smrg -ptx*) 170314c0a534Smrg vendor=sequent 170414c0a534Smrg ;; 170514c0a534Smrg -tpf*) 170614c0a534Smrg vendor=ibm 170714c0a534Smrg ;; 170814c0a534Smrg -vxsim* | -vxworks* | -windiss*) 170914c0a534Smrg vendor=wrs 171014c0a534Smrg ;; 171114c0a534Smrg -aux*) 171214c0a534Smrg vendor=apple 171314c0a534Smrg ;; 171414c0a534Smrg -hms*) 171514c0a534Smrg vendor=hitachi 171614c0a534Smrg ;; 171714c0a534Smrg -mpw* | -macos*) 171814c0a534Smrg vendor=apple 171914c0a534Smrg ;; 172014c0a534Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 172114c0a534Smrg vendor=atari 172214c0a534Smrg ;; 172314c0a534Smrg -vos*) 172414c0a534Smrg vendor=stratus 172514c0a534Smrg ;; 172614c0a534Smrg esac 172714c0a534Smrg basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 172814c0a534Smrg ;; 172914c0a534Smrgesac 173014c0a534Smrg 173114c0a534Smrgecho $basic_machine$os 173214c0a534Smrgexit 173314c0a534Smrg 173414c0a534Smrg# Local variables: 173514c0a534Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 173614c0a534Smrg# time-stamp-start: "timestamp='" 173714c0a534Smrg# time-stamp-format: "%:y-%02m-%02d" 173814c0a534Smrg# time-stamp-end: "'" 173914c0a534Smrg# End: 1740