config.sub revision 5eeb4e8f
1972599cfSmrg#! /bin/sh 2972599cfSmrg# Configuration validation subroutine script. 35eeb4e8fSmrg# Copyright 1992-2014 Free Software Foundation, Inc. 4972599cfSmrg 55eeb4e8fSmrgtimestamp='2014-12-03' 6972599cfSmrg 75eeb4e8fSmrg# This file is free software; you can redistribute it and/or modify it 85eeb4e8fSmrg# under the terms of the GNU General Public License as published by 95eeb4e8fSmrg# the Free Software Foundation; either version 3 of the License, or 10972599cfSmrg# (at your option) any later version. 11972599cfSmrg# 125eeb4e8fSmrg# This program is distributed in the hope that it will be useful, but 135eeb4e8fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 145eeb4e8fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 155eeb4e8fSmrg# General Public License for more details. 16972599cfSmrg# 17972599cfSmrg# You should have received a copy of the GNU General Public License 185eeb4e8fSmrg# along with this program; if not, see <http://www.gnu.org/licenses/>. 19972599cfSmrg# 20972599cfSmrg# As a special exception to the GNU General Public License, if you 21972599cfSmrg# distribute this file as part of a program that contains a 22972599cfSmrg# configuration script generated by Autoconf, you may include it under 235eeb4e8fSmrg# the same distribution terms that you use for the rest of that 245eeb4e8fSmrg# program. This Exception is an additional permission under section 7 255eeb4e8fSmrg# of the GNU General Public License, version 3 ("GPLv3"). 26972599cfSmrg 27972599cfSmrg 285eeb4e8fSmrg# Please send patches to <config-patches@gnu.org>. 29972599cfSmrg# 30972599cfSmrg# Configuration subroutine to validate and canonicalize a configuration type. 31972599cfSmrg# Supply the specified configuration type as an argument. 32972599cfSmrg# If it is invalid, we print an error message on stderr and exit with code 1. 33972599cfSmrg# Otherwise, we print the canonical config type on stdout and succeed. 34972599cfSmrg 35972599cfSmrg# You can get the latest version of this script from: 36972599cfSmrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 37972599cfSmrg 38972599cfSmrg# This file is supposed to be the same for all GNU packages 39972599cfSmrg# and recognize all the CPU types, system types and aliases 40972599cfSmrg# that are meaningful with *any* GNU software. 41972599cfSmrg# Each package is responsible for reporting which valid configurations 42972599cfSmrg# it does not support. The user should be able to distinguish 43972599cfSmrg# a failure to support a valid configuration from a meaningless 44972599cfSmrg# configuration. 45972599cfSmrg 46972599cfSmrg# The goal of this file is to map all the various variations of a given 47972599cfSmrg# machine specification into a single specification in the form: 48972599cfSmrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 49972599cfSmrg# or in some cases, the newer four-part form: 50972599cfSmrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 51972599cfSmrg# It is wrong to echo any other type of specification. 52972599cfSmrg 53972599cfSmrgme=`echo "$0" | sed -e 's,.*/,,'` 54972599cfSmrg 55972599cfSmrgusage="\ 56972599cfSmrgUsage: $0 [OPTION] CPU-MFR-OPSYS 57972599cfSmrg $0 [OPTION] ALIAS 58972599cfSmrg 59972599cfSmrgCanonicalize a configuration name. 60972599cfSmrg 61972599cfSmrgOperation modes: 62972599cfSmrg -h, --help print this help, then exit 63972599cfSmrg -t, --time-stamp print date of last modification, then exit 64972599cfSmrg -v, --version print version number, then exit 65972599cfSmrg 66972599cfSmrgReport bugs and patches to <config-patches@gnu.org>." 67972599cfSmrg 68972599cfSmrgversion="\ 69972599cfSmrgGNU config.sub ($timestamp) 70972599cfSmrg 715eeb4e8fSmrgCopyright 1992-2014 Free Software Foundation, Inc. 72972599cfSmrg 73972599cfSmrgThis is free software; see the source for copying conditions. There is NO 74972599cfSmrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 75972599cfSmrg 76972599cfSmrghelp=" 77972599cfSmrgTry \`$me --help' for more information." 78972599cfSmrg 79972599cfSmrg# Parse command line 80972599cfSmrgwhile test $# -gt 0 ; do 81972599cfSmrg case $1 in 82972599cfSmrg --time-stamp | --time* | -t ) 83972599cfSmrg echo "$timestamp" ; exit ;; 84972599cfSmrg --version | -v ) 85972599cfSmrg echo "$version" ; exit ;; 86972599cfSmrg --help | --h* | -h ) 87972599cfSmrg echo "$usage"; exit ;; 88972599cfSmrg -- ) # Stop option processing 89972599cfSmrg shift; break ;; 90972599cfSmrg - ) # Use stdin as input. 91972599cfSmrg break ;; 92972599cfSmrg -* ) 93972599cfSmrg echo "$me: invalid option $1$help" 94972599cfSmrg exit 1 ;; 95972599cfSmrg 96972599cfSmrg *local*) 97972599cfSmrg # First pass through any local machine types. 98972599cfSmrg echo $1 99972599cfSmrg exit ;; 100972599cfSmrg 101972599cfSmrg * ) 102972599cfSmrg break ;; 103972599cfSmrg esac 104972599cfSmrgdone 105972599cfSmrg 106972599cfSmrgcase $# in 107972599cfSmrg 0) echo "$me: missing argument$help" >&2 108972599cfSmrg exit 1;; 109972599cfSmrg 1) ;; 110972599cfSmrg *) echo "$me: too many arguments$help" >&2 111972599cfSmrg exit 1;; 112972599cfSmrgesac 113972599cfSmrg 114972599cfSmrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 115972599cfSmrg# Here we must recognize all the valid KERNEL-OS combinations. 116972599cfSmrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 117972599cfSmrgcase $maybe_os in 118972599cfSmrg nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 1195eeb4e8fSmrg linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 120972599cfSmrg knetbsd*-gnu* | netbsd*-gnu* | \ 121972599cfSmrg kopensolaris*-gnu* | \ 122972599cfSmrg storm-chaos* | os2-emx* | rtmk-nova*) 123972599cfSmrg os=-$maybe_os 124972599cfSmrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 125972599cfSmrg ;; 1265eeb4e8fSmrg android-linux) 1275eeb4e8fSmrg os=-linux-android 1285eeb4e8fSmrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 1295eeb4e8fSmrg ;; 130972599cfSmrg *) 131972599cfSmrg basic_machine=`echo $1 | sed 's/-[^-]*$//'` 132972599cfSmrg if [ $basic_machine != $1 ] 133972599cfSmrg then os=`echo $1 | sed 's/.*-/-/'` 134972599cfSmrg else os=; fi 135972599cfSmrg ;; 136972599cfSmrgesac 137972599cfSmrg 138972599cfSmrg### Let's recognize common machines as not being operating systems so 139972599cfSmrg### that things like config.sub decstation-3100 work. We also 140972599cfSmrg### recognize some manufacturers as not being operating systems, so we 141972599cfSmrg### can provide default operating systems below. 142972599cfSmrgcase $os in 143972599cfSmrg -sun*os*) 144972599cfSmrg # Prevent following clause from handling this invalid input. 145972599cfSmrg ;; 146972599cfSmrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 147972599cfSmrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 148972599cfSmrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 149972599cfSmrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 150972599cfSmrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 151972599cfSmrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 1525eeb4e8fSmrg -apple | -axis | -knuth | -cray | -microblaze*) 153972599cfSmrg os= 154972599cfSmrg basic_machine=$1 155972599cfSmrg ;; 156972599cfSmrg -bluegene*) 157972599cfSmrg os=-cnk 158972599cfSmrg ;; 159972599cfSmrg -sim | -cisco | -oki | -wec | -winbond) 160972599cfSmrg os= 161972599cfSmrg basic_machine=$1 162972599cfSmrg ;; 163972599cfSmrg -scout) 164972599cfSmrg ;; 165972599cfSmrg -wrs) 166972599cfSmrg os=-vxworks 167972599cfSmrg basic_machine=$1 168972599cfSmrg ;; 169972599cfSmrg -chorusos*) 170972599cfSmrg os=-chorusos 171972599cfSmrg basic_machine=$1 172972599cfSmrg ;; 173972599cfSmrg -chorusrdb) 174972599cfSmrg os=-chorusrdb 175972599cfSmrg basic_machine=$1 176972599cfSmrg ;; 177972599cfSmrg -hiux*) 178972599cfSmrg os=-hiuxwe2 179972599cfSmrg ;; 180972599cfSmrg -sco6) 181972599cfSmrg os=-sco5v6 182972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 183972599cfSmrg ;; 184972599cfSmrg -sco5) 185972599cfSmrg os=-sco3.2v5 186972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 187972599cfSmrg ;; 188972599cfSmrg -sco4) 189972599cfSmrg os=-sco3.2v4 190972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 191972599cfSmrg ;; 192972599cfSmrg -sco3.2.[4-9]*) 193972599cfSmrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 194972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 195972599cfSmrg ;; 196972599cfSmrg -sco3.2v[4-9]*) 197972599cfSmrg # Don't forget version if it is 3.2v4 or newer. 198972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 199972599cfSmrg ;; 200972599cfSmrg -sco5v6*) 201972599cfSmrg # Don't forget version if it is 3.2v4 or newer. 202972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 203972599cfSmrg ;; 204972599cfSmrg -sco*) 205972599cfSmrg os=-sco3.2v2 206972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 207972599cfSmrg ;; 208972599cfSmrg -udk*) 209972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 210972599cfSmrg ;; 211972599cfSmrg -isc) 212972599cfSmrg os=-isc2.2 213972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 214972599cfSmrg ;; 215972599cfSmrg -clix*) 216972599cfSmrg basic_machine=clipper-intergraph 217972599cfSmrg ;; 218972599cfSmrg -isc*) 219972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 220972599cfSmrg ;; 2215eeb4e8fSmrg -lynx*178) 2225eeb4e8fSmrg os=-lynxos178 2235eeb4e8fSmrg ;; 2245eeb4e8fSmrg -lynx*5) 2255eeb4e8fSmrg os=-lynxos5 2265eeb4e8fSmrg ;; 227972599cfSmrg -lynx*) 228972599cfSmrg os=-lynxos 229972599cfSmrg ;; 230972599cfSmrg -ptx*) 231972599cfSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 232972599cfSmrg ;; 233972599cfSmrg -windowsnt*) 234972599cfSmrg os=`echo $os | sed -e 's/windowsnt/winnt/'` 235972599cfSmrg ;; 236972599cfSmrg -psos*) 237972599cfSmrg os=-psos 238972599cfSmrg ;; 239972599cfSmrg -mint | -mint[0-9]*) 240972599cfSmrg basic_machine=m68k-atari 241972599cfSmrg os=-mint 242972599cfSmrg ;; 243972599cfSmrgesac 244972599cfSmrg 245972599cfSmrg# Decode aliases for certain CPU-COMPANY combinations. 246972599cfSmrgcase $basic_machine in 247972599cfSmrg # Recognize the basic CPU types without company name. 248972599cfSmrg # Some are omitted here because they have special meanings below. 249972599cfSmrg 1750a | 580 \ 250972599cfSmrg | a29k \ 2515eeb4e8fSmrg | aarch64 | aarch64_be \ 252972599cfSmrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 253972599cfSmrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 254972599cfSmrg | am33_2.0 \ 2555eeb4e8fSmrg | arc | arceb \ 2565eeb4e8fSmrg | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 2575eeb4e8fSmrg | avr | avr32 \ 2585eeb4e8fSmrg | be32 | be64 \ 259972599cfSmrg | bfin \ 2605eeb4e8fSmrg | c4x | c8051 | clipper \ 261972599cfSmrg | d10v | d30v | dlx | dsp16xx \ 262972599cfSmrg | epiphany \ 263972599cfSmrg | fido | fr30 | frv \ 264972599cfSmrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 265972599cfSmrg | hexagon \ 266972599cfSmrg | i370 | i860 | i960 | ia64 \ 267972599cfSmrg | ip2k | iq2000 \ 2685eeb4e8fSmrg | k1om \ 269972599cfSmrg | le32 | le64 \ 270972599cfSmrg | lm32 \ 271972599cfSmrg | m32c | m32r | m32rle | m68000 | m68k | m88k \ 2725eeb4e8fSmrg | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 273972599cfSmrg | mips | mipsbe | mipseb | mipsel | mipsle \ 274972599cfSmrg | mips16 \ 275972599cfSmrg | mips64 | mips64el \ 276972599cfSmrg | mips64octeon | mips64octeonel \ 277972599cfSmrg | mips64orion | mips64orionel \ 278972599cfSmrg | mips64r5900 | mips64r5900el \ 279972599cfSmrg | mips64vr | mips64vrel \ 280972599cfSmrg | mips64vr4100 | mips64vr4100el \ 281972599cfSmrg | mips64vr4300 | mips64vr4300el \ 282972599cfSmrg | mips64vr5000 | mips64vr5000el \ 283972599cfSmrg | mips64vr5900 | mips64vr5900el \ 284972599cfSmrg | mipsisa32 | mipsisa32el \ 285972599cfSmrg | mipsisa32r2 | mipsisa32r2el \ 2865eeb4e8fSmrg | mipsisa32r6 | mipsisa32r6el \ 287972599cfSmrg | mipsisa64 | mipsisa64el \ 288972599cfSmrg | mipsisa64r2 | mipsisa64r2el \ 2895eeb4e8fSmrg | mipsisa64r6 | mipsisa64r6el \ 290972599cfSmrg | mipsisa64sb1 | mipsisa64sb1el \ 291972599cfSmrg | mipsisa64sr71k | mipsisa64sr71kel \ 2925eeb4e8fSmrg | mipsr5900 | mipsr5900el \ 293972599cfSmrg | mipstx39 | mipstx39el \ 294972599cfSmrg | mn10200 | mn10300 \ 295972599cfSmrg | moxie \ 296972599cfSmrg | mt \ 297972599cfSmrg | msp430 \ 298972599cfSmrg | nds32 | nds32le | nds32be \ 2995eeb4e8fSmrg | nios | nios2 | nios2eb | nios2el \ 300972599cfSmrg | ns16k | ns32k \ 3015eeb4e8fSmrg | open8 | or1k | or1knd | or32 \ 302972599cfSmrg | pdp10 | pdp11 | pj | pjl \ 303972599cfSmrg | powerpc | powerpc64 | powerpc64le | powerpcle \ 304972599cfSmrg | pyramid \ 3055eeb4e8fSmrg | riscv32 | riscv64 \ 306972599cfSmrg | rl78 | rx \ 307972599cfSmrg | score \ 308972599cfSmrg | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 309972599cfSmrg | sh64 | sh64le \ 310972599cfSmrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 311972599cfSmrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 312972599cfSmrg | spu \ 313972599cfSmrg | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 314972599cfSmrg | ubicom32 \ 315972599cfSmrg | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 3165eeb4e8fSmrg | visium \ 317972599cfSmrg | we32k \ 318972599cfSmrg | x86 | xc16x | xstormy16 | xtensa \ 319972599cfSmrg | z8k | z80) 320972599cfSmrg basic_machine=$basic_machine-unknown 321972599cfSmrg ;; 322972599cfSmrg c54x) 323972599cfSmrg basic_machine=tic54x-unknown 324972599cfSmrg ;; 325972599cfSmrg c55x) 326972599cfSmrg basic_machine=tic55x-unknown 327972599cfSmrg ;; 328972599cfSmrg c6x) 329972599cfSmrg basic_machine=tic6x-unknown 330972599cfSmrg ;; 3315eeb4e8fSmrg leon|leon[3-9]) 3325eeb4e8fSmrg basic_machine=sparc-$basic_machine 3335eeb4e8fSmrg ;; 3345eeb4e8fSmrg m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) 335972599cfSmrg basic_machine=$basic_machine-unknown 336972599cfSmrg os=-none 337972599cfSmrg ;; 338972599cfSmrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 339972599cfSmrg ;; 340972599cfSmrg ms1) 341972599cfSmrg basic_machine=mt-unknown 342972599cfSmrg ;; 343972599cfSmrg 344972599cfSmrg strongarm | thumb | xscale) 345972599cfSmrg basic_machine=arm-unknown 346972599cfSmrg ;; 3475eeb4e8fSmrg xgate) 3485eeb4e8fSmrg basic_machine=$basic_machine-unknown 3495eeb4e8fSmrg os=-none 3505eeb4e8fSmrg ;; 351972599cfSmrg xscaleeb) 352972599cfSmrg basic_machine=armeb-unknown 353972599cfSmrg ;; 354972599cfSmrg 355972599cfSmrg xscaleel) 356972599cfSmrg basic_machine=armel-unknown 357972599cfSmrg ;; 358972599cfSmrg 359972599cfSmrg # We use `pc' rather than `unknown' 360972599cfSmrg # because (1) that's what they normally are, and 361972599cfSmrg # (2) the word "unknown" tends to confuse beginning users. 362972599cfSmrg i*86 | x86_64) 363972599cfSmrg basic_machine=$basic_machine-pc 364972599cfSmrg ;; 365972599cfSmrg # Object if more than one company name word. 366972599cfSmrg *-*-*) 367972599cfSmrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 368972599cfSmrg exit 1 369972599cfSmrg ;; 370972599cfSmrg # Recognize the basic CPU types with company name. 371972599cfSmrg 580-* \ 372972599cfSmrg | a29k-* \ 3735eeb4e8fSmrg | aarch64-* | aarch64_be-* \ 374972599cfSmrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 375972599cfSmrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 3765eeb4e8fSmrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ 377972599cfSmrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 378972599cfSmrg | avr-* | avr32-* \ 379972599cfSmrg | be32-* | be64-* \ 380972599cfSmrg | bfin-* | bs2000-* \ 381972599cfSmrg | c[123]* | c30-* | [cjt]90-* | c4x-* \ 3825eeb4e8fSmrg | c8051-* | clipper-* | craynv-* | cydra-* \ 383972599cfSmrg | d10v-* | d30v-* | dlx-* \ 384972599cfSmrg | elxsi-* \ 385972599cfSmrg | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 386972599cfSmrg | h8300-* | h8500-* \ 387972599cfSmrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 388972599cfSmrg | hexagon-* \ 389972599cfSmrg | i*86-* | i860-* | i960-* | ia64-* \ 390972599cfSmrg | ip2k-* | iq2000-* \ 3915eeb4e8fSmrg | k1om-* \ 392972599cfSmrg | le32-* | le64-* \ 393972599cfSmrg | lm32-* \ 394972599cfSmrg | m32c-* | m32r-* | m32rle-* \ 395972599cfSmrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 3965eeb4e8fSmrg | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 3975eeb4e8fSmrg | microblaze-* | microblazeel-* \ 398972599cfSmrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 399972599cfSmrg | mips16-* \ 400972599cfSmrg | mips64-* | mips64el-* \ 401972599cfSmrg | mips64octeon-* | mips64octeonel-* \ 402972599cfSmrg | mips64orion-* | mips64orionel-* \ 403972599cfSmrg | mips64r5900-* | mips64r5900el-* \ 404972599cfSmrg | mips64vr-* | mips64vrel-* \ 405972599cfSmrg | mips64vr4100-* | mips64vr4100el-* \ 406972599cfSmrg | mips64vr4300-* | mips64vr4300el-* \ 407972599cfSmrg | mips64vr5000-* | mips64vr5000el-* \ 408972599cfSmrg | mips64vr5900-* | mips64vr5900el-* \ 409972599cfSmrg | mipsisa32-* | mipsisa32el-* \ 410972599cfSmrg | mipsisa32r2-* | mipsisa32r2el-* \ 4115eeb4e8fSmrg | mipsisa32r6-* | mipsisa32r6el-* \ 412972599cfSmrg | mipsisa64-* | mipsisa64el-* \ 413972599cfSmrg | mipsisa64r2-* | mipsisa64r2el-* \ 4145eeb4e8fSmrg | mipsisa64r6-* | mipsisa64r6el-* \ 415972599cfSmrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 416972599cfSmrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 4175eeb4e8fSmrg | mipsr5900-* | mipsr5900el-* \ 418972599cfSmrg | mipstx39-* | mipstx39el-* \ 419972599cfSmrg | mmix-* \ 420972599cfSmrg | mt-* \ 421972599cfSmrg | msp430-* \ 422972599cfSmrg | nds32-* | nds32le-* | nds32be-* \ 4235eeb4e8fSmrg | nios-* | nios2-* | nios2eb-* | nios2el-* \ 424972599cfSmrg | none-* | np1-* | ns16k-* | ns32k-* \ 425972599cfSmrg | open8-* \ 4265eeb4e8fSmrg | or1k*-* \ 427972599cfSmrg | orion-* \ 428972599cfSmrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 429972599cfSmrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 430972599cfSmrg | pyramid-* \ 431972599cfSmrg | rl78-* | romp-* | rs6000-* | rx-* \ 432972599cfSmrg | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 433972599cfSmrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 434972599cfSmrg | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 435972599cfSmrg | sparclite-* \ 436972599cfSmrg | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 437972599cfSmrg | tahoe-* \ 438972599cfSmrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 439972599cfSmrg | tile*-* \ 440972599cfSmrg | tron-* \ 441972599cfSmrg | ubicom32-* \ 442972599cfSmrg | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 443972599cfSmrg | vax-* \ 4445eeb4e8fSmrg | visium-* \ 445972599cfSmrg | we32k-* \ 446972599cfSmrg | x86-* | x86_64-* | xc16x-* | xps100-* \ 447972599cfSmrg | xstormy16-* | xtensa*-* \ 448972599cfSmrg | ymp-* \ 449972599cfSmrg | z8k-* | z80-*) 450972599cfSmrg ;; 451972599cfSmrg # Recognize the basic CPU types without company name, with glob match. 452972599cfSmrg xtensa*) 453972599cfSmrg basic_machine=$basic_machine-unknown 454972599cfSmrg ;; 455972599cfSmrg # Recognize the various machine names and aliases which stand 456972599cfSmrg # for a CPU type and a company and sometimes even an OS. 457972599cfSmrg 386bsd) 458972599cfSmrg basic_machine=i386-unknown 459972599cfSmrg os=-bsd 460972599cfSmrg ;; 461972599cfSmrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 462972599cfSmrg basic_machine=m68000-att 463972599cfSmrg ;; 464972599cfSmrg 3b*) 465972599cfSmrg basic_machine=we32k-att 466972599cfSmrg ;; 467972599cfSmrg a29khif) 468972599cfSmrg basic_machine=a29k-amd 469972599cfSmrg os=-udi 470972599cfSmrg ;; 471972599cfSmrg abacus) 472972599cfSmrg basic_machine=abacus-unknown 473972599cfSmrg ;; 474972599cfSmrg adobe68k) 475972599cfSmrg basic_machine=m68010-adobe 476972599cfSmrg os=-scout 477972599cfSmrg ;; 478972599cfSmrg alliant | fx80) 479972599cfSmrg basic_machine=fx80-alliant 480972599cfSmrg ;; 481972599cfSmrg altos | altos3068) 482972599cfSmrg basic_machine=m68k-altos 483972599cfSmrg ;; 484972599cfSmrg am29k) 485972599cfSmrg basic_machine=a29k-none 486972599cfSmrg os=-bsd 487972599cfSmrg ;; 488972599cfSmrg amd64) 489972599cfSmrg basic_machine=x86_64-pc 490972599cfSmrg ;; 491972599cfSmrg amd64-*) 492972599cfSmrg basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 493972599cfSmrg ;; 494972599cfSmrg amdahl) 495972599cfSmrg basic_machine=580-amdahl 496972599cfSmrg os=-sysv 497972599cfSmrg ;; 498972599cfSmrg amiga | amiga-*) 499972599cfSmrg basic_machine=m68k-unknown 500972599cfSmrg ;; 501972599cfSmrg amigaos | amigados) 502972599cfSmrg basic_machine=m68k-unknown 503972599cfSmrg os=-amigaos 504972599cfSmrg ;; 505972599cfSmrg amigaunix | amix) 506972599cfSmrg basic_machine=m68k-unknown 507972599cfSmrg os=-sysv4 508972599cfSmrg ;; 509972599cfSmrg apollo68) 510972599cfSmrg basic_machine=m68k-apollo 511972599cfSmrg os=-sysv 512972599cfSmrg ;; 513972599cfSmrg apollo68bsd) 514972599cfSmrg basic_machine=m68k-apollo 515972599cfSmrg os=-bsd 516972599cfSmrg ;; 517972599cfSmrg aros) 518972599cfSmrg basic_machine=i386-pc 519972599cfSmrg os=-aros 520972599cfSmrg ;; 521972599cfSmrg aux) 522972599cfSmrg basic_machine=m68k-apple 523972599cfSmrg os=-aux 524972599cfSmrg ;; 525972599cfSmrg balance) 526972599cfSmrg basic_machine=ns32k-sequent 527972599cfSmrg os=-dynix 528972599cfSmrg ;; 529972599cfSmrg blackfin) 530972599cfSmrg basic_machine=bfin-unknown 531972599cfSmrg os=-linux 532972599cfSmrg ;; 533972599cfSmrg blackfin-*) 534972599cfSmrg basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 535972599cfSmrg os=-linux 536972599cfSmrg ;; 537972599cfSmrg bluegene*) 538972599cfSmrg basic_machine=powerpc-ibm 539972599cfSmrg os=-cnk 540972599cfSmrg ;; 541972599cfSmrg c54x-*) 542972599cfSmrg basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 543972599cfSmrg ;; 544972599cfSmrg c55x-*) 545972599cfSmrg basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 546972599cfSmrg ;; 547972599cfSmrg c6x-*) 548972599cfSmrg basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 549972599cfSmrg ;; 550972599cfSmrg c90) 551972599cfSmrg basic_machine=c90-cray 552972599cfSmrg os=-unicos 553972599cfSmrg ;; 554972599cfSmrg cegcc) 555972599cfSmrg basic_machine=arm-unknown 556972599cfSmrg os=-cegcc 557972599cfSmrg ;; 558972599cfSmrg convex-c1) 559972599cfSmrg basic_machine=c1-convex 560972599cfSmrg os=-bsd 561972599cfSmrg ;; 562972599cfSmrg convex-c2) 563972599cfSmrg basic_machine=c2-convex 564972599cfSmrg os=-bsd 565972599cfSmrg ;; 566972599cfSmrg convex-c32) 567972599cfSmrg basic_machine=c32-convex 568972599cfSmrg os=-bsd 569972599cfSmrg ;; 570972599cfSmrg convex-c34) 571972599cfSmrg basic_machine=c34-convex 572972599cfSmrg os=-bsd 573972599cfSmrg ;; 574972599cfSmrg convex-c38) 575972599cfSmrg basic_machine=c38-convex 576972599cfSmrg os=-bsd 577972599cfSmrg ;; 578972599cfSmrg cray | j90) 579972599cfSmrg basic_machine=j90-cray 580972599cfSmrg os=-unicos 581972599cfSmrg ;; 582972599cfSmrg craynv) 583972599cfSmrg basic_machine=craynv-cray 584972599cfSmrg os=-unicosmp 585972599cfSmrg ;; 586972599cfSmrg cr16 | cr16-*) 587972599cfSmrg basic_machine=cr16-unknown 588972599cfSmrg os=-elf 589972599cfSmrg ;; 590972599cfSmrg crds | unos) 591972599cfSmrg basic_machine=m68k-crds 592972599cfSmrg ;; 593972599cfSmrg crisv32 | crisv32-* | etraxfs*) 594972599cfSmrg basic_machine=crisv32-axis 595972599cfSmrg ;; 596972599cfSmrg cris | cris-* | etrax*) 597972599cfSmrg basic_machine=cris-axis 598972599cfSmrg ;; 599972599cfSmrg crx) 600972599cfSmrg basic_machine=crx-unknown 601972599cfSmrg os=-elf 602972599cfSmrg ;; 603972599cfSmrg da30 | da30-*) 604972599cfSmrg basic_machine=m68k-da30 605972599cfSmrg ;; 606972599cfSmrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 607972599cfSmrg basic_machine=mips-dec 608972599cfSmrg ;; 609972599cfSmrg decsystem10* | dec10*) 610972599cfSmrg basic_machine=pdp10-dec 611972599cfSmrg os=-tops10 612972599cfSmrg ;; 613972599cfSmrg decsystem20* | dec20*) 614972599cfSmrg basic_machine=pdp10-dec 615972599cfSmrg os=-tops20 616972599cfSmrg ;; 617972599cfSmrg delta | 3300 | motorola-3300 | motorola-delta \ 618972599cfSmrg | 3300-motorola | delta-motorola) 619972599cfSmrg basic_machine=m68k-motorola 620972599cfSmrg ;; 621972599cfSmrg delta88) 622972599cfSmrg basic_machine=m88k-motorola 623972599cfSmrg os=-sysv3 624972599cfSmrg ;; 625972599cfSmrg dicos) 626972599cfSmrg basic_machine=i686-pc 627972599cfSmrg os=-dicos 628972599cfSmrg ;; 629972599cfSmrg djgpp) 630972599cfSmrg basic_machine=i586-pc 631972599cfSmrg os=-msdosdjgpp 632972599cfSmrg ;; 633972599cfSmrg dpx20 | dpx20-*) 634972599cfSmrg basic_machine=rs6000-bull 635972599cfSmrg os=-bosx 636972599cfSmrg ;; 637972599cfSmrg dpx2* | dpx2*-bull) 638972599cfSmrg basic_machine=m68k-bull 639972599cfSmrg os=-sysv3 640972599cfSmrg ;; 641972599cfSmrg ebmon29k) 642972599cfSmrg basic_machine=a29k-amd 643972599cfSmrg os=-ebmon 644972599cfSmrg ;; 645972599cfSmrg elxsi) 646972599cfSmrg basic_machine=elxsi-elxsi 647972599cfSmrg os=-bsd 648972599cfSmrg ;; 649972599cfSmrg encore | umax | mmax) 650972599cfSmrg basic_machine=ns32k-encore 651972599cfSmrg ;; 652972599cfSmrg es1800 | OSE68k | ose68k | ose | OSE) 653972599cfSmrg basic_machine=m68k-ericsson 654972599cfSmrg os=-ose 655972599cfSmrg ;; 656972599cfSmrg fx2800) 657972599cfSmrg basic_machine=i860-alliant 658972599cfSmrg ;; 659972599cfSmrg genix) 660972599cfSmrg basic_machine=ns32k-ns 661972599cfSmrg ;; 662972599cfSmrg gmicro) 663972599cfSmrg basic_machine=tron-gmicro 664972599cfSmrg os=-sysv 665972599cfSmrg ;; 666972599cfSmrg go32) 667972599cfSmrg basic_machine=i386-pc 668972599cfSmrg os=-go32 669972599cfSmrg ;; 670972599cfSmrg h3050r* | hiux*) 671972599cfSmrg basic_machine=hppa1.1-hitachi 672972599cfSmrg os=-hiuxwe2 673972599cfSmrg ;; 674972599cfSmrg h8300hms) 675972599cfSmrg basic_machine=h8300-hitachi 676972599cfSmrg os=-hms 677972599cfSmrg ;; 678972599cfSmrg h8300xray) 679972599cfSmrg basic_machine=h8300-hitachi 680972599cfSmrg os=-xray 681972599cfSmrg ;; 682972599cfSmrg h8500hms) 683972599cfSmrg basic_machine=h8500-hitachi 684972599cfSmrg os=-hms 685972599cfSmrg ;; 686972599cfSmrg harris) 687972599cfSmrg basic_machine=m88k-harris 688972599cfSmrg os=-sysv3 689972599cfSmrg ;; 690972599cfSmrg hp300-*) 691972599cfSmrg basic_machine=m68k-hp 692972599cfSmrg ;; 693972599cfSmrg hp300bsd) 694972599cfSmrg basic_machine=m68k-hp 695972599cfSmrg os=-bsd 696972599cfSmrg ;; 697972599cfSmrg hp300hpux) 698972599cfSmrg basic_machine=m68k-hp 699972599cfSmrg os=-hpux 700972599cfSmrg ;; 701972599cfSmrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 702972599cfSmrg basic_machine=hppa1.0-hp 703972599cfSmrg ;; 704972599cfSmrg hp9k2[0-9][0-9] | hp9k31[0-9]) 705972599cfSmrg basic_machine=m68000-hp 706972599cfSmrg ;; 707972599cfSmrg hp9k3[2-9][0-9]) 708972599cfSmrg basic_machine=m68k-hp 709972599cfSmrg ;; 710972599cfSmrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 711972599cfSmrg basic_machine=hppa1.0-hp 712972599cfSmrg ;; 713972599cfSmrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 714972599cfSmrg basic_machine=hppa1.1-hp 715972599cfSmrg ;; 716972599cfSmrg hp9k78[0-9] | hp78[0-9]) 717972599cfSmrg # FIXME: really hppa2.0-hp 718972599cfSmrg basic_machine=hppa1.1-hp 719972599cfSmrg ;; 720972599cfSmrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 721972599cfSmrg # FIXME: really hppa2.0-hp 722972599cfSmrg basic_machine=hppa1.1-hp 723972599cfSmrg ;; 724972599cfSmrg hp9k8[0-9][13679] | hp8[0-9][13679]) 725972599cfSmrg basic_machine=hppa1.1-hp 726972599cfSmrg ;; 727972599cfSmrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 728972599cfSmrg basic_machine=hppa1.0-hp 729972599cfSmrg ;; 730972599cfSmrg hppa-next) 731972599cfSmrg os=-nextstep3 732972599cfSmrg ;; 733972599cfSmrg hppaosf) 734972599cfSmrg basic_machine=hppa1.1-hp 735972599cfSmrg os=-osf 736972599cfSmrg ;; 737972599cfSmrg hppro) 738972599cfSmrg basic_machine=hppa1.1-hp 739972599cfSmrg os=-proelf 740972599cfSmrg ;; 741972599cfSmrg i370-ibm* | ibm*) 742972599cfSmrg basic_machine=i370-ibm 743972599cfSmrg ;; 744972599cfSmrg i*86v32) 745972599cfSmrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 746972599cfSmrg os=-sysv32 747972599cfSmrg ;; 748972599cfSmrg i*86v4*) 749972599cfSmrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 750972599cfSmrg os=-sysv4 751972599cfSmrg ;; 752972599cfSmrg i*86v) 753972599cfSmrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 754972599cfSmrg os=-sysv 755972599cfSmrg ;; 756972599cfSmrg i*86sol2) 757972599cfSmrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 758972599cfSmrg os=-solaris2 759972599cfSmrg ;; 760972599cfSmrg i386mach) 761972599cfSmrg basic_machine=i386-mach 762972599cfSmrg os=-mach 763972599cfSmrg ;; 764972599cfSmrg i386-vsta | vsta) 765972599cfSmrg basic_machine=i386-unknown 766972599cfSmrg os=-vsta 767972599cfSmrg ;; 768972599cfSmrg iris | iris4d) 769972599cfSmrg basic_machine=mips-sgi 770972599cfSmrg case $os in 771972599cfSmrg -irix*) 772972599cfSmrg ;; 773972599cfSmrg *) 774972599cfSmrg os=-irix4 775972599cfSmrg ;; 776972599cfSmrg esac 777972599cfSmrg ;; 778972599cfSmrg isi68 | isi) 779972599cfSmrg basic_machine=m68k-isi 780972599cfSmrg os=-sysv 781972599cfSmrg ;; 7825eeb4e8fSmrg leon-*|leon[3-9]-*) 7835eeb4e8fSmrg basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` 7845eeb4e8fSmrg ;; 785972599cfSmrg m68knommu) 786972599cfSmrg basic_machine=m68k-unknown 787972599cfSmrg os=-linux 788972599cfSmrg ;; 789972599cfSmrg m68knommu-*) 790972599cfSmrg basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 791972599cfSmrg os=-linux 792972599cfSmrg ;; 793972599cfSmrg m88k-omron*) 794972599cfSmrg basic_machine=m88k-omron 795972599cfSmrg ;; 796972599cfSmrg magnum | m3230) 797972599cfSmrg basic_machine=mips-mips 798972599cfSmrg os=-sysv 799972599cfSmrg ;; 800972599cfSmrg merlin) 801972599cfSmrg basic_machine=ns32k-utek 802972599cfSmrg os=-sysv 803972599cfSmrg ;; 8045eeb4e8fSmrg microblaze*) 805972599cfSmrg basic_machine=microblaze-xilinx 806972599cfSmrg ;; 8075eeb4e8fSmrg mingw64) 8085eeb4e8fSmrg basic_machine=x86_64-pc 8095eeb4e8fSmrg os=-mingw64 8105eeb4e8fSmrg ;; 811972599cfSmrg mingw32) 8125eeb4e8fSmrg basic_machine=i686-pc 813972599cfSmrg os=-mingw32 814972599cfSmrg ;; 815972599cfSmrg mingw32ce) 816972599cfSmrg basic_machine=arm-unknown 817972599cfSmrg os=-mingw32ce 818972599cfSmrg ;; 819972599cfSmrg miniframe) 820972599cfSmrg basic_machine=m68000-convergent 821972599cfSmrg ;; 822972599cfSmrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 823972599cfSmrg basic_machine=m68k-atari 824972599cfSmrg os=-mint 825972599cfSmrg ;; 826972599cfSmrg mips3*-*) 827972599cfSmrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 828972599cfSmrg ;; 829972599cfSmrg mips3*) 830972599cfSmrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 831972599cfSmrg ;; 832972599cfSmrg monitor) 833972599cfSmrg basic_machine=m68k-rom68k 834972599cfSmrg os=-coff 835972599cfSmrg ;; 836972599cfSmrg morphos) 837972599cfSmrg basic_machine=powerpc-unknown 838972599cfSmrg os=-morphos 839972599cfSmrg ;; 8405eeb4e8fSmrg moxiebox) 8415eeb4e8fSmrg basic_machine=moxie-unknown 8425eeb4e8fSmrg os=-moxiebox 8435eeb4e8fSmrg ;; 844972599cfSmrg msdos) 845972599cfSmrg basic_machine=i386-pc 846972599cfSmrg os=-msdos 847972599cfSmrg ;; 848972599cfSmrg ms1-*) 849972599cfSmrg basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 850972599cfSmrg ;; 851972599cfSmrg msys) 8525eeb4e8fSmrg basic_machine=i686-pc 853972599cfSmrg os=-msys 854972599cfSmrg ;; 855972599cfSmrg mvs) 856972599cfSmrg basic_machine=i370-ibm 857972599cfSmrg os=-mvs 858972599cfSmrg ;; 859972599cfSmrg nacl) 860972599cfSmrg basic_machine=le32-unknown 861972599cfSmrg os=-nacl 862972599cfSmrg ;; 863972599cfSmrg ncr3000) 864972599cfSmrg basic_machine=i486-ncr 865972599cfSmrg os=-sysv4 866972599cfSmrg ;; 867972599cfSmrg netbsd386) 868972599cfSmrg basic_machine=i386-unknown 869972599cfSmrg os=-netbsd 870972599cfSmrg ;; 871972599cfSmrg netwinder) 872972599cfSmrg basic_machine=armv4l-rebel 873972599cfSmrg os=-linux 874972599cfSmrg ;; 875972599cfSmrg news | news700 | news800 | news900) 876972599cfSmrg basic_machine=m68k-sony 877972599cfSmrg os=-newsos 878972599cfSmrg ;; 879972599cfSmrg news1000) 880972599cfSmrg basic_machine=m68030-sony 881972599cfSmrg os=-newsos 882972599cfSmrg ;; 883972599cfSmrg news-3600 | risc-news) 884972599cfSmrg basic_machine=mips-sony 885972599cfSmrg os=-newsos 886972599cfSmrg ;; 887972599cfSmrg necv70) 888972599cfSmrg basic_machine=v70-nec 889972599cfSmrg os=-sysv 890972599cfSmrg ;; 891972599cfSmrg next | m*-next ) 892972599cfSmrg basic_machine=m68k-next 893972599cfSmrg case $os in 894972599cfSmrg -nextstep* ) 895972599cfSmrg ;; 896972599cfSmrg -ns2*) 897972599cfSmrg os=-nextstep2 898972599cfSmrg ;; 899972599cfSmrg *) 900972599cfSmrg os=-nextstep3 901972599cfSmrg ;; 902972599cfSmrg esac 903972599cfSmrg ;; 904972599cfSmrg nh3000) 905972599cfSmrg basic_machine=m68k-harris 906972599cfSmrg os=-cxux 907972599cfSmrg ;; 908972599cfSmrg nh[45]000) 909972599cfSmrg basic_machine=m88k-harris 910972599cfSmrg os=-cxux 911972599cfSmrg ;; 912972599cfSmrg nindy960) 913972599cfSmrg basic_machine=i960-intel 914972599cfSmrg os=-nindy 915972599cfSmrg ;; 916972599cfSmrg mon960) 917972599cfSmrg basic_machine=i960-intel 918972599cfSmrg os=-mon960 919972599cfSmrg ;; 920972599cfSmrg nonstopux) 921972599cfSmrg basic_machine=mips-compaq 922972599cfSmrg os=-nonstopux 923972599cfSmrg ;; 924972599cfSmrg np1) 925972599cfSmrg basic_machine=np1-gould 926972599cfSmrg ;; 927972599cfSmrg neo-tandem) 928972599cfSmrg basic_machine=neo-tandem 929972599cfSmrg ;; 930972599cfSmrg nse-tandem) 931972599cfSmrg basic_machine=nse-tandem 932972599cfSmrg ;; 933972599cfSmrg nsr-tandem) 934972599cfSmrg basic_machine=nsr-tandem 935972599cfSmrg ;; 936972599cfSmrg op50n-* | op60c-*) 937972599cfSmrg basic_machine=hppa1.1-oki 938972599cfSmrg os=-proelf 939972599cfSmrg ;; 940972599cfSmrg openrisc | openrisc-*) 941972599cfSmrg basic_machine=or32-unknown 942972599cfSmrg ;; 943972599cfSmrg os400) 944972599cfSmrg basic_machine=powerpc-ibm 945972599cfSmrg os=-os400 946972599cfSmrg ;; 947972599cfSmrg OSE68000 | ose68000) 948972599cfSmrg basic_machine=m68000-ericsson 949972599cfSmrg os=-ose 950972599cfSmrg ;; 951972599cfSmrg os68k) 952972599cfSmrg basic_machine=m68k-none 953972599cfSmrg os=-os68k 954972599cfSmrg ;; 955972599cfSmrg pa-hitachi) 956972599cfSmrg basic_machine=hppa1.1-hitachi 957972599cfSmrg os=-hiuxwe2 958972599cfSmrg ;; 959972599cfSmrg paragon) 960972599cfSmrg basic_machine=i860-intel 961972599cfSmrg os=-osf 962972599cfSmrg ;; 963972599cfSmrg parisc) 964972599cfSmrg basic_machine=hppa-unknown 965972599cfSmrg os=-linux 966972599cfSmrg ;; 967972599cfSmrg parisc-*) 968972599cfSmrg basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 969972599cfSmrg os=-linux 970972599cfSmrg ;; 971972599cfSmrg pbd) 972972599cfSmrg basic_machine=sparc-tti 973972599cfSmrg ;; 974972599cfSmrg pbb) 975972599cfSmrg basic_machine=m68k-tti 976972599cfSmrg ;; 977972599cfSmrg pc532 | pc532-*) 978972599cfSmrg basic_machine=ns32k-pc532 979972599cfSmrg ;; 980972599cfSmrg pc98) 981972599cfSmrg basic_machine=i386-pc 982972599cfSmrg ;; 983972599cfSmrg pc98-*) 984972599cfSmrg basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 985972599cfSmrg ;; 986972599cfSmrg pentium | p5 | k5 | k6 | nexgen | viac3) 987972599cfSmrg basic_machine=i586-pc 988972599cfSmrg ;; 989972599cfSmrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 990972599cfSmrg basic_machine=i686-pc 991972599cfSmrg ;; 992972599cfSmrg pentiumii | pentium2 | pentiumiii | pentium3) 993972599cfSmrg basic_machine=i686-pc 994972599cfSmrg ;; 995972599cfSmrg pentium4) 996972599cfSmrg basic_machine=i786-pc 997972599cfSmrg ;; 998972599cfSmrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 999972599cfSmrg basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 1000972599cfSmrg ;; 1001972599cfSmrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 1002972599cfSmrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 1003972599cfSmrg ;; 1004972599cfSmrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1005972599cfSmrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 1006972599cfSmrg ;; 1007972599cfSmrg pentium4-*) 1008972599cfSmrg basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 1009972599cfSmrg ;; 1010972599cfSmrg pn) 1011972599cfSmrg basic_machine=pn-gould 1012972599cfSmrg ;; 1013972599cfSmrg power) basic_machine=power-ibm 1014972599cfSmrg ;; 1015972599cfSmrg ppc | ppcbe) basic_machine=powerpc-unknown 1016972599cfSmrg ;; 1017972599cfSmrg ppc-* | ppcbe-*) 1018972599cfSmrg basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 1019972599cfSmrg ;; 1020972599cfSmrg ppcle | powerpclittle | ppc-le | powerpc-little) 1021972599cfSmrg basic_machine=powerpcle-unknown 1022972599cfSmrg ;; 1023972599cfSmrg ppcle-* | powerpclittle-*) 1024972599cfSmrg basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 1025972599cfSmrg ;; 1026972599cfSmrg ppc64) basic_machine=powerpc64-unknown 1027972599cfSmrg ;; 1028972599cfSmrg ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 1029972599cfSmrg ;; 1030972599cfSmrg ppc64le | powerpc64little | ppc64-le | powerpc64-little) 1031972599cfSmrg basic_machine=powerpc64le-unknown 1032972599cfSmrg ;; 1033972599cfSmrg ppc64le-* | powerpc64little-*) 1034972599cfSmrg basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 1035972599cfSmrg ;; 1036972599cfSmrg ps2) 1037972599cfSmrg basic_machine=i386-ibm 1038972599cfSmrg ;; 1039972599cfSmrg pw32) 1040972599cfSmrg basic_machine=i586-unknown 1041972599cfSmrg os=-pw32 1042972599cfSmrg ;; 10435eeb4e8fSmrg rdos | rdos64) 10445eeb4e8fSmrg basic_machine=x86_64-pc 10455eeb4e8fSmrg os=-rdos 10465eeb4e8fSmrg ;; 10475eeb4e8fSmrg rdos32) 1048972599cfSmrg basic_machine=i386-pc 1049972599cfSmrg os=-rdos 1050972599cfSmrg ;; 1051972599cfSmrg rom68k) 1052972599cfSmrg basic_machine=m68k-rom68k 1053972599cfSmrg os=-coff 1054972599cfSmrg ;; 1055972599cfSmrg rm[46]00) 1056972599cfSmrg basic_machine=mips-siemens 1057972599cfSmrg ;; 1058972599cfSmrg rtpc | rtpc-*) 1059972599cfSmrg basic_machine=romp-ibm 1060972599cfSmrg ;; 1061972599cfSmrg s390 | s390-*) 1062972599cfSmrg basic_machine=s390-ibm 1063972599cfSmrg ;; 1064972599cfSmrg s390x | s390x-*) 1065972599cfSmrg basic_machine=s390x-ibm 1066972599cfSmrg ;; 1067972599cfSmrg sa29200) 1068972599cfSmrg basic_machine=a29k-amd 1069972599cfSmrg os=-udi 1070972599cfSmrg ;; 1071972599cfSmrg sb1) 1072972599cfSmrg basic_machine=mipsisa64sb1-unknown 1073972599cfSmrg ;; 1074972599cfSmrg sb1el) 1075972599cfSmrg basic_machine=mipsisa64sb1el-unknown 1076972599cfSmrg ;; 1077972599cfSmrg sde) 1078972599cfSmrg basic_machine=mipsisa32-sde 1079972599cfSmrg os=-elf 1080972599cfSmrg ;; 1081972599cfSmrg sei) 1082972599cfSmrg basic_machine=mips-sei 1083972599cfSmrg os=-seiux 1084972599cfSmrg ;; 1085972599cfSmrg sequent) 1086972599cfSmrg basic_machine=i386-sequent 1087972599cfSmrg ;; 1088972599cfSmrg sh) 1089972599cfSmrg basic_machine=sh-hitachi 1090972599cfSmrg os=-hms 1091972599cfSmrg ;; 1092972599cfSmrg sh5el) 1093972599cfSmrg basic_machine=sh5le-unknown 1094972599cfSmrg ;; 1095972599cfSmrg sh64) 1096972599cfSmrg basic_machine=sh64-unknown 1097972599cfSmrg ;; 1098972599cfSmrg sparclite-wrs | simso-wrs) 1099972599cfSmrg basic_machine=sparclite-wrs 1100972599cfSmrg os=-vxworks 1101972599cfSmrg ;; 1102972599cfSmrg sps7) 1103972599cfSmrg basic_machine=m68k-bull 1104972599cfSmrg os=-sysv2 1105972599cfSmrg ;; 1106972599cfSmrg spur) 1107972599cfSmrg basic_machine=spur-unknown 1108972599cfSmrg ;; 1109972599cfSmrg st2000) 1110972599cfSmrg basic_machine=m68k-tandem 1111972599cfSmrg ;; 1112972599cfSmrg stratus) 1113972599cfSmrg basic_machine=i860-stratus 1114972599cfSmrg os=-sysv4 1115972599cfSmrg ;; 1116972599cfSmrg strongarm-* | thumb-*) 1117972599cfSmrg basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` 1118972599cfSmrg ;; 1119972599cfSmrg sun2) 1120972599cfSmrg basic_machine=m68000-sun 1121972599cfSmrg ;; 1122972599cfSmrg sun2os3) 1123972599cfSmrg basic_machine=m68000-sun 1124972599cfSmrg os=-sunos3 1125972599cfSmrg ;; 1126972599cfSmrg sun2os4) 1127972599cfSmrg basic_machine=m68000-sun 1128972599cfSmrg os=-sunos4 1129972599cfSmrg ;; 1130972599cfSmrg sun3os3) 1131972599cfSmrg basic_machine=m68k-sun 1132972599cfSmrg os=-sunos3 1133972599cfSmrg ;; 1134972599cfSmrg sun3os4) 1135972599cfSmrg basic_machine=m68k-sun 1136972599cfSmrg os=-sunos4 1137972599cfSmrg ;; 1138972599cfSmrg sun4os3) 1139972599cfSmrg basic_machine=sparc-sun 1140972599cfSmrg os=-sunos3 1141972599cfSmrg ;; 1142972599cfSmrg sun4os4) 1143972599cfSmrg basic_machine=sparc-sun 1144972599cfSmrg os=-sunos4 1145972599cfSmrg ;; 1146972599cfSmrg sun4sol2) 1147972599cfSmrg basic_machine=sparc-sun 1148972599cfSmrg os=-solaris2 1149972599cfSmrg ;; 1150972599cfSmrg sun3 | sun3-*) 1151972599cfSmrg basic_machine=m68k-sun 1152972599cfSmrg ;; 1153972599cfSmrg sun4) 1154972599cfSmrg basic_machine=sparc-sun 1155972599cfSmrg ;; 1156972599cfSmrg sun386 | sun386i | roadrunner) 1157972599cfSmrg basic_machine=i386-sun 1158972599cfSmrg ;; 1159972599cfSmrg sv1) 1160972599cfSmrg basic_machine=sv1-cray 1161972599cfSmrg os=-unicos 1162972599cfSmrg ;; 1163972599cfSmrg symmetry) 1164972599cfSmrg basic_machine=i386-sequent 1165972599cfSmrg os=-dynix 1166972599cfSmrg ;; 1167972599cfSmrg t3e) 1168972599cfSmrg basic_machine=alphaev5-cray 1169972599cfSmrg os=-unicos 1170972599cfSmrg ;; 1171972599cfSmrg t90) 1172972599cfSmrg basic_machine=t90-cray 1173972599cfSmrg os=-unicos 1174972599cfSmrg ;; 1175972599cfSmrg tile*) 1176972599cfSmrg basic_machine=$basic_machine-unknown 1177972599cfSmrg os=-linux-gnu 1178972599cfSmrg ;; 1179972599cfSmrg tx39) 1180972599cfSmrg basic_machine=mipstx39-unknown 1181972599cfSmrg ;; 1182972599cfSmrg tx39el) 1183972599cfSmrg basic_machine=mipstx39el-unknown 1184972599cfSmrg ;; 1185972599cfSmrg toad1) 1186972599cfSmrg basic_machine=pdp10-xkl 1187972599cfSmrg os=-tops20 1188972599cfSmrg ;; 1189972599cfSmrg tower | tower-32) 1190972599cfSmrg basic_machine=m68k-ncr 1191972599cfSmrg ;; 1192972599cfSmrg tpf) 1193972599cfSmrg basic_machine=s390x-ibm 1194972599cfSmrg os=-tpf 1195972599cfSmrg ;; 1196972599cfSmrg udi29k) 1197972599cfSmrg basic_machine=a29k-amd 1198972599cfSmrg os=-udi 1199972599cfSmrg ;; 1200972599cfSmrg ultra3) 1201972599cfSmrg basic_machine=a29k-nyu 1202972599cfSmrg os=-sym1 1203972599cfSmrg ;; 1204972599cfSmrg v810 | necv810) 1205972599cfSmrg basic_machine=v810-nec 1206972599cfSmrg os=-none 1207972599cfSmrg ;; 1208972599cfSmrg vaxv) 1209972599cfSmrg basic_machine=vax-dec 1210972599cfSmrg os=-sysv 1211972599cfSmrg ;; 1212972599cfSmrg vms) 1213972599cfSmrg basic_machine=vax-dec 1214972599cfSmrg os=-vms 1215972599cfSmrg ;; 1216972599cfSmrg vpp*|vx|vx-*) 1217972599cfSmrg basic_machine=f301-fujitsu 1218972599cfSmrg ;; 1219972599cfSmrg vxworks960) 1220972599cfSmrg basic_machine=i960-wrs 1221972599cfSmrg os=-vxworks 1222972599cfSmrg ;; 1223972599cfSmrg vxworks68) 1224972599cfSmrg basic_machine=m68k-wrs 1225972599cfSmrg os=-vxworks 1226972599cfSmrg ;; 1227972599cfSmrg vxworks29k) 1228972599cfSmrg basic_machine=a29k-wrs 1229972599cfSmrg os=-vxworks 1230972599cfSmrg ;; 1231972599cfSmrg w65*) 1232972599cfSmrg basic_machine=w65-wdc 1233972599cfSmrg os=-none 1234972599cfSmrg ;; 1235972599cfSmrg w89k-*) 1236972599cfSmrg basic_machine=hppa1.1-winbond 1237972599cfSmrg os=-proelf 1238972599cfSmrg ;; 1239972599cfSmrg xbox) 1240972599cfSmrg basic_machine=i686-pc 1241972599cfSmrg os=-mingw32 1242972599cfSmrg ;; 1243972599cfSmrg xps | xps100) 1244972599cfSmrg basic_machine=xps100-honeywell 1245972599cfSmrg ;; 1246972599cfSmrg xscale-* | xscalee[bl]-*) 1247972599cfSmrg basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` 1248972599cfSmrg ;; 1249972599cfSmrg ymp) 1250972599cfSmrg basic_machine=ymp-cray 1251972599cfSmrg os=-unicos 1252972599cfSmrg ;; 1253972599cfSmrg z8k-*-coff) 1254972599cfSmrg basic_machine=z8k-unknown 1255972599cfSmrg os=-sim 1256972599cfSmrg ;; 1257972599cfSmrg z80-*-coff) 1258972599cfSmrg basic_machine=z80-unknown 1259972599cfSmrg os=-sim 1260972599cfSmrg ;; 1261972599cfSmrg none) 1262972599cfSmrg basic_machine=none-none 1263972599cfSmrg os=-none 1264972599cfSmrg ;; 1265972599cfSmrg 1266972599cfSmrg# Here we handle the default manufacturer of certain CPU types. It is in 1267972599cfSmrg# some cases the only manufacturer, in others, it is the most popular. 1268972599cfSmrg w89k) 1269972599cfSmrg basic_machine=hppa1.1-winbond 1270972599cfSmrg ;; 1271972599cfSmrg op50n) 1272972599cfSmrg basic_machine=hppa1.1-oki 1273972599cfSmrg ;; 1274972599cfSmrg op60c) 1275972599cfSmrg basic_machine=hppa1.1-oki 1276972599cfSmrg ;; 1277972599cfSmrg romp) 1278972599cfSmrg basic_machine=romp-ibm 1279972599cfSmrg ;; 1280972599cfSmrg mmix) 1281972599cfSmrg basic_machine=mmix-knuth 1282972599cfSmrg ;; 1283972599cfSmrg rs6000) 1284972599cfSmrg basic_machine=rs6000-ibm 1285972599cfSmrg ;; 1286972599cfSmrg vax) 1287972599cfSmrg basic_machine=vax-dec 1288972599cfSmrg ;; 1289972599cfSmrg pdp10) 1290972599cfSmrg # there are many clones, so DEC is not a safe bet 1291972599cfSmrg basic_machine=pdp10-unknown 1292972599cfSmrg ;; 1293972599cfSmrg pdp11) 1294972599cfSmrg basic_machine=pdp11-dec 1295972599cfSmrg ;; 1296972599cfSmrg we32k) 1297972599cfSmrg basic_machine=we32k-att 1298972599cfSmrg ;; 1299972599cfSmrg sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 1300972599cfSmrg basic_machine=sh-unknown 1301972599cfSmrg ;; 1302972599cfSmrg sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 1303972599cfSmrg basic_machine=sparc-sun 1304972599cfSmrg ;; 1305972599cfSmrg cydra) 1306972599cfSmrg basic_machine=cydra-cydrome 1307972599cfSmrg ;; 1308972599cfSmrg orion) 1309972599cfSmrg basic_machine=orion-highlevel 1310972599cfSmrg ;; 1311972599cfSmrg orion105) 1312972599cfSmrg basic_machine=clipper-highlevel 1313972599cfSmrg ;; 1314972599cfSmrg mac | mpw | mac-mpw) 1315972599cfSmrg basic_machine=m68k-apple 1316972599cfSmrg ;; 1317972599cfSmrg pmac | pmac-mpw) 1318972599cfSmrg basic_machine=powerpc-apple 1319972599cfSmrg ;; 1320972599cfSmrg *-unknown) 1321972599cfSmrg # Make sure to match an already-canonicalized machine name. 1322972599cfSmrg ;; 1323972599cfSmrg *) 1324972599cfSmrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1325972599cfSmrg exit 1 1326972599cfSmrg ;; 1327972599cfSmrgesac 1328972599cfSmrg 1329972599cfSmrg# Here we canonicalize certain aliases for manufacturers. 1330972599cfSmrgcase $basic_machine in 1331972599cfSmrg *-digital*) 1332972599cfSmrg basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 1333972599cfSmrg ;; 1334972599cfSmrg *-commodore*) 1335972599cfSmrg basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 1336972599cfSmrg ;; 1337972599cfSmrg *) 1338972599cfSmrg ;; 1339972599cfSmrgesac 1340972599cfSmrg 1341972599cfSmrg# Decode manufacturer-specific aliases for certain operating systems. 1342972599cfSmrg 1343972599cfSmrgif [ x"$os" != x"" ] 1344972599cfSmrgthen 1345972599cfSmrgcase $os in 1346972599cfSmrg # First match some system type aliases 1347972599cfSmrg # that might get confused with valid system types. 1348972599cfSmrg # -solaris* is a basic system type, with this one exception. 1349972599cfSmrg -auroraux) 1350972599cfSmrg os=-auroraux 1351972599cfSmrg ;; 1352972599cfSmrg -solaris1 | -solaris1.*) 1353972599cfSmrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 1354972599cfSmrg ;; 1355972599cfSmrg -solaris) 1356972599cfSmrg os=-solaris2 1357972599cfSmrg ;; 1358972599cfSmrg -svr4*) 1359972599cfSmrg os=-sysv4 1360972599cfSmrg ;; 1361972599cfSmrg -unixware*) 1362972599cfSmrg os=-sysv4.2uw 1363972599cfSmrg ;; 1364972599cfSmrg -gnu/linux*) 1365972599cfSmrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1366972599cfSmrg ;; 1367972599cfSmrg # First accept the basic system types. 1368972599cfSmrg # The portable systems comes first. 1369972599cfSmrg # Each alternative MUST END IN A *, to match a version number. 1370972599cfSmrg # -sysv* is not here because it comes later, after sysvr4. 1371972599cfSmrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1372972599cfSmrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1373972599cfSmrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 13745eeb4e8fSmrg | -sym* | -kopensolaris* | -plan9* \ 1375972599cfSmrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1376972599cfSmrg | -aos* | -aros* \ 1377972599cfSmrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1378972599cfSmrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1379972599cfSmrg | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 13805eeb4e8fSmrg | -bitrig* | -openbsd* | -solidbsd* \ 1381972599cfSmrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1382972599cfSmrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1383972599cfSmrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1384972599cfSmrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1385972599cfSmrg | -chorusos* | -chorusrdb* | -cegcc* \ 1386972599cfSmrg | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 13875eeb4e8fSmrg | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 13885eeb4e8fSmrg | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 13895eeb4e8fSmrg | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ 1390972599cfSmrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1391972599cfSmrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1392972599cfSmrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1393972599cfSmrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1394972599cfSmrg | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1395972599cfSmrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 13965eeb4e8fSmrg | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) 1397972599cfSmrg # Remember, each alternative MUST END IN *, to match a version number. 1398972599cfSmrg ;; 1399972599cfSmrg -qnx*) 1400972599cfSmrg case $basic_machine in 1401972599cfSmrg x86-* | i*86-*) 1402972599cfSmrg ;; 1403972599cfSmrg *) 1404972599cfSmrg os=-nto$os 1405972599cfSmrg ;; 1406972599cfSmrg esac 1407972599cfSmrg ;; 1408972599cfSmrg -nto-qnx*) 1409972599cfSmrg ;; 1410972599cfSmrg -nto*) 1411972599cfSmrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 1412972599cfSmrg ;; 1413972599cfSmrg -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1414972599cfSmrg | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 1415972599cfSmrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1416972599cfSmrg ;; 1417972599cfSmrg -mac*) 1418972599cfSmrg os=`echo $os | sed -e 's|mac|macos|'` 1419972599cfSmrg ;; 1420972599cfSmrg -linux-dietlibc) 1421972599cfSmrg os=-linux-dietlibc 1422972599cfSmrg ;; 1423972599cfSmrg -linux*) 1424972599cfSmrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 1425972599cfSmrg ;; 1426972599cfSmrg -sunos5*) 1427972599cfSmrg os=`echo $os | sed -e 's|sunos5|solaris2|'` 1428972599cfSmrg ;; 1429972599cfSmrg -sunos6*) 1430972599cfSmrg os=`echo $os | sed -e 's|sunos6|solaris3|'` 1431972599cfSmrg ;; 1432972599cfSmrg -opened*) 1433972599cfSmrg os=-openedition 1434972599cfSmrg ;; 1435972599cfSmrg -os400*) 1436972599cfSmrg os=-os400 1437972599cfSmrg ;; 1438972599cfSmrg -wince*) 1439972599cfSmrg os=-wince 1440972599cfSmrg ;; 1441972599cfSmrg -osfrose*) 1442972599cfSmrg os=-osfrose 1443972599cfSmrg ;; 1444972599cfSmrg -osf*) 1445972599cfSmrg os=-osf 1446972599cfSmrg ;; 1447972599cfSmrg -utek*) 1448972599cfSmrg os=-bsd 1449972599cfSmrg ;; 1450972599cfSmrg -dynix*) 1451972599cfSmrg os=-bsd 1452972599cfSmrg ;; 1453972599cfSmrg -acis*) 1454972599cfSmrg os=-aos 1455972599cfSmrg ;; 1456972599cfSmrg -atheos*) 1457972599cfSmrg os=-atheos 1458972599cfSmrg ;; 1459972599cfSmrg -syllable*) 1460972599cfSmrg os=-syllable 1461972599cfSmrg ;; 1462972599cfSmrg -386bsd) 1463972599cfSmrg os=-bsd 1464972599cfSmrg ;; 1465972599cfSmrg -ctix* | -uts*) 1466972599cfSmrg os=-sysv 1467972599cfSmrg ;; 1468972599cfSmrg -nova*) 1469972599cfSmrg os=-rtmk-nova 1470972599cfSmrg ;; 1471972599cfSmrg -ns2 ) 1472972599cfSmrg os=-nextstep2 1473972599cfSmrg ;; 1474972599cfSmrg -nsk*) 1475972599cfSmrg os=-nsk 1476972599cfSmrg ;; 1477972599cfSmrg # Preserve the version number of sinix5. 1478972599cfSmrg -sinix5.*) 1479972599cfSmrg os=`echo $os | sed -e 's|sinix|sysv|'` 1480972599cfSmrg ;; 1481972599cfSmrg -sinix*) 1482972599cfSmrg os=-sysv4 1483972599cfSmrg ;; 1484972599cfSmrg -tpf*) 1485972599cfSmrg os=-tpf 1486972599cfSmrg ;; 1487972599cfSmrg -triton*) 1488972599cfSmrg os=-sysv3 1489972599cfSmrg ;; 1490972599cfSmrg -oss*) 1491972599cfSmrg os=-sysv3 1492972599cfSmrg ;; 1493972599cfSmrg -svr4) 1494972599cfSmrg os=-sysv4 1495972599cfSmrg ;; 1496972599cfSmrg -svr3) 1497972599cfSmrg os=-sysv3 1498972599cfSmrg ;; 1499972599cfSmrg -sysvr4) 1500972599cfSmrg os=-sysv4 1501972599cfSmrg ;; 1502972599cfSmrg # This must come after -sysvr4. 1503972599cfSmrg -sysv*) 1504972599cfSmrg ;; 1505972599cfSmrg -ose*) 1506972599cfSmrg os=-ose 1507972599cfSmrg ;; 1508972599cfSmrg -es1800*) 1509972599cfSmrg os=-ose 1510972599cfSmrg ;; 1511972599cfSmrg -xenix) 1512972599cfSmrg os=-xenix 1513972599cfSmrg ;; 1514972599cfSmrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1515972599cfSmrg os=-mint 1516972599cfSmrg ;; 1517972599cfSmrg -aros*) 1518972599cfSmrg os=-aros 1519972599cfSmrg ;; 1520972599cfSmrg -zvmoe) 1521972599cfSmrg os=-zvmoe 1522972599cfSmrg ;; 1523972599cfSmrg -dicos*) 1524972599cfSmrg os=-dicos 1525972599cfSmrg ;; 1526972599cfSmrg -nacl*) 1527972599cfSmrg ;; 1528972599cfSmrg -none) 1529972599cfSmrg ;; 1530972599cfSmrg *) 1531972599cfSmrg # Get rid of the `-' at the beginning of $os. 1532972599cfSmrg os=`echo $os | sed 's/[^-]*-//'` 1533972599cfSmrg echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 1534972599cfSmrg exit 1 1535972599cfSmrg ;; 1536972599cfSmrgesac 1537972599cfSmrgelse 1538972599cfSmrg 1539972599cfSmrg# Here we handle the default operating systems that come with various machines. 1540972599cfSmrg# The value should be what the vendor currently ships out the door with their 1541972599cfSmrg# machine or put another way, the most popular os provided with the machine. 1542972599cfSmrg 1543972599cfSmrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 1544972599cfSmrg# "-sun"), then you have to tell the case statement up towards the top 1545972599cfSmrg# that MANUFACTURER isn't an operating system. Otherwise, code above 1546972599cfSmrg# will signal an error saying that MANUFACTURER isn't an operating 1547972599cfSmrg# system, and we'll never get to this point. 1548972599cfSmrg 1549972599cfSmrgcase $basic_machine in 1550972599cfSmrg score-*) 1551972599cfSmrg os=-elf 1552972599cfSmrg ;; 1553972599cfSmrg spu-*) 1554972599cfSmrg os=-elf 1555972599cfSmrg ;; 1556972599cfSmrg *-acorn) 1557972599cfSmrg os=-riscix1.2 1558972599cfSmrg ;; 1559972599cfSmrg arm*-rebel) 1560972599cfSmrg os=-linux 1561972599cfSmrg ;; 1562972599cfSmrg arm*-semi) 1563972599cfSmrg os=-aout 1564972599cfSmrg ;; 1565972599cfSmrg c4x-* | tic4x-*) 1566972599cfSmrg os=-coff 1567972599cfSmrg ;; 15685eeb4e8fSmrg c8051-*) 15695eeb4e8fSmrg os=-elf 15705eeb4e8fSmrg ;; 15715eeb4e8fSmrg hexagon-*) 15725eeb4e8fSmrg os=-elf 15735eeb4e8fSmrg ;; 1574972599cfSmrg tic54x-*) 1575972599cfSmrg os=-coff 1576972599cfSmrg ;; 1577972599cfSmrg tic55x-*) 1578972599cfSmrg os=-coff 1579972599cfSmrg ;; 1580972599cfSmrg tic6x-*) 1581972599cfSmrg os=-coff 1582972599cfSmrg ;; 1583972599cfSmrg # This must come before the *-dec entry. 1584972599cfSmrg pdp10-*) 1585972599cfSmrg os=-tops20 1586972599cfSmrg ;; 1587972599cfSmrg pdp11-*) 1588972599cfSmrg os=-none 1589972599cfSmrg ;; 1590972599cfSmrg *-dec | vax-*) 1591972599cfSmrg os=-ultrix4.2 1592972599cfSmrg ;; 1593972599cfSmrg m68*-apollo) 1594972599cfSmrg os=-domain 1595972599cfSmrg ;; 1596972599cfSmrg i386-sun) 1597972599cfSmrg os=-sunos4.0.2 1598972599cfSmrg ;; 1599972599cfSmrg m68000-sun) 1600972599cfSmrg os=-sunos3 1601972599cfSmrg ;; 1602972599cfSmrg m68*-cisco) 1603972599cfSmrg os=-aout 1604972599cfSmrg ;; 1605972599cfSmrg mep-*) 1606972599cfSmrg os=-elf 1607972599cfSmrg ;; 1608972599cfSmrg mips*-cisco) 1609972599cfSmrg os=-elf 1610972599cfSmrg ;; 1611972599cfSmrg mips*-*) 1612972599cfSmrg os=-elf 1613972599cfSmrg ;; 1614972599cfSmrg or32-*) 1615972599cfSmrg os=-coff 1616972599cfSmrg ;; 1617972599cfSmrg *-tti) # must be before sparc entry or we get the wrong os. 1618972599cfSmrg os=-sysv3 1619972599cfSmrg ;; 1620972599cfSmrg sparc-* | *-sun) 1621972599cfSmrg os=-sunos4.1.1 1622972599cfSmrg ;; 1623972599cfSmrg *-be) 1624972599cfSmrg os=-beos 1625972599cfSmrg ;; 1626972599cfSmrg *-haiku) 1627972599cfSmrg os=-haiku 1628972599cfSmrg ;; 1629972599cfSmrg *-ibm) 1630972599cfSmrg os=-aix 1631972599cfSmrg ;; 1632972599cfSmrg *-knuth) 1633972599cfSmrg os=-mmixware 1634972599cfSmrg ;; 1635972599cfSmrg *-wec) 1636972599cfSmrg os=-proelf 1637972599cfSmrg ;; 1638972599cfSmrg *-winbond) 1639972599cfSmrg os=-proelf 1640972599cfSmrg ;; 1641972599cfSmrg *-oki) 1642972599cfSmrg os=-proelf 1643972599cfSmrg ;; 1644972599cfSmrg *-hp) 1645972599cfSmrg os=-hpux 1646972599cfSmrg ;; 1647972599cfSmrg *-hitachi) 1648972599cfSmrg os=-hiux 1649972599cfSmrg ;; 1650972599cfSmrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1651972599cfSmrg os=-sysv 1652972599cfSmrg ;; 1653972599cfSmrg *-cbm) 1654972599cfSmrg os=-amigaos 1655972599cfSmrg ;; 1656972599cfSmrg *-dg) 1657972599cfSmrg os=-dgux 1658972599cfSmrg ;; 1659972599cfSmrg *-dolphin) 1660972599cfSmrg os=-sysv3 1661972599cfSmrg ;; 1662972599cfSmrg m68k-ccur) 1663972599cfSmrg os=-rtu 1664972599cfSmrg ;; 1665972599cfSmrg m88k-omron*) 1666972599cfSmrg os=-luna 1667972599cfSmrg ;; 1668972599cfSmrg *-next ) 1669972599cfSmrg os=-nextstep 1670972599cfSmrg ;; 1671972599cfSmrg *-sequent) 1672972599cfSmrg os=-ptx 1673972599cfSmrg ;; 1674972599cfSmrg *-crds) 1675972599cfSmrg os=-unos 1676972599cfSmrg ;; 1677972599cfSmrg *-ns) 1678972599cfSmrg os=-genix 1679972599cfSmrg ;; 1680972599cfSmrg i370-*) 1681972599cfSmrg os=-mvs 1682972599cfSmrg ;; 1683972599cfSmrg *-next) 1684972599cfSmrg os=-nextstep3 1685972599cfSmrg ;; 1686972599cfSmrg *-gould) 1687972599cfSmrg os=-sysv 1688972599cfSmrg ;; 1689972599cfSmrg *-highlevel) 1690972599cfSmrg os=-bsd 1691972599cfSmrg ;; 1692972599cfSmrg *-encore) 1693972599cfSmrg os=-bsd 1694972599cfSmrg ;; 1695972599cfSmrg *-sgi) 1696972599cfSmrg os=-irix 1697972599cfSmrg ;; 1698972599cfSmrg *-siemens) 1699972599cfSmrg os=-sysv4 1700972599cfSmrg ;; 1701972599cfSmrg *-masscomp) 1702972599cfSmrg os=-rtu 1703972599cfSmrg ;; 1704972599cfSmrg f30[01]-fujitsu | f700-fujitsu) 1705972599cfSmrg os=-uxpv 1706972599cfSmrg ;; 1707972599cfSmrg *-rom68k) 1708972599cfSmrg os=-coff 1709972599cfSmrg ;; 1710972599cfSmrg *-*bug) 1711972599cfSmrg os=-coff 1712972599cfSmrg ;; 1713972599cfSmrg *-apple) 1714972599cfSmrg os=-macos 1715972599cfSmrg ;; 1716972599cfSmrg *-atari*) 1717972599cfSmrg os=-mint 1718972599cfSmrg ;; 1719972599cfSmrg *) 1720972599cfSmrg os=-none 1721972599cfSmrg ;; 1722972599cfSmrgesac 1723972599cfSmrgfi 1724972599cfSmrg 1725972599cfSmrg# Here we handle the case where we know the os, and the CPU type, but not the 1726972599cfSmrg# manufacturer. We pick the logical manufacturer. 1727972599cfSmrgvendor=unknown 1728972599cfSmrgcase $basic_machine in 1729972599cfSmrg *-unknown) 1730972599cfSmrg case $os in 1731972599cfSmrg -riscix*) 1732972599cfSmrg vendor=acorn 1733972599cfSmrg ;; 1734972599cfSmrg -sunos*) 1735972599cfSmrg vendor=sun 1736972599cfSmrg ;; 1737972599cfSmrg -cnk*|-aix*) 1738972599cfSmrg vendor=ibm 1739972599cfSmrg ;; 1740972599cfSmrg -beos*) 1741972599cfSmrg vendor=be 1742972599cfSmrg ;; 1743972599cfSmrg -hpux*) 1744972599cfSmrg vendor=hp 1745972599cfSmrg ;; 1746972599cfSmrg -mpeix*) 1747972599cfSmrg vendor=hp 1748972599cfSmrg ;; 1749972599cfSmrg -hiux*) 1750972599cfSmrg vendor=hitachi 1751972599cfSmrg ;; 1752972599cfSmrg -unos*) 1753972599cfSmrg vendor=crds 1754972599cfSmrg ;; 1755972599cfSmrg -dgux*) 1756972599cfSmrg vendor=dg 1757972599cfSmrg ;; 1758972599cfSmrg -luna*) 1759972599cfSmrg vendor=omron 1760972599cfSmrg ;; 1761972599cfSmrg -genix*) 1762972599cfSmrg vendor=ns 1763972599cfSmrg ;; 1764972599cfSmrg -mvs* | -opened*) 1765972599cfSmrg vendor=ibm 1766972599cfSmrg ;; 1767972599cfSmrg -os400*) 1768972599cfSmrg vendor=ibm 1769972599cfSmrg ;; 1770972599cfSmrg -ptx*) 1771972599cfSmrg vendor=sequent 1772972599cfSmrg ;; 1773972599cfSmrg -tpf*) 1774972599cfSmrg vendor=ibm 1775972599cfSmrg ;; 1776972599cfSmrg -vxsim* | -vxworks* | -windiss*) 1777972599cfSmrg vendor=wrs 1778972599cfSmrg ;; 1779972599cfSmrg -aux*) 1780972599cfSmrg vendor=apple 1781972599cfSmrg ;; 1782972599cfSmrg -hms*) 1783972599cfSmrg vendor=hitachi 1784972599cfSmrg ;; 1785972599cfSmrg -mpw* | -macos*) 1786972599cfSmrg vendor=apple 1787972599cfSmrg ;; 1788972599cfSmrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1789972599cfSmrg vendor=atari 1790972599cfSmrg ;; 1791972599cfSmrg -vos*) 1792972599cfSmrg vendor=stratus 1793972599cfSmrg ;; 1794972599cfSmrg esac 1795972599cfSmrg basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 1796972599cfSmrg ;; 1797972599cfSmrgesac 1798972599cfSmrg 1799972599cfSmrgecho $basic_machine$os 1800972599cfSmrgexit 1801972599cfSmrg 1802972599cfSmrg# Local variables: 1803972599cfSmrg# eval: (add-hook 'write-file-hooks 'time-stamp) 1804972599cfSmrg# time-stamp-start: "timestamp='" 1805972599cfSmrg# time-stamp-format: "%:y-%02m-%02d" 1806972599cfSmrg# time-stamp-end: "'" 1807972599cfSmrg# End: 1808