config.sub revision f66e55a2
129459361Smrg#! /bin/sh 229459361Smrg# Configuration validation subroutine script. 3f66e55a2Smrg# Copyright 1992-2013 Free Software Foundation, Inc. 429459361Smrg 5f66e55a2Smrgtimestamp='2013-04-24' 629459361Smrg 7f66e55a2Smrg# This file is free software; you can redistribute it and/or modify it 8f66e55a2Smrg# under the terms of the GNU General Public License as published by 9f66e55a2Smrg# the Free Software Foundation; either version 3 of the License, or 1029459361Smrg# (at your option) any later version. 1129459361Smrg# 12f66e55a2Smrg# This program is distributed in the hope that it will be useful, but 13f66e55a2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 14f66e55a2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15f66e55a2Smrg# General Public License for more details. 1629459361Smrg# 1729459361Smrg# You should have received a copy of the GNU General Public License 18f66e55a2Smrg# along with this program; if not, see <http://www.gnu.org/licenses/>. 1929459361Smrg# 2029459361Smrg# As a special exception to the GNU General Public License, if you 2129459361Smrg# distribute this file as part of a program that contains a 2229459361Smrg# configuration script generated by Autoconf, you may include it under 23f66e55a2Smrg# the same distribution terms that you use for the rest of that 24f66e55a2Smrg# program. This Exception is an additional permission under section 7 25f66e55a2Smrg# of the GNU General Public License, version 3 ("GPLv3"). 2629459361Smrg 2729459361Smrg 28f66e55a2Smrg# Please send patches with a ChangeLog entry to config-patches@gnu.org. 2929459361Smrg# 3029459361Smrg# Configuration subroutine to validate and canonicalize a configuration type. 3129459361Smrg# Supply the specified configuration type as an argument. 3229459361Smrg# If it is invalid, we print an error message on stderr and exit with code 1. 3329459361Smrg# Otherwise, we print the canonical config type on stdout and succeed. 3429459361Smrg 35c3c9b392Smrg# You can get the latest version of this script from: 36c3c9b392Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 37c3c9b392Smrg 3829459361Smrg# This file is supposed to be the same for all GNU packages 3929459361Smrg# and recognize all the CPU types, system types and aliases 4029459361Smrg# that are meaningful with *any* GNU software. 4129459361Smrg# Each package is responsible for reporting which valid configurations 4229459361Smrg# it does not support. The user should be able to distinguish 4329459361Smrg# a failure to support a valid configuration from a meaningless 4429459361Smrg# configuration. 4529459361Smrg 4629459361Smrg# The goal of this file is to map all the various variations of a given 4729459361Smrg# machine specification into a single specification in the form: 4829459361Smrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 4929459361Smrg# or in some cases, the newer four-part form: 5029459361Smrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 5129459361Smrg# It is wrong to echo any other type of specification. 5229459361Smrg 5329459361Smrgme=`echo "$0" | sed -e 's,.*/,,'` 5429459361Smrg 5529459361Smrgusage="\ 5629459361SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS 5729459361Smrg $0 [OPTION] ALIAS 5829459361Smrg 5929459361SmrgCanonicalize a configuration name. 6029459361Smrg 6129459361SmrgOperation modes: 6229459361Smrg -h, --help print this help, then exit 6329459361Smrg -t, --time-stamp print date of last modification, then exit 6429459361Smrg -v, --version print version number, then exit 6529459361Smrg 6629459361SmrgReport bugs and patches to <config-patches@gnu.org>." 6729459361Smrg 6829459361Smrgversion="\ 6929459361SmrgGNU config.sub ($timestamp) 7029459361Smrg 71f66e55a2SmrgCopyright 1992-2013 Free Software Foundation, Inc. 7229459361Smrg 7329459361SmrgThis is free software; see the source for copying conditions. There is NO 7429459361Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 7529459361Smrg 7629459361Smrghelp=" 7729459361SmrgTry \`$me --help' for more information." 7829459361Smrg 7929459361Smrg# Parse command line 8029459361Smrgwhile test $# -gt 0 ; do 8129459361Smrg case $1 in 8229459361Smrg --time-stamp | --time* | -t ) 8329459361Smrg echo "$timestamp" ; exit ;; 8429459361Smrg --version | -v ) 8529459361Smrg echo "$version" ; exit ;; 8629459361Smrg --help | --h* | -h ) 8729459361Smrg echo "$usage"; exit ;; 8829459361Smrg -- ) # Stop option processing 8929459361Smrg shift; break ;; 9029459361Smrg - ) # Use stdin as input. 9129459361Smrg break ;; 9229459361Smrg -* ) 9329459361Smrg echo "$me: invalid option $1$help" 9429459361Smrg exit 1 ;; 9529459361Smrg 9629459361Smrg *local*) 9729459361Smrg # First pass through any local machine types. 9829459361Smrg echo $1 9929459361Smrg exit ;; 10029459361Smrg 10129459361Smrg * ) 10229459361Smrg break ;; 10329459361Smrg esac 10429459361Smrgdone 10529459361Smrg 10629459361Smrgcase $# in 10729459361Smrg 0) echo "$me: missing argument$help" >&2 10829459361Smrg exit 1;; 10929459361Smrg 1) ;; 11029459361Smrg *) echo "$me: too many arguments$help" >&2 11129459361Smrg exit 1;; 11229459361Smrgesac 11329459361Smrg 11429459361Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 11529459361Smrg# Here we must recognize all the valid KERNEL-OS combinations. 11629459361Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 11729459361Smrgcase $maybe_os in 118c3c9b392Smrg nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 119f66e55a2Smrg linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 120c3c9b392Smrg knetbsd*-gnu* | netbsd*-gnu* | \ 1215715adc0Smrg kopensolaris*-gnu* | \ 12229459361Smrg storm-chaos* | os2-emx* | rtmk-nova*) 12329459361Smrg os=-$maybe_os 12429459361Smrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 12529459361Smrg ;; 126f66e55a2Smrg android-linux) 127f66e55a2Smrg os=-linux-android 128f66e55a2Smrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 129f66e55a2Smrg ;; 13029459361Smrg *) 13129459361Smrg basic_machine=`echo $1 | sed 's/-[^-]*$//'` 13229459361Smrg if [ $basic_machine != $1 ] 13329459361Smrg then os=`echo $1 | sed 's/.*-/-/'` 13429459361Smrg else os=; fi 13529459361Smrg ;; 13629459361Smrgesac 13729459361Smrg 13829459361Smrg### Let's recognize common machines as not being operating systems so 13929459361Smrg### that things like config.sub decstation-3100 work. We also 14029459361Smrg### recognize some manufacturers as not being operating systems, so we 14129459361Smrg### can provide default operating systems below. 14229459361Smrgcase $os in 14329459361Smrg -sun*os*) 14429459361Smrg # Prevent following clause from handling this invalid input. 14529459361Smrg ;; 14629459361Smrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 14729459361Smrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 14829459361Smrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 14929459361Smrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 15029459361Smrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 15129459361Smrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 152f66e55a2Smrg -apple | -axis | -knuth | -cray | -microblaze*) 15329459361Smrg os= 15429459361Smrg basic_machine=$1 15529459361Smrg ;; 156f66e55a2Smrg -bluegene*) 157f66e55a2Smrg os=-cnk 158c3c9b392Smrg ;; 15929459361Smrg -sim | -cisco | -oki | -wec | -winbond) 16029459361Smrg os= 16129459361Smrg basic_machine=$1 16229459361Smrg ;; 16329459361Smrg -scout) 16429459361Smrg ;; 16529459361Smrg -wrs) 16629459361Smrg os=-vxworks 16729459361Smrg basic_machine=$1 16829459361Smrg ;; 16929459361Smrg -chorusos*) 17029459361Smrg os=-chorusos 17129459361Smrg basic_machine=$1 17229459361Smrg ;; 173f66e55a2Smrg -chorusrdb) 174f66e55a2Smrg os=-chorusrdb 17529459361Smrg basic_machine=$1 176f66e55a2Smrg ;; 17729459361Smrg -hiux*) 17829459361Smrg os=-hiuxwe2 17929459361Smrg ;; 18029459361Smrg -sco6) 18129459361Smrg os=-sco5v6 18229459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 18329459361Smrg ;; 18429459361Smrg -sco5) 18529459361Smrg os=-sco3.2v5 18629459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 18729459361Smrg ;; 18829459361Smrg -sco4) 18929459361Smrg os=-sco3.2v4 19029459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19129459361Smrg ;; 19229459361Smrg -sco3.2.[4-9]*) 19329459361Smrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 19429459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19529459361Smrg ;; 19629459361Smrg -sco3.2v[4-9]*) 19729459361Smrg # Don't forget version if it is 3.2v4 or newer. 19829459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19929459361Smrg ;; 20029459361Smrg -sco5v6*) 20129459361Smrg # Don't forget version if it is 3.2v4 or newer. 20229459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20329459361Smrg ;; 20429459361Smrg -sco*) 20529459361Smrg os=-sco3.2v2 20629459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20729459361Smrg ;; 20829459361Smrg -udk*) 20929459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21029459361Smrg ;; 21129459361Smrg -isc) 21229459361Smrg os=-isc2.2 21329459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21429459361Smrg ;; 21529459361Smrg -clix*) 21629459361Smrg basic_machine=clipper-intergraph 21729459361Smrg ;; 21829459361Smrg -isc*) 21929459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 22029459361Smrg ;; 221f66e55a2Smrg -lynx*178) 222f66e55a2Smrg os=-lynxos178 223f66e55a2Smrg ;; 224f66e55a2Smrg -lynx*5) 225f66e55a2Smrg os=-lynxos5 226f66e55a2Smrg ;; 22729459361Smrg -lynx*) 22829459361Smrg os=-lynxos 22929459361Smrg ;; 23029459361Smrg -ptx*) 23129459361Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 23229459361Smrg ;; 23329459361Smrg -windowsnt*) 23429459361Smrg os=`echo $os | sed -e 's/windowsnt/winnt/'` 23529459361Smrg ;; 23629459361Smrg -psos*) 23729459361Smrg os=-psos 23829459361Smrg ;; 23929459361Smrg -mint | -mint[0-9]*) 24029459361Smrg basic_machine=m68k-atari 24129459361Smrg os=-mint 24229459361Smrg ;; 24329459361Smrgesac 24429459361Smrg 24529459361Smrg# Decode aliases for certain CPU-COMPANY combinations. 24629459361Smrgcase $basic_machine in 24729459361Smrg # Recognize the basic CPU types without company name. 24829459361Smrg # Some are omitted here because they have special meanings below. 24929459361Smrg 1750a | 580 \ 25029459361Smrg | a29k \ 251f66e55a2Smrg | aarch64 | aarch64_be \ 25229459361Smrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 25329459361Smrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 25429459361Smrg | am33_2.0 \ 255f66e55a2Smrg | arc | arceb \ 256f66e55a2Smrg | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 257f66e55a2Smrg | avr | avr32 \ 258f66e55a2Smrg | be32 | be64 \ 25929459361Smrg | bfin \ 26029459361Smrg | c4x | clipper \ 26129459361Smrg | d10v | d30v | dlx | dsp16xx \ 262f66e55a2Smrg | epiphany \ 26329459361Smrg | fido | fr30 | frv \ 26429459361Smrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 265f66e55a2Smrg | hexagon \ 26629459361Smrg | i370 | i860 | i960 | ia64 \ 26729459361Smrg | ip2k | iq2000 \ 268f66e55a2Smrg | le32 | le64 \ 2695715adc0Smrg | lm32 \ 27029459361Smrg | m32c | m32r | m32rle | m68000 | m68k | m88k \ 271f66e55a2Smrg | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 27229459361Smrg | mips | mipsbe | mipseb | mipsel | mipsle \ 27329459361Smrg | mips16 \ 27429459361Smrg | mips64 | mips64el \ 2755715adc0Smrg | mips64octeon | mips64octeonel \ 27629459361Smrg | mips64orion | mips64orionel \ 2775715adc0Smrg | mips64r5900 | mips64r5900el \ 2785715adc0Smrg | mips64vr | mips64vrel \ 27929459361Smrg | mips64vr4100 | mips64vr4100el \ 28029459361Smrg | mips64vr4300 | mips64vr4300el \ 28129459361Smrg | mips64vr5000 | mips64vr5000el \ 28229459361Smrg | mips64vr5900 | mips64vr5900el \ 28329459361Smrg | mipsisa32 | mipsisa32el \ 28429459361Smrg | mipsisa32r2 | mipsisa32r2el \ 28529459361Smrg | mipsisa64 | mipsisa64el \ 28629459361Smrg | mipsisa64r2 | mipsisa64r2el \ 28729459361Smrg | mipsisa64sb1 | mipsisa64sb1el \ 28829459361Smrg | mipsisa64sr71k | mipsisa64sr71kel \ 289f66e55a2Smrg | mipsr5900 | mipsr5900el \ 29029459361Smrg | mipstx39 | mipstx39el \ 29129459361Smrg | mn10200 | mn10300 \ 2925715adc0Smrg | moxie \ 29329459361Smrg | mt \ 29429459361Smrg | msp430 \ 295c3c9b392Smrg | nds32 | nds32le | nds32be \ 296f66e55a2Smrg | nios | nios2 | nios2eb | nios2el \ 29729459361Smrg | ns16k | ns32k \ 298f66e55a2Smrg | open8 \ 299f66e55a2Smrg | or1k | or32 \ 30029459361Smrg | pdp10 | pdp11 | pj | pjl \ 301f66e55a2Smrg | powerpc | powerpc64 | powerpc64le | powerpcle \ 30229459361Smrg | pyramid \ 303f66e55a2Smrg | rl78 | rx \ 30429459361Smrg | score \ 3055715adc0Smrg | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 30629459361Smrg | sh64 | sh64le \ 30729459361Smrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 30829459361Smrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 309f66e55a2Smrg | spu \ 310f66e55a2Smrg | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 311c3c9b392Smrg | ubicom32 \ 312f66e55a2Smrg | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 31329459361Smrg | we32k \ 314f66e55a2Smrg | x86 | xc16x | xstormy16 | xtensa \ 3155715adc0Smrg | z8k | z80) 31629459361Smrg basic_machine=$basic_machine-unknown 31729459361Smrg ;; 318c3c9b392Smrg c54x) 319c3c9b392Smrg basic_machine=tic54x-unknown 320c3c9b392Smrg ;; 321c3c9b392Smrg c55x) 322c3c9b392Smrg basic_machine=tic55x-unknown 323c3c9b392Smrg ;; 324c3c9b392Smrg c6x) 325c3c9b392Smrg basic_machine=tic6x-unknown 326c3c9b392Smrg ;; 327f66e55a2Smrg m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) 32829459361Smrg basic_machine=$basic_machine-unknown 32929459361Smrg os=-none 33029459361Smrg ;; 33129459361Smrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 33229459361Smrg ;; 33329459361Smrg ms1) 33429459361Smrg basic_machine=mt-unknown 33529459361Smrg ;; 33629459361Smrg 337f66e55a2Smrg strongarm | thumb | xscale) 338f66e55a2Smrg basic_machine=arm-unknown 339f66e55a2Smrg ;; 340f66e55a2Smrg xgate) 341f66e55a2Smrg basic_machine=$basic_machine-unknown 342f66e55a2Smrg os=-none 343f66e55a2Smrg ;; 344f66e55a2Smrg xscaleeb) 345f66e55a2Smrg basic_machine=armeb-unknown 346f66e55a2Smrg ;; 347f66e55a2Smrg 348f66e55a2Smrg xscaleel) 349f66e55a2Smrg basic_machine=armel-unknown 350f66e55a2Smrg ;; 351f66e55a2Smrg 35229459361Smrg # We use `pc' rather than `unknown' 35329459361Smrg # because (1) that's what they normally are, and 35429459361Smrg # (2) the word "unknown" tends to confuse beginning users. 35529459361Smrg i*86 | x86_64) 35629459361Smrg basic_machine=$basic_machine-pc 35729459361Smrg ;; 35829459361Smrg # Object if more than one company name word. 35929459361Smrg *-*-*) 36029459361Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 36129459361Smrg exit 1 36229459361Smrg ;; 36329459361Smrg # Recognize the basic CPU types with company name. 36429459361Smrg 580-* \ 36529459361Smrg | a29k-* \ 366f66e55a2Smrg | aarch64-* | aarch64_be-* \ 36729459361Smrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 36829459361Smrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 369f66e55a2Smrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ 37029459361Smrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 37129459361Smrg | avr-* | avr32-* \ 372f66e55a2Smrg | be32-* | be64-* \ 37329459361Smrg | bfin-* | bs2000-* \ 374c3c9b392Smrg | c[123]* | c30-* | [cjt]90-* | c4x-* \ 37529459361Smrg | clipper-* | craynv-* | cydra-* \ 37629459361Smrg | d10v-* | d30v-* | dlx-* \ 37729459361Smrg | elxsi-* \ 37829459361Smrg | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 37929459361Smrg | h8300-* | h8500-* \ 38029459361Smrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 381f66e55a2Smrg | hexagon-* \ 38229459361Smrg | i*86-* | i860-* | i960-* | ia64-* \ 38329459361Smrg | ip2k-* | iq2000-* \ 384f66e55a2Smrg | le32-* | le64-* \ 3855715adc0Smrg | lm32-* \ 38629459361Smrg | m32c-* | m32r-* | m32rle-* \ 38729459361Smrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 388f66e55a2Smrg | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 389f66e55a2Smrg | microblaze-* | microblazeel-* \ 39029459361Smrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 39129459361Smrg | mips16-* \ 39229459361Smrg | mips64-* | mips64el-* \ 3935715adc0Smrg | mips64octeon-* | mips64octeonel-* \ 39429459361Smrg | mips64orion-* | mips64orionel-* \ 3955715adc0Smrg | mips64r5900-* | mips64r5900el-* \ 3965715adc0Smrg | mips64vr-* | mips64vrel-* \ 39729459361Smrg | mips64vr4100-* | mips64vr4100el-* \ 39829459361Smrg | mips64vr4300-* | mips64vr4300el-* \ 39929459361Smrg | mips64vr5000-* | mips64vr5000el-* \ 40029459361Smrg | mips64vr5900-* | mips64vr5900el-* \ 40129459361Smrg | mipsisa32-* | mipsisa32el-* \ 40229459361Smrg | mipsisa32r2-* | mipsisa32r2el-* \ 40329459361Smrg | mipsisa64-* | mipsisa64el-* \ 40429459361Smrg | mipsisa64r2-* | mipsisa64r2el-* \ 40529459361Smrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 40629459361Smrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 407f66e55a2Smrg | mipsr5900-* | mipsr5900el-* \ 40829459361Smrg | mipstx39-* | mipstx39el-* \ 40929459361Smrg | mmix-* \ 41029459361Smrg | mt-* \ 41129459361Smrg | msp430-* \ 412c3c9b392Smrg | nds32-* | nds32le-* | nds32be-* \ 413f66e55a2Smrg | nios-* | nios2-* | nios2eb-* | nios2el-* \ 41429459361Smrg | none-* | np1-* | ns16k-* | ns32k-* \ 415f66e55a2Smrg | open8-* \ 41629459361Smrg | orion-* \ 41729459361Smrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 418f66e55a2Smrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 41929459361Smrg | pyramid-* \ 420f66e55a2Smrg | rl78-* | romp-* | rs6000-* | rx-* \ 4215715adc0Smrg | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 42229459361Smrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 42329459361Smrg | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 42429459361Smrg | sparclite-* \ 425f66e55a2Smrg | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 426f66e55a2Smrg | tahoe-* \ 427c3c9b392Smrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 428f66e55a2Smrg | tile*-* \ 42929459361Smrg | tron-* \ 430c3c9b392Smrg | ubicom32-* \ 431f66e55a2Smrg | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 432f66e55a2Smrg | vax-* \ 43329459361Smrg | we32k-* \ 434f66e55a2Smrg | x86-* | x86_64-* | xc16x-* | xps100-* \ 4355715adc0Smrg | xstormy16-* | xtensa*-* \ 43629459361Smrg | ymp-* \ 4375715adc0Smrg | z8k-* | z80-*) 4385715adc0Smrg ;; 4395715adc0Smrg # Recognize the basic CPU types without company name, with glob match. 4405715adc0Smrg xtensa*) 4415715adc0Smrg basic_machine=$basic_machine-unknown 44229459361Smrg ;; 44329459361Smrg # Recognize the various machine names and aliases which stand 44429459361Smrg # for a CPU type and a company and sometimes even an OS. 44529459361Smrg 386bsd) 44629459361Smrg basic_machine=i386-unknown 44729459361Smrg os=-bsd 44829459361Smrg ;; 44929459361Smrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 45029459361Smrg basic_machine=m68000-att 45129459361Smrg ;; 45229459361Smrg 3b*) 45329459361Smrg basic_machine=we32k-att 45429459361Smrg ;; 45529459361Smrg a29khif) 45629459361Smrg basic_machine=a29k-amd 45729459361Smrg os=-udi 45829459361Smrg ;; 459f66e55a2Smrg abacus) 46029459361Smrg basic_machine=abacus-unknown 46129459361Smrg ;; 46229459361Smrg adobe68k) 46329459361Smrg basic_machine=m68010-adobe 46429459361Smrg os=-scout 46529459361Smrg ;; 46629459361Smrg alliant | fx80) 46729459361Smrg basic_machine=fx80-alliant 46829459361Smrg ;; 46929459361Smrg altos | altos3068) 47029459361Smrg basic_machine=m68k-altos 47129459361Smrg ;; 47229459361Smrg am29k) 47329459361Smrg basic_machine=a29k-none 47429459361Smrg os=-bsd 47529459361Smrg ;; 47629459361Smrg amd64) 47729459361Smrg basic_machine=x86_64-pc 47829459361Smrg ;; 47929459361Smrg amd64-*) 48029459361Smrg basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 48129459361Smrg ;; 48229459361Smrg amdahl) 48329459361Smrg basic_machine=580-amdahl 48429459361Smrg os=-sysv 48529459361Smrg ;; 48629459361Smrg amiga | amiga-*) 48729459361Smrg basic_machine=m68k-unknown 48829459361Smrg ;; 48929459361Smrg amigaos | amigados) 49029459361Smrg basic_machine=m68k-unknown 49129459361Smrg os=-amigaos 49229459361Smrg ;; 49329459361Smrg amigaunix | amix) 49429459361Smrg basic_machine=m68k-unknown 49529459361Smrg os=-sysv4 49629459361Smrg ;; 49729459361Smrg apollo68) 49829459361Smrg basic_machine=m68k-apollo 49929459361Smrg os=-sysv 50029459361Smrg ;; 50129459361Smrg apollo68bsd) 50229459361Smrg basic_machine=m68k-apollo 50329459361Smrg os=-bsd 50429459361Smrg ;; 5055715adc0Smrg aros) 5065715adc0Smrg basic_machine=i386-pc 5075715adc0Smrg os=-aros 5085715adc0Smrg ;; 50929459361Smrg aux) 51029459361Smrg basic_machine=m68k-apple 51129459361Smrg os=-aux 51229459361Smrg ;; 51329459361Smrg balance) 51429459361Smrg basic_machine=ns32k-sequent 51529459361Smrg os=-dynix 51629459361Smrg ;; 5175715adc0Smrg blackfin) 5185715adc0Smrg basic_machine=bfin-unknown 5195715adc0Smrg os=-linux 5205715adc0Smrg ;; 5215715adc0Smrg blackfin-*) 5225715adc0Smrg basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 5235715adc0Smrg os=-linux 5245715adc0Smrg ;; 525c3c9b392Smrg bluegene*) 526c3c9b392Smrg basic_machine=powerpc-ibm 527c3c9b392Smrg os=-cnk 528c3c9b392Smrg ;; 529c3c9b392Smrg c54x-*) 530c3c9b392Smrg basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 531c3c9b392Smrg ;; 532c3c9b392Smrg c55x-*) 533c3c9b392Smrg basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 534c3c9b392Smrg ;; 535c3c9b392Smrg c6x-*) 536c3c9b392Smrg basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 537c3c9b392Smrg ;; 53829459361Smrg c90) 53929459361Smrg basic_machine=c90-cray 54029459361Smrg os=-unicos 54129459361Smrg ;; 542f66e55a2Smrg cegcc) 5435715adc0Smrg basic_machine=arm-unknown 5445715adc0Smrg os=-cegcc 5455715adc0Smrg ;; 54629459361Smrg convex-c1) 54729459361Smrg basic_machine=c1-convex 54829459361Smrg os=-bsd 54929459361Smrg ;; 55029459361Smrg convex-c2) 55129459361Smrg basic_machine=c2-convex 55229459361Smrg os=-bsd 55329459361Smrg ;; 55429459361Smrg convex-c32) 55529459361Smrg basic_machine=c32-convex 55629459361Smrg os=-bsd 55729459361Smrg ;; 55829459361Smrg convex-c34) 55929459361Smrg basic_machine=c34-convex 56029459361Smrg os=-bsd 56129459361Smrg ;; 56229459361Smrg convex-c38) 56329459361Smrg basic_machine=c38-convex 56429459361Smrg os=-bsd 56529459361Smrg ;; 56629459361Smrg cray | j90) 56729459361Smrg basic_machine=j90-cray 56829459361Smrg os=-unicos 56929459361Smrg ;; 57029459361Smrg craynv) 57129459361Smrg basic_machine=craynv-cray 57229459361Smrg os=-unicosmp 57329459361Smrg ;; 574f66e55a2Smrg cr16 | cr16-*) 5755715adc0Smrg basic_machine=cr16-unknown 57629459361Smrg os=-elf 57729459361Smrg ;; 57829459361Smrg crds | unos) 57929459361Smrg basic_machine=m68k-crds 58029459361Smrg ;; 58129459361Smrg crisv32 | crisv32-* | etraxfs*) 58229459361Smrg basic_machine=crisv32-axis 58329459361Smrg ;; 58429459361Smrg cris | cris-* | etrax*) 58529459361Smrg basic_machine=cris-axis 58629459361Smrg ;; 58729459361Smrg crx) 58829459361Smrg basic_machine=crx-unknown 58929459361Smrg os=-elf 59029459361Smrg ;; 59129459361Smrg da30 | da30-*) 59229459361Smrg basic_machine=m68k-da30 59329459361Smrg ;; 59429459361Smrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 59529459361Smrg basic_machine=mips-dec 59629459361Smrg ;; 59729459361Smrg decsystem10* | dec10*) 59829459361Smrg basic_machine=pdp10-dec 59929459361Smrg os=-tops10 60029459361Smrg ;; 60129459361Smrg decsystem20* | dec20*) 60229459361Smrg basic_machine=pdp10-dec 60329459361Smrg os=-tops20 60429459361Smrg ;; 60529459361Smrg delta | 3300 | motorola-3300 | motorola-delta \ 60629459361Smrg | 3300-motorola | delta-motorola) 60729459361Smrg basic_machine=m68k-motorola 60829459361Smrg ;; 60929459361Smrg delta88) 61029459361Smrg basic_machine=m88k-motorola 61129459361Smrg os=-sysv3 61229459361Smrg ;; 6135715adc0Smrg dicos) 6145715adc0Smrg basic_machine=i686-pc 6155715adc0Smrg os=-dicos 6165715adc0Smrg ;; 61729459361Smrg djgpp) 61829459361Smrg basic_machine=i586-pc 61929459361Smrg os=-msdosdjgpp 62029459361Smrg ;; 62129459361Smrg dpx20 | dpx20-*) 62229459361Smrg basic_machine=rs6000-bull 62329459361Smrg os=-bosx 62429459361Smrg ;; 62529459361Smrg dpx2* | dpx2*-bull) 62629459361Smrg basic_machine=m68k-bull 62729459361Smrg os=-sysv3 62829459361Smrg ;; 62929459361Smrg ebmon29k) 63029459361Smrg basic_machine=a29k-amd 63129459361Smrg os=-ebmon 63229459361Smrg ;; 63329459361Smrg elxsi) 63429459361Smrg basic_machine=elxsi-elxsi 63529459361Smrg os=-bsd 63629459361Smrg ;; 63729459361Smrg encore | umax | mmax) 63829459361Smrg basic_machine=ns32k-encore 63929459361Smrg ;; 64029459361Smrg es1800 | OSE68k | ose68k | ose | OSE) 64129459361Smrg basic_machine=m68k-ericsson 64229459361Smrg os=-ose 64329459361Smrg ;; 64429459361Smrg fx2800) 64529459361Smrg basic_machine=i860-alliant 64629459361Smrg ;; 64729459361Smrg genix) 64829459361Smrg basic_machine=ns32k-ns 64929459361Smrg ;; 65029459361Smrg gmicro) 65129459361Smrg basic_machine=tron-gmicro 65229459361Smrg os=-sysv 65329459361Smrg ;; 65429459361Smrg go32) 65529459361Smrg basic_machine=i386-pc 65629459361Smrg os=-go32 65729459361Smrg ;; 65829459361Smrg h3050r* | hiux*) 65929459361Smrg basic_machine=hppa1.1-hitachi 66029459361Smrg os=-hiuxwe2 66129459361Smrg ;; 66229459361Smrg h8300hms) 66329459361Smrg basic_machine=h8300-hitachi 66429459361Smrg os=-hms 66529459361Smrg ;; 66629459361Smrg h8300xray) 66729459361Smrg basic_machine=h8300-hitachi 66829459361Smrg os=-xray 66929459361Smrg ;; 67029459361Smrg h8500hms) 67129459361Smrg basic_machine=h8500-hitachi 67229459361Smrg os=-hms 67329459361Smrg ;; 67429459361Smrg harris) 67529459361Smrg basic_machine=m88k-harris 67629459361Smrg os=-sysv3 67729459361Smrg ;; 67829459361Smrg hp300-*) 67929459361Smrg basic_machine=m68k-hp 68029459361Smrg ;; 68129459361Smrg hp300bsd) 68229459361Smrg basic_machine=m68k-hp 68329459361Smrg os=-bsd 68429459361Smrg ;; 68529459361Smrg hp300hpux) 68629459361Smrg basic_machine=m68k-hp 68729459361Smrg os=-hpux 68829459361Smrg ;; 68929459361Smrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 69029459361Smrg basic_machine=hppa1.0-hp 69129459361Smrg ;; 69229459361Smrg hp9k2[0-9][0-9] | hp9k31[0-9]) 69329459361Smrg basic_machine=m68000-hp 69429459361Smrg ;; 69529459361Smrg hp9k3[2-9][0-9]) 69629459361Smrg basic_machine=m68k-hp 69729459361Smrg ;; 69829459361Smrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 69929459361Smrg basic_machine=hppa1.0-hp 70029459361Smrg ;; 70129459361Smrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 70229459361Smrg basic_machine=hppa1.1-hp 70329459361Smrg ;; 70429459361Smrg hp9k78[0-9] | hp78[0-9]) 70529459361Smrg # FIXME: really hppa2.0-hp 70629459361Smrg basic_machine=hppa1.1-hp 70729459361Smrg ;; 70829459361Smrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 70929459361Smrg # FIXME: really hppa2.0-hp 71029459361Smrg basic_machine=hppa1.1-hp 71129459361Smrg ;; 71229459361Smrg hp9k8[0-9][13679] | hp8[0-9][13679]) 71329459361Smrg basic_machine=hppa1.1-hp 71429459361Smrg ;; 71529459361Smrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 71629459361Smrg basic_machine=hppa1.0-hp 71729459361Smrg ;; 71829459361Smrg hppa-next) 71929459361Smrg os=-nextstep3 72029459361Smrg ;; 72129459361Smrg hppaosf) 72229459361Smrg basic_machine=hppa1.1-hp 72329459361Smrg os=-osf 72429459361Smrg ;; 72529459361Smrg hppro) 72629459361Smrg basic_machine=hppa1.1-hp 72729459361Smrg os=-proelf 72829459361Smrg ;; 72929459361Smrg i370-ibm* | ibm*) 73029459361Smrg basic_machine=i370-ibm 73129459361Smrg ;; 73229459361Smrg i*86v32) 73329459361Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 73429459361Smrg os=-sysv32 73529459361Smrg ;; 73629459361Smrg i*86v4*) 73729459361Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 73829459361Smrg os=-sysv4 73929459361Smrg ;; 74029459361Smrg i*86v) 74129459361Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 74229459361Smrg os=-sysv 74329459361Smrg ;; 74429459361Smrg i*86sol2) 74529459361Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 74629459361Smrg os=-solaris2 74729459361Smrg ;; 74829459361Smrg i386mach) 74929459361Smrg basic_machine=i386-mach 75029459361Smrg os=-mach 75129459361Smrg ;; 75229459361Smrg i386-vsta | vsta) 75329459361Smrg basic_machine=i386-unknown 75429459361Smrg os=-vsta 75529459361Smrg ;; 75629459361Smrg iris | iris4d) 75729459361Smrg basic_machine=mips-sgi 75829459361Smrg case $os in 75929459361Smrg -irix*) 76029459361Smrg ;; 76129459361Smrg *) 76229459361Smrg os=-irix4 76329459361Smrg ;; 76429459361Smrg esac 76529459361Smrg ;; 76629459361Smrg isi68 | isi) 76729459361Smrg basic_machine=m68k-isi 76829459361Smrg os=-sysv 76929459361Smrg ;; 7705715adc0Smrg m68knommu) 7715715adc0Smrg basic_machine=m68k-unknown 7725715adc0Smrg os=-linux 7735715adc0Smrg ;; 7745715adc0Smrg m68knommu-*) 7755715adc0Smrg basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 7765715adc0Smrg os=-linux 7775715adc0Smrg ;; 77829459361Smrg m88k-omron*) 77929459361Smrg basic_machine=m88k-omron 78029459361Smrg ;; 78129459361Smrg magnum | m3230) 78229459361Smrg basic_machine=mips-mips 78329459361Smrg os=-sysv 78429459361Smrg ;; 78529459361Smrg merlin) 78629459361Smrg basic_machine=ns32k-utek 78729459361Smrg os=-sysv 78829459361Smrg ;; 789f66e55a2Smrg microblaze*) 790c3c9b392Smrg basic_machine=microblaze-xilinx 791c3c9b392Smrg ;; 792f66e55a2Smrg mingw64) 793f66e55a2Smrg basic_machine=x86_64-pc 794f66e55a2Smrg os=-mingw64 795f66e55a2Smrg ;; 79629459361Smrg mingw32) 79729459361Smrg basic_machine=i386-pc 79829459361Smrg os=-mingw32 79929459361Smrg ;; 8005715adc0Smrg mingw32ce) 8015715adc0Smrg basic_machine=arm-unknown 8025715adc0Smrg os=-mingw32ce 8035715adc0Smrg ;; 80429459361Smrg miniframe) 80529459361Smrg basic_machine=m68000-convergent 80629459361Smrg ;; 80729459361Smrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 80829459361Smrg basic_machine=m68k-atari 80929459361Smrg os=-mint 81029459361Smrg ;; 81129459361Smrg mips3*-*) 81229459361Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 81329459361Smrg ;; 81429459361Smrg mips3*) 81529459361Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 81629459361Smrg ;; 81729459361Smrg monitor) 81829459361Smrg basic_machine=m68k-rom68k 81929459361Smrg os=-coff 82029459361Smrg ;; 82129459361Smrg morphos) 82229459361Smrg basic_machine=powerpc-unknown 82329459361Smrg os=-morphos 82429459361Smrg ;; 82529459361Smrg msdos) 82629459361Smrg basic_machine=i386-pc 82729459361Smrg os=-msdos 82829459361Smrg ;; 82929459361Smrg ms1-*) 83029459361Smrg basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 83129459361Smrg ;; 832f66e55a2Smrg msys) 833f66e55a2Smrg basic_machine=i386-pc 834f66e55a2Smrg os=-msys 835f66e55a2Smrg ;; 83629459361Smrg mvs) 83729459361Smrg basic_machine=i370-ibm 83829459361Smrg os=-mvs 83929459361Smrg ;; 840f66e55a2Smrg nacl) 841f66e55a2Smrg basic_machine=le32-unknown 842f66e55a2Smrg os=-nacl 843f66e55a2Smrg ;; 84429459361Smrg ncr3000) 84529459361Smrg basic_machine=i486-ncr 84629459361Smrg os=-sysv4 84729459361Smrg ;; 84829459361Smrg netbsd386) 84929459361Smrg basic_machine=i386-unknown 85029459361Smrg os=-netbsd 85129459361Smrg ;; 85229459361Smrg netwinder) 85329459361Smrg basic_machine=armv4l-rebel 85429459361Smrg os=-linux 85529459361Smrg ;; 85629459361Smrg news | news700 | news800 | news900) 85729459361Smrg basic_machine=m68k-sony 85829459361Smrg os=-newsos 85929459361Smrg ;; 86029459361Smrg news1000) 86129459361Smrg basic_machine=m68030-sony 86229459361Smrg os=-newsos 86329459361Smrg ;; 86429459361Smrg news-3600 | risc-news) 86529459361Smrg basic_machine=mips-sony 86629459361Smrg os=-newsos 86729459361Smrg ;; 86829459361Smrg necv70) 86929459361Smrg basic_machine=v70-nec 87029459361Smrg os=-sysv 87129459361Smrg ;; 87229459361Smrg next | m*-next ) 87329459361Smrg basic_machine=m68k-next 87429459361Smrg case $os in 87529459361Smrg -nextstep* ) 87629459361Smrg ;; 87729459361Smrg -ns2*) 87829459361Smrg os=-nextstep2 87929459361Smrg ;; 88029459361Smrg *) 88129459361Smrg os=-nextstep3 88229459361Smrg ;; 88329459361Smrg esac 88429459361Smrg ;; 88529459361Smrg nh3000) 88629459361Smrg basic_machine=m68k-harris 88729459361Smrg os=-cxux 88829459361Smrg ;; 88929459361Smrg nh[45]000) 89029459361Smrg basic_machine=m88k-harris 89129459361Smrg os=-cxux 89229459361Smrg ;; 89329459361Smrg nindy960) 89429459361Smrg basic_machine=i960-intel 89529459361Smrg os=-nindy 89629459361Smrg ;; 89729459361Smrg mon960) 89829459361Smrg basic_machine=i960-intel 89929459361Smrg os=-mon960 90029459361Smrg ;; 90129459361Smrg nonstopux) 90229459361Smrg basic_machine=mips-compaq 90329459361Smrg os=-nonstopux 90429459361Smrg ;; 90529459361Smrg np1) 90629459361Smrg basic_machine=np1-gould 90729459361Smrg ;; 908f66e55a2Smrg neo-tandem) 909c3c9b392Smrg basic_machine=neo-tandem 910c3c9b392Smrg ;; 911f66e55a2Smrg nse-tandem) 912c3c9b392Smrg basic_machine=nse-tandem 913c3c9b392Smrg ;; 91429459361Smrg nsr-tandem) 91529459361Smrg basic_machine=nsr-tandem 91629459361Smrg ;; 91729459361Smrg op50n-* | op60c-*) 91829459361Smrg basic_machine=hppa1.1-oki 91929459361Smrg os=-proelf 92029459361Smrg ;; 92129459361Smrg openrisc | openrisc-*) 92229459361Smrg basic_machine=or32-unknown 92329459361Smrg ;; 92429459361Smrg os400) 92529459361Smrg basic_machine=powerpc-ibm 92629459361Smrg os=-os400 92729459361Smrg ;; 92829459361Smrg OSE68000 | ose68000) 92929459361Smrg basic_machine=m68000-ericsson 93029459361Smrg os=-ose 93129459361Smrg ;; 93229459361Smrg os68k) 93329459361Smrg basic_machine=m68k-none 93429459361Smrg os=-os68k 93529459361Smrg ;; 93629459361Smrg pa-hitachi) 93729459361Smrg basic_machine=hppa1.1-hitachi 93829459361Smrg os=-hiuxwe2 93929459361Smrg ;; 94029459361Smrg paragon) 94129459361Smrg basic_machine=i860-intel 94229459361Smrg os=-osf 94329459361Smrg ;; 9445715adc0Smrg parisc) 9455715adc0Smrg basic_machine=hppa-unknown 9465715adc0Smrg os=-linux 9475715adc0Smrg ;; 9485715adc0Smrg parisc-*) 9495715adc0Smrg basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 9505715adc0Smrg os=-linux 9515715adc0Smrg ;; 95229459361Smrg pbd) 95329459361Smrg basic_machine=sparc-tti 95429459361Smrg ;; 95529459361Smrg pbb) 95629459361Smrg basic_machine=m68k-tti 95729459361Smrg ;; 95829459361Smrg pc532 | pc532-*) 95929459361Smrg basic_machine=ns32k-pc532 96029459361Smrg ;; 96129459361Smrg pc98) 96229459361Smrg basic_machine=i386-pc 96329459361Smrg ;; 96429459361Smrg pc98-*) 96529459361Smrg basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 96629459361Smrg ;; 96729459361Smrg pentium | p5 | k5 | k6 | nexgen | viac3) 96829459361Smrg basic_machine=i586-pc 96929459361Smrg ;; 97029459361Smrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 97129459361Smrg basic_machine=i686-pc 97229459361Smrg ;; 97329459361Smrg pentiumii | pentium2 | pentiumiii | pentium3) 97429459361Smrg basic_machine=i686-pc 97529459361Smrg ;; 97629459361Smrg pentium4) 97729459361Smrg basic_machine=i786-pc 97829459361Smrg ;; 97929459361Smrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 98029459361Smrg basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 98129459361Smrg ;; 98229459361Smrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 98329459361Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 98429459361Smrg ;; 98529459361Smrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 98629459361Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 98729459361Smrg ;; 98829459361Smrg pentium4-*) 98929459361Smrg basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 99029459361Smrg ;; 99129459361Smrg pn) 99229459361Smrg basic_machine=pn-gould 99329459361Smrg ;; 99429459361Smrg power) basic_machine=power-ibm 99529459361Smrg ;; 996f66e55a2Smrg ppc | ppcbe) basic_machine=powerpc-unknown 99729459361Smrg ;; 998f66e55a2Smrg ppc-* | ppcbe-*) 999f66e55a2Smrg basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 100029459361Smrg ;; 100129459361Smrg ppcle | powerpclittle | ppc-le | powerpc-little) 100229459361Smrg basic_machine=powerpcle-unknown 100329459361Smrg ;; 100429459361Smrg ppcle-* | powerpclittle-*) 100529459361Smrg basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 100629459361Smrg ;; 100729459361Smrg ppc64) basic_machine=powerpc64-unknown 100829459361Smrg ;; 100929459361Smrg ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 101029459361Smrg ;; 101129459361Smrg ppc64le | powerpc64little | ppc64-le | powerpc64-little) 101229459361Smrg basic_machine=powerpc64le-unknown 101329459361Smrg ;; 101429459361Smrg ppc64le-* | powerpc64little-*) 101529459361Smrg basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 101629459361Smrg ;; 101729459361Smrg ps2) 101829459361Smrg basic_machine=i386-ibm 101929459361Smrg ;; 102029459361Smrg pw32) 102129459361Smrg basic_machine=i586-unknown 102229459361Smrg os=-pw32 102329459361Smrg ;; 1024f66e55a2Smrg rdos | rdos64) 1025f66e55a2Smrg basic_machine=x86_64-pc 1026f66e55a2Smrg os=-rdos 1027f66e55a2Smrg ;; 1028f66e55a2Smrg rdos32) 102929459361Smrg basic_machine=i386-pc 103029459361Smrg os=-rdos 103129459361Smrg ;; 103229459361Smrg rom68k) 103329459361Smrg basic_machine=m68k-rom68k 103429459361Smrg os=-coff 103529459361Smrg ;; 103629459361Smrg rm[46]00) 103729459361Smrg basic_machine=mips-siemens 103829459361Smrg ;; 103929459361Smrg rtpc | rtpc-*) 104029459361Smrg basic_machine=romp-ibm 104129459361Smrg ;; 104229459361Smrg s390 | s390-*) 104329459361Smrg basic_machine=s390-ibm 104429459361Smrg ;; 104529459361Smrg s390x | s390x-*) 104629459361Smrg basic_machine=s390x-ibm 104729459361Smrg ;; 104829459361Smrg sa29200) 104929459361Smrg basic_machine=a29k-amd 105029459361Smrg os=-udi 105129459361Smrg ;; 105229459361Smrg sb1) 105329459361Smrg basic_machine=mipsisa64sb1-unknown 105429459361Smrg ;; 105529459361Smrg sb1el) 105629459361Smrg basic_machine=mipsisa64sb1el-unknown 105729459361Smrg ;; 105829459361Smrg sde) 105929459361Smrg basic_machine=mipsisa32-sde 106029459361Smrg os=-elf 106129459361Smrg ;; 106229459361Smrg sei) 106329459361Smrg basic_machine=mips-sei 106429459361Smrg os=-seiux 106529459361Smrg ;; 106629459361Smrg sequent) 106729459361Smrg basic_machine=i386-sequent 106829459361Smrg ;; 106929459361Smrg sh) 107029459361Smrg basic_machine=sh-hitachi 107129459361Smrg os=-hms 107229459361Smrg ;; 107329459361Smrg sh5el) 107429459361Smrg basic_machine=sh5le-unknown 107529459361Smrg ;; 107629459361Smrg sh64) 107729459361Smrg basic_machine=sh64-unknown 107829459361Smrg ;; 107929459361Smrg sparclite-wrs | simso-wrs) 108029459361Smrg basic_machine=sparclite-wrs 108129459361Smrg os=-vxworks 108229459361Smrg ;; 108329459361Smrg sps7) 108429459361Smrg basic_machine=m68k-bull 108529459361Smrg os=-sysv2 108629459361Smrg ;; 108729459361Smrg spur) 108829459361Smrg basic_machine=spur-unknown 108929459361Smrg ;; 109029459361Smrg st2000) 109129459361Smrg basic_machine=m68k-tandem 109229459361Smrg ;; 109329459361Smrg stratus) 109429459361Smrg basic_machine=i860-stratus 109529459361Smrg os=-sysv4 109629459361Smrg ;; 1097f66e55a2Smrg strongarm-* | thumb-*) 1098f66e55a2Smrg basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` 1099f66e55a2Smrg ;; 110029459361Smrg sun2) 110129459361Smrg basic_machine=m68000-sun 110229459361Smrg ;; 110329459361Smrg sun2os3) 110429459361Smrg basic_machine=m68000-sun 110529459361Smrg os=-sunos3 110629459361Smrg ;; 110729459361Smrg sun2os4) 110829459361Smrg basic_machine=m68000-sun 110929459361Smrg os=-sunos4 111029459361Smrg ;; 111129459361Smrg sun3os3) 111229459361Smrg basic_machine=m68k-sun 111329459361Smrg os=-sunos3 111429459361Smrg ;; 111529459361Smrg sun3os4) 111629459361Smrg basic_machine=m68k-sun 111729459361Smrg os=-sunos4 111829459361Smrg ;; 111929459361Smrg sun4os3) 112029459361Smrg basic_machine=sparc-sun 112129459361Smrg os=-sunos3 112229459361Smrg ;; 112329459361Smrg sun4os4) 112429459361Smrg basic_machine=sparc-sun 112529459361Smrg os=-sunos4 112629459361Smrg ;; 112729459361Smrg sun4sol2) 112829459361Smrg basic_machine=sparc-sun 112929459361Smrg os=-solaris2 113029459361Smrg ;; 113129459361Smrg sun3 | sun3-*) 113229459361Smrg basic_machine=m68k-sun 113329459361Smrg ;; 113429459361Smrg sun4) 113529459361Smrg basic_machine=sparc-sun 113629459361Smrg ;; 113729459361Smrg sun386 | sun386i | roadrunner) 113829459361Smrg basic_machine=i386-sun 113929459361Smrg ;; 114029459361Smrg sv1) 114129459361Smrg basic_machine=sv1-cray 114229459361Smrg os=-unicos 114329459361Smrg ;; 114429459361Smrg symmetry) 114529459361Smrg basic_machine=i386-sequent 114629459361Smrg os=-dynix 114729459361Smrg ;; 114829459361Smrg t3e) 114929459361Smrg basic_machine=alphaev5-cray 115029459361Smrg os=-unicos 115129459361Smrg ;; 115229459361Smrg t90) 115329459361Smrg basic_machine=t90-cray 115429459361Smrg os=-unicos 115529459361Smrg ;; 11565715adc0Smrg tile*) 1157f66e55a2Smrg basic_machine=$basic_machine-unknown 11585715adc0Smrg os=-linux-gnu 11595715adc0Smrg ;; 116029459361Smrg tx39) 116129459361Smrg basic_machine=mipstx39-unknown 116229459361Smrg ;; 116329459361Smrg tx39el) 116429459361Smrg basic_machine=mipstx39el-unknown 116529459361Smrg ;; 116629459361Smrg toad1) 116729459361Smrg basic_machine=pdp10-xkl 116829459361Smrg os=-tops20 116929459361Smrg ;; 117029459361Smrg tower | tower-32) 117129459361Smrg basic_machine=m68k-ncr 117229459361Smrg ;; 117329459361Smrg tpf) 117429459361Smrg basic_machine=s390x-ibm 117529459361Smrg os=-tpf 117629459361Smrg ;; 117729459361Smrg udi29k) 117829459361Smrg basic_machine=a29k-amd 117929459361Smrg os=-udi 118029459361Smrg ;; 118129459361Smrg ultra3) 118229459361Smrg basic_machine=a29k-nyu 118329459361Smrg os=-sym1 118429459361Smrg ;; 118529459361Smrg v810 | necv810) 118629459361Smrg basic_machine=v810-nec 118729459361Smrg os=-none 118829459361Smrg ;; 118929459361Smrg vaxv) 119029459361Smrg basic_machine=vax-dec 119129459361Smrg os=-sysv 119229459361Smrg ;; 119329459361Smrg vms) 119429459361Smrg basic_machine=vax-dec 119529459361Smrg os=-vms 119629459361Smrg ;; 119729459361Smrg vpp*|vx|vx-*) 119829459361Smrg basic_machine=f301-fujitsu 119929459361Smrg ;; 120029459361Smrg vxworks960) 120129459361Smrg basic_machine=i960-wrs 120229459361Smrg os=-vxworks 120329459361Smrg ;; 120429459361Smrg vxworks68) 120529459361Smrg basic_machine=m68k-wrs 120629459361Smrg os=-vxworks 120729459361Smrg ;; 120829459361Smrg vxworks29k) 120929459361Smrg basic_machine=a29k-wrs 121029459361Smrg os=-vxworks 121129459361Smrg ;; 121229459361Smrg w65*) 121329459361Smrg basic_machine=w65-wdc 121429459361Smrg os=-none 121529459361Smrg ;; 121629459361Smrg w89k-*) 121729459361Smrg basic_machine=hppa1.1-winbond 121829459361Smrg os=-proelf 121929459361Smrg ;; 122029459361Smrg xbox) 122129459361Smrg basic_machine=i686-pc 122229459361Smrg os=-mingw32 122329459361Smrg ;; 122429459361Smrg xps | xps100) 122529459361Smrg basic_machine=xps100-honeywell 122629459361Smrg ;; 1227f66e55a2Smrg xscale-* | xscalee[bl]-*) 1228f66e55a2Smrg basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` 1229f66e55a2Smrg ;; 123029459361Smrg ymp) 123129459361Smrg basic_machine=ymp-cray 123229459361Smrg os=-unicos 123329459361Smrg ;; 123429459361Smrg z8k-*-coff) 123529459361Smrg basic_machine=z8k-unknown 123629459361Smrg os=-sim 123729459361Smrg ;; 12385715adc0Smrg z80-*-coff) 12395715adc0Smrg basic_machine=z80-unknown 12405715adc0Smrg os=-sim 12415715adc0Smrg ;; 124229459361Smrg none) 124329459361Smrg basic_machine=none-none 124429459361Smrg os=-none 124529459361Smrg ;; 124629459361Smrg 124729459361Smrg# Here we handle the default manufacturer of certain CPU types. It is in 124829459361Smrg# some cases the only manufacturer, in others, it is the most popular. 124929459361Smrg w89k) 125029459361Smrg basic_machine=hppa1.1-winbond 125129459361Smrg ;; 125229459361Smrg op50n) 125329459361Smrg basic_machine=hppa1.1-oki 125429459361Smrg ;; 125529459361Smrg op60c) 125629459361Smrg basic_machine=hppa1.1-oki 125729459361Smrg ;; 125829459361Smrg romp) 125929459361Smrg basic_machine=romp-ibm 126029459361Smrg ;; 126129459361Smrg mmix) 126229459361Smrg basic_machine=mmix-knuth 126329459361Smrg ;; 126429459361Smrg rs6000) 126529459361Smrg basic_machine=rs6000-ibm 126629459361Smrg ;; 126729459361Smrg vax) 126829459361Smrg basic_machine=vax-dec 126929459361Smrg ;; 127029459361Smrg pdp10) 127129459361Smrg # there are many clones, so DEC is not a safe bet 127229459361Smrg basic_machine=pdp10-unknown 127329459361Smrg ;; 127429459361Smrg pdp11) 127529459361Smrg basic_machine=pdp11-dec 127629459361Smrg ;; 127729459361Smrg we32k) 127829459361Smrg basic_machine=we32k-att 127929459361Smrg ;; 12805715adc0Smrg sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 128129459361Smrg basic_machine=sh-unknown 128229459361Smrg ;; 128329459361Smrg sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 128429459361Smrg basic_machine=sparc-sun 128529459361Smrg ;; 128629459361Smrg cydra) 128729459361Smrg basic_machine=cydra-cydrome 128829459361Smrg ;; 128929459361Smrg orion) 129029459361Smrg basic_machine=orion-highlevel 129129459361Smrg ;; 129229459361Smrg orion105) 129329459361Smrg basic_machine=clipper-highlevel 129429459361Smrg ;; 129529459361Smrg mac | mpw | mac-mpw) 129629459361Smrg basic_machine=m68k-apple 129729459361Smrg ;; 129829459361Smrg pmac | pmac-mpw) 129929459361Smrg basic_machine=powerpc-apple 130029459361Smrg ;; 130129459361Smrg *-unknown) 130229459361Smrg # Make sure to match an already-canonicalized machine name. 130329459361Smrg ;; 130429459361Smrg *) 130529459361Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 130629459361Smrg exit 1 130729459361Smrg ;; 130829459361Smrgesac 130929459361Smrg 131029459361Smrg# Here we canonicalize certain aliases for manufacturers. 131129459361Smrgcase $basic_machine in 131229459361Smrg *-digital*) 131329459361Smrg basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 131429459361Smrg ;; 131529459361Smrg *-commodore*) 131629459361Smrg basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 131729459361Smrg ;; 131829459361Smrg *) 131929459361Smrg ;; 132029459361Smrgesac 132129459361Smrg 132229459361Smrg# Decode manufacturer-specific aliases for certain operating systems. 132329459361Smrg 132429459361Smrgif [ x"$os" != x"" ] 132529459361Smrgthen 132629459361Smrgcase $os in 1327f66e55a2Smrg # First match some system type aliases 1328f66e55a2Smrg # that might get confused with valid system types. 132929459361Smrg # -solaris* is a basic system type, with this one exception. 1330f66e55a2Smrg -auroraux) 1331f66e55a2Smrg os=-auroraux 1332c3c9b392Smrg ;; 133329459361Smrg -solaris1 | -solaris1.*) 133429459361Smrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 133529459361Smrg ;; 133629459361Smrg -solaris) 133729459361Smrg os=-solaris2 133829459361Smrg ;; 133929459361Smrg -svr4*) 134029459361Smrg os=-sysv4 134129459361Smrg ;; 134229459361Smrg -unixware*) 134329459361Smrg os=-sysv4.2uw 134429459361Smrg ;; 134529459361Smrg -gnu/linux*) 134629459361Smrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 134729459361Smrg ;; 134829459361Smrg # First accept the basic system types. 134929459361Smrg # The portable systems comes first. 135029459361Smrg # Each alternative MUST END IN A *, to match a version number. 135129459361Smrg # -sysv* is not here because it comes later, after sysvr4. 135229459361Smrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1353c3c9b392Smrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1354c3c9b392Smrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 1355f66e55a2Smrg | -sym* | -kopensolaris* | -plan9* \ 135629459361Smrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 13575715adc0Smrg | -aos* | -aros* \ 135829459361Smrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 135929459361Smrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 136029459361Smrg | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1361f66e55a2Smrg | -bitrig* | -openbsd* | -solidbsd* \ 136229459361Smrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 136329459361Smrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 136429459361Smrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 136529459361Smrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 13665715adc0Smrg | -chorusos* | -chorusrdb* | -cegcc* \ 1367f66e55a2Smrg | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1368f66e55a2Smrg | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 1369f66e55a2Smrg | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 137029459361Smrg | -uxpv* | -beos* | -mpeix* | -udk* \ 137129459361Smrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 137229459361Smrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 137329459361Smrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 137429459361Smrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 137529459361Smrg | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 137629459361Smrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1377c3c9b392Smrg | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 137829459361Smrg # Remember, each alternative MUST END IN *, to match a version number. 137929459361Smrg ;; 138029459361Smrg -qnx*) 138129459361Smrg case $basic_machine in 138229459361Smrg x86-* | i*86-*) 138329459361Smrg ;; 138429459361Smrg *) 138529459361Smrg os=-nto$os 138629459361Smrg ;; 138729459361Smrg esac 138829459361Smrg ;; 138929459361Smrg -nto-qnx*) 139029459361Smrg ;; 139129459361Smrg -nto*) 139229459361Smrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 139329459361Smrg ;; 139429459361Smrg -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 139529459361Smrg | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 139629459361Smrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 139729459361Smrg ;; 139829459361Smrg -mac*) 139929459361Smrg os=`echo $os | sed -e 's|mac|macos|'` 140029459361Smrg ;; 140129459361Smrg -linux-dietlibc) 140229459361Smrg os=-linux-dietlibc 140329459361Smrg ;; 140429459361Smrg -linux*) 140529459361Smrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 140629459361Smrg ;; 140729459361Smrg -sunos5*) 140829459361Smrg os=`echo $os | sed -e 's|sunos5|solaris2|'` 140929459361Smrg ;; 141029459361Smrg -sunos6*) 141129459361Smrg os=`echo $os | sed -e 's|sunos6|solaris3|'` 141229459361Smrg ;; 141329459361Smrg -opened*) 141429459361Smrg os=-openedition 141529459361Smrg ;; 1416f66e55a2Smrg -os400*) 141729459361Smrg os=-os400 141829459361Smrg ;; 141929459361Smrg -wince*) 142029459361Smrg os=-wince 142129459361Smrg ;; 142229459361Smrg -osfrose*) 142329459361Smrg os=-osfrose 142429459361Smrg ;; 142529459361Smrg -osf*) 142629459361Smrg os=-osf 142729459361Smrg ;; 142829459361Smrg -utek*) 142929459361Smrg os=-bsd 143029459361Smrg ;; 143129459361Smrg -dynix*) 143229459361Smrg os=-bsd 143329459361Smrg ;; 143429459361Smrg -acis*) 143529459361Smrg os=-aos 143629459361Smrg ;; 143729459361Smrg -atheos*) 143829459361Smrg os=-atheos 143929459361Smrg ;; 144029459361Smrg -syllable*) 144129459361Smrg os=-syllable 144229459361Smrg ;; 144329459361Smrg -386bsd) 144429459361Smrg os=-bsd 144529459361Smrg ;; 144629459361Smrg -ctix* | -uts*) 144729459361Smrg os=-sysv 144829459361Smrg ;; 144929459361Smrg -nova*) 145029459361Smrg os=-rtmk-nova 145129459361Smrg ;; 145229459361Smrg -ns2 ) 145329459361Smrg os=-nextstep2 145429459361Smrg ;; 145529459361Smrg -nsk*) 145629459361Smrg os=-nsk 145729459361Smrg ;; 145829459361Smrg # Preserve the version number of sinix5. 145929459361Smrg -sinix5.*) 146029459361Smrg os=`echo $os | sed -e 's|sinix|sysv|'` 146129459361Smrg ;; 146229459361Smrg -sinix*) 146329459361Smrg os=-sysv4 146429459361Smrg ;; 1465f66e55a2Smrg -tpf*) 146629459361Smrg os=-tpf 146729459361Smrg ;; 146829459361Smrg -triton*) 146929459361Smrg os=-sysv3 147029459361Smrg ;; 147129459361Smrg -oss*) 147229459361Smrg os=-sysv3 147329459361Smrg ;; 147429459361Smrg -svr4) 147529459361Smrg os=-sysv4 147629459361Smrg ;; 147729459361Smrg -svr3) 147829459361Smrg os=-sysv3 147929459361Smrg ;; 148029459361Smrg -sysvr4) 148129459361Smrg os=-sysv4 148229459361Smrg ;; 148329459361Smrg # This must come after -sysvr4. 148429459361Smrg -sysv*) 148529459361Smrg ;; 148629459361Smrg -ose*) 148729459361Smrg os=-ose 148829459361Smrg ;; 148929459361Smrg -es1800*) 149029459361Smrg os=-ose 149129459361Smrg ;; 149229459361Smrg -xenix) 149329459361Smrg os=-xenix 149429459361Smrg ;; 149529459361Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 149629459361Smrg os=-mint 149729459361Smrg ;; 149829459361Smrg -aros*) 149929459361Smrg os=-aros 150029459361Smrg ;; 150129459361Smrg -zvmoe) 150229459361Smrg os=-zvmoe 150329459361Smrg ;; 15045715adc0Smrg -dicos*) 15055715adc0Smrg os=-dicos 15065715adc0Smrg ;; 1507f66e55a2Smrg -nacl*) 1508f66e55a2Smrg ;; 150929459361Smrg -none) 151029459361Smrg ;; 151129459361Smrg *) 151229459361Smrg # Get rid of the `-' at the beginning of $os. 151329459361Smrg os=`echo $os | sed 's/[^-]*-//'` 151429459361Smrg echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 151529459361Smrg exit 1 151629459361Smrg ;; 151729459361Smrgesac 151829459361Smrgelse 151929459361Smrg 152029459361Smrg# Here we handle the default operating systems that come with various machines. 152129459361Smrg# The value should be what the vendor currently ships out the door with their 152229459361Smrg# machine or put another way, the most popular os provided with the machine. 152329459361Smrg 152429459361Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 152529459361Smrg# "-sun"), then you have to tell the case statement up towards the top 152629459361Smrg# that MANUFACTURER isn't an operating system. Otherwise, code above 152729459361Smrg# will signal an error saying that MANUFACTURER isn't an operating 152829459361Smrg# system, and we'll never get to this point. 152929459361Smrg 153029459361Smrgcase $basic_machine in 1531f66e55a2Smrg score-*) 153229459361Smrg os=-elf 153329459361Smrg ;; 1534f66e55a2Smrg spu-*) 153529459361Smrg os=-elf 153629459361Smrg ;; 153729459361Smrg *-acorn) 153829459361Smrg os=-riscix1.2 153929459361Smrg ;; 154029459361Smrg arm*-rebel) 154129459361Smrg os=-linux 154229459361Smrg ;; 154329459361Smrg arm*-semi) 154429459361Smrg os=-aout 154529459361Smrg ;; 1546f66e55a2Smrg c4x-* | tic4x-*) 1547f66e55a2Smrg os=-coff 1548f66e55a2Smrg ;; 1549f66e55a2Smrg hexagon-*) 1550f66e55a2Smrg os=-elf 155129459361Smrg ;; 1552c3c9b392Smrg tic54x-*) 1553c3c9b392Smrg os=-coff 1554c3c9b392Smrg ;; 1555c3c9b392Smrg tic55x-*) 1556c3c9b392Smrg os=-coff 1557c3c9b392Smrg ;; 1558c3c9b392Smrg tic6x-*) 1559c3c9b392Smrg os=-coff 1560c3c9b392Smrg ;; 156129459361Smrg # This must come before the *-dec entry. 156229459361Smrg pdp10-*) 156329459361Smrg os=-tops20 156429459361Smrg ;; 156529459361Smrg pdp11-*) 156629459361Smrg os=-none 156729459361Smrg ;; 156829459361Smrg *-dec | vax-*) 156929459361Smrg os=-ultrix4.2 157029459361Smrg ;; 157129459361Smrg m68*-apollo) 157229459361Smrg os=-domain 157329459361Smrg ;; 157429459361Smrg i386-sun) 157529459361Smrg os=-sunos4.0.2 157629459361Smrg ;; 157729459361Smrg m68000-sun) 157829459361Smrg os=-sunos3 157929459361Smrg ;; 158029459361Smrg m68*-cisco) 158129459361Smrg os=-aout 158229459361Smrg ;; 1583f66e55a2Smrg mep-*) 15845715adc0Smrg os=-elf 15855715adc0Smrg ;; 158629459361Smrg mips*-cisco) 158729459361Smrg os=-elf 158829459361Smrg ;; 158929459361Smrg mips*-*) 159029459361Smrg os=-elf 159129459361Smrg ;; 1592f66e55a2Smrg or1k-*) 1593f66e55a2Smrg os=-elf 1594f66e55a2Smrg ;; 159529459361Smrg or32-*) 159629459361Smrg os=-coff 159729459361Smrg ;; 159829459361Smrg *-tti) # must be before sparc entry or we get the wrong os. 159929459361Smrg os=-sysv3 160029459361Smrg ;; 160129459361Smrg sparc-* | *-sun) 160229459361Smrg os=-sunos4.1.1 160329459361Smrg ;; 160429459361Smrg *-be) 160529459361Smrg os=-beos 160629459361Smrg ;; 160729459361Smrg *-haiku) 160829459361Smrg os=-haiku 160929459361Smrg ;; 161029459361Smrg *-ibm) 161129459361Smrg os=-aix 161229459361Smrg ;; 1613f66e55a2Smrg *-knuth) 161429459361Smrg os=-mmixware 161529459361Smrg ;; 161629459361Smrg *-wec) 161729459361Smrg os=-proelf 161829459361Smrg ;; 161929459361Smrg *-winbond) 162029459361Smrg os=-proelf 162129459361Smrg ;; 162229459361Smrg *-oki) 162329459361Smrg os=-proelf 162429459361Smrg ;; 162529459361Smrg *-hp) 162629459361Smrg os=-hpux 162729459361Smrg ;; 162829459361Smrg *-hitachi) 162929459361Smrg os=-hiux 163029459361Smrg ;; 163129459361Smrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 163229459361Smrg os=-sysv 163329459361Smrg ;; 163429459361Smrg *-cbm) 163529459361Smrg os=-amigaos 163629459361Smrg ;; 163729459361Smrg *-dg) 163829459361Smrg os=-dgux 163929459361Smrg ;; 164029459361Smrg *-dolphin) 164129459361Smrg os=-sysv3 164229459361Smrg ;; 164329459361Smrg m68k-ccur) 164429459361Smrg os=-rtu 164529459361Smrg ;; 164629459361Smrg m88k-omron*) 164729459361Smrg os=-luna 164829459361Smrg ;; 164929459361Smrg *-next ) 165029459361Smrg os=-nextstep 165129459361Smrg ;; 165229459361Smrg *-sequent) 165329459361Smrg os=-ptx 165429459361Smrg ;; 165529459361Smrg *-crds) 165629459361Smrg os=-unos 165729459361Smrg ;; 165829459361Smrg *-ns) 165929459361Smrg os=-genix 166029459361Smrg ;; 166129459361Smrg i370-*) 166229459361Smrg os=-mvs 166329459361Smrg ;; 166429459361Smrg *-next) 166529459361Smrg os=-nextstep3 166629459361Smrg ;; 166729459361Smrg *-gould) 166829459361Smrg os=-sysv 166929459361Smrg ;; 167029459361Smrg *-highlevel) 167129459361Smrg os=-bsd 167229459361Smrg ;; 167329459361Smrg *-encore) 167429459361Smrg os=-bsd 167529459361Smrg ;; 167629459361Smrg *-sgi) 167729459361Smrg os=-irix 167829459361Smrg ;; 167929459361Smrg *-siemens) 168029459361Smrg os=-sysv4 168129459361Smrg ;; 168229459361Smrg *-masscomp) 168329459361Smrg os=-rtu 168429459361Smrg ;; 168529459361Smrg f30[01]-fujitsu | f700-fujitsu) 168629459361Smrg os=-uxpv 168729459361Smrg ;; 168829459361Smrg *-rom68k) 168929459361Smrg os=-coff 169029459361Smrg ;; 169129459361Smrg *-*bug) 169229459361Smrg os=-coff 169329459361Smrg ;; 169429459361Smrg *-apple) 169529459361Smrg os=-macos 169629459361Smrg ;; 169729459361Smrg *-atari*) 169829459361Smrg os=-mint 169929459361Smrg ;; 170029459361Smrg *) 170129459361Smrg os=-none 170229459361Smrg ;; 170329459361Smrgesac 170429459361Smrgfi 170529459361Smrg 170629459361Smrg# Here we handle the case where we know the os, and the CPU type, but not the 170729459361Smrg# manufacturer. We pick the logical manufacturer. 170829459361Smrgvendor=unknown 170929459361Smrgcase $basic_machine in 171029459361Smrg *-unknown) 171129459361Smrg case $os in 171229459361Smrg -riscix*) 171329459361Smrg vendor=acorn 171429459361Smrg ;; 171529459361Smrg -sunos*) 171629459361Smrg vendor=sun 171729459361Smrg ;; 1718c3c9b392Smrg -cnk*|-aix*) 171929459361Smrg vendor=ibm 172029459361Smrg ;; 172129459361Smrg -beos*) 172229459361Smrg vendor=be 172329459361Smrg ;; 172429459361Smrg -hpux*) 172529459361Smrg vendor=hp 172629459361Smrg ;; 172729459361Smrg -mpeix*) 172829459361Smrg vendor=hp 172929459361Smrg ;; 173029459361Smrg -hiux*) 173129459361Smrg vendor=hitachi 173229459361Smrg ;; 173329459361Smrg -unos*) 173429459361Smrg vendor=crds 173529459361Smrg ;; 173629459361Smrg -dgux*) 173729459361Smrg vendor=dg 173829459361Smrg ;; 173929459361Smrg -luna*) 174029459361Smrg vendor=omron 174129459361Smrg ;; 174229459361Smrg -genix*) 174329459361Smrg vendor=ns 174429459361Smrg ;; 174529459361Smrg -mvs* | -opened*) 174629459361Smrg vendor=ibm 174729459361Smrg ;; 174829459361Smrg -os400*) 174929459361Smrg vendor=ibm 175029459361Smrg ;; 175129459361Smrg -ptx*) 175229459361Smrg vendor=sequent 175329459361Smrg ;; 175429459361Smrg -tpf*) 175529459361Smrg vendor=ibm 175629459361Smrg ;; 175729459361Smrg -vxsim* | -vxworks* | -windiss*) 175829459361Smrg vendor=wrs 175929459361Smrg ;; 176029459361Smrg -aux*) 176129459361Smrg vendor=apple 176229459361Smrg ;; 176329459361Smrg -hms*) 176429459361Smrg vendor=hitachi 176529459361Smrg ;; 176629459361Smrg -mpw* | -macos*) 176729459361Smrg vendor=apple 176829459361Smrg ;; 176929459361Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 177029459361Smrg vendor=atari 177129459361Smrg ;; 177229459361Smrg -vos*) 177329459361Smrg vendor=stratus 177429459361Smrg ;; 177529459361Smrg esac 177629459361Smrg basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 177729459361Smrg ;; 177829459361Smrgesac 177929459361Smrg 178029459361Smrgecho $basic_machine$os 178129459361Smrgexit 178229459361Smrg 178329459361Smrg# Local variables: 178429459361Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 178529459361Smrg# time-stamp-start: "timestamp='" 178629459361Smrg# time-stamp-format: "%:y-%02m-%02d" 178729459361Smrg# time-stamp-end: "'" 178829459361Smrg# End: 1789