config.sub revision 63847c39
176888252Smrg#! /bin/sh 276888252Smrg# Configuration validation subroutine script. 376888252Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 463847c39Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 563847c39Smrg# 2011, 2012 Free Software Foundation, Inc. 676888252Smrg 763847c39Smrgtimestamp='2012-02-10' 876888252Smrg 976888252Smrg# This file is (in principle) common to ALL GNU software. 1076888252Smrg# The presence of a machine in this file suggests that SOME GNU software 1176888252Smrg# can handle that machine. It does not imply ALL GNU software can. 1276888252Smrg# 1376888252Smrg# This file is free software; you can redistribute it and/or modify 1476888252Smrg# it under the terms of the GNU General Public License as published by 1576888252Smrg# the Free Software Foundation; either version 2 of the License, or 1676888252Smrg# (at your option) any later version. 1776888252Smrg# 1876888252Smrg# This program is distributed in the hope that it will be useful, 1976888252Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2076888252Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2176888252Smrg# GNU General Public License for more details. 2276888252Smrg# 2376888252Smrg# You should have received a copy of the GNU General Public License 2463847c39Smrg# along with this program; if not, see <http://www.gnu.org/licenses/>. 251ae1b5e8Smrg# 2676888252Smrg# As a special exception to the GNU General Public License, if you 2776888252Smrg# distribute this file as part of a program that contains a 2876888252Smrg# configuration script generated by Autoconf, you may include it under 2976888252Smrg# the same distribution terms that you use for the rest of that program. 3076888252Smrg 311ae1b5e8Smrg 3276888252Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 3363847c39Smrg# diff and a properly formatted GNU ChangeLog entry. 3476888252Smrg# 3576888252Smrg# Configuration subroutine to validate and canonicalize a configuration type. 3676888252Smrg# Supply the specified configuration type as an argument. 3776888252Smrg# If it is invalid, we print an error message on stderr and exit with code 1. 3876888252Smrg# Otherwise, we print the canonical config type on stdout and succeed. 3976888252Smrg 4063847c39Smrg# You can get the latest version of this script from: 4163847c39Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 4263847c39Smrg 4376888252Smrg# This file is supposed to be the same for all GNU packages 4476888252Smrg# and recognize all the CPU types, system types and aliases 4576888252Smrg# that are meaningful with *any* GNU software. 4676888252Smrg# Each package is responsible for reporting which valid configurations 4776888252Smrg# it does not support. The user should be able to distinguish 4876888252Smrg# a failure to support a valid configuration from a meaningless 4976888252Smrg# configuration. 5076888252Smrg 5176888252Smrg# The goal of this file is to map all the various variations of a given 5276888252Smrg# machine specification into a single specification in the form: 5376888252Smrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 5476888252Smrg# or in some cases, the newer four-part form: 5576888252Smrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 5676888252Smrg# It is wrong to echo any other type of specification. 5776888252Smrg 5876888252Smrgme=`echo "$0" | sed -e 's,.*/,,'` 5976888252Smrg 6076888252Smrgusage="\ 6176888252SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS 6276888252Smrg $0 [OPTION] ALIAS 6376888252Smrg 6476888252SmrgCanonicalize a configuration name. 6576888252Smrg 6676888252SmrgOperation modes: 6776888252Smrg -h, --help print this help, then exit 6876888252Smrg -t, --time-stamp print date of last modification, then exit 6976888252Smrg -v, --version print version number, then exit 7076888252Smrg 7176888252SmrgReport bugs and patches to <config-patches@gnu.org>." 7276888252Smrg 7376888252Smrgversion="\ 7476888252SmrgGNU config.sub ($timestamp) 7576888252Smrg 7663847c39SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 7763847c39Smrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 7863847c39SmrgFree Software Foundation, Inc. 7976888252Smrg 8076888252SmrgThis is free software; see the source for copying conditions. There is NO 8176888252Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 8276888252Smrg 8376888252Smrghelp=" 8476888252SmrgTry \`$me --help' for more information." 8576888252Smrg 8676888252Smrg# Parse command line 8776888252Smrgwhile test $# -gt 0 ; do 8876888252Smrg case $1 in 8976888252Smrg --time-stamp | --time* | -t ) 901ae1b5e8Smrg echo "$timestamp" ; exit ;; 9176888252Smrg --version | -v ) 921ae1b5e8Smrg echo "$version" ; exit ;; 9376888252Smrg --help | --h* | -h ) 941ae1b5e8Smrg echo "$usage"; exit ;; 9576888252Smrg -- ) # Stop option processing 9676888252Smrg shift; break ;; 9776888252Smrg - ) # Use stdin as input. 9876888252Smrg break ;; 9976888252Smrg -* ) 10076888252Smrg echo "$me: invalid option $1$help" 10176888252Smrg exit 1 ;; 10276888252Smrg 10376888252Smrg *local*) 10476888252Smrg # First pass through any local machine types. 10576888252Smrg echo $1 1061ae1b5e8Smrg exit ;; 10776888252Smrg 10876888252Smrg * ) 10976888252Smrg break ;; 11076888252Smrg esac 11176888252Smrgdone 11276888252Smrg 11376888252Smrgcase $# in 11476888252Smrg 0) echo "$me: missing argument$help" >&2 11576888252Smrg exit 1;; 11676888252Smrg 1) ;; 11776888252Smrg *) echo "$me: too many arguments$help" >&2 11876888252Smrg exit 1;; 11976888252Smrgesac 12076888252Smrg 12176888252Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 12276888252Smrg# Here we must recognize all the valid KERNEL-OS combinations. 12376888252Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 12476888252Smrgcase $maybe_os in 12563847c39Smrg nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 12663847c39Smrg linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 12763847c39Smrg knetbsd*-gnu* | netbsd*-gnu* | \ 12863847c39Smrg kopensolaris*-gnu* | \ 1291ae1b5e8Smrg storm-chaos* | os2-emx* | rtmk-nova*) 13076888252Smrg os=-$maybe_os 13176888252Smrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 13276888252Smrg ;; 13363847c39Smrg android-linux) 13463847c39Smrg os=-linux-android 13563847c39Smrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 13663847c39Smrg ;; 13776888252Smrg *) 13876888252Smrg basic_machine=`echo $1 | sed 's/-[^-]*$//'` 13976888252Smrg if [ $basic_machine != $1 ] 14076888252Smrg then os=`echo $1 | sed 's/.*-/-/'` 14176888252Smrg else os=; fi 14276888252Smrg ;; 14376888252Smrgesac 14476888252Smrg 14576888252Smrg### Let's recognize common machines as not being operating systems so 14676888252Smrg### that things like config.sub decstation-3100 work. We also 14776888252Smrg### recognize some manufacturers as not being operating systems, so we 14876888252Smrg### can provide default operating systems below. 14976888252Smrgcase $os in 15076888252Smrg -sun*os*) 15176888252Smrg # Prevent following clause from handling this invalid input. 15276888252Smrg ;; 15376888252Smrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 15476888252Smrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 15576888252Smrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 15676888252Smrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 15776888252Smrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 15876888252Smrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 15963847c39Smrg -apple | -axis | -knuth | -cray | -microblaze) 16076888252Smrg os= 16176888252Smrg basic_machine=$1 16276888252Smrg ;; 16363847c39Smrg -bluegene*) 16463847c39Smrg os=-cnk 16563847c39Smrg ;; 16676888252Smrg -sim | -cisco | -oki | -wec | -winbond) 16776888252Smrg os= 16876888252Smrg basic_machine=$1 16976888252Smrg ;; 17076888252Smrg -scout) 17176888252Smrg ;; 17276888252Smrg -wrs) 17376888252Smrg os=-vxworks 17476888252Smrg basic_machine=$1 17576888252Smrg ;; 17676888252Smrg -chorusos*) 17776888252Smrg os=-chorusos 17876888252Smrg basic_machine=$1 17976888252Smrg ;; 18063847c39Smrg -chorusrdb) 18163847c39Smrg os=-chorusrdb 18276888252Smrg basic_machine=$1 18363847c39Smrg ;; 18476888252Smrg -hiux*) 18576888252Smrg os=-hiuxwe2 18676888252Smrg ;; 1871ae1b5e8Smrg -sco6) 1881ae1b5e8Smrg os=-sco5v6 1891ae1b5e8Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1901ae1b5e8Smrg ;; 19176888252Smrg -sco5) 19276888252Smrg os=-sco3.2v5 19376888252Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19476888252Smrg ;; 19576888252Smrg -sco4) 19676888252Smrg os=-sco3.2v4 19776888252Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19876888252Smrg ;; 19976888252Smrg -sco3.2.[4-9]*) 20076888252Smrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 20176888252Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20276888252Smrg ;; 20376888252Smrg -sco3.2v[4-9]*) 20476888252Smrg # Don't forget version if it is 3.2v4 or newer. 20576888252Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20676888252Smrg ;; 2071ae1b5e8Smrg -sco5v6*) 2081ae1b5e8Smrg # Don't forget version if it is 3.2v4 or newer. 2091ae1b5e8Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2101ae1b5e8Smrg ;; 21176888252Smrg -sco*) 21276888252Smrg os=-sco3.2v2 21376888252Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21476888252Smrg ;; 21576888252Smrg -udk*) 21676888252Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21776888252Smrg ;; 21876888252Smrg -isc) 21976888252Smrg os=-isc2.2 22076888252Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 22176888252Smrg ;; 22276888252Smrg -clix*) 22376888252Smrg basic_machine=clipper-intergraph 22476888252Smrg ;; 22576888252Smrg -isc*) 22676888252Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 22776888252Smrg ;; 22876888252Smrg -lynx*) 22976888252Smrg os=-lynxos 23076888252Smrg ;; 23176888252Smrg -ptx*) 23276888252Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 23376888252Smrg ;; 23476888252Smrg -windowsnt*) 23576888252Smrg os=`echo $os | sed -e 's/windowsnt/winnt/'` 23676888252Smrg ;; 23776888252Smrg -psos*) 23876888252Smrg os=-psos 23976888252Smrg ;; 24076888252Smrg -mint | -mint[0-9]*) 24176888252Smrg basic_machine=m68k-atari 24276888252Smrg os=-mint 24376888252Smrg ;; 24476888252Smrgesac 24576888252Smrg 24676888252Smrg# Decode aliases for certain CPU-COMPANY combinations. 24776888252Smrgcase $basic_machine in 24876888252Smrg # Recognize the basic CPU types without company name. 24976888252Smrg # Some are omitted here because they have special meanings below. 25076888252Smrg 1750a | 580 \ 25176888252Smrg | a29k \ 25263847c39Smrg | aarch64 | aarch64_be \ 25376888252Smrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 25476888252Smrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 2551ae1b5e8Smrg | am33_2.0 \ 2561ae1b5e8Smrg | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 25763847c39Smrg | be32 | be64 \ 2581ae1b5e8Smrg | bfin \ 25976888252Smrg | c4x | clipper \ 26076888252Smrg | d10v | d30v | dlx | dsp16xx \ 26163847c39Smrg | epiphany \ 2621ae1b5e8Smrg | fido | fr30 | frv \ 26376888252Smrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 26463847c39Smrg | hexagon \ 26576888252Smrg | i370 | i860 | i960 | ia64 \ 2661ae1b5e8Smrg | ip2k | iq2000 \ 26763847c39Smrg | le32 | le64 \ 26863847c39Smrg | lm32 \ 2691ae1b5e8Smrg | m32c | m32r | m32rle | m68000 | m68k | m88k \ 27063847c39Smrg | maxq | mb | microblaze | mcore | mep | metag \ 27176888252Smrg | mips | mipsbe | mipseb | mipsel | mipsle \ 27276888252Smrg | mips16 \ 27376888252Smrg | mips64 | mips64el \ 27463847c39Smrg | mips64octeon | mips64octeonel \ 275d8556812Smrg | mips64orion | mips64orionel \ 27663847c39Smrg | mips64r5900 | mips64r5900el \ 27763847c39Smrg | mips64vr | mips64vrel \ 27876888252Smrg | mips64vr4100 | mips64vr4100el \ 27976888252Smrg | mips64vr4300 | mips64vr4300el \ 28076888252Smrg | mips64vr5000 | mips64vr5000el \ 2811ae1b5e8Smrg | mips64vr5900 | mips64vr5900el \ 28276888252Smrg | mipsisa32 | mipsisa32el \ 28376888252Smrg | mipsisa32r2 | mipsisa32r2el \ 28476888252Smrg | mipsisa64 | mipsisa64el \ 2851ae1b5e8Smrg | mipsisa64r2 | mipsisa64r2el \ 28676888252Smrg | mipsisa64sb1 | mipsisa64sb1el \ 28776888252Smrg | mipsisa64sr71k | mipsisa64sr71kel \ 28876888252Smrg | mipstx39 | mipstx39el \ 28976888252Smrg | mn10200 | mn10300 \ 29063847c39Smrg | moxie \ 2911ae1b5e8Smrg | mt \ 29276888252Smrg | msp430 \ 29363847c39Smrg | nds32 | nds32le | nds32be \ 2941ae1b5e8Smrg | nios | nios2 \ 29576888252Smrg | ns16k | ns32k \ 29663847c39Smrg | open8 \ 2971ae1b5e8Smrg | or32 \ 29876888252Smrg | pdp10 | pdp11 | pj | pjl \ 29963847c39Smrg | powerpc | powerpc64 | powerpc64le | powerpcle \ 30076888252Smrg | pyramid \ 30163847c39Smrg | rl78 | rx \ 3021ae1b5e8Smrg | score \ 30363847c39Smrg | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 30476888252Smrg | sh64 | sh64le \ 3051ae1b5e8Smrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 3061ae1b5e8Smrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 30763847c39Smrg | spu \ 30863847c39Smrg | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 30963847c39Smrg | ubicom32 \ 31063847c39Smrg | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 31176888252Smrg | we32k \ 31263847c39Smrg | x86 | xc16x | xstormy16 | xtensa \ 31363847c39Smrg | z8k | z80) 31476888252Smrg basic_machine=$basic_machine-unknown 31576888252Smrg ;; 31663847c39Smrg c54x) 31763847c39Smrg basic_machine=tic54x-unknown 31863847c39Smrg ;; 31963847c39Smrg c55x) 32063847c39Smrg basic_machine=tic55x-unknown 32163847c39Smrg ;; 32263847c39Smrg c6x) 32363847c39Smrg basic_machine=tic6x-unknown 32463847c39Smrg ;; 32563847c39Smrg m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) 32676888252Smrg basic_machine=$basic_machine-unknown 32776888252Smrg os=-none 32876888252Smrg ;; 32976888252Smrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 33076888252Smrg ;; 3311ae1b5e8Smrg ms1) 3321ae1b5e8Smrg basic_machine=mt-unknown 3331ae1b5e8Smrg ;; 33476888252Smrg 33563847c39Smrg strongarm | thumb | xscale) 33663847c39Smrg basic_machine=arm-unknown 33763847c39Smrg ;; 33863847c39Smrg xgate) 33963847c39Smrg basic_machine=$basic_machine-unknown 34063847c39Smrg os=-none 34163847c39Smrg ;; 34263847c39Smrg xscaleeb) 34363847c39Smrg basic_machine=armeb-unknown 34463847c39Smrg ;; 34563847c39Smrg 34663847c39Smrg xscaleel) 34763847c39Smrg basic_machine=armel-unknown 34863847c39Smrg ;; 34963847c39Smrg 35076888252Smrg # We use `pc' rather than `unknown' 35176888252Smrg # because (1) that's what they normally are, and 35276888252Smrg # (2) the word "unknown" tends to confuse beginning users. 35376888252Smrg i*86 | x86_64) 35476888252Smrg basic_machine=$basic_machine-pc 35576888252Smrg ;; 35676888252Smrg # Object if more than one company name word. 35776888252Smrg *-*-*) 35876888252Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 35976888252Smrg exit 1 36076888252Smrg ;; 36176888252Smrg # Recognize the basic CPU types with company name. 36276888252Smrg 580-* \ 36376888252Smrg | a29k-* \ 36463847c39Smrg | aarch64-* | aarch64_be-* \ 36576888252Smrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 36676888252Smrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 36776888252Smrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 36876888252Smrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 3691ae1b5e8Smrg | avr-* | avr32-* \ 37063847c39Smrg | be32-* | be64-* \ 3711ae1b5e8Smrg | bfin-* | bs2000-* \ 37263847c39Smrg | c[123]* | c30-* | [cjt]90-* | c4x-* \ 3731ae1b5e8Smrg | clipper-* | craynv-* | cydra-* \ 37476888252Smrg | d10v-* | d30v-* | dlx-* \ 37576888252Smrg | elxsi-* \ 3761ae1b5e8Smrg | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 37776888252Smrg | h8300-* | h8500-* \ 37876888252Smrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 37963847c39Smrg | hexagon-* \ 38076888252Smrg | i*86-* | i860-* | i960-* | ia64-* \ 3811ae1b5e8Smrg | ip2k-* | iq2000-* \ 38263847c39Smrg | le32-* | le64-* \ 38363847c39Smrg | lm32-* \ 3841ae1b5e8Smrg | m32c-* | m32r-* | m32rle-* \ 38576888252Smrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 38663847c39Smrg | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ 38776888252Smrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 38876888252Smrg | mips16-* \ 38976888252Smrg | mips64-* | mips64el-* \ 39063847c39Smrg | mips64octeon-* | mips64octeonel-* \ 391d8556812Smrg | mips64orion-* | mips64orionel-* \ 39263847c39Smrg | mips64r5900-* | mips64r5900el-* \ 39363847c39Smrg | mips64vr-* | mips64vrel-* \ 39476888252Smrg | mips64vr4100-* | mips64vr4100el-* \ 39576888252Smrg | mips64vr4300-* | mips64vr4300el-* \ 39676888252Smrg | mips64vr5000-* | mips64vr5000el-* \ 3971ae1b5e8Smrg | mips64vr5900-* | mips64vr5900el-* \ 39876888252Smrg | mipsisa32-* | mipsisa32el-* \ 39976888252Smrg | mipsisa32r2-* | mipsisa32r2el-* \ 40076888252Smrg | mipsisa64-* | mipsisa64el-* \ 4011ae1b5e8Smrg | mipsisa64r2-* | mipsisa64r2el-* \ 40276888252Smrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 40376888252Smrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 40476888252Smrg | mipstx39-* | mipstx39el-* \ 4051ae1b5e8Smrg | mmix-* \ 4061ae1b5e8Smrg | mt-* \ 40776888252Smrg | msp430-* \ 40863847c39Smrg | nds32-* | nds32le-* | nds32be-* \ 4091ae1b5e8Smrg | nios-* | nios2-* \ 4101ae1b5e8Smrg | none-* | np1-* | ns16k-* | ns32k-* \ 41163847c39Smrg | open8-* \ 41276888252Smrg | orion-* \ 41376888252Smrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 41463847c39Smrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 41576888252Smrg | pyramid-* \ 41663847c39Smrg | rl78-* | romp-* | rs6000-* | rx-* \ 41763847c39Smrg | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 41876888252Smrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 4191ae1b5e8Smrg | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 4201ae1b5e8Smrg | sparclite-* \ 42163847c39Smrg | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 42263847c39Smrg | tahoe-* \ 423d8556812Smrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 42463847c39Smrg | tile*-* \ 42576888252Smrg | tron-* \ 42663847c39Smrg | ubicom32-* \ 42763847c39Smrg | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 42863847c39Smrg | vax-* \ 42976888252Smrg | we32k-* \ 43063847c39Smrg | x86-* | x86_64-* | xc16x-* | xps100-* \ 4311ae1b5e8Smrg | xstormy16-* | xtensa*-* \ 43276888252Smrg | ymp-* \ 43363847c39Smrg | z8k-* | z80-*) 4341ae1b5e8Smrg ;; 4351ae1b5e8Smrg # Recognize the basic CPU types without company name, with glob match. 4361ae1b5e8Smrg xtensa*) 4371ae1b5e8Smrg basic_machine=$basic_machine-unknown 43876888252Smrg ;; 43976888252Smrg # Recognize the various machine names and aliases which stand 44076888252Smrg # for a CPU type and a company and sometimes even an OS. 44176888252Smrg 386bsd) 44276888252Smrg basic_machine=i386-unknown 44376888252Smrg os=-bsd 44476888252Smrg ;; 44576888252Smrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 44676888252Smrg basic_machine=m68000-att 44776888252Smrg ;; 44876888252Smrg 3b*) 44976888252Smrg basic_machine=we32k-att 45076888252Smrg ;; 45176888252Smrg a29khif) 45276888252Smrg basic_machine=a29k-amd 45376888252Smrg os=-udi 45476888252Smrg ;; 45563847c39Smrg abacus) 4561ae1b5e8Smrg basic_machine=abacus-unknown 4571ae1b5e8Smrg ;; 45876888252Smrg adobe68k) 45976888252Smrg basic_machine=m68010-adobe 46076888252Smrg os=-scout 46176888252Smrg ;; 46276888252Smrg alliant | fx80) 46376888252Smrg basic_machine=fx80-alliant 46476888252Smrg ;; 46576888252Smrg altos | altos3068) 46676888252Smrg basic_machine=m68k-altos 46776888252Smrg ;; 46876888252Smrg am29k) 46976888252Smrg basic_machine=a29k-none 47076888252Smrg os=-bsd 47176888252Smrg ;; 47276888252Smrg amd64) 47376888252Smrg basic_machine=x86_64-pc 47476888252Smrg ;; 4751ae1b5e8Smrg amd64-*) 4761ae1b5e8Smrg basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 4771ae1b5e8Smrg ;; 47876888252Smrg amdahl) 47976888252Smrg basic_machine=580-amdahl 48076888252Smrg os=-sysv 48176888252Smrg ;; 48276888252Smrg amiga | amiga-*) 48376888252Smrg basic_machine=m68k-unknown 48476888252Smrg ;; 48576888252Smrg amigaos | amigados) 48676888252Smrg basic_machine=m68k-unknown 48776888252Smrg os=-amigaos 48876888252Smrg ;; 48976888252Smrg amigaunix | amix) 49076888252Smrg basic_machine=m68k-unknown 49176888252Smrg os=-sysv4 49276888252Smrg ;; 49376888252Smrg apollo68) 49476888252Smrg basic_machine=m68k-apollo 49576888252Smrg os=-sysv 49676888252Smrg ;; 49776888252Smrg apollo68bsd) 49876888252Smrg basic_machine=m68k-apollo 49976888252Smrg os=-bsd 50076888252Smrg ;; 50163847c39Smrg aros) 50263847c39Smrg basic_machine=i386-pc 50363847c39Smrg os=-aros 50463847c39Smrg ;; 50576888252Smrg aux) 50676888252Smrg basic_machine=m68k-apple 50776888252Smrg os=-aux 50876888252Smrg ;; 50976888252Smrg balance) 51076888252Smrg basic_machine=ns32k-sequent 51176888252Smrg os=-dynix 51276888252Smrg ;; 5131ae1b5e8Smrg blackfin) 5141ae1b5e8Smrg basic_machine=bfin-unknown 5151ae1b5e8Smrg os=-linux 5161ae1b5e8Smrg ;; 5171ae1b5e8Smrg blackfin-*) 5181ae1b5e8Smrg basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 5191ae1b5e8Smrg os=-linux 5201ae1b5e8Smrg ;; 52163847c39Smrg bluegene*) 52263847c39Smrg basic_machine=powerpc-ibm 52363847c39Smrg os=-cnk 52463847c39Smrg ;; 52563847c39Smrg c54x-*) 52663847c39Smrg basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 52763847c39Smrg ;; 52863847c39Smrg c55x-*) 52963847c39Smrg basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 53063847c39Smrg ;; 53163847c39Smrg c6x-*) 53263847c39Smrg basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 53363847c39Smrg ;; 53476888252Smrg c90) 53576888252Smrg basic_machine=c90-cray 53676888252Smrg os=-unicos 53776888252Smrg ;; 53863847c39Smrg cegcc) 53963847c39Smrg basic_machine=arm-unknown 54063847c39Smrg os=-cegcc 54163847c39Smrg ;; 54276888252Smrg convex-c1) 54376888252Smrg basic_machine=c1-convex 54476888252Smrg os=-bsd 54576888252Smrg ;; 54676888252Smrg convex-c2) 54776888252Smrg basic_machine=c2-convex 54876888252Smrg os=-bsd 54976888252Smrg ;; 55076888252Smrg convex-c32) 55176888252Smrg basic_machine=c32-convex 55276888252Smrg os=-bsd 55376888252Smrg ;; 55476888252Smrg convex-c34) 55576888252Smrg basic_machine=c34-convex 55676888252Smrg os=-bsd 55776888252Smrg ;; 55876888252Smrg convex-c38) 55976888252Smrg basic_machine=c38-convex 56076888252Smrg os=-bsd 56176888252Smrg ;; 56276888252Smrg cray | j90) 56376888252Smrg basic_machine=j90-cray 56476888252Smrg os=-unicos 56576888252Smrg ;; 5661ae1b5e8Smrg craynv) 5671ae1b5e8Smrg basic_machine=craynv-cray 5681ae1b5e8Smrg os=-unicosmp 5691ae1b5e8Smrg ;; 57063847c39Smrg cr16 | cr16-*) 5711ae1b5e8Smrg basic_machine=cr16-unknown 5721ae1b5e8Smrg os=-elf 5731ae1b5e8Smrg ;; 57476888252Smrg crds | unos) 57576888252Smrg basic_machine=m68k-crds 57676888252Smrg ;; 5771ae1b5e8Smrg crisv32 | crisv32-* | etraxfs*) 5781ae1b5e8Smrg basic_machine=crisv32-axis 5791ae1b5e8Smrg ;; 58076888252Smrg cris | cris-* | etrax*) 58176888252Smrg basic_machine=cris-axis 58276888252Smrg ;; 5831ae1b5e8Smrg crx) 5841ae1b5e8Smrg basic_machine=crx-unknown 5851ae1b5e8Smrg os=-elf 5861ae1b5e8Smrg ;; 58776888252Smrg da30 | da30-*) 58876888252Smrg basic_machine=m68k-da30 58976888252Smrg ;; 59076888252Smrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 59176888252Smrg basic_machine=mips-dec 59276888252Smrg ;; 59376888252Smrg decsystem10* | dec10*) 59476888252Smrg basic_machine=pdp10-dec 59576888252Smrg os=-tops10 59676888252Smrg ;; 59776888252Smrg decsystem20* | dec20*) 59876888252Smrg basic_machine=pdp10-dec 59976888252Smrg os=-tops20 60076888252Smrg ;; 60176888252Smrg delta | 3300 | motorola-3300 | motorola-delta \ 60276888252Smrg | 3300-motorola | delta-motorola) 60376888252Smrg basic_machine=m68k-motorola 60476888252Smrg ;; 60576888252Smrg delta88) 60676888252Smrg basic_machine=m88k-motorola 60776888252Smrg os=-sysv3 60876888252Smrg ;; 60963847c39Smrg dicos) 61063847c39Smrg basic_machine=i686-pc 61163847c39Smrg os=-dicos 61263847c39Smrg ;; 6131ae1b5e8Smrg djgpp) 6141ae1b5e8Smrg basic_machine=i586-pc 6151ae1b5e8Smrg os=-msdosdjgpp 6161ae1b5e8Smrg ;; 61776888252Smrg dpx20 | dpx20-*) 61876888252Smrg basic_machine=rs6000-bull 61976888252Smrg os=-bosx 62076888252Smrg ;; 62176888252Smrg dpx2* | dpx2*-bull) 62276888252Smrg basic_machine=m68k-bull 62376888252Smrg os=-sysv3 62476888252Smrg ;; 62576888252Smrg ebmon29k) 62676888252Smrg basic_machine=a29k-amd 62776888252Smrg os=-ebmon 62876888252Smrg ;; 62976888252Smrg elxsi) 63076888252Smrg basic_machine=elxsi-elxsi 63176888252Smrg os=-bsd 63276888252Smrg ;; 63376888252Smrg encore | umax | mmax) 63476888252Smrg basic_machine=ns32k-encore 63576888252Smrg ;; 63676888252Smrg es1800 | OSE68k | ose68k | ose | OSE) 63776888252Smrg basic_machine=m68k-ericsson 63876888252Smrg os=-ose 63976888252Smrg ;; 64076888252Smrg fx2800) 64176888252Smrg basic_machine=i860-alliant 64276888252Smrg ;; 64376888252Smrg genix) 64476888252Smrg basic_machine=ns32k-ns 64576888252Smrg ;; 64676888252Smrg gmicro) 64776888252Smrg basic_machine=tron-gmicro 64876888252Smrg os=-sysv 64976888252Smrg ;; 65076888252Smrg go32) 65176888252Smrg basic_machine=i386-pc 65276888252Smrg os=-go32 65376888252Smrg ;; 65476888252Smrg h3050r* | hiux*) 65576888252Smrg basic_machine=hppa1.1-hitachi 65676888252Smrg os=-hiuxwe2 65776888252Smrg ;; 65876888252Smrg h8300hms) 65976888252Smrg basic_machine=h8300-hitachi 66076888252Smrg os=-hms 66176888252Smrg ;; 66276888252Smrg h8300xray) 66376888252Smrg basic_machine=h8300-hitachi 66476888252Smrg os=-xray 66576888252Smrg ;; 66676888252Smrg h8500hms) 66776888252Smrg basic_machine=h8500-hitachi 66876888252Smrg os=-hms 66976888252Smrg ;; 67076888252Smrg harris) 67176888252Smrg basic_machine=m88k-harris 67276888252Smrg os=-sysv3 67376888252Smrg ;; 67476888252Smrg hp300-*) 67576888252Smrg basic_machine=m68k-hp 67676888252Smrg ;; 67776888252Smrg hp300bsd) 67876888252Smrg basic_machine=m68k-hp 67976888252Smrg os=-bsd 68076888252Smrg ;; 68176888252Smrg hp300hpux) 68276888252Smrg basic_machine=m68k-hp 68376888252Smrg os=-hpux 68476888252Smrg ;; 68576888252Smrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 68676888252Smrg basic_machine=hppa1.0-hp 68776888252Smrg ;; 68876888252Smrg hp9k2[0-9][0-9] | hp9k31[0-9]) 68976888252Smrg basic_machine=m68000-hp 69076888252Smrg ;; 69176888252Smrg hp9k3[2-9][0-9]) 69276888252Smrg basic_machine=m68k-hp 69376888252Smrg ;; 69476888252Smrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 69576888252Smrg basic_machine=hppa1.0-hp 69676888252Smrg ;; 69776888252Smrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 69876888252Smrg basic_machine=hppa1.1-hp 69976888252Smrg ;; 70076888252Smrg hp9k78[0-9] | hp78[0-9]) 70176888252Smrg # FIXME: really hppa2.0-hp 70276888252Smrg basic_machine=hppa1.1-hp 70376888252Smrg ;; 70476888252Smrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 70576888252Smrg # FIXME: really hppa2.0-hp 70676888252Smrg basic_machine=hppa1.1-hp 70776888252Smrg ;; 70876888252Smrg hp9k8[0-9][13679] | hp8[0-9][13679]) 70976888252Smrg basic_machine=hppa1.1-hp 71076888252Smrg ;; 71176888252Smrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 71276888252Smrg basic_machine=hppa1.0-hp 71376888252Smrg ;; 71476888252Smrg hppa-next) 71576888252Smrg os=-nextstep3 71676888252Smrg ;; 71776888252Smrg hppaosf) 71876888252Smrg basic_machine=hppa1.1-hp 71976888252Smrg os=-osf 72076888252Smrg ;; 72176888252Smrg hppro) 72276888252Smrg basic_machine=hppa1.1-hp 72376888252Smrg os=-proelf 72476888252Smrg ;; 72576888252Smrg i370-ibm* | ibm*) 72676888252Smrg basic_machine=i370-ibm 72776888252Smrg ;; 72876888252Smrg i*86v32) 72976888252Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 73076888252Smrg os=-sysv32 73176888252Smrg ;; 73276888252Smrg i*86v4*) 73376888252Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 73476888252Smrg os=-sysv4 73576888252Smrg ;; 73676888252Smrg i*86v) 73776888252Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 73876888252Smrg os=-sysv 73976888252Smrg ;; 74076888252Smrg i*86sol2) 74176888252Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 74276888252Smrg os=-solaris2 74376888252Smrg ;; 74476888252Smrg i386mach) 74576888252Smrg basic_machine=i386-mach 74676888252Smrg os=-mach 74776888252Smrg ;; 74876888252Smrg i386-vsta | vsta) 74976888252Smrg basic_machine=i386-unknown 75076888252Smrg os=-vsta 75176888252Smrg ;; 75276888252Smrg iris | iris4d) 75376888252Smrg basic_machine=mips-sgi 75476888252Smrg case $os in 75576888252Smrg -irix*) 75676888252Smrg ;; 75776888252Smrg *) 75876888252Smrg os=-irix4 75976888252Smrg ;; 76076888252Smrg esac 76176888252Smrg ;; 76276888252Smrg isi68 | isi) 76376888252Smrg basic_machine=m68k-isi 76476888252Smrg os=-sysv 76576888252Smrg ;; 7661ae1b5e8Smrg m68knommu) 7671ae1b5e8Smrg basic_machine=m68k-unknown 7681ae1b5e8Smrg os=-linux 7691ae1b5e8Smrg ;; 7701ae1b5e8Smrg m68knommu-*) 7711ae1b5e8Smrg basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 7721ae1b5e8Smrg os=-linux 7731ae1b5e8Smrg ;; 77476888252Smrg m88k-omron*) 77576888252Smrg basic_machine=m88k-omron 77676888252Smrg ;; 77776888252Smrg magnum | m3230) 77876888252Smrg basic_machine=mips-mips 77976888252Smrg os=-sysv 78076888252Smrg ;; 78176888252Smrg merlin) 78276888252Smrg basic_machine=ns32k-utek 78376888252Smrg os=-sysv 78476888252Smrg ;; 78563847c39Smrg microblaze) 78663847c39Smrg basic_machine=microblaze-xilinx 78763847c39Smrg ;; 78876888252Smrg mingw32) 78976888252Smrg basic_machine=i386-pc 79076888252Smrg os=-mingw32 79176888252Smrg ;; 7921ae1b5e8Smrg mingw32ce) 7931ae1b5e8Smrg basic_machine=arm-unknown 7941ae1b5e8Smrg os=-mingw32ce 7951ae1b5e8Smrg ;; 79676888252Smrg miniframe) 79776888252Smrg basic_machine=m68000-convergent 79876888252Smrg ;; 79976888252Smrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 80076888252Smrg basic_machine=m68k-atari 80176888252Smrg os=-mint 80276888252Smrg ;; 80376888252Smrg mips3*-*) 80476888252Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 80576888252Smrg ;; 80676888252Smrg mips3*) 80776888252Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 80876888252Smrg ;; 80976888252Smrg monitor) 81076888252Smrg basic_machine=m68k-rom68k 81176888252Smrg os=-coff 81276888252Smrg ;; 81376888252Smrg morphos) 81476888252Smrg basic_machine=powerpc-unknown 81576888252Smrg os=-morphos 81676888252Smrg ;; 81776888252Smrg msdos) 81876888252Smrg basic_machine=i386-pc 81976888252Smrg os=-msdos 82076888252Smrg ;; 8211ae1b5e8Smrg ms1-*) 8221ae1b5e8Smrg basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 8231ae1b5e8Smrg ;; 82463847c39Smrg msys) 82563847c39Smrg basic_machine=i386-pc 82663847c39Smrg os=-msys 82763847c39Smrg ;; 82876888252Smrg mvs) 82976888252Smrg basic_machine=i370-ibm 83076888252Smrg os=-mvs 83176888252Smrg ;; 83263847c39Smrg nacl) 83363847c39Smrg basic_machine=le32-unknown 83463847c39Smrg os=-nacl 83563847c39Smrg ;; 83676888252Smrg ncr3000) 83776888252Smrg basic_machine=i486-ncr 83876888252Smrg os=-sysv4 83976888252Smrg ;; 84076888252Smrg netbsd386) 84176888252Smrg basic_machine=i386-unknown 84276888252Smrg os=-netbsd 84376888252Smrg ;; 84476888252Smrg netwinder) 84576888252Smrg basic_machine=armv4l-rebel 84676888252Smrg os=-linux 84776888252Smrg ;; 84876888252Smrg news | news700 | news800 | news900) 84976888252Smrg basic_machine=m68k-sony 85076888252Smrg os=-newsos 85176888252Smrg ;; 85276888252Smrg news1000) 85376888252Smrg basic_machine=m68030-sony 85476888252Smrg os=-newsos 85576888252Smrg ;; 85676888252Smrg news-3600 | risc-news) 85776888252Smrg basic_machine=mips-sony 85876888252Smrg os=-newsos 85976888252Smrg ;; 86076888252Smrg necv70) 86176888252Smrg basic_machine=v70-nec 86276888252Smrg os=-sysv 86376888252Smrg ;; 86476888252Smrg next | m*-next ) 86576888252Smrg basic_machine=m68k-next 86676888252Smrg case $os in 86776888252Smrg -nextstep* ) 86876888252Smrg ;; 86976888252Smrg -ns2*) 87076888252Smrg os=-nextstep2 87176888252Smrg ;; 87276888252Smrg *) 87376888252Smrg os=-nextstep3 87476888252Smrg ;; 87576888252Smrg esac 87676888252Smrg ;; 87776888252Smrg nh3000) 87876888252Smrg basic_machine=m68k-harris 87976888252Smrg os=-cxux 88076888252Smrg ;; 88176888252Smrg nh[45]000) 88276888252Smrg basic_machine=m88k-harris 88376888252Smrg os=-cxux 88476888252Smrg ;; 88576888252Smrg nindy960) 88676888252Smrg basic_machine=i960-intel 88776888252Smrg os=-nindy 88876888252Smrg ;; 88976888252Smrg mon960) 89076888252Smrg basic_machine=i960-intel 89176888252Smrg os=-mon960 89276888252Smrg ;; 89376888252Smrg nonstopux) 89476888252Smrg basic_machine=mips-compaq 89576888252Smrg os=-nonstopux 89676888252Smrg ;; 89776888252Smrg np1) 89876888252Smrg basic_machine=np1-gould 89976888252Smrg ;; 90063847c39Smrg neo-tandem) 90163847c39Smrg basic_machine=neo-tandem 90263847c39Smrg ;; 90363847c39Smrg nse-tandem) 90463847c39Smrg basic_machine=nse-tandem 90563847c39Smrg ;; 90676888252Smrg nsr-tandem) 90776888252Smrg basic_machine=nsr-tandem 90876888252Smrg ;; 90976888252Smrg op50n-* | op60c-*) 91076888252Smrg basic_machine=hppa1.1-oki 91176888252Smrg os=-proelf 91276888252Smrg ;; 9131ae1b5e8Smrg openrisc | openrisc-*) 91476888252Smrg basic_machine=or32-unknown 9151ae1b5e8Smrg ;; 9161ae1b5e8Smrg os400) 9171ae1b5e8Smrg basic_machine=powerpc-ibm 9181ae1b5e8Smrg os=-os400 91976888252Smrg ;; 92076888252Smrg OSE68000 | ose68000) 92176888252Smrg basic_machine=m68000-ericsson 92276888252Smrg os=-ose 92376888252Smrg ;; 92476888252Smrg os68k) 92576888252Smrg basic_machine=m68k-none 92676888252Smrg os=-os68k 92776888252Smrg ;; 92876888252Smrg pa-hitachi) 92976888252Smrg basic_machine=hppa1.1-hitachi 93076888252Smrg os=-hiuxwe2 93176888252Smrg ;; 93276888252Smrg paragon) 93376888252Smrg basic_machine=i860-intel 93476888252Smrg os=-osf 93576888252Smrg ;; 9361ae1b5e8Smrg parisc) 9371ae1b5e8Smrg basic_machine=hppa-unknown 9381ae1b5e8Smrg os=-linux 9391ae1b5e8Smrg ;; 9401ae1b5e8Smrg parisc-*) 9411ae1b5e8Smrg basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 9421ae1b5e8Smrg os=-linux 9431ae1b5e8Smrg ;; 94476888252Smrg pbd) 94576888252Smrg basic_machine=sparc-tti 94676888252Smrg ;; 94776888252Smrg pbb) 94876888252Smrg basic_machine=m68k-tti 94976888252Smrg ;; 95076888252Smrg pc532 | pc532-*) 95176888252Smrg basic_machine=ns32k-pc532 95276888252Smrg ;; 9531ae1b5e8Smrg pc98) 9541ae1b5e8Smrg basic_machine=i386-pc 9551ae1b5e8Smrg ;; 9561ae1b5e8Smrg pc98-*) 9571ae1b5e8Smrg basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 9581ae1b5e8Smrg ;; 95976888252Smrg pentium | p5 | k5 | k6 | nexgen | viac3) 96076888252Smrg basic_machine=i586-pc 96176888252Smrg ;; 96276888252Smrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 96376888252Smrg basic_machine=i686-pc 96476888252Smrg ;; 96576888252Smrg pentiumii | pentium2 | pentiumiii | pentium3) 96676888252Smrg basic_machine=i686-pc 96776888252Smrg ;; 96876888252Smrg pentium4) 96976888252Smrg basic_machine=i786-pc 97076888252Smrg ;; 97176888252Smrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 97276888252Smrg basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 97376888252Smrg ;; 97476888252Smrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 97576888252Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 97676888252Smrg ;; 97776888252Smrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 97876888252Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 97976888252Smrg ;; 98076888252Smrg pentium4-*) 98176888252Smrg basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 98276888252Smrg ;; 98376888252Smrg pn) 98476888252Smrg basic_machine=pn-gould 98576888252Smrg ;; 98676888252Smrg power) basic_machine=power-ibm 98776888252Smrg ;; 98863847c39Smrg ppc | ppcbe) basic_machine=powerpc-unknown 98976888252Smrg ;; 99063847c39Smrg ppc-* | ppcbe-*) 99163847c39Smrg basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 99276888252Smrg ;; 99376888252Smrg ppcle | powerpclittle | ppc-le | powerpc-little) 99476888252Smrg basic_machine=powerpcle-unknown 99576888252Smrg ;; 99676888252Smrg ppcle-* | powerpclittle-*) 99776888252Smrg basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 99876888252Smrg ;; 99976888252Smrg ppc64) basic_machine=powerpc64-unknown 100076888252Smrg ;; 100176888252Smrg ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 100276888252Smrg ;; 100376888252Smrg ppc64le | powerpc64little | ppc64-le | powerpc64-little) 100476888252Smrg basic_machine=powerpc64le-unknown 100576888252Smrg ;; 100676888252Smrg ppc64le-* | powerpc64little-*) 100776888252Smrg basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 100876888252Smrg ;; 100976888252Smrg ps2) 101076888252Smrg basic_machine=i386-ibm 101176888252Smrg ;; 101276888252Smrg pw32) 101376888252Smrg basic_machine=i586-unknown 101476888252Smrg os=-pw32 101576888252Smrg ;; 10161ae1b5e8Smrg rdos) 10171ae1b5e8Smrg basic_machine=i386-pc 10181ae1b5e8Smrg os=-rdos 10191ae1b5e8Smrg ;; 102076888252Smrg rom68k) 102176888252Smrg basic_machine=m68k-rom68k 102276888252Smrg os=-coff 102376888252Smrg ;; 102476888252Smrg rm[46]00) 102576888252Smrg basic_machine=mips-siemens 102676888252Smrg ;; 102776888252Smrg rtpc | rtpc-*) 102876888252Smrg basic_machine=romp-ibm 102976888252Smrg ;; 10301ae1b5e8Smrg s390 | s390-*) 10311ae1b5e8Smrg basic_machine=s390-ibm 10321ae1b5e8Smrg ;; 10331ae1b5e8Smrg s390x | s390x-*) 10341ae1b5e8Smrg basic_machine=s390x-ibm 10351ae1b5e8Smrg ;; 103676888252Smrg sa29200) 103776888252Smrg basic_machine=a29k-amd 103876888252Smrg os=-udi 103976888252Smrg ;; 104076888252Smrg sb1) 104176888252Smrg basic_machine=mipsisa64sb1-unknown 104276888252Smrg ;; 104376888252Smrg sb1el) 104476888252Smrg basic_machine=mipsisa64sb1el-unknown 104576888252Smrg ;; 10461ae1b5e8Smrg sde) 10471ae1b5e8Smrg basic_machine=mipsisa32-sde 10481ae1b5e8Smrg os=-elf 10491ae1b5e8Smrg ;; 105076888252Smrg sei) 105176888252Smrg basic_machine=mips-sei 105276888252Smrg os=-seiux 105376888252Smrg ;; 105476888252Smrg sequent) 105576888252Smrg basic_machine=i386-sequent 105676888252Smrg ;; 105776888252Smrg sh) 105876888252Smrg basic_machine=sh-hitachi 105976888252Smrg os=-hms 106076888252Smrg ;; 10611ae1b5e8Smrg sh5el) 10621ae1b5e8Smrg basic_machine=sh5le-unknown 10631ae1b5e8Smrg ;; 106476888252Smrg sh64) 106576888252Smrg basic_machine=sh64-unknown 106676888252Smrg ;; 106776888252Smrg sparclite-wrs | simso-wrs) 106876888252Smrg basic_machine=sparclite-wrs 106976888252Smrg os=-vxworks 107076888252Smrg ;; 107176888252Smrg sps7) 107276888252Smrg basic_machine=m68k-bull 107376888252Smrg os=-sysv2 107476888252Smrg ;; 107576888252Smrg spur) 107676888252Smrg basic_machine=spur-unknown 107776888252Smrg ;; 107876888252Smrg st2000) 107976888252Smrg basic_machine=m68k-tandem 108076888252Smrg ;; 108176888252Smrg stratus) 108276888252Smrg basic_machine=i860-stratus 108376888252Smrg os=-sysv4 108476888252Smrg ;; 108563847c39Smrg strongarm-* | thumb-*) 108663847c39Smrg basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` 108763847c39Smrg ;; 108876888252Smrg sun2) 108976888252Smrg basic_machine=m68000-sun 109076888252Smrg ;; 109176888252Smrg sun2os3) 109276888252Smrg basic_machine=m68000-sun 109376888252Smrg os=-sunos3 109476888252Smrg ;; 109576888252Smrg sun2os4) 109676888252Smrg basic_machine=m68000-sun 109776888252Smrg os=-sunos4 109876888252Smrg ;; 109976888252Smrg sun3os3) 110076888252Smrg basic_machine=m68k-sun 110176888252Smrg os=-sunos3 110276888252Smrg ;; 110376888252Smrg sun3os4) 110476888252Smrg basic_machine=m68k-sun 110576888252Smrg os=-sunos4 110676888252Smrg ;; 110776888252Smrg sun4os3) 110876888252Smrg basic_machine=sparc-sun 110976888252Smrg os=-sunos3 111076888252Smrg ;; 111176888252Smrg sun4os4) 111276888252Smrg basic_machine=sparc-sun 111376888252Smrg os=-sunos4 111476888252Smrg ;; 111576888252Smrg sun4sol2) 111676888252Smrg basic_machine=sparc-sun 111776888252Smrg os=-solaris2 111876888252Smrg ;; 111976888252Smrg sun3 | sun3-*) 112076888252Smrg basic_machine=m68k-sun 112176888252Smrg ;; 112276888252Smrg sun4) 112376888252Smrg basic_machine=sparc-sun 112476888252Smrg ;; 112576888252Smrg sun386 | sun386i | roadrunner) 112676888252Smrg basic_machine=i386-sun 112776888252Smrg ;; 112876888252Smrg sv1) 112976888252Smrg basic_machine=sv1-cray 113076888252Smrg os=-unicos 113176888252Smrg ;; 113276888252Smrg symmetry) 113376888252Smrg basic_machine=i386-sequent 113476888252Smrg os=-dynix 113576888252Smrg ;; 113676888252Smrg t3e) 113776888252Smrg basic_machine=alphaev5-cray 113876888252Smrg os=-unicos 113976888252Smrg ;; 114076888252Smrg t90) 114176888252Smrg basic_machine=t90-cray 114276888252Smrg os=-unicos 114376888252Smrg ;; 11441ae1b5e8Smrg tile*) 114563847c39Smrg basic_machine=$basic_machine-unknown 11461ae1b5e8Smrg os=-linux-gnu 11471ae1b5e8Smrg ;; 114876888252Smrg tx39) 114976888252Smrg basic_machine=mipstx39-unknown 115076888252Smrg ;; 115176888252Smrg tx39el) 115276888252Smrg basic_machine=mipstx39el-unknown 115376888252Smrg ;; 115476888252Smrg toad1) 115576888252Smrg basic_machine=pdp10-xkl 115676888252Smrg os=-tops20 115776888252Smrg ;; 115876888252Smrg tower | tower-32) 115976888252Smrg basic_machine=m68k-ncr 116076888252Smrg ;; 11611ae1b5e8Smrg tpf) 11621ae1b5e8Smrg basic_machine=s390x-ibm 11631ae1b5e8Smrg os=-tpf 11641ae1b5e8Smrg ;; 116576888252Smrg udi29k) 116676888252Smrg basic_machine=a29k-amd 116776888252Smrg os=-udi 116876888252Smrg ;; 116976888252Smrg ultra3) 117076888252Smrg basic_machine=a29k-nyu 117176888252Smrg os=-sym1 117276888252Smrg ;; 117376888252Smrg v810 | necv810) 117476888252Smrg basic_machine=v810-nec 117576888252Smrg os=-none 117676888252Smrg ;; 117776888252Smrg vaxv) 117876888252Smrg basic_machine=vax-dec 117976888252Smrg os=-sysv 118076888252Smrg ;; 118176888252Smrg vms) 118276888252Smrg basic_machine=vax-dec 118376888252Smrg os=-vms 118476888252Smrg ;; 118576888252Smrg vpp*|vx|vx-*) 118676888252Smrg basic_machine=f301-fujitsu 118776888252Smrg ;; 118876888252Smrg vxworks960) 118976888252Smrg basic_machine=i960-wrs 119076888252Smrg os=-vxworks 119176888252Smrg ;; 119276888252Smrg vxworks68) 119376888252Smrg basic_machine=m68k-wrs 119476888252Smrg os=-vxworks 119576888252Smrg ;; 119676888252Smrg vxworks29k) 119776888252Smrg basic_machine=a29k-wrs 119876888252Smrg os=-vxworks 119976888252Smrg ;; 120076888252Smrg w65*) 120176888252Smrg basic_machine=w65-wdc 120276888252Smrg os=-none 120376888252Smrg ;; 120476888252Smrg w89k-*) 120576888252Smrg basic_machine=hppa1.1-winbond 120676888252Smrg os=-proelf 120776888252Smrg ;; 12081ae1b5e8Smrg xbox) 12091ae1b5e8Smrg basic_machine=i686-pc 12101ae1b5e8Smrg os=-mingw32 12111ae1b5e8Smrg ;; 121276888252Smrg xps | xps100) 121376888252Smrg basic_machine=xps100-honeywell 121476888252Smrg ;; 121563847c39Smrg xscale-* | xscalee[bl]-*) 121663847c39Smrg basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` 121763847c39Smrg ;; 121876888252Smrg ymp) 121976888252Smrg basic_machine=ymp-cray 122076888252Smrg os=-unicos 122176888252Smrg ;; 122276888252Smrg z8k-*-coff) 122376888252Smrg basic_machine=z8k-unknown 122476888252Smrg os=-sim 122576888252Smrg ;; 122663847c39Smrg z80-*-coff) 122763847c39Smrg basic_machine=z80-unknown 122863847c39Smrg os=-sim 122963847c39Smrg ;; 123076888252Smrg none) 123176888252Smrg basic_machine=none-none 123276888252Smrg os=-none 123376888252Smrg ;; 123476888252Smrg 123576888252Smrg# Here we handle the default manufacturer of certain CPU types. It is in 123676888252Smrg# some cases the only manufacturer, in others, it is the most popular. 123776888252Smrg w89k) 123876888252Smrg basic_machine=hppa1.1-winbond 123976888252Smrg ;; 124076888252Smrg op50n) 124176888252Smrg basic_machine=hppa1.1-oki 124276888252Smrg ;; 124376888252Smrg op60c) 124476888252Smrg basic_machine=hppa1.1-oki 124576888252Smrg ;; 124676888252Smrg romp) 124776888252Smrg basic_machine=romp-ibm 124876888252Smrg ;; 12491ae1b5e8Smrg mmix) 12501ae1b5e8Smrg basic_machine=mmix-knuth 12511ae1b5e8Smrg ;; 125276888252Smrg rs6000) 125376888252Smrg basic_machine=rs6000-ibm 125476888252Smrg ;; 125576888252Smrg vax) 125676888252Smrg basic_machine=vax-dec 125776888252Smrg ;; 125876888252Smrg pdp10) 125976888252Smrg # there are many clones, so DEC is not a safe bet 126076888252Smrg basic_machine=pdp10-unknown 126176888252Smrg ;; 126276888252Smrg pdp11) 126376888252Smrg basic_machine=pdp11-dec 126476888252Smrg ;; 126576888252Smrg we32k) 126676888252Smrg basic_machine=we32k-att 126776888252Smrg ;; 126863847c39Smrg sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 126976888252Smrg basic_machine=sh-unknown 127076888252Smrg ;; 12711ae1b5e8Smrg sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 127276888252Smrg basic_machine=sparc-sun 127376888252Smrg ;; 127476888252Smrg cydra) 127576888252Smrg basic_machine=cydra-cydrome 127676888252Smrg ;; 127776888252Smrg orion) 127876888252Smrg basic_machine=orion-highlevel 127976888252Smrg ;; 128076888252Smrg orion105) 128176888252Smrg basic_machine=clipper-highlevel 128276888252Smrg ;; 128376888252Smrg mac | mpw | mac-mpw) 128476888252Smrg basic_machine=m68k-apple 128576888252Smrg ;; 128676888252Smrg pmac | pmac-mpw) 128776888252Smrg basic_machine=powerpc-apple 128876888252Smrg ;; 128976888252Smrg *-unknown) 129076888252Smrg # Make sure to match an already-canonicalized machine name. 129176888252Smrg ;; 129276888252Smrg *) 129376888252Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 129476888252Smrg exit 1 129576888252Smrg ;; 129676888252Smrgesac 129776888252Smrg 129876888252Smrg# Here we canonicalize certain aliases for manufacturers. 129976888252Smrgcase $basic_machine in 130076888252Smrg *-digital*) 130176888252Smrg basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 130276888252Smrg ;; 130376888252Smrg *-commodore*) 130476888252Smrg basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 130576888252Smrg ;; 130676888252Smrg *) 130776888252Smrg ;; 130876888252Smrgesac 130976888252Smrg 131076888252Smrg# Decode manufacturer-specific aliases for certain operating systems. 131176888252Smrg 131276888252Smrgif [ x"$os" != x"" ] 131376888252Smrgthen 131476888252Smrgcase $os in 131563847c39Smrg # First match some system type aliases 131663847c39Smrg # that might get confused with valid system types. 131776888252Smrg # -solaris* is a basic system type, with this one exception. 131863847c39Smrg -auroraux) 131963847c39Smrg os=-auroraux 132063847c39Smrg ;; 132176888252Smrg -solaris1 | -solaris1.*) 132276888252Smrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 132376888252Smrg ;; 132476888252Smrg -solaris) 132576888252Smrg os=-solaris2 132676888252Smrg ;; 132776888252Smrg -svr4*) 132876888252Smrg os=-sysv4 132976888252Smrg ;; 133076888252Smrg -unixware*) 133176888252Smrg os=-sysv4.2uw 133276888252Smrg ;; 133376888252Smrg -gnu/linux*) 133476888252Smrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 133576888252Smrg ;; 133676888252Smrg # First accept the basic system types. 133776888252Smrg # The portable systems comes first. 133876888252Smrg # Each alternative MUST END IN A *, to match a version number. 133976888252Smrg # -sysv* is not here because it comes later, after sysvr4. 134076888252Smrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 134163847c39Smrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 134263847c39Smrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 134363847c39Smrg | -sym* | -kopensolaris* \ 134476888252Smrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 134563847c39Smrg | -aos* | -aros* \ 134676888252Smrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 134776888252Smrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 13481ae1b5e8Smrg | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 13491ae1b5e8Smrg | -openbsd* | -solidbsd* \ 13501ae1b5e8Smrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 13511ae1b5e8Smrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 135276888252Smrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 135376888252Smrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 135463847c39Smrg | -chorusos* | -chorusrdb* | -cegcc* \ 135563847c39Smrg | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 135663847c39Smrg | -mingw32* | -linux-gnu* | -linux-android* \ 135763847c39Smrg | -linux-newlib* | -linux-uclibc* \ 13581ae1b5e8Smrg | -uxpv* | -beos* | -mpeix* | -udk* \ 135976888252Smrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 136076888252Smrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 136176888252Smrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 136276888252Smrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 136376888252Smrg | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 13641ae1b5e8Smrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 136563847c39Smrg | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 136676888252Smrg # Remember, each alternative MUST END IN *, to match a version number. 136776888252Smrg ;; 136876888252Smrg -qnx*) 136976888252Smrg case $basic_machine in 137076888252Smrg x86-* | i*86-*) 137176888252Smrg ;; 137276888252Smrg *) 137376888252Smrg os=-nto$os 137476888252Smrg ;; 137576888252Smrg esac 137676888252Smrg ;; 137776888252Smrg -nto-qnx*) 137876888252Smrg ;; 137976888252Smrg -nto*) 138076888252Smrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 138176888252Smrg ;; 138276888252Smrg -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 13831ae1b5e8Smrg | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 138476888252Smrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 138576888252Smrg ;; 138676888252Smrg -mac*) 138776888252Smrg os=`echo $os | sed -e 's|mac|macos|'` 138876888252Smrg ;; 13891ae1b5e8Smrg -linux-dietlibc) 13901ae1b5e8Smrg os=-linux-dietlibc 13911ae1b5e8Smrg ;; 139276888252Smrg -linux*) 139376888252Smrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 139476888252Smrg ;; 139576888252Smrg -sunos5*) 139676888252Smrg os=`echo $os | sed -e 's|sunos5|solaris2|'` 139776888252Smrg ;; 139876888252Smrg -sunos6*) 139976888252Smrg os=`echo $os | sed -e 's|sunos6|solaris3|'` 140076888252Smrg ;; 140176888252Smrg -opened*) 140276888252Smrg os=-openedition 140376888252Smrg ;; 140463847c39Smrg -os400*) 14051ae1b5e8Smrg os=-os400 14061ae1b5e8Smrg ;; 140776888252Smrg -wince*) 140876888252Smrg os=-wince 140976888252Smrg ;; 141076888252Smrg -osfrose*) 141176888252Smrg os=-osfrose 141276888252Smrg ;; 141376888252Smrg -osf*) 141476888252Smrg os=-osf 141576888252Smrg ;; 141676888252Smrg -utek*) 141776888252Smrg os=-bsd 141876888252Smrg ;; 141976888252Smrg -dynix*) 142076888252Smrg os=-bsd 142176888252Smrg ;; 142276888252Smrg -acis*) 142376888252Smrg os=-aos 142476888252Smrg ;; 142576888252Smrg -atheos*) 142676888252Smrg os=-atheos 142776888252Smrg ;; 14281ae1b5e8Smrg -syllable*) 14291ae1b5e8Smrg os=-syllable 14301ae1b5e8Smrg ;; 143176888252Smrg -386bsd) 143276888252Smrg os=-bsd 143376888252Smrg ;; 143476888252Smrg -ctix* | -uts*) 143576888252Smrg os=-sysv 143676888252Smrg ;; 143776888252Smrg -nova*) 143876888252Smrg os=-rtmk-nova 143976888252Smrg ;; 144076888252Smrg -ns2 ) 144176888252Smrg os=-nextstep2 144276888252Smrg ;; 144376888252Smrg -nsk*) 144476888252Smrg os=-nsk 144576888252Smrg ;; 144676888252Smrg # Preserve the version number of sinix5. 144776888252Smrg -sinix5.*) 144876888252Smrg os=`echo $os | sed -e 's|sinix|sysv|'` 144976888252Smrg ;; 145076888252Smrg -sinix*) 145176888252Smrg os=-sysv4 145276888252Smrg ;; 145363847c39Smrg -tpf*) 14541ae1b5e8Smrg os=-tpf 14551ae1b5e8Smrg ;; 145676888252Smrg -triton*) 145776888252Smrg os=-sysv3 145876888252Smrg ;; 145976888252Smrg -oss*) 146076888252Smrg os=-sysv3 146176888252Smrg ;; 146276888252Smrg -svr4) 146376888252Smrg os=-sysv4 146476888252Smrg ;; 146576888252Smrg -svr3) 146676888252Smrg os=-sysv3 146776888252Smrg ;; 146876888252Smrg -sysvr4) 146976888252Smrg os=-sysv4 147076888252Smrg ;; 147176888252Smrg # This must come after -sysvr4. 147276888252Smrg -sysv*) 147376888252Smrg ;; 147476888252Smrg -ose*) 147576888252Smrg os=-ose 147676888252Smrg ;; 147776888252Smrg -es1800*) 147876888252Smrg os=-ose 147976888252Smrg ;; 148076888252Smrg -xenix) 148176888252Smrg os=-xenix 148276888252Smrg ;; 148376888252Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 148476888252Smrg os=-mint 148576888252Smrg ;; 148676888252Smrg -aros*) 148776888252Smrg os=-aros 148876888252Smrg ;; 148976888252Smrg -kaos*) 149076888252Smrg os=-kaos 149176888252Smrg ;; 14921ae1b5e8Smrg -zvmoe) 14931ae1b5e8Smrg os=-zvmoe 14941ae1b5e8Smrg ;; 149563847c39Smrg -dicos*) 149663847c39Smrg os=-dicos 149763847c39Smrg ;; 149863847c39Smrg -nacl*) 149963847c39Smrg ;; 150076888252Smrg -none) 150176888252Smrg ;; 150276888252Smrg *) 150376888252Smrg # Get rid of the `-' at the beginning of $os. 150476888252Smrg os=`echo $os | sed 's/[^-]*-//'` 150576888252Smrg echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 150676888252Smrg exit 1 150776888252Smrg ;; 150876888252Smrgesac 150976888252Smrgelse 151076888252Smrg 151176888252Smrg# Here we handle the default operating systems that come with various machines. 151276888252Smrg# The value should be what the vendor currently ships out the door with their 151376888252Smrg# machine or put another way, the most popular os provided with the machine. 151476888252Smrg 151576888252Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 151676888252Smrg# "-sun"), then you have to tell the case statement up towards the top 151776888252Smrg# that MANUFACTURER isn't an operating system. Otherwise, code above 151876888252Smrg# will signal an error saying that MANUFACTURER isn't an operating 151976888252Smrg# system, and we'll never get to this point. 152076888252Smrg 152176888252Smrgcase $basic_machine in 152263847c39Smrg score-*) 15231ae1b5e8Smrg os=-elf 15241ae1b5e8Smrg ;; 152563847c39Smrg spu-*) 15261ae1b5e8Smrg os=-elf 15271ae1b5e8Smrg ;; 152876888252Smrg *-acorn) 152976888252Smrg os=-riscix1.2 153076888252Smrg ;; 153176888252Smrg arm*-rebel) 153276888252Smrg os=-linux 153376888252Smrg ;; 153476888252Smrg arm*-semi) 153576888252Smrg os=-aout 153676888252Smrg ;; 153763847c39Smrg c4x-* | tic4x-*) 153863847c39Smrg os=-coff 153963847c39Smrg ;; 154063847c39Smrg tic54x-*) 154163847c39Smrg os=-coff 154263847c39Smrg ;; 154363847c39Smrg tic55x-*) 154463847c39Smrg os=-coff 154563847c39Smrg ;; 154663847c39Smrg tic6x-*) 154763847c39Smrg os=-coff 154876888252Smrg ;; 154976888252Smrg # This must come before the *-dec entry. 155076888252Smrg pdp10-*) 155176888252Smrg os=-tops20 155276888252Smrg ;; 155376888252Smrg pdp11-*) 155476888252Smrg os=-none 155576888252Smrg ;; 155676888252Smrg *-dec | vax-*) 155776888252Smrg os=-ultrix4.2 155876888252Smrg ;; 155976888252Smrg m68*-apollo) 156076888252Smrg os=-domain 156176888252Smrg ;; 156276888252Smrg i386-sun) 156376888252Smrg os=-sunos4.0.2 156476888252Smrg ;; 156576888252Smrg m68000-sun) 156676888252Smrg os=-sunos3 156776888252Smrg ;; 156876888252Smrg m68*-cisco) 156976888252Smrg os=-aout 157076888252Smrg ;; 157163847c39Smrg mep-*) 15721ae1b5e8Smrg os=-elf 15731ae1b5e8Smrg ;; 157476888252Smrg mips*-cisco) 157576888252Smrg os=-elf 157676888252Smrg ;; 157776888252Smrg mips*-*) 157876888252Smrg os=-elf 157976888252Smrg ;; 158076888252Smrg or32-*) 158176888252Smrg os=-coff 158276888252Smrg ;; 158376888252Smrg *-tti) # must be before sparc entry or we get the wrong os. 158476888252Smrg os=-sysv3 158576888252Smrg ;; 158676888252Smrg sparc-* | *-sun) 158776888252Smrg os=-sunos4.1.1 158876888252Smrg ;; 158976888252Smrg *-be) 159076888252Smrg os=-beos 159176888252Smrg ;; 15921ae1b5e8Smrg *-haiku) 15931ae1b5e8Smrg os=-haiku 15941ae1b5e8Smrg ;; 159576888252Smrg *-ibm) 159676888252Smrg os=-aix 159776888252Smrg ;; 159863847c39Smrg *-knuth) 15991ae1b5e8Smrg os=-mmixware 16001ae1b5e8Smrg ;; 160176888252Smrg *-wec) 160276888252Smrg os=-proelf 160376888252Smrg ;; 160476888252Smrg *-winbond) 160576888252Smrg os=-proelf 160676888252Smrg ;; 160776888252Smrg *-oki) 160876888252Smrg os=-proelf 160976888252Smrg ;; 161076888252Smrg *-hp) 161176888252Smrg os=-hpux 161276888252Smrg ;; 161376888252Smrg *-hitachi) 161476888252Smrg os=-hiux 161576888252Smrg ;; 161676888252Smrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 161776888252Smrg os=-sysv 161876888252Smrg ;; 161976888252Smrg *-cbm) 162076888252Smrg os=-amigaos 162176888252Smrg ;; 162276888252Smrg *-dg) 162376888252Smrg os=-dgux 162476888252Smrg ;; 162576888252Smrg *-dolphin) 162676888252Smrg os=-sysv3 162776888252Smrg ;; 162876888252Smrg m68k-ccur) 162976888252Smrg os=-rtu 163076888252Smrg ;; 163176888252Smrg m88k-omron*) 163276888252Smrg os=-luna 163376888252Smrg ;; 163476888252Smrg *-next ) 163576888252Smrg os=-nextstep 163676888252Smrg ;; 163776888252Smrg *-sequent) 163876888252Smrg os=-ptx 163976888252Smrg ;; 164076888252Smrg *-crds) 164176888252Smrg os=-unos 164276888252Smrg ;; 164376888252Smrg *-ns) 164476888252Smrg os=-genix 164576888252Smrg ;; 164676888252Smrg i370-*) 164776888252Smrg os=-mvs 164876888252Smrg ;; 164976888252Smrg *-next) 165076888252Smrg os=-nextstep3 165176888252Smrg ;; 165276888252Smrg *-gould) 165376888252Smrg os=-sysv 165476888252Smrg ;; 165576888252Smrg *-highlevel) 165676888252Smrg os=-bsd 165776888252Smrg ;; 165876888252Smrg *-encore) 165976888252Smrg os=-bsd 166076888252Smrg ;; 166176888252Smrg *-sgi) 166276888252Smrg os=-irix 166376888252Smrg ;; 166476888252Smrg *-siemens) 166576888252Smrg os=-sysv4 166676888252Smrg ;; 166776888252Smrg *-masscomp) 166876888252Smrg os=-rtu 166976888252Smrg ;; 167076888252Smrg f30[01]-fujitsu | f700-fujitsu) 167176888252Smrg os=-uxpv 167276888252Smrg ;; 167376888252Smrg *-rom68k) 167476888252Smrg os=-coff 167576888252Smrg ;; 167676888252Smrg *-*bug) 167776888252Smrg os=-coff 167876888252Smrg ;; 167976888252Smrg *-apple) 168076888252Smrg os=-macos 168176888252Smrg ;; 168276888252Smrg *-atari*) 168376888252Smrg os=-mint 168476888252Smrg ;; 168576888252Smrg *) 168676888252Smrg os=-none 168776888252Smrg ;; 168876888252Smrgesac 168976888252Smrgfi 169076888252Smrg 169176888252Smrg# Here we handle the case where we know the os, and the CPU type, but not the 169276888252Smrg# manufacturer. We pick the logical manufacturer. 169376888252Smrgvendor=unknown 169476888252Smrgcase $basic_machine in 169576888252Smrg *-unknown) 169676888252Smrg case $os in 169776888252Smrg -riscix*) 169876888252Smrg vendor=acorn 169976888252Smrg ;; 170076888252Smrg -sunos*) 170176888252Smrg vendor=sun 170276888252Smrg ;; 170363847c39Smrg -cnk*|-aix*) 170476888252Smrg vendor=ibm 170576888252Smrg ;; 170676888252Smrg -beos*) 170776888252Smrg vendor=be 170876888252Smrg ;; 170976888252Smrg -hpux*) 171076888252Smrg vendor=hp 171176888252Smrg ;; 171276888252Smrg -mpeix*) 171376888252Smrg vendor=hp 171476888252Smrg ;; 171576888252Smrg -hiux*) 171676888252Smrg vendor=hitachi 171776888252Smrg ;; 171876888252Smrg -unos*) 171976888252Smrg vendor=crds 172076888252Smrg ;; 172176888252Smrg -dgux*) 172276888252Smrg vendor=dg 172376888252Smrg ;; 172476888252Smrg -luna*) 172576888252Smrg vendor=omron 172676888252Smrg ;; 172776888252Smrg -genix*) 172876888252Smrg vendor=ns 172976888252Smrg ;; 173076888252Smrg -mvs* | -opened*) 173176888252Smrg vendor=ibm 173276888252Smrg ;; 17331ae1b5e8Smrg -os400*) 17341ae1b5e8Smrg vendor=ibm 17351ae1b5e8Smrg ;; 173676888252Smrg -ptx*) 173776888252Smrg vendor=sequent 173876888252Smrg ;; 17391ae1b5e8Smrg -tpf*) 17401ae1b5e8Smrg vendor=ibm 17411ae1b5e8Smrg ;; 174276888252Smrg -vxsim* | -vxworks* | -windiss*) 174376888252Smrg vendor=wrs 174476888252Smrg ;; 174576888252Smrg -aux*) 174676888252Smrg vendor=apple 174776888252Smrg ;; 174876888252Smrg -hms*) 174976888252Smrg vendor=hitachi 175076888252Smrg ;; 175176888252Smrg -mpw* | -macos*) 175276888252Smrg vendor=apple 175376888252Smrg ;; 175476888252Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 175576888252Smrg vendor=atari 175676888252Smrg ;; 175776888252Smrg -vos*) 175876888252Smrg vendor=stratus 175976888252Smrg ;; 176076888252Smrg esac 176176888252Smrg basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 176276888252Smrg ;; 176376888252Smrgesac 176476888252Smrg 176576888252Smrgecho $basic_machine$os 17661ae1b5e8Smrgexit 176776888252Smrg 176876888252Smrg# Local variables: 176976888252Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 177076888252Smrg# time-stamp-start: "timestamp='" 177176888252Smrg# time-stamp-format: "%:y-%02m-%02d" 177276888252Smrg# time-stamp-end: "'" 177376888252Smrg# End: 1774