config.sub revision bf2eeab3
114c0a534Smrg#! /bin/sh 214c0a534Smrg# Configuration validation subroutine script. 314c0a534Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4bf2eeab3Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 5bf2eeab3Smrg# Free Software Foundation, Inc. 614c0a534Smrg 7bf2eeab3Smrgtimestamp='2009-04-17' 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 3514c0a534Smrg# diff and a properly formatted 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 4214c0a534Smrg# This file is supposed to be the same for all GNU packages 4314c0a534Smrg# and recognize all the CPU types, system types and aliases 4414c0a534Smrg# that are meaningful with *any* GNU software. 4514c0a534Smrg# Each package is responsible for reporting which valid configurations 4614c0a534Smrg# it does not support. The user should be able to distinguish 4714c0a534Smrg# a failure to support a valid configuration from a meaningless 4814c0a534Smrg# configuration. 4914c0a534Smrg 5014c0a534Smrg# The goal of this file is to map all the various variations of a given 5114c0a534Smrg# machine specification into a single specification in the form: 5214c0a534Smrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 5314c0a534Smrg# or in some cases, the newer four-part form: 5414c0a534Smrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 5514c0a534Smrg# It is wrong to echo any other type of specification. 5614c0a534Smrg 5714c0a534Smrgme=`echo "$0" | sed -e 's,.*/,,'` 5814c0a534Smrg 5914c0a534Smrgusage="\ 6014c0a534SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS 6114c0a534Smrg $0 [OPTION] ALIAS 6214c0a534Smrg 6314c0a534SmrgCanonicalize a configuration name. 6414c0a534Smrg 6514c0a534SmrgOperation modes: 6614c0a534Smrg -h, --help print this help, then exit 6714c0a534Smrg -t, --time-stamp print date of last modification, then exit 6814c0a534Smrg -v, --version print version number, then exit 6914c0a534Smrg 7014c0a534SmrgReport bugs and patches to <config-patches@gnu.org>." 7114c0a534Smrg 7214c0a534Smrgversion="\ 7314c0a534SmrgGNU config.sub ($timestamp) 7414c0a534Smrg 75bf2eeab3SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 76bf2eeab3Smrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 7714c0a534Smrg 7814c0a534SmrgThis is free software; see the source for copying conditions. There is NO 7914c0a534Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 8014c0a534Smrg 8114c0a534Smrghelp=" 8214c0a534SmrgTry \`$me --help' for more information." 8314c0a534Smrg 8414c0a534Smrg# Parse command line 8514c0a534Smrgwhile test $# -gt 0 ; do 8614c0a534Smrg case $1 in 8714c0a534Smrg --time-stamp | --time* | -t ) 8814c0a534Smrg echo "$timestamp" ; exit ;; 8914c0a534Smrg --version | -v ) 9014c0a534Smrg echo "$version" ; exit ;; 9114c0a534Smrg --help | --h* | -h ) 9214c0a534Smrg echo "$usage"; exit ;; 9314c0a534Smrg -- ) # Stop option processing 9414c0a534Smrg shift; break ;; 9514c0a534Smrg - ) # Use stdin as input. 9614c0a534Smrg break ;; 9714c0a534Smrg -* ) 9814c0a534Smrg echo "$me: invalid option $1$help" 9914c0a534Smrg exit 1 ;; 10014c0a534Smrg 10114c0a534Smrg *local*) 10214c0a534Smrg # First pass through any local machine types. 10314c0a534Smrg echo $1 10414c0a534Smrg exit ;; 10514c0a534Smrg 10614c0a534Smrg * ) 10714c0a534Smrg break ;; 10814c0a534Smrg esac 10914c0a534Smrgdone 11014c0a534Smrg 11114c0a534Smrgcase $# in 11214c0a534Smrg 0) echo "$me: missing argument$help" >&2 11314c0a534Smrg exit 1;; 11414c0a534Smrg 1) ;; 11514c0a534Smrg *) echo "$me: too many arguments$help" >&2 11614c0a534Smrg exit 1;; 11714c0a534Smrgesac 11814c0a534Smrg 11914c0a534Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 12014c0a534Smrg# Here we must recognize all the valid KERNEL-OS combinations. 12114c0a534Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 12214c0a534Smrgcase $maybe_os in 123bf2eeab3Smrg nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 124bf2eeab3Smrg uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 125bf2eeab3Smrg kopensolaris*-gnu* | \ 126bf2eeab3Smrg storm-chaos* | os2-emx* | rtmk-nova*) 12714c0a534Smrg os=-$maybe_os 12814c0a534Smrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 12914c0a534Smrg ;; 13014c0a534Smrg *) 13114c0a534Smrg basic_machine=`echo $1 | sed 's/-[^-]*$//'` 13214c0a534Smrg if [ $basic_machine != $1 ] 13314c0a534Smrg then os=`echo $1 | sed 's/.*-/-/'` 13414c0a534Smrg else os=; fi 13514c0a534Smrg ;; 13614c0a534Smrgesac 13714c0a534Smrg 13814c0a534Smrg### Let's recognize common machines as not being operating systems so 13914c0a534Smrg### that things like config.sub decstation-3100 work. We also 14014c0a534Smrg### recognize some manufacturers as not being operating systems, so we 14114c0a534Smrg### can provide default operating systems below. 14214c0a534Smrgcase $os in 14314c0a534Smrg -sun*os*) 14414c0a534Smrg # Prevent following clause from handling this invalid input. 14514c0a534Smrg ;; 14614c0a534Smrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 14714c0a534Smrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 14814c0a534Smrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 14914c0a534Smrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 15014c0a534Smrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 15114c0a534Smrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 15214c0a534Smrg -apple | -axis | -knuth | -cray) 15314c0a534Smrg os= 15414c0a534Smrg basic_machine=$1 15514c0a534Smrg ;; 15614c0a534Smrg -sim | -cisco | -oki | -wec | -winbond) 15714c0a534Smrg os= 15814c0a534Smrg basic_machine=$1 15914c0a534Smrg ;; 16014c0a534Smrg -scout) 16114c0a534Smrg ;; 16214c0a534Smrg -wrs) 16314c0a534Smrg os=-vxworks 16414c0a534Smrg basic_machine=$1 16514c0a534Smrg ;; 16614c0a534Smrg -chorusos*) 16714c0a534Smrg os=-chorusos 16814c0a534Smrg basic_machine=$1 16914c0a534Smrg ;; 17014c0a534Smrg -chorusrdb) 17114c0a534Smrg os=-chorusrdb 17214c0a534Smrg basic_machine=$1 17314c0a534Smrg ;; 17414c0a534Smrg -hiux*) 17514c0a534Smrg os=-hiuxwe2 17614c0a534Smrg ;; 177bf2eeab3Smrg -sco6) 178bf2eeab3Smrg os=-sco5v6 179bf2eeab3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 180bf2eeab3Smrg ;; 18114c0a534Smrg -sco5) 18214c0a534Smrg os=-sco3.2v5 18314c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 18414c0a534Smrg ;; 18514c0a534Smrg -sco4) 18614c0a534Smrg os=-sco3.2v4 18714c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 18814c0a534Smrg ;; 18914c0a534Smrg -sco3.2.[4-9]*) 19014c0a534Smrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 19114c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19214c0a534Smrg ;; 19314c0a534Smrg -sco3.2v[4-9]*) 19414c0a534Smrg # Don't forget version if it is 3.2v4 or newer. 19514c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19614c0a534Smrg ;; 197bf2eeab3Smrg -sco5v6*) 198bf2eeab3Smrg # Don't forget version if it is 3.2v4 or newer. 199bf2eeab3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 200bf2eeab3Smrg ;; 20114c0a534Smrg -sco*) 20214c0a534Smrg os=-sco3.2v2 20314c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20414c0a534Smrg ;; 20514c0a534Smrg -udk*) 20614c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20714c0a534Smrg ;; 20814c0a534Smrg -isc) 20914c0a534Smrg os=-isc2.2 21014c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21114c0a534Smrg ;; 21214c0a534Smrg -clix*) 21314c0a534Smrg basic_machine=clipper-intergraph 21414c0a534Smrg ;; 21514c0a534Smrg -isc*) 21614c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21714c0a534Smrg ;; 21814c0a534Smrg -lynx*) 21914c0a534Smrg os=-lynxos 22014c0a534Smrg ;; 22114c0a534Smrg -ptx*) 22214c0a534Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 22314c0a534Smrg ;; 22414c0a534Smrg -windowsnt*) 22514c0a534Smrg os=`echo $os | sed -e 's/windowsnt/winnt/'` 22614c0a534Smrg ;; 22714c0a534Smrg -psos*) 22814c0a534Smrg os=-psos 22914c0a534Smrg ;; 23014c0a534Smrg -mint | -mint[0-9]*) 23114c0a534Smrg basic_machine=m68k-atari 23214c0a534Smrg os=-mint 23314c0a534Smrg ;; 23414c0a534Smrgesac 23514c0a534Smrg 23614c0a534Smrg# Decode aliases for certain CPU-COMPANY combinations. 23714c0a534Smrgcase $basic_machine in 23814c0a534Smrg # Recognize the basic CPU types without company name. 23914c0a534Smrg # Some are omitted here because they have special meanings below. 24014c0a534Smrg 1750a | 580 \ 24114c0a534Smrg | a29k \ 24214c0a534Smrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 24314c0a534Smrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 24414c0a534Smrg | am33_2.0 \ 245bf2eeab3Smrg | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 24614c0a534Smrg | bfin \ 24714c0a534Smrg | c4x | clipper \ 24814c0a534Smrg | d10v | d30v | dlx | dsp16xx \ 249bf2eeab3Smrg | fido | fr30 | frv \ 25014c0a534Smrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 25114c0a534Smrg | i370 | i860 | i960 | ia64 \ 25214c0a534Smrg | ip2k | iq2000 \ 253bf2eeab3Smrg | lm32 \ 254bf2eeab3Smrg | m32c | m32r | m32rle | m68000 | m68k | m88k \ 255bf2eeab3Smrg | maxq | mb | microblaze | mcore | mep | metag \ 25614c0a534Smrg | mips | mipsbe | mipseb | mipsel | mipsle \ 25714c0a534Smrg | mips16 \ 25814c0a534Smrg | mips64 | mips64el \ 259bf2eeab3Smrg | mips64octeon | mips64octeonel \ 26014c0a534Smrg | mips64orion | mips64orionel \ 261bf2eeab3Smrg | mips64r5900 | mips64r5900el \ 262bf2eeab3Smrg | mips64vr | mips64vrel \ 26314c0a534Smrg | mips64vr4100 | mips64vr4100el \ 26414c0a534Smrg | mips64vr4300 | mips64vr4300el \ 26514c0a534Smrg | mips64vr5000 | mips64vr5000el \ 26614c0a534Smrg | mips64vr5900 | mips64vr5900el \ 26714c0a534Smrg | mipsisa32 | mipsisa32el \ 26814c0a534Smrg | mipsisa32r2 | mipsisa32r2el \ 26914c0a534Smrg | mipsisa64 | mipsisa64el \ 27014c0a534Smrg | mipsisa64r2 | mipsisa64r2el \ 27114c0a534Smrg | mipsisa64sb1 | mipsisa64sb1el \ 27214c0a534Smrg | mipsisa64sr71k | mipsisa64sr71kel \ 27314c0a534Smrg | mipstx39 | mipstx39el \ 27414c0a534Smrg | mn10200 | mn10300 \ 275bf2eeab3Smrg | moxie \ 276bf2eeab3Smrg | mt \ 27714c0a534Smrg | msp430 \ 278bf2eeab3Smrg | nios | nios2 \ 27914c0a534Smrg | ns16k | ns32k \ 28014c0a534Smrg | or32 \ 28114c0a534Smrg | pdp10 | pdp11 | pj | pjl \ 28214c0a534Smrg | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 28314c0a534Smrg | pyramid \ 284bf2eeab3Smrg | score \ 285bf2eeab3Smrg | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 28614c0a534Smrg | sh64 | sh64le \ 287bf2eeab3Smrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 288bf2eeab3Smrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 289bf2eeab3Smrg | spu | strongarm \ 29014c0a534Smrg | tahoe | thumb | tic4x | tic80 | tron \ 29114c0a534Smrg | v850 | v850e \ 29214c0a534Smrg | we32k \ 293bf2eeab3Smrg | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 294bf2eeab3Smrg | z8k | z80) 29514c0a534Smrg basic_machine=$basic_machine-unknown 29614c0a534Smrg ;; 29714c0a534Smrg m6811 | m68hc11 | m6812 | m68hc12) 29814c0a534Smrg # Motorola 68HC11/12. 29914c0a534Smrg basic_machine=$basic_machine-unknown 30014c0a534Smrg os=-none 30114c0a534Smrg ;; 30214c0a534Smrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 30314c0a534Smrg ;; 304bf2eeab3Smrg ms1) 305bf2eeab3Smrg basic_machine=mt-unknown 306bf2eeab3Smrg ;; 30714c0a534Smrg 30814c0a534Smrg # We use `pc' rather than `unknown' 30914c0a534Smrg # because (1) that's what they normally are, and 31014c0a534Smrg # (2) the word "unknown" tends to confuse beginning users. 31114c0a534Smrg i*86 | x86_64) 31214c0a534Smrg basic_machine=$basic_machine-pc 31314c0a534Smrg ;; 31414c0a534Smrg # Object if more than one company name word. 31514c0a534Smrg *-*-*) 31614c0a534Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 31714c0a534Smrg exit 1 31814c0a534Smrg ;; 31914c0a534Smrg # Recognize the basic CPU types with company name. 32014c0a534Smrg 580-* \ 32114c0a534Smrg | a29k-* \ 32214c0a534Smrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 32314c0a534Smrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 32414c0a534Smrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 32514c0a534Smrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 326bf2eeab3Smrg | avr-* | avr32-* \ 32714c0a534Smrg | bfin-* | bs2000-* \ 32814c0a534Smrg | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 32914c0a534Smrg | clipper-* | craynv-* | cydra-* \ 33014c0a534Smrg | d10v-* | d30v-* | dlx-* \ 33114c0a534Smrg | elxsi-* \ 332bf2eeab3Smrg | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 33314c0a534Smrg | h8300-* | h8500-* \ 33414c0a534Smrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 33514c0a534Smrg | i*86-* | i860-* | i960-* | ia64-* \ 33614c0a534Smrg | ip2k-* | iq2000-* \ 337bf2eeab3Smrg | lm32-* \ 338bf2eeab3Smrg | m32c-* | m32r-* | m32rle-* \ 33914c0a534Smrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 340bf2eeab3Smrg | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 34114c0a534Smrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 34214c0a534Smrg | mips16-* \ 34314c0a534Smrg | mips64-* | mips64el-* \ 344bf2eeab3Smrg | mips64octeon-* | mips64octeonel-* \ 34514c0a534Smrg | mips64orion-* | mips64orionel-* \ 346bf2eeab3Smrg | mips64r5900-* | mips64r5900el-* \ 347bf2eeab3Smrg | mips64vr-* | mips64vrel-* \ 34814c0a534Smrg | mips64vr4100-* | mips64vr4100el-* \ 34914c0a534Smrg | mips64vr4300-* | mips64vr4300el-* \ 35014c0a534Smrg | mips64vr5000-* | mips64vr5000el-* \ 35114c0a534Smrg | mips64vr5900-* | mips64vr5900el-* \ 35214c0a534Smrg | mipsisa32-* | mipsisa32el-* \ 35314c0a534Smrg | mipsisa32r2-* | mipsisa32r2el-* \ 35414c0a534Smrg | mipsisa64-* | mipsisa64el-* \ 35514c0a534Smrg | mipsisa64r2-* | mipsisa64r2el-* \ 35614c0a534Smrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 35714c0a534Smrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 35814c0a534Smrg | mipstx39-* | mipstx39el-* \ 35914c0a534Smrg | mmix-* \ 360bf2eeab3Smrg | mt-* \ 36114c0a534Smrg | msp430-* \ 362bf2eeab3Smrg | nios-* | nios2-* \ 36314c0a534Smrg | none-* | np1-* | ns16k-* | ns32k-* \ 36414c0a534Smrg | orion-* \ 36514c0a534Smrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 36614c0a534Smrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 36714c0a534Smrg | pyramid-* \ 36814c0a534Smrg | romp-* | rs6000-* \ 369bf2eeab3Smrg | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 37014c0a534Smrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 371bf2eeab3Smrg | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 37214c0a534Smrg | sparclite-* \ 373bf2eeab3Smrg | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 37414c0a534Smrg | tahoe-* | thumb-* \ 375bf2eeab3Smrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ 37614c0a534Smrg | tron-* \ 37714c0a534Smrg | v850-* | v850e-* | vax-* \ 37814c0a534Smrg | we32k-* \ 379bf2eeab3Smrg | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 380bf2eeab3Smrg | xstormy16-* | xtensa*-* \ 38114c0a534Smrg | ymp-* \ 382bf2eeab3Smrg | z8k-* | z80-*) 38314c0a534Smrg ;; 384bf2eeab3Smrg # Recognize the basic CPU types without company name, with glob match. 385bf2eeab3Smrg xtensa*) 386bf2eeab3Smrg basic_machine=$basic_machine-unknown 38714c0a534Smrg ;; 38814c0a534Smrg # Recognize the various machine names and aliases which stand 38914c0a534Smrg # for a CPU type and a company and sometimes even an OS. 39014c0a534Smrg 386bsd) 39114c0a534Smrg basic_machine=i386-unknown 39214c0a534Smrg os=-bsd 39314c0a534Smrg ;; 39414c0a534Smrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 39514c0a534Smrg basic_machine=m68000-att 39614c0a534Smrg ;; 39714c0a534Smrg 3b*) 39814c0a534Smrg basic_machine=we32k-att 39914c0a534Smrg ;; 40014c0a534Smrg a29khif) 40114c0a534Smrg basic_machine=a29k-amd 40214c0a534Smrg os=-udi 40314c0a534Smrg ;; 40414c0a534Smrg abacus) 40514c0a534Smrg basic_machine=abacus-unknown 40614c0a534Smrg ;; 40714c0a534Smrg adobe68k) 40814c0a534Smrg basic_machine=m68010-adobe 40914c0a534Smrg os=-scout 41014c0a534Smrg ;; 41114c0a534Smrg alliant | fx80) 41214c0a534Smrg basic_machine=fx80-alliant 41314c0a534Smrg ;; 41414c0a534Smrg altos | altos3068) 41514c0a534Smrg basic_machine=m68k-altos 41614c0a534Smrg ;; 41714c0a534Smrg am29k) 41814c0a534Smrg basic_machine=a29k-none 41914c0a534Smrg os=-bsd 42014c0a534Smrg ;; 42114c0a534Smrg amd64) 42214c0a534Smrg basic_machine=x86_64-pc 42314c0a534Smrg ;; 42414c0a534Smrg amd64-*) 42514c0a534Smrg basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 42614c0a534Smrg ;; 42714c0a534Smrg amdahl) 42814c0a534Smrg basic_machine=580-amdahl 42914c0a534Smrg os=-sysv 43014c0a534Smrg ;; 43114c0a534Smrg amiga | amiga-*) 43214c0a534Smrg basic_machine=m68k-unknown 43314c0a534Smrg ;; 43414c0a534Smrg amigaos | amigados) 43514c0a534Smrg basic_machine=m68k-unknown 43614c0a534Smrg os=-amigaos 43714c0a534Smrg ;; 43814c0a534Smrg amigaunix | amix) 43914c0a534Smrg basic_machine=m68k-unknown 44014c0a534Smrg os=-sysv4 44114c0a534Smrg ;; 44214c0a534Smrg apollo68) 44314c0a534Smrg basic_machine=m68k-apollo 44414c0a534Smrg os=-sysv 44514c0a534Smrg ;; 44614c0a534Smrg apollo68bsd) 44714c0a534Smrg basic_machine=m68k-apollo 44814c0a534Smrg os=-bsd 44914c0a534Smrg ;; 450bf2eeab3Smrg aros) 451bf2eeab3Smrg basic_machine=i386-pc 452bf2eeab3Smrg os=-aros 453bf2eeab3Smrg ;; 45414c0a534Smrg aux) 45514c0a534Smrg basic_machine=m68k-apple 45614c0a534Smrg os=-aux 45714c0a534Smrg ;; 45814c0a534Smrg balance) 45914c0a534Smrg basic_machine=ns32k-sequent 46014c0a534Smrg os=-dynix 46114c0a534Smrg ;; 462bf2eeab3Smrg blackfin) 463bf2eeab3Smrg basic_machine=bfin-unknown 464bf2eeab3Smrg os=-linux 465bf2eeab3Smrg ;; 466bf2eeab3Smrg blackfin-*) 467bf2eeab3Smrg basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 468bf2eeab3Smrg os=-linux 469bf2eeab3Smrg ;; 47014c0a534Smrg c90) 47114c0a534Smrg basic_machine=c90-cray 47214c0a534Smrg os=-unicos 47314c0a534Smrg ;; 474bf2eeab3Smrg cegcc) 475bf2eeab3Smrg basic_machine=arm-unknown 476bf2eeab3Smrg os=-cegcc 477bf2eeab3Smrg ;; 47814c0a534Smrg convex-c1) 47914c0a534Smrg basic_machine=c1-convex 48014c0a534Smrg os=-bsd 48114c0a534Smrg ;; 48214c0a534Smrg convex-c2) 48314c0a534Smrg basic_machine=c2-convex 48414c0a534Smrg os=-bsd 48514c0a534Smrg ;; 48614c0a534Smrg convex-c32) 48714c0a534Smrg basic_machine=c32-convex 48814c0a534Smrg os=-bsd 48914c0a534Smrg ;; 49014c0a534Smrg convex-c34) 49114c0a534Smrg basic_machine=c34-convex 49214c0a534Smrg os=-bsd 49314c0a534Smrg ;; 49414c0a534Smrg convex-c38) 49514c0a534Smrg basic_machine=c38-convex 49614c0a534Smrg os=-bsd 49714c0a534Smrg ;; 49814c0a534Smrg cray | j90) 49914c0a534Smrg basic_machine=j90-cray 50014c0a534Smrg os=-unicos 50114c0a534Smrg ;; 50214c0a534Smrg craynv) 50314c0a534Smrg basic_machine=craynv-cray 50414c0a534Smrg os=-unicosmp 50514c0a534Smrg ;; 506bf2eeab3Smrg cr16) 507bf2eeab3Smrg basic_machine=cr16-unknown 50814c0a534Smrg os=-elf 50914c0a534Smrg ;; 51014c0a534Smrg crds | unos) 51114c0a534Smrg basic_machine=m68k-crds 51214c0a534Smrg ;; 51314c0a534Smrg crisv32 | crisv32-* | etraxfs*) 51414c0a534Smrg basic_machine=crisv32-axis 51514c0a534Smrg ;; 51614c0a534Smrg cris | cris-* | etrax*) 51714c0a534Smrg basic_machine=cris-axis 51814c0a534Smrg ;; 51914c0a534Smrg crx) 52014c0a534Smrg basic_machine=crx-unknown 52114c0a534Smrg os=-elf 52214c0a534Smrg ;; 52314c0a534Smrg da30 | da30-*) 52414c0a534Smrg basic_machine=m68k-da30 52514c0a534Smrg ;; 52614c0a534Smrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 52714c0a534Smrg basic_machine=mips-dec 52814c0a534Smrg ;; 52914c0a534Smrg decsystem10* | dec10*) 53014c0a534Smrg basic_machine=pdp10-dec 53114c0a534Smrg os=-tops10 53214c0a534Smrg ;; 53314c0a534Smrg decsystem20* | dec20*) 53414c0a534Smrg basic_machine=pdp10-dec 53514c0a534Smrg os=-tops20 53614c0a534Smrg ;; 53714c0a534Smrg delta | 3300 | motorola-3300 | motorola-delta \ 53814c0a534Smrg | 3300-motorola | delta-motorola) 53914c0a534Smrg basic_machine=m68k-motorola 54014c0a534Smrg ;; 54114c0a534Smrg delta88) 54214c0a534Smrg basic_machine=m88k-motorola 54314c0a534Smrg os=-sysv3 54414c0a534Smrg ;; 545bf2eeab3Smrg dicos) 546bf2eeab3Smrg basic_machine=i686-pc 547bf2eeab3Smrg os=-dicos 548bf2eeab3Smrg ;; 54914c0a534Smrg djgpp) 55014c0a534Smrg basic_machine=i586-pc 55114c0a534Smrg os=-msdosdjgpp 55214c0a534Smrg ;; 55314c0a534Smrg dpx20 | dpx20-*) 55414c0a534Smrg basic_machine=rs6000-bull 55514c0a534Smrg os=-bosx 55614c0a534Smrg ;; 55714c0a534Smrg dpx2* | dpx2*-bull) 55814c0a534Smrg basic_machine=m68k-bull 55914c0a534Smrg os=-sysv3 56014c0a534Smrg ;; 56114c0a534Smrg ebmon29k) 56214c0a534Smrg basic_machine=a29k-amd 56314c0a534Smrg os=-ebmon 56414c0a534Smrg ;; 56514c0a534Smrg elxsi) 56614c0a534Smrg basic_machine=elxsi-elxsi 56714c0a534Smrg os=-bsd 56814c0a534Smrg ;; 56914c0a534Smrg encore | umax | mmax) 57014c0a534Smrg basic_machine=ns32k-encore 57114c0a534Smrg ;; 57214c0a534Smrg es1800 | OSE68k | ose68k | ose | OSE) 57314c0a534Smrg basic_machine=m68k-ericsson 57414c0a534Smrg os=-ose 57514c0a534Smrg ;; 57614c0a534Smrg fx2800) 57714c0a534Smrg basic_machine=i860-alliant 57814c0a534Smrg ;; 57914c0a534Smrg genix) 58014c0a534Smrg basic_machine=ns32k-ns 58114c0a534Smrg ;; 58214c0a534Smrg gmicro) 58314c0a534Smrg basic_machine=tron-gmicro 58414c0a534Smrg os=-sysv 58514c0a534Smrg ;; 58614c0a534Smrg go32) 58714c0a534Smrg basic_machine=i386-pc 58814c0a534Smrg os=-go32 58914c0a534Smrg ;; 59014c0a534Smrg h3050r* | hiux*) 59114c0a534Smrg basic_machine=hppa1.1-hitachi 59214c0a534Smrg os=-hiuxwe2 59314c0a534Smrg ;; 59414c0a534Smrg h8300hms) 59514c0a534Smrg basic_machine=h8300-hitachi 59614c0a534Smrg os=-hms 59714c0a534Smrg ;; 59814c0a534Smrg h8300xray) 59914c0a534Smrg basic_machine=h8300-hitachi 60014c0a534Smrg os=-xray 60114c0a534Smrg ;; 60214c0a534Smrg h8500hms) 60314c0a534Smrg basic_machine=h8500-hitachi 60414c0a534Smrg os=-hms 60514c0a534Smrg ;; 60614c0a534Smrg harris) 60714c0a534Smrg basic_machine=m88k-harris 60814c0a534Smrg os=-sysv3 60914c0a534Smrg ;; 61014c0a534Smrg hp300-*) 61114c0a534Smrg basic_machine=m68k-hp 61214c0a534Smrg ;; 61314c0a534Smrg hp300bsd) 61414c0a534Smrg basic_machine=m68k-hp 61514c0a534Smrg os=-bsd 61614c0a534Smrg ;; 61714c0a534Smrg hp300hpux) 61814c0a534Smrg basic_machine=m68k-hp 61914c0a534Smrg os=-hpux 62014c0a534Smrg ;; 62114c0a534Smrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 62214c0a534Smrg basic_machine=hppa1.0-hp 62314c0a534Smrg ;; 62414c0a534Smrg hp9k2[0-9][0-9] | hp9k31[0-9]) 62514c0a534Smrg basic_machine=m68000-hp 62614c0a534Smrg ;; 62714c0a534Smrg hp9k3[2-9][0-9]) 62814c0a534Smrg basic_machine=m68k-hp 62914c0a534Smrg ;; 63014c0a534Smrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 63114c0a534Smrg basic_machine=hppa1.0-hp 63214c0a534Smrg ;; 63314c0a534Smrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 63414c0a534Smrg basic_machine=hppa1.1-hp 63514c0a534Smrg ;; 63614c0a534Smrg hp9k78[0-9] | hp78[0-9]) 63714c0a534Smrg # FIXME: really hppa2.0-hp 63814c0a534Smrg basic_machine=hppa1.1-hp 63914c0a534Smrg ;; 64014c0a534Smrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 64114c0a534Smrg # FIXME: really hppa2.0-hp 64214c0a534Smrg basic_machine=hppa1.1-hp 64314c0a534Smrg ;; 64414c0a534Smrg hp9k8[0-9][13679] | hp8[0-9][13679]) 64514c0a534Smrg basic_machine=hppa1.1-hp 64614c0a534Smrg ;; 64714c0a534Smrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 64814c0a534Smrg basic_machine=hppa1.0-hp 64914c0a534Smrg ;; 65014c0a534Smrg hppa-next) 65114c0a534Smrg os=-nextstep3 65214c0a534Smrg ;; 65314c0a534Smrg hppaosf) 65414c0a534Smrg basic_machine=hppa1.1-hp 65514c0a534Smrg os=-osf 65614c0a534Smrg ;; 65714c0a534Smrg hppro) 65814c0a534Smrg basic_machine=hppa1.1-hp 65914c0a534Smrg os=-proelf 66014c0a534Smrg ;; 66114c0a534Smrg i370-ibm* | ibm*) 66214c0a534Smrg basic_machine=i370-ibm 66314c0a534Smrg ;; 66414c0a534Smrg# I'm not sure what "Sysv32" means. Should this be sysv3.2? 66514c0a534Smrg i*86v32) 66614c0a534Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 66714c0a534Smrg os=-sysv32 66814c0a534Smrg ;; 66914c0a534Smrg i*86v4*) 67014c0a534Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 67114c0a534Smrg os=-sysv4 67214c0a534Smrg ;; 67314c0a534Smrg i*86v) 67414c0a534Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 67514c0a534Smrg os=-sysv 67614c0a534Smrg ;; 67714c0a534Smrg i*86sol2) 67814c0a534Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 67914c0a534Smrg os=-solaris2 68014c0a534Smrg ;; 68114c0a534Smrg i386mach) 68214c0a534Smrg basic_machine=i386-mach 68314c0a534Smrg os=-mach 68414c0a534Smrg ;; 68514c0a534Smrg i386-vsta | vsta) 68614c0a534Smrg basic_machine=i386-unknown 68714c0a534Smrg os=-vsta 68814c0a534Smrg ;; 68914c0a534Smrg iris | iris4d) 69014c0a534Smrg basic_machine=mips-sgi 69114c0a534Smrg case $os in 69214c0a534Smrg -irix*) 69314c0a534Smrg ;; 69414c0a534Smrg *) 69514c0a534Smrg os=-irix4 69614c0a534Smrg ;; 69714c0a534Smrg esac 69814c0a534Smrg ;; 69914c0a534Smrg isi68 | isi) 70014c0a534Smrg basic_machine=m68k-isi 70114c0a534Smrg os=-sysv 70214c0a534Smrg ;; 703bf2eeab3Smrg m68knommu) 704bf2eeab3Smrg basic_machine=m68k-unknown 705bf2eeab3Smrg os=-linux 706bf2eeab3Smrg ;; 707bf2eeab3Smrg m68knommu-*) 708bf2eeab3Smrg basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 709bf2eeab3Smrg os=-linux 710bf2eeab3Smrg ;; 71114c0a534Smrg m88k-omron*) 71214c0a534Smrg basic_machine=m88k-omron 71314c0a534Smrg ;; 71414c0a534Smrg magnum | m3230) 71514c0a534Smrg basic_machine=mips-mips 71614c0a534Smrg os=-sysv 71714c0a534Smrg ;; 71814c0a534Smrg merlin) 71914c0a534Smrg basic_machine=ns32k-utek 72014c0a534Smrg os=-sysv 72114c0a534Smrg ;; 72214c0a534Smrg mingw32) 72314c0a534Smrg basic_machine=i386-pc 72414c0a534Smrg os=-mingw32 72514c0a534Smrg ;; 726bf2eeab3Smrg mingw32ce) 727bf2eeab3Smrg basic_machine=arm-unknown 728bf2eeab3Smrg os=-mingw32ce 729bf2eeab3Smrg ;; 73014c0a534Smrg miniframe) 73114c0a534Smrg basic_machine=m68000-convergent 73214c0a534Smrg ;; 73314c0a534Smrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 73414c0a534Smrg basic_machine=m68k-atari 73514c0a534Smrg os=-mint 73614c0a534Smrg ;; 73714c0a534Smrg mips3*-*) 73814c0a534Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 73914c0a534Smrg ;; 74014c0a534Smrg mips3*) 74114c0a534Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 74214c0a534Smrg ;; 74314c0a534Smrg monitor) 74414c0a534Smrg basic_machine=m68k-rom68k 74514c0a534Smrg os=-coff 74614c0a534Smrg ;; 74714c0a534Smrg morphos) 74814c0a534Smrg basic_machine=powerpc-unknown 74914c0a534Smrg os=-morphos 75014c0a534Smrg ;; 75114c0a534Smrg msdos) 75214c0a534Smrg basic_machine=i386-pc 75314c0a534Smrg os=-msdos 75414c0a534Smrg ;; 755bf2eeab3Smrg ms1-*) 756bf2eeab3Smrg basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 757bf2eeab3Smrg ;; 75814c0a534Smrg mvs) 75914c0a534Smrg basic_machine=i370-ibm 76014c0a534Smrg os=-mvs 76114c0a534Smrg ;; 76214c0a534Smrg ncr3000) 76314c0a534Smrg basic_machine=i486-ncr 76414c0a534Smrg os=-sysv4 76514c0a534Smrg ;; 76614c0a534Smrg netbsd386) 76714c0a534Smrg basic_machine=i386-unknown 76814c0a534Smrg os=-netbsd 76914c0a534Smrg ;; 77014c0a534Smrg netwinder) 77114c0a534Smrg basic_machine=armv4l-rebel 77214c0a534Smrg os=-linux 77314c0a534Smrg ;; 77414c0a534Smrg news | news700 | news800 | news900) 77514c0a534Smrg basic_machine=m68k-sony 77614c0a534Smrg os=-newsos 77714c0a534Smrg ;; 77814c0a534Smrg news1000) 77914c0a534Smrg basic_machine=m68030-sony 78014c0a534Smrg os=-newsos 78114c0a534Smrg ;; 78214c0a534Smrg news-3600 | risc-news) 78314c0a534Smrg basic_machine=mips-sony 78414c0a534Smrg os=-newsos 78514c0a534Smrg ;; 78614c0a534Smrg necv70) 78714c0a534Smrg basic_machine=v70-nec 78814c0a534Smrg os=-sysv 78914c0a534Smrg ;; 79014c0a534Smrg next | m*-next ) 79114c0a534Smrg basic_machine=m68k-next 79214c0a534Smrg case $os in 79314c0a534Smrg -nextstep* ) 79414c0a534Smrg ;; 79514c0a534Smrg -ns2*) 79614c0a534Smrg os=-nextstep2 79714c0a534Smrg ;; 79814c0a534Smrg *) 79914c0a534Smrg os=-nextstep3 80014c0a534Smrg ;; 80114c0a534Smrg esac 80214c0a534Smrg ;; 80314c0a534Smrg nh3000) 80414c0a534Smrg basic_machine=m68k-harris 80514c0a534Smrg os=-cxux 80614c0a534Smrg ;; 80714c0a534Smrg nh[45]000) 80814c0a534Smrg basic_machine=m88k-harris 80914c0a534Smrg os=-cxux 81014c0a534Smrg ;; 81114c0a534Smrg nindy960) 81214c0a534Smrg basic_machine=i960-intel 81314c0a534Smrg os=-nindy 81414c0a534Smrg ;; 81514c0a534Smrg mon960) 81614c0a534Smrg basic_machine=i960-intel 81714c0a534Smrg os=-mon960 81814c0a534Smrg ;; 81914c0a534Smrg nonstopux) 82014c0a534Smrg basic_machine=mips-compaq 82114c0a534Smrg os=-nonstopux 82214c0a534Smrg ;; 82314c0a534Smrg np1) 82414c0a534Smrg basic_machine=np1-gould 82514c0a534Smrg ;; 82614c0a534Smrg nsr-tandem) 82714c0a534Smrg basic_machine=nsr-tandem 82814c0a534Smrg ;; 82914c0a534Smrg op50n-* | op60c-*) 83014c0a534Smrg basic_machine=hppa1.1-oki 83114c0a534Smrg os=-proelf 83214c0a534Smrg ;; 83314c0a534Smrg openrisc | openrisc-*) 83414c0a534Smrg basic_machine=or32-unknown 83514c0a534Smrg ;; 83614c0a534Smrg os400) 83714c0a534Smrg basic_machine=powerpc-ibm 83814c0a534Smrg os=-os400 83914c0a534Smrg ;; 84014c0a534Smrg OSE68000 | ose68000) 84114c0a534Smrg basic_machine=m68000-ericsson 84214c0a534Smrg os=-ose 84314c0a534Smrg ;; 84414c0a534Smrg os68k) 84514c0a534Smrg basic_machine=m68k-none 84614c0a534Smrg os=-os68k 84714c0a534Smrg ;; 84814c0a534Smrg pa-hitachi) 84914c0a534Smrg basic_machine=hppa1.1-hitachi 85014c0a534Smrg os=-hiuxwe2 85114c0a534Smrg ;; 85214c0a534Smrg paragon) 85314c0a534Smrg basic_machine=i860-intel 85414c0a534Smrg os=-osf 85514c0a534Smrg ;; 856bf2eeab3Smrg parisc) 857bf2eeab3Smrg basic_machine=hppa-unknown 858bf2eeab3Smrg os=-linux 859bf2eeab3Smrg ;; 860bf2eeab3Smrg parisc-*) 861bf2eeab3Smrg basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 862bf2eeab3Smrg os=-linux 863bf2eeab3Smrg ;; 86414c0a534Smrg pbd) 86514c0a534Smrg basic_machine=sparc-tti 86614c0a534Smrg ;; 86714c0a534Smrg pbb) 86814c0a534Smrg basic_machine=m68k-tti 86914c0a534Smrg ;; 87014c0a534Smrg pc532 | pc532-*) 87114c0a534Smrg basic_machine=ns32k-pc532 87214c0a534Smrg ;; 873bf2eeab3Smrg pc98) 874bf2eeab3Smrg basic_machine=i386-pc 875bf2eeab3Smrg ;; 876bf2eeab3Smrg pc98-*) 877bf2eeab3Smrg basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 878bf2eeab3Smrg ;; 87914c0a534Smrg pentium | p5 | k5 | k6 | nexgen | viac3) 88014c0a534Smrg basic_machine=i586-pc 88114c0a534Smrg ;; 88214c0a534Smrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 88314c0a534Smrg basic_machine=i686-pc 88414c0a534Smrg ;; 88514c0a534Smrg pentiumii | pentium2 | pentiumiii | pentium3) 88614c0a534Smrg basic_machine=i686-pc 88714c0a534Smrg ;; 88814c0a534Smrg pentium4) 88914c0a534Smrg basic_machine=i786-pc 89014c0a534Smrg ;; 89114c0a534Smrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 89214c0a534Smrg basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 89314c0a534Smrg ;; 89414c0a534Smrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 89514c0a534Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 89614c0a534Smrg ;; 89714c0a534Smrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 89814c0a534Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 89914c0a534Smrg ;; 90014c0a534Smrg pentium4-*) 90114c0a534Smrg basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 90214c0a534Smrg ;; 90314c0a534Smrg pn) 90414c0a534Smrg basic_machine=pn-gould 90514c0a534Smrg ;; 90614c0a534Smrg power) basic_machine=power-ibm 90714c0a534Smrg ;; 90814c0a534Smrg ppc) basic_machine=powerpc-unknown 90914c0a534Smrg ;; 91014c0a534Smrg ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 91114c0a534Smrg ;; 91214c0a534Smrg ppcle | powerpclittle | ppc-le | powerpc-little) 91314c0a534Smrg basic_machine=powerpcle-unknown 91414c0a534Smrg ;; 91514c0a534Smrg ppcle-* | powerpclittle-*) 91614c0a534Smrg basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 91714c0a534Smrg ;; 91814c0a534Smrg ppc64) basic_machine=powerpc64-unknown 91914c0a534Smrg ;; 92014c0a534Smrg ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 92114c0a534Smrg ;; 92214c0a534Smrg ppc64le | powerpc64little | ppc64-le | powerpc64-little) 92314c0a534Smrg basic_machine=powerpc64le-unknown 92414c0a534Smrg ;; 92514c0a534Smrg ppc64le-* | powerpc64little-*) 92614c0a534Smrg basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 92714c0a534Smrg ;; 92814c0a534Smrg ps2) 92914c0a534Smrg basic_machine=i386-ibm 93014c0a534Smrg ;; 93114c0a534Smrg pw32) 93214c0a534Smrg basic_machine=i586-unknown 93314c0a534Smrg os=-pw32 93414c0a534Smrg ;; 935bf2eeab3Smrg rdos) 936bf2eeab3Smrg basic_machine=i386-pc 937bf2eeab3Smrg os=-rdos 938bf2eeab3Smrg ;; 93914c0a534Smrg rom68k) 94014c0a534Smrg basic_machine=m68k-rom68k 94114c0a534Smrg os=-coff 94214c0a534Smrg ;; 94314c0a534Smrg rm[46]00) 94414c0a534Smrg basic_machine=mips-siemens 94514c0a534Smrg ;; 94614c0a534Smrg rtpc | rtpc-*) 94714c0a534Smrg basic_machine=romp-ibm 94814c0a534Smrg ;; 94914c0a534Smrg s390 | s390-*) 95014c0a534Smrg basic_machine=s390-ibm 95114c0a534Smrg ;; 95214c0a534Smrg s390x | s390x-*) 95314c0a534Smrg basic_machine=s390x-ibm 95414c0a534Smrg ;; 95514c0a534Smrg sa29200) 95614c0a534Smrg basic_machine=a29k-amd 95714c0a534Smrg os=-udi 95814c0a534Smrg ;; 95914c0a534Smrg sb1) 96014c0a534Smrg basic_machine=mipsisa64sb1-unknown 96114c0a534Smrg ;; 96214c0a534Smrg sb1el) 96314c0a534Smrg basic_machine=mipsisa64sb1el-unknown 96414c0a534Smrg ;; 965bf2eeab3Smrg sde) 966bf2eeab3Smrg basic_machine=mipsisa32-sde 967bf2eeab3Smrg os=-elf 968bf2eeab3Smrg ;; 96914c0a534Smrg sei) 97014c0a534Smrg basic_machine=mips-sei 97114c0a534Smrg os=-seiux 97214c0a534Smrg ;; 97314c0a534Smrg sequent) 97414c0a534Smrg basic_machine=i386-sequent 97514c0a534Smrg ;; 97614c0a534Smrg sh) 97714c0a534Smrg basic_machine=sh-hitachi 97814c0a534Smrg os=-hms 97914c0a534Smrg ;; 980bf2eeab3Smrg sh5el) 981bf2eeab3Smrg basic_machine=sh5le-unknown 982bf2eeab3Smrg ;; 98314c0a534Smrg sh64) 98414c0a534Smrg basic_machine=sh64-unknown 98514c0a534Smrg ;; 98614c0a534Smrg sparclite-wrs | simso-wrs) 98714c0a534Smrg basic_machine=sparclite-wrs 98814c0a534Smrg os=-vxworks 98914c0a534Smrg ;; 99014c0a534Smrg sps7) 99114c0a534Smrg basic_machine=m68k-bull 99214c0a534Smrg os=-sysv2 99314c0a534Smrg ;; 99414c0a534Smrg spur) 99514c0a534Smrg basic_machine=spur-unknown 99614c0a534Smrg ;; 99714c0a534Smrg st2000) 99814c0a534Smrg basic_machine=m68k-tandem 99914c0a534Smrg ;; 100014c0a534Smrg stratus) 100114c0a534Smrg basic_machine=i860-stratus 100214c0a534Smrg os=-sysv4 100314c0a534Smrg ;; 100414c0a534Smrg sun2) 100514c0a534Smrg basic_machine=m68000-sun 100614c0a534Smrg ;; 100714c0a534Smrg sun2os3) 100814c0a534Smrg basic_machine=m68000-sun 100914c0a534Smrg os=-sunos3 101014c0a534Smrg ;; 101114c0a534Smrg sun2os4) 101214c0a534Smrg basic_machine=m68000-sun 101314c0a534Smrg os=-sunos4 101414c0a534Smrg ;; 101514c0a534Smrg sun3os3) 101614c0a534Smrg basic_machine=m68k-sun 101714c0a534Smrg os=-sunos3 101814c0a534Smrg ;; 101914c0a534Smrg sun3os4) 102014c0a534Smrg basic_machine=m68k-sun 102114c0a534Smrg os=-sunos4 102214c0a534Smrg ;; 102314c0a534Smrg sun4os3) 102414c0a534Smrg basic_machine=sparc-sun 102514c0a534Smrg os=-sunos3 102614c0a534Smrg ;; 102714c0a534Smrg sun4os4) 102814c0a534Smrg basic_machine=sparc-sun 102914c0a534Smrg os=-sunos4 103014c0a534Smrg ;; 103114c0a534Smrg sun4sol2) 103214c0a534Smrg basic_machine=sparc-sun 103314c0a534Smrg os=-solaris2 103414c0a534Smrg ;; 103514c0a534Smrg sun3 | sun3-*) 103614c0a534Smrg basic_machine=m68k-sun 103714c0a534Smrg ;; 103814c0a534Smrg sun4) 103914c0a534Smrg basic_machine=sparc-sun 104014c0a534Smrg ;; 104114c0a534Smrg sun386 | sun386i | roadrunner) 104214c0a534Smrg basic_machine=i386-sun 104314c0a534Smrg ;; 104414c0a534Smrg sv1) 104514c0a534Smrg basic_machine=sv1-cray 104614c0a534Smrg os=-unicos 104714c0a534Smrg ;; 104814c0a534Smrg symmetry) 104914c0a534Smrg basic_machine=i386-sequent 105014c0a534Smrg os=-dynix 105114c0a534Smrg ;; 105214c0a534Smrg t3e) 105314c0a534Smrg basic_machine=alphaev5-cray 105414c0a534Smrg os=-unicos 105514c0a534Smrg ;; 105614c0a534Smrg t90) 105714c0a534Smrg basic_machine=t90-cray 105814c0a534Smrg os=-unicos 105914c0a534Smrg ;; 106014c0a534Smrg tic54x | c54x*) 106114c0a534Smrg basic_machine=tic54x-unknown 106214c0a534Smrg os=-coff 106314c0a534Smrg ;; 106414c0a534Smrg tic55x | c55x*) 106514c0a534Smrg basic_machine=tic55x-unknown 106614c0a534Smrg os=-coff 106714c0a534Smrg ;; 106814c0a534Smrg tic6x | c6x*) 106914c0a534Smrg basic_machine=tic6x-unknown 107014c0a534Smrg os=-coff 107114c0a534Smrg ;; 1072bf2eeab3Smrg tile*) 1073bf2eeab3Smrg basic_machine=tile-unknown 1074bf2eeab3Smrg os=-linux-gnu 1075bf2eeab3Smrg ;; 107614c0a534Smrg tx39) 107714c0a534Smrg basic_machine=mipstx39-unknown 107814c0a534Smrg ;; 107914c0a534Smrg tx39el) 108014c0a534Smrg basic_machine=mipstx39el-unknown 108114c0a534Smrg ;; 108214c0a534Smrg toad1) 108314c0a534Smrg basic_machine=pdp10-xkl 108414c0a534Smrg os=-tops20 108514c0a534Smrg ;; 108614c0a534Smrg tower | tower-32) 108714c0a534Smrg basic_machine=m68k-ncr 108814c0a534Smrg ;; 108914c0a534Smrg tpf) 109014c0a534Smrg basic_machine=s390x-ibm 109114c0a534Smrg os=-tpf 109214c0a534Smrg ;; 109314c0a534Smrg udi29k) 109414c0a534Smrg basic_machine=a29k-amd 109514c0a534Smrg os=-udi 109614c0a534Smrg ;; 109714c0a534Smrg ultra3) 109814c0a534Smrg basic_machine=a29k-nyu 109914c0a534Smrg os=-sym1 110014c0a534Smrg ;; 110114c0a534Smrg v810 | necv810) 110214c0a534Smrg basic_machine=v810-nec 110314c0a534Smrg os=-none 110414c0a534Smrg ;; 110514c0a534Smrg vaxv) 110614c0a534Smrg basic_machine=vax-dec 110714c0a534Smrg os=-sysv 110814c0a534Smrg ;; 110914c0a534Smrg vms) 111014c0a534Smrg basic_machine=vax-dec 111114c0a534Smrg os=-vms 111214c0a534Smrg ;; 111314c0a534Smrg vpp*|vx|vx-*) 111414c0a534Smrg basic_machine=f301-fujitsu 111514c0a534Smrg ;; 111614c0a534Smrg vxworks960) 111714c0a534Smrg basic_machine=i960-wrs 111814c0a534Smrg os=-vxworks 111914c0a534Smrg ;; 112014c0a534Smrg vxworks68) 112114c0a534Smrg basic_machine=m68k-wrs 112214c0a534Smrg os=-vxworks 112314c0a534Smrg ;; 112414c0a534Smrg vxworks29k) 112514c0a534Smrg basic_machine=a29k-wrs 112614c0a534Smrg os=-vxworks 112714c0a534Smrg ;; 112814c0a534Smrg w65*) 112914c0a534Smrg basic_machine=w65-wdc 113014c0a534Smrg os=-none 113114c0a534Smrg ;; 113214c0a534Smrg w89k-*) 113314c0a534Smrg basic_machine=hppa1.1-winbond 113414c0a534Smrg os=-proelf 113514c0a534Smrg ;; 113614c0a534Smrg xbox) 113714c0a534Smrg basic_machine=i686-pc 113814c0a534Smrg os=-mingw32 113914c0a534Smrg ;; 114014c0a534Smrg xps | xps100) 114114c0a534Smrg basic_machine=xps100-honeywell 114214c0a534Smrg ;; 114314c0a534Smrg ymp) 114414c0a534Smrg basic_machine=ymp-cray 114514c0a534Smrg os=-unicos 114614c0a534Smrg ;; 114714c0a534Smrg z8k-*-coff) 114814c0a534Smrg basic_machine=z8k-unknown 114914c0a534Smrg os=-sim 115014c0a534Smrg ;; 1151bf2eeab3Smrg z80-*-coff) 1152bf2eeab3Smrg basic_machine=z80-unknown 1153bf2eeab3Smrg os=-sim 1154bf2eeab3Smrg ;; 115514c0a534Smrg none) 115614c0a534Smrg basic_machine=none-none 115714c0a534Smrg os=-none 115814c0a534Smrg ;; 115914c0a534Smrg 116014c0a534Smrg# Here we handle the default manufacturer of certain CPU types. It is in 116114c0a534Smrg# some cases the only manufacturer, in others, it is the most popular. 116214c0a534Smrg w89k) 116314c0a534Smrg basic_machine=hppa1.1-winbond 116414c0a534Smrg ;; 116514c0a534Smrg op50n) 116614c0a534Smrg basic_machine=hppa1.1-oki 116714c0a534Smrg ;; 116814c0a534Smrg op60c) 116914c0a534Smrg basic_machine=hppa1.1-oki 117014c0a534Smrg ;; 117114c0a534Smrg romp) 117214c0a534Smrg basic_machine=romp-ibm 117314c0a534Smrg ;; 117414c0a534Smrg mmix) 117514c0a534Smrg basic_machine=mmix-knuth 117614c0a534Smrg ;; 117714c0a534Smrg rs6000) 117814c0a534Smrg basic_machine=rs6000-ibm 117914c0a534Smrg ;; 118014c0a534Smrg vax) 118114c0a534Smrg basic_machine=vax-dec 118214c0a534Smrg ;; 118314c0a534Smrg pdp10) 118414c0a534Smrg # there are many clones, so DEC is not a safe bet 118514c0a534Smrg basic_machine=pdp10-unknown 118614c0a534Smrg ;; 118714c0a534Smrg pdp11) 118814c0a534Smrg basic_machine=pdp11-dec 118914c0a534Smrg ;; 119014c0a534Smrg we32k) 119114c0a534Smrg basic_machine=we32k-att 119214c0a534Smrg ;; 1193bf2eeab3Smrg sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 119414c0a534Smrg basic_machine=sh-unknown 119514c0a534Smrg ;; 1196bf2eeab3Smrg sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 119714c0a534Smrg basic_machine=sparc-sun 119814c0a534Smrg ;; 119914c0a534Smrg cydra) 120014c0a534Smrg basic_machine=cydra-cydrome 120114c0a534Smrg ;; 120214c0a534Smrg orion) 120314c0a534Smrg basic_machine=orion-highlevel 120414c0a534Smrg ;; 120514c0a534Smrg orion105) 120614c0a534Smrg basic_machine=clipper-highlevel 120714c0a534Smrg ;; 120814c0a534Smrg mac | mpw | mac-mpw) 120914c0a534Smrg basic_machine=m68k-apple 121014c0a534Smrg ;; 121114c0a534Smrg pmac | pmac-mpw) 121214c0a534Smrg basic_machine=powerpc-apple 121314c0a534Smrg ;; 121414c0a534Smrg *-unknown) 121514c0a534Smrg # Make sure to match an already-canonicalized machine name. 121614c0a534Smrg ;; 121714c0a534Smrg *) 121814c0a534Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 121914c0a534Smrg exit 1 122014c0a534Smrg ;; 122114c0a534Smrgesac 122214c0a534Smrg 122314c0a534Smrg# Here we canonicalize certain aliases for manufacturers. 122414c0a534Smrgcase $basic_machine in 122514c0a534Smrg *-digital*) 122614c0a534Smrg basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 122714c0a534Smrg ;; 122814c0a534Smrg *-commodore*) 122914c0a534Smrg basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 123014c0a534Smrg ;; 123114c0a534Smrg *) 123214c0a534Smrg ;; 123314c0a534Smrgesac 123414c0a534Smrg 123514c0a534Smrg# Decode manufacturer-specific aliases for certain operating systems. 123614c0a534Smrg 123714c0a534Smrgif [ x"$os" != x"" ] 123814c0a534Smrgthen 123914c0a534Smrgcase $os in 124014c0a534Smrg # First match some system type aliases 124114c0a534Smrg # that might get confused with valid system types. 124214c0a534Smrg # -solaris* is a basic system type, with this one exception. 124314c0a534Smrg -solaris1 | -solaris1.*) 124414c0a534Smrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 124514c0a534Smrg ;; 124614c0a534Smrg -solaris) 124714c0a534Smrg os=-solaris2 124814c0a534Smrg ;; 124914c0a534Smrg -svr4*) 125014c0a534Smrg os=-sysv4 125114c0a534Smrg ;; 125214c0a534Smrg -unixware*) 125314c0a534Smrg os=-sysv4.2uw 125414c0a534Smrg ;; 125514c0a534Smrg -gnu/linux*) 125614c0a534Smrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 125714c0a534Smrg ;; 125814c0a534Smrg # First accept the basic system types. 125914c0a534Smrg # The portable systems comes first. 126014c0a534Smrg # Each alternative MUST END IN A *, to match a version number. 126114c0a534Smrg # -sysv* is not here because it comes later, after sysvr4. 126214c0a534Smrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 126314c0a534Smrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 126414c0a534Smrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 1265bf2eeab3Smrg | -kopensolaris* \ 126614c0a534Smrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1267bf2eeab3Smrg | -aos* | -aros* \ 126814c0a534Smrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 126914c0a534Smrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1270bf2eeab3Smrg | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1271bf2eeab3Smrg | -openbsd* | -solidbsd* \ 127214c0a534Smrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 127314c0a534Smrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 127414c0a534Smrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 127514c0a534Smrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1276bf2eeab3Smrg | -chorusos* | -chorusrdb* | -cegcc* \ 127714c0a534Smrg | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1278bf2eeab3Smrg | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ 1279bf2eeab3Smrg | -uxpv* | -beos* | -mpeix* | -udk* \ 128014c0a534Smrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 128114c0a534Smrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 128214c0a534Smrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 128314c0a534Smrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 128414c0a534Smrg | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 128514c0a534Smrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1286bf2eeab3Smrg | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) 128714c0a534Smrg # Remember, each alternative MUST END IN *, to match a version number. 128814c0a534Smrg ;; 128914c0a534Smrg -qnx*) 129014c0a534Smrg case $basic_machine in 129114c0a534Smrg x86-* | i*86-*) 129214c0a534Smrg ;; 129314c0a534Smrg *) 129414c0a534Smrg os=-nto$os 129514c0a534Smrg ;; 129614c0a534Smrg esac 129714c0a534Smrg ;; 129814c0a534Smrg -nto-qnx*) 129914c0a534Smrg ;; 130014c0a534Smrg -nto*) 130114c0a534Smrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 130214c0a534Smrg ;; 130314c0a534Smrg -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 130414c0a534Smrg | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 130514c0a534Smrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 130614c0a534Smrg ;; 130714c0a534Smrg -mac*) 130814c0a534Smrg os=`echo $os | sed -e 's|mac|macos|'` 130914c0a534Smrg ;; 131014c0a534Smrg -linux-dietlibc) 131114c0a534Smrg os=-linux-dietlibc 131214c0a534Smrg ;; 131314c0a534Smrg -linux*) 131414c0a534Smrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 131514c0a534Smrg ;; 131614c0a534Smrg -sunos5*) 131714c0a534Smrg os=`echo $os | sed -e 's|sunos5|solaris2|'` 131814c0a534Smrg ;; 131914c0a534Smrg -sunos6*) 132014c0a534Smrg os=`echo $os | sed -e 's|sunos6|solaris3|'` 132114c0a534Smrg ;; 132214c0a534Smrg -opened*) 132314c0a534Smrg os=-openedition 132414c0a534Smrg ;; 132514c0a534Smrg -os400*) 132614c0a534Smrg os=-os400 132714c0a534Smrg ;; 132814c0a534Smrg -wince*) 132914c0a534Smrg os=-wince 133014c0a534Smrg ;; 133114c0a534Smrg -osfrose*) 133214c0a534Smrg os=-osfrose 133314c0a534Smrg ;; 133414c0a534Smrg -osf*) 133514c0a534Smrg os=-osf 133614c0a534Smrg ;; 133714c0a534Smrg -utek*) 133814c0a534Smrg os=-bsd 133914c0a534Smrg ;; 134014c0a534Smrg -dynix*) 134114c0a534Smrg os=-bsd 134214c0a534Smrg ;; 134314c0a534Smrg -acis*) 134414c0a534Smrg os=-aos 134514c0a534Smrg ;; 134614c0a534Smrg -atheos*) 134714c0a534Smrg os=-atheos 134814c0a534Smrg ;; 134914c0a534Smrg -syllable*) 135014c0a534Smrg os=-syllable 135114c0a534Smrg ;; 135214c0a534Smrg -386bsd) 135314c0a534Smrg os=-bsd 135414c0a534Smrg ;; 135514c0a534Smrg -ctix* | -uts*) 135614c0a534Smrg os=-sysv 135714c0a534Smrg ;; 135814c0a534Smrg -nova*) 135914c0a534Smrg os=-rtmk-nova 136014c0a534Smrg ;; 136114c0a534Smrg -ns2 ) 136214c0a534Smrg os=-nextstep2 136314c0a534Smrg ;; 136414c0a534Smrg -nsk*) 136514c0a534Smrg os=-nsk 136614c0a534Smrg ;; 136714c0a534Smrg # Preserve the version number of sinix5. 136814c0a534Smrg -sinix5.*) 136914c0a534Smrg os=`echo $os | sed -e 's|sinix|sysv|'` 137014c0a534Smrg ;; 137114c0a534Smrg -sinix*) 137214c0a534Smrg os=-sysv4 137314c0a534Smrg ;; 137414c0a534Smrg -tpf*) 137514c0a534Smrg os=-tpf 137614c0a534Smrg ;; 137714c0a534Smrg -triton*) 137814c0a534Smrg os=-sysv3 137914c0a534Smrg ;; 138014c0a534Smrg -oss*) 138114c0a534Smrg os=-sysv3 138214c0a534Smrg ;; 138314c0a534Smrg -svr4) 138414c0a534Smrg os=-sysv4 138514c0a534Smrg ;; 138614c0a534Smrg -svr3) 138714c0a534Smrg os=-sysv3 138814c0a534Smrg ;; 138914c0a534Smrg -sysvr4) 139014c0a534Smrg os=-sysv4 139114c0a534Smrg ;; 139214c0a534Smrg # This must come after -sysvr4. 139314c0a534Smrg -sysv*) 139414c0a534Smrg ;; 139514c0a534Smrg -ose*) 139614c0a534Smrg os=-ose 139714c0a534Smrg ;; 139814c0a534Smrg -es1800*) 139914c0a534Smrg os=-ose 140014c0a534Smrg ;; 140114c0a534Smrg -xenix) 140214c0a534Smrg os=-xenix 140314c0a534Smrg ;; 140414c0a534Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 140514c0a534Smrg os=-mint 140614c0a534Smrg ;; 140714c0a534Smrg -aros*) 140814c0a534Smrg os=-aros 140914c0a534Smrg ;; 141014c0a534Smrg -kaos*) 141114c0a534Smrg os=-kaos 141214c0a534Smrg ;; 141314c0a534Smrg -zvmoe) 141414c0a534Smrg os=-zvmoe 141514c0a534Smrg ;; 1416bf2eeab3Smrg -dicos*) 1417bf2eeab3Smrg os=-dicos 1418bf2eeab3Smrg ;; 141914c0a534Smrg -none) 142014c0a534Smrg ;; 142114c0a534Smrg *) 142214c0a534Smrg # Get rid of the `-' at the beginning of $os. 142314c0a534Smrg os=`echo $os | sed 's/[^-]*-//'` 142414c0a534Smrg echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 142514c0a534Smrg exit 1 142614c0a534Smrg ;; 142714c0a534Smrgesac 142814c0a534Smrgelse 142914c0a534Smrg 143014c0a534Smrg# Here we handle the default operating systems that come with various machines. 143114c0a534Smrg# The value should be what the vendor currently ships out the door with their 143214c0a534Smrg# machine or put another way, the most popular os provided with the machine. 143314c0a534Smrg 143414c0a534Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 143514c0a534Smrg# "-sun"), then you have to tell the case statement up towards the top 143614c0a534Smrg# that MANUFACTURER isn't an operating system. Otherwise, code above 143714c0a534Smrg# will signal an error saying that MANUFACTURER isn't an operating 143814c0a534Smrg# system, and we'll never get to this point. 143914c0a534Smrg 144014c0a534Smrgcase $basic_machine in 1441bf2eeab3Smrg score-*) 1442bf2eeab3Smrg os=-elf 1443bf2eeab3Smrg ;; 1444bf2eeab3Smrg spu-*) 1445bf2eeab3Smrg os=-elf 1446bf2eeab3Smrg ;; 144714c0a534Smrg *-acorn) 144814c0a534Smrg os=-riscix1.2 144914c0a534Smrg ;; 145014c0a534Smrg arm*-rebel) 145114c0a534Smrg os=-linux 145214c0a534Smrg ;; 145314c0a534Smrg arm*-semi) 145414c0a534Smrg os=-aout 145514c0a534Smrg ;; 1456bf2eeab3Smrg c4x-* | tic4x-*) 1457bf2eeab3Smrg os=-coff 1458bf2eeab3Smrg ;; 145914c0a534Smrg # This must come before the *-dec entry. 146014c0a534Smrg pdp10-*) 146114c0a534Smrg os=-tops20 146214c0a534Smrg ;; 146314c0a534Smrg pdp11-*) 146414c0a534Smrg os=-none 146514c0a534Smrg ;; 146614c0a534Smrg *-dec | vax-*) 146714c0a534Smrg os=-ultrix4.2 146814c0a534Smrg ;; 146914c0a534Smrg m68*-apollo) 147014c0a534Smrg os=-domain 147114c0a534Smrg ;; 147214c0a534Smrg i386-sun) 147314c0a534Smrg os=-sunos4.0.2 147414c0a534Smrg ;; 147514c0a534Smrg m68000-sun) 147614c0a534Smrg os=-sunos3 147714c0a534Smrg # This also exists in the configure program, but was not the 147814c0a534Smrg # default. 147914c0a534Smrg # os=-sunos4 148014c0a534Smrg ;; 148114c0a534Smrg m68*-cisco) 148214c0a534Smrg os=-aout 148314c0a534Smrg ;; 1484bf2eeab3Smrg mep-*) 1485bf2eeab3Smrg os=-elf 1486bf2eeab3Smrg ;; 148714c0a534Smrg mips*-cisco) 148814c0a534Smrg os=-elf 148914c0a534Smrg ;; 149014c0a534Smrg mips*-*) 149114c0a534Smrg os=-elf 149214c0a534Smrg ;; 149314c0a534Smrg or32-*) 149414c0a534Smrg os=-coff 149514c0a534Smrg ;; 149614c0a534Smrg *-tti) # must be before sparc entry or we get the wrong os. 149714c0a534Smrg os=-sysv3 149814c0a534Smrg ;; 149914c0a534Smrg sparc-* | *-sun) 150014c0a534Smrg os=-sunos4.1.1 150114c0a534Smrg ;; 150214c0a534Smrg *-be) 150314c0a534Smrg os=-beos 150414c0a534Smrg ;; 150514c0a534Smrg *-haiku) 150614c0a534Smrg os=-haiku 150714c0a534Smrg ;; 150814c0a534Smrg *-ibm) 150914c0a534Smrg os=-aix 151014c0a534Smrg ;; 151114c0a534Smrg *-knuth) 151214c0a534Smrg os=-mmixware 151314c0a534Smrg ;; 151414c0a534Smrg *-wec) 151514c0a534Smrg os=-proelf 151614c0a534Smrg ;; 151714c0a534Smrg *-winbond) 151814c0a534Smrg os=-proelf 151914c0a534Smrg ;; 152014c0a534Smrg *-oki) 152114c0a534Smrg os=-proelf 152214c0a534Smrg ;; 152314c0a534Smrg *-hp) 152414c0a534Smrg os=-hpux 152514c0a534Smrg ;; 152614c0a534Smrg *-hitachi) 152714c0a534Smrg os=-hiux 152814c0a534Smrg ;; 152914c0a534Smrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 153014c0a534Smrg os=-sysv 153114c0a534Smrg ;; 153214c0a534Smrg *-cbm) 153314c0a534Smrg os=-amigaos 153414c0a534Smrg ;; 153514c0a534Smrg *-dg) 153614c0a534Smrg os=-dgux 153714c0a534Smrg ;; 153814c0a534Smrg *-dolphin) 153914c0a534Smrg os=-sysv3 154014c0a534Smrg ;; 154114c0a534Smrg m68k-ccur) 154214c0a534Smrg os=-rtu 154314c0a534Smrg ;; 154414c0a534Smrg m88k-omron*) 154514c0a534Smrg os=-luna 154614c0a534Smrg ;; 154714c0a534Smrg *-next ) 154814c0a534Smrg os=-nextstep 154914c0a534Smrg ;; 155014c0a534Smrg *-sequent) 155114c0a534Smrg os=-ptx 155214c0a534Smrg ;; 155314c0a534Smrg *-crds) 155414c0a534Smrg os=-unos 155514c0a534Smrg ;; 155614c0a534Smrg *-ns) 155714c0a534Smrg os=-genix 155814c0a534Smrg ;; 155914c0a534Smrg i370-*) 156014c0a534Smrg os=-mvs 156114c0a534Smrg ;; 156214c0a534Smrg *-next) 156314c0a534Smrg os=-nextstep3 156414c0a534Smrg ;; 156514c0a534Smrg *-gould) 156614c0a534Smrg os=-sysv 156714c0a534Smrg ;; 156814c0a534Smrg *-highlevel) 156914c0a534Smrg os=-bsd 157014c0a534Smrg ;; 157114c0a534Smrg *-encore) 157214c0a534Smrg os=-bsd 157314c0a534Smrg ;; 157414c0a534Smrg *-sgi) 157514c0a534Smrg os=-irix 157614c0a534Smrg ;; 157714c0a534Smrg *-siemens) 157814c0a534Smrg os=-sysv4 157914c0a534Smrg ;; 158014c0a534Smrg *-masscomp) 158114c0a534Smrg os=-rtu 158214c0a534Smrg ;; 158314c0a534Smrg f30[01]-fujitsu | f700-fujitsu) 158414c0a534Smrg os=-uxpv 158514c0a534Smrg ;; 158614c0a534Smrg *-rom68k) 158714c0a534Smrg os=-coff 158814c0a534Smrg ;; 158914c0a534Smrg *-*bug) 159014c0a534Smrg os=-coff 159114c0a534Smrg ;; 159214c0a534Smrg *-apple) 159314c0a534Smrg os=-macos 159414c0a534Smrg ;; 159514c0a534Smrg *-atari*) 159614c0a534Smrg os=-mint 159714c0a534Smrg ;; 159814c0a534Smrg *) 159914c0a534Smrg os=-none 160014c0a534Smrg ;; 160114c0a534Smrgesac 160214c0a534Smrgfi 160314c0a534Smrg 160414c0a534Smrg# Here we handle the case where we know the os, and the CPU type, but not the 160514c0a534Smrg# manufacturer. We pick the logical manufacturer. 160614c0a534Smrgvendor=unknown 160714c0a534Smrgcase $basic_machine in 160814c0a534Smrg *-unknown) 160914c0a534Smrg case $os in 161014c0a534Smrg -riscix*) 161114c0a534Smrg vendor=acorn 161214c0a534Smrg ;; 161314c0a534Smrg -sunos*) 161414c0a534Smrg vendor=sun 161514c0a534Smrg ;; 161614c0a534Smrg -aix*) 161714c0a534Smrg vendor=ibm 161814c0a534Smrg ;; 161914c0a534Smrg -beos*) 162014c0a534Smrg vendor=be 162114c0a534Smrg ;; 162214c0a534Smrg -hpux*) 162314c0a534Smrg vendor=hp 162414c0a534Smrg ;; 162514c0a534Smrg -mpeix*) 162614c0a534Smrg vendor=hp 162714c0a534Smrg ;; 162814c0a534Smrg -hiux*) 162914c0a534Smrg vendor=hitachi 163014c0a534Smrg ;; 163114c0a534Smrg -unos*) 163214c0a534Smrg vendor=crds 163314c0a534Smrg ;; 163414c0a534Smrg -dgux*) 163514c0a534Smrg vendor=dg 163614c0a534Smrg ;; 163714c0a534Smrg -luna*) 163814c0a534Smrg vendor=omron 163914c0a534Smrg ;; 164014c0a534Smrg -genix*) 164114c0a534Smrg vendor=ns 164214c0a534Smrg ;; 164314c0a534Smrg -mvs* | -opened*) 164414c0a534Smrg vendor=ibm 164514c0a534Smrg ;; 164614c0a534Smrg -os400*) 164714c0a534Smrg vendor=ibm 164814c0a534Smrg ;; 164914c0a534Smrg -ptx*) 165014c0a534Smrg vendor=sequent 165114c0a534Smrg ;; 165214c0a534Smrg -tpf*) 165314c0a534Smrg vendor=ibm 165414c0a534Smrg ;; 165514c0a534Smrg -vxsim* | -vxworks* | -windiss*) 165614c0a534Smrg vendor=wrs 165714c0a534Smrg ;; 165814c0a534Smrg -aux*) 165914c0a534Smrg vendor=apple 166014c0a534Smrg ;; 166114c0a534Smrg -hms*) 166214c0a534Smrg vendor=hitachi 166314c0a534Smrg ;; 166414c0a534Smrg -mpw* | -macos*) 166514c0a534Smrg vendor=apple 166614c0a534Smrg ;; 166714c0a534Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 166814c0a534Smrg vendor=atari 166914c0a534Smrg ;; 167014c0a534Smrg -vos*) 167114c0a534Smrg vendor=stratus 167214c0a534Smrg ;; 167314c0a534Smrg esac 167414c0a534Smrg basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 167514c0a534Smrg ;; 167614c0a534Smrgesac 167714c0a534Smrg 167814c0a534Smrgecho $basic_machine$os 167914c0a534Smrgexit 168014c0a534Smrg 168114c0a534Smrg# Local variables: 168214c0a534Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 168314c0a534Smrg# time-stamp-start: "timestamp='" 168414c0a534Smrg# time-stamp-format: "%:y-%02m-%02d" 168514c0a534Smrg# time-stamp-end: "'" 168614c0a534Smrg# End: 1687