config.sub revision 1bedbe3f
1ba6a1819Smrg#! /bin/sh 2ba6a1819Smrg# Configuration validation subroutine script. 31bedbe3fSmrg# Copyright 1992-2013 Free Software Foundation, Inc. 4ba6a1819Smrg 51bedbe3fSmrgtimestamp='2013-04-24' 6ba6a1819Smrg 71bedbe3fSmrg# This file is free software; you can redistribute it and/or modify it 81bedbe3fSmrg# under the terms of the GNU General Public License as published by 91bedbe3fSmrg# the Free Software Foundation; either version 3 of the License, or 10ba6a1819Smrg# (at your option) any later version. 11ba6a1819Smrg# 121bedbe3fSmrg# This program is distributed in the hope that it will be useful, but 131bedbe3fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 141bedbe3fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 151bedbe3fSmrg# General Public License for more details. 16ba6a1819Smrg# 17ba6a1819Smrg# You should have received a copy of the GNU General Public License 181bedbe3fSmrg# along with this program; if not, see <http://www.gnu.org/licenses/>. 19ba6a1819Smrg# 20ba6a1819Smrg# As a special exception to the GNU General Public License, if you 21ba6a1819Smrg# distribute this file as part of a program that contains a 22ba6a1819Smrg# configuration script generated by Autoconf, you may include it under 231bedbe3fSmrg# the same distribution terms that you use for the rest of that 241bedbe3fSmrg# program. This Exception is an additional permission under section 7 251bedbe3fSmrg# of the GNU General Public License, version 3 ("GPLv3"). 26ba6a1819Smrg 27ba6a1819Smrg 281bedbe3fSmrg# Please send patches with a ChangeLog entry to config-patches@gnu.org. 29ba6a1819Smrg# 30ba6a1819Smrg# Configuration subroutine to validate and canonicalize a configuration type. 31ba6a1819Smrg# Supply the specified configuration type as an argument. 32ba6a1819Smrg# If it is invalid, we print an error message on stderr and exit with code 1. 33ba6a1819Smrg# Otherwise, we print the canonical config type on stdout and succeed. 34ba6a1819Smrg 35549e21daSmrg# You can get the latest version of this script from: 36549e21daSmrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 37549e21daSmrg 38ba6a1819Smrg# This file is supposed to be the same for all GNU packages 39ba6a1819Smrg# and recognize all the CPU types, system types and aliases 40ba6a1819Smrg# that are meaningful with *any* GNU software. 41ba6a1819Smrg# Each package is responsible for reporting which valid configurations 42ba6a1819Smrg# it does not support. The user should be able to distinguish 43ba6a1819Smrg# a failure to support a valid configuration from a meaningless 44ba6a1819Smrg# configuration. 45ba6a1819Smrg 46ba6a1819Smrg# The goal of this file is to map all the various variations of a given 47ba6a1819Smrg# machine specification into a single specification in the form: 48ba6a1819Smrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 49ba6a1819Smrg# or in some cases, the newer four-part form: 50ba6a1819Smrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 51ba6a1819Smrg# It is wrong to echo any other type of specification. 52ba6a1819Smrg 53ba6a1819Smrgme=`echo "$0" | sed -e 's,.*/,,'` 54ba6a1819Smrg 55ba6a1819Smrgusage="\ 56ba6a1819SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS 57ba6a1819Smrg $0 [OPTION] ALIAS 58ba6a1819Smrg 59ba6a1819SmrgCanonicalize a configuration name. 60ba6a1819Smrg 61ba6a1819SmrgOperation modes: 62ba6a1819Smrg -h, --help print this help, then exit 63ba6a1819Smrg -t, --time-stamp print date of last modification, then exit 64ba6a1819Smrg -v, --version print version number, then exit 65ba6a1819Smrg 66ba6a1819SmrgReport bugs and patches to <config-patches@gnu.org>." 67ba6a1819Smrg 68ba6a1819Smrgversion="\ 69ba6a1819SmrgGNU config.sub ($timestamp) 70ba6a1819Smrg 711bedbe3fSmrgCopyright 1992-2013 Free Software Foundation, Inc. 72ba6a1819Smrg 73ba6a1819SmrgThis is free software; see the source for copying conditions. There is NO 74ba6a1819Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 75ba6a1819Smrg 76ba6a1819Smrghelp=" 77ba6a1819SmrgTry \`$me --help' for more information." 78ba6a1819Smrg 79ba6a1819Smrg# Parse command line 80ba6a1819Smrgwhile test $# -gt 0 ; do 81ba6a1819Smrg case $1 in 82ba6a1819Smrg --time-stamp | --time* | -t ) 83ba6a1819Smrg echo "$timestamp" ; exit ;; 84ba6a1819Smrg --version | -v ) 85ba6a1819Smrg echo "$version" ; exit ;; 86ba6a1819Smrg --help | --h* | -h ) 87ba6a1819Smrg echo "$usage"; exit ;; 88ba6a1819Smrg -- ) # Stop option processing 89ba6a1819Smrg shift; break ;; 90ba6a1819Smrg - ) # Use stdin as input. 91ba6a1819Smrg break ;; 92ba6a1819Smrg -* ) 93ba6a1819Smrg echo "$me: invalid option $1$help" 94ba6a1819Smrg exit 1 ;; 95ba6a1819Smrg 96ba6a1819Smrg *local*) 97ba6a1819Smrg # First pass through any local machine types. 98ba6a1819Smrg echo $1 99ba6a1819Smrg exit ;; 100ba6a1819Smrg 101ba6a1819Smrg * ) 102ba6a1819Smrg break ;; 103ba6a1819Smrg esac 104ba6a1819Smrgdone 105ba6a1819Smrg 106ba6a1819Smrgcase $# in 107ba6a1819Smrg 0) echo "$me: missing argument$help" >&2 108ba6a1819Smrg exit 1;; 109ba6a1819Smrg 1) ;; 110ba6a1819Smrg *) echo "$me: too many arguments$help" >&2 111ba6a1819Smrg exit 1;; 112ba6a1819Smrgesac 113ba6a1819Smrg 114ba6a1819Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 115ba6a1819Smrg# Here we must recognize all the valid KERNEL-OS combinations. 116ba6a1819Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 117ba6a1819Smrgcase $maybe_os in 118549e21daSmrg nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 1191bedbe3fSmrg linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 120549e21daSmrg knetbsd*-gnu* | netbsd*-gnu* | \ 121549e21daSmrg kopensolaris*-gnu* | \ 122ba6a1819Smrg storm-chaos* | os2-emx* | rtmk-nova*) 123ba6a1819Smrg os=-$maybe_os 124ba6a1819Smrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 125ba6a1819Smrg ;; 1261bedbe3fSmrg android-linux) 1271bedbe3fSmrg os=-linux-android 1281bedbe3fSmrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 1291bedbe3fSmrg ;; 130ba6a1819Smrg *) 131ba6a1819Smrg basic_machine=`echo $1 | sed 's/-[^-]*$//'` 132ba6a1819Smrg if [ $basic_machine != $1 ] 133ba6a1819Smrg then os=`echo $1 | sed 's/.*-/-/'` 134ba6a1819Smrg else os=; fi 135ba6a1819Smrg ;; 136ba6a1819Smrgesac 137ba6a1819Smrg 138ba6a1819Smrg### Let's recognize common machines as not being operating systems so 139ba6a1819Smrg### that things like config.sub decstation-3100 work. We also 140ba6a1819Smrg### recognize some manufacturers as not being operating systems, so we 141ba6a1819Smrg### can provide default operating systems below. 142ba6a1819Smrgcase $os in 143ba6a1819Smrg -sun*os*) 144ba6a1819Smrg # Prevent following clause from handling this invalid input. 145ba6a1819Smrg ;; 146ba6a1819Smrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 147ba6a1819Smrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 148ba6a1819Smrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 149ba6a1819Smrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 150ba6a1819Smrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 151ba6a1819Smrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 1521bedbe3fSmrg -apple | -axis | -knuth | -cray | -microblaze*) 153ba6a1819Smrg os= 154ba6a1819Smrg basic_machine=$1 155ba6a1819Smrg ;; 1561bedbe3fSmrg -bluegene*) 1571bedbe3fSmrg os=-cnk 158549e21daSmrg ;; 159ba6a1819Smrg -sim | -cisco | -oki | -wec | -winbond) 160ba6a1819Smrg os= 161ba6a1819Smrg basic_machine=$1 162ba6a1819Smrg ;; 163ba6a1819Smrg -scout) 164ba6a1819Smrg ;; 165ba6a1819Smrg -wrs) 166ba6a1819Smrg os=-vxworks 167ba6a1819Smrg basic_machine=$1 168ba6a1819Smrg ;; 169ba6a1819Smrg -chorusos*) 170ba6a1819Smrg os=-chorusos 171ba6a1819Smrg basic_machine=$1 172ba6a1819Smrg ;; 1731bedbe3fSmrg -chorusrdb) 1741bedbe3fSmrg os=-chorusrdb 175ba6a1819Smrg basic_machine=$1 1761bedbe3fSmrg ;; 177ba6a1819Smrg -hiux*) 178ba6a1819Smrg os=-hiuxwe2 179ba6a1819Smrg ;; 180ba6a1819Smrg -sco6) 181ba6a1819Smrg os=-sco5v6 182ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 183ba6a1819Smrg ;; 184ba6a1819Smrg -sco5) 185ba6a1819Smrg os=-sco3.2v5 186ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 187ba6a1819Smrg ;; 188ba6a1819Smrg -sco4) 189ba6a1819Smrg os=-sco3.2v4 190ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 191ba6a1819Smrg ;; 192ba6a1819Smrg -sco3.2.[4-9]*) 193ba6a1819Smrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 194ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 195ba6a1819Smrg ;; 196ba6a1819Smrg -sco3.2v[4-9]*) 197ba6a1819Smrg # Don't forget version if it is 3.2v4 or newer. 198ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 199ba6a1819Smrg ;; 200ba6a1819Smrg -sco5v6*) 201ba6a1819Smrg # Don't forget version if it is 3.2v4 or newer. 202ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 203ba6a1819Smrg ;; 204ba6a1819Smrg -sco*) 205ba6a1819Smrg os=-sco3.2v2 206ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 207ba6a1819Smrg ;; 208ba6a1819Smrg -udk*) 209ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 210ba6a1819Smrg ;; 211ba6a1819Smrg -isc) 212ba6a1819Smrg os=-isc2.2 213ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 214ba6a1819Smrg ;; 215ba6a1819Smrg -clix*) 216ba6a1819Smrg basic_machine=clipper-intergraph 217ba6a1819Smrg ;; 218ba6a1819Smrg -isc*) 219ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 220ba6a1819Smrg ;; 2211bedbe3fSmrg -lynx*178) 2221bedbe3fSmrg os=-lynxos178 2231bedbe3fSmrg ;; 2241bedbe3fSmrg -lynx*5) 2251bedbe3fSmrg os=-lynxos5 2261bedbe3fSmrg ;; 227ba6a1819Smrg -lynx*) 228ba6a1819Smrg os=-lynxos 229ba6a1819Smrg ;; 230ba6a1819Smrg -ptx*) 231ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 232ba6a1819Smrg ;; 233ba6a1819Smrg -windowsnt*) 234ba6a1819Smrg os=`echo $os | sed -e 's/windowsnt/winnt/'` 235ba6a1819Smrg ;; 236ba6a1819Smrg -psos*) 237ba6a1819Smrg os=-psos 238ba6a1819Smrg ;; 239ba6a1819Smrg -mint | -mint[0-9]*) 240ba6a1819Smrg basic_machine=m68k-atari 241ba6a1819Smrg os=-mint 242ba6a1819Smrg ;; 243ba6a1819Smrgesac 244ba6a1819Smrg 245ba6a1819Smrg# Decode aliases for certain CPU-COMPANY combinations. 246ba6a1819Smrgcase $basic_machine in 247ba6a1819Smrg # Recognize the basic CPU types without company name. 248ba6a1819Smrg # Some are omitted here because they have special meanings below. 249ba6a1819Smrg 1750a | 580 \ 250ba6a1819Smrg | a29k \ 2511bedbe3fSmrg | aarch64 | aarch64_be \ 252ba6a1819Smrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 253ba6a1819Smrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 254ba6a1819Smrg | am33_2.0 \ 2551bedbe3fSmrg | arc | arceb \ 2561bedbe3fSmrg | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 2571bedbe3fSmrg | avr | avr32 \ 2581bedbe3fSmrg | be32 | be64 \ 259ba6a1819Smrg | bfin \ 260ba6a1819Smrg | c4x | clipper \ 261ba6a1819Smrg | d10v | d30v | dlx | dsp16xx \ 2621bedbe3fSmrg | epiphany \ 263549e21daSmrg | fido | fr30 | frv \ 264ba6a1819Smrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 2651bedbe3fSmrg | hexagon \ 266ba6a1819Smrg | i370 | i860 | i960 | ia64 \ 267ba6a1819Smrg | ip2k | iq2000 \ 2681bedbe3fSmrg | le32 | le64 \ 269549e21daSmrg | lm32 \ 270549e21daSmrg | m32c | m32r | m32rle | m68000 | m68k | m88k \ 2711bedbe3fSmrg | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 272ba6a1819Smrg | mips | mipsbe | mipseb | mipsel | mipsle \ 273ba6a1819Smrg | mips16 \ 274ba6a1819Smrg | mips64 | mips64el \ 275549e21daSmrg | mips64octeon | mips64octeonel \ 276ba6a1819Smrg | mips64orion | mips64orionel \ 277549e21daSmrg | mips64r5900 | mips64r5900el \ 278549e21daSmrg | mips64vr | mips64vrel \ 279ba6a1819Smrg | mips64vr4100 | mips64vr4100el \ 280ba6a1819Smrg | mips64vr4300 | mips64vr4300el \ 281ba6a1819Smrg | mips64vr5000 | mips64vr5000el \ 282ba6a1819Smrg | mips64vr5900 | mips64vr5900el \ 283ba6a1819Smrg | mipsisa32 | mipsisa32el \ 284ba6a1819Smrg | mipsisa32r2 | mipsisa32r2el \ 285ba6a1819Smrg | mipsisa64 | mipsisa64el \ 286ba6a1819Smrg | mipsisa64r2 | mipsisa64r2el \ 287ba6a1819Smrg | mipsisa64sb1 | mipsisa64sb1el \ 288ba6a1819Smrg | mipsisa64sr71k | mipsisa64sr71kel \ 2891bedbe3fSmrg | mipsr5900 | mipsr5900el \ 290ba6a1819Smrg | mipstx39 | mipstx39el \ 291ba6a1819Smrg | mn10200 | mn10300 \ 292549e21daSmrg | moxie \ 293ba6a1819Smrg | mt \ 294ba6a1819Smrg | msp430 \ 295549e21daSmrg | nds32 | nds32le | nds32be \ 2961bedbe3fSmrg | nios | nios2 | nios2eb | nios2el \ 297ba6a1819Smrg | ns16k | ns32k \ 2981bedbe3fSmrg | open8 \ 2991bedbe3fSmrg | or1k | or32 \ 300ba6a1819Smrg | pdp10 | pdp11 | pj | pjl \ 3011bedbe3fSmrg | powerpc | powerpc64 | powerpc64le | powerpcle \ 302ba6a1819Smrg | pyramid \ 3031bedbe3fSmrg | rl78 | rx \ 304549e21daSmrg | score \ 305549e21daSmrg | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 306ba6a1819Smrg | sh64 | sh64le \ 307549e21daSmrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 308549e21daSmrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 3091bedbe3fSmrg | spu \ 3101bedbe3fSmrg | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 311549e21daSmrg | ubicom32 \ 3121bedbe3fSmrg | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 313ba6a1819Smrg | we32k \ 3141bedbe3fSmrg | x86 | xc16x | xstormy16 | xtensa \ 315549e21daSmrg | z8k | z80) 316ba6a1819Smrg basic_machine=$basic_machine-unknown 317ba6a1819Smrg ;; 318549e21daSmrg c54x) 319549e21daSmrg basic_machine=tic54x-unknown 320549e21daSmrg ;; 321549e21daSmrg c55x) 322549e21daSmrg basic_machine=tic55x-unknown 323549e21daSmrg ;; 324549e21daSmrg c6x) 325549e21daSmrg basic_machine=tic6x-unknown 326ba6a1819Smrg ;; 3271bedbe3fSmrg m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) 328ba6a1819Smrg basic_machine=$basic_machine-unknown 329ba6a1819Smrg os=-none 330ba6a1819Smrg ;; 331ba6a1819Smrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 332ba6a1819Smrg ;; 333ba6a1819Smrg ms1) 334ba6a1819Smrg basic_machine=mt-unknown 335ba6a1819Smrg ;; 336ba6a1819Smrg 3371bedbe3fSmrg strongarm | thumb | xscale) 3381bedbe3fSmrg basic_machine=arm-unknown 3391bedbe3fSmrg ;; 3401bedbe3fSmrg xgate) 3411bedbe3fSmrg basic_machine=$basic_machine-unknown 3421bedbe3fSmrg os=-none 3431bedbe3fSmrg ;; 3441bedbe3fSmrg xscaleeb) 3451bedbe3fSmrg basic_machine=armeb-unknown 3461bedbe3fSmrg ;; 3471bedbe3fSmrg 3481bedbe3fSmrg xscaleel) 3491bedbe3fSmrg basic_machine=armel-unknown 3501bedbe3fSmrg ;; 3511bedbe3fSmrg 352ba6a1819Smrg # We use `pc' rather than `unknown' 353ba6a1819Smrg # because (1) that's what they normally are, and 354ba6a1819Smrg # (2) the word "unknown" tends to confuse beginning users. 355ba6a1819Smrg i*86 | x86_64) 356ba6a1819Smrg basic_machine=$basic_machine-pc 357ba6a1819Smrg ;; 358ba6a1819Smrg # Object if more than one company name word. 359ba6a1819Smrg *-*-*) 360ba6a1819Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 361ba6a1819Smrg exit 1 362ba6a1819Smrg ;; 363ba6a1819Smrg # Recognize the basic CPU types with company name. 364ba6a1819Smrg 580-* \ 365ba6a1819Smrg | a29k-* \ 3661bedbe3fSmrg | aarch64-* | aarch64_be-* \ 367ba6a1819Smrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 368ba6a1819Smrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 3691bedbe3fSmrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ 370ba6a1819Smrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 371549e21daSmrg | avr-* | avr32-* \ 3721bedbe3fSmrg | be32-* | be64-* \ 373ba6a1819Smrg | bfin-* | bs2000-* \ 374549e21daSmrg | c[123]* | c30-* | [cjt]90-* | c4x-* \ 375ba6a1819Smrg | clipper-* | craynv-* | cydra-* \ 376ba6a1819Smrg | d10v-* | d30v-* | dlx-* \ 377ba6a1819Smrg | elxsi-* \ 378549e21daSmrg | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 379ba6a1819Smrg | h8300-* | h8500-* \ 380ba6a1819Smrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 3811bedbe3fSmrg | hexagon-* \ 382ba6a1819Smrg | i*86-* | i860-* | i960-* | ia64-* \ 383ba6a1819Smrg | ip2k-* | iq2000-* \ 3841bedbe3fSmrg | le32-* | le64-* \ 385549e21daSmrg | lm32-* \ 386549e21daSmrg | m32c-* | m32r-* | m32rle-* \ 387ba6a1819Smrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 3881bedbe3fSmrg | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 3891bedbe3fSmrg | microblaze-* | microblazeel-* \ 390ba6a1819Smrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 391ba6a1819Smrg | mips16-* \ 392ba6a1819Smrg | mips64-* | mips64el-* \ 393549e21daSmrg | mips64octeon-* | mips64octeonel-* \ 394ba6a1819Smrg | mips64orion-* | mips64orionel-* \ 395549e21daSmrg | mips64r5900-* | mips64r5900el-* \ 396549e21daSmrg | mips64vr-* | mips64vrel-* \ 397ba6a1819Smrg | mips64vr4100-* | mips64vr4100el-* \ 398ba6a1819Smrg | mips64vr4300-* | mips64vr4300el-* \ 399ba6a1819Smrg | mips64vr5000-* | mips64vr5000el-* \ 400ba6a1819Smrg | mips64vr5900-* | mips64vr5900el-* \ 401ba6a1819Smrg | mipsisa32-* | mipsisa32el-* \ 402ba6a1819Smrg | mipsisa32r2-* | mipsisa32r2el-* \ 403ba6a1819Smrg | mipsisa64-* | mipsisa64el-* \ 404ba6a1819Smrg | mipsisa64r2-* | mipsisa64r2el-* \ 405ba6a1819Smrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 406ba6a1819Smrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 4071bedbe3fSmrg | mipsr5900-* | mipsr5900el-* \ 408ba6a1819Smrg | mipstx39-* | mipstx39el-* \ 409ba6a1819Smrg | mmix-* \ 410ba6a1819Smrg | mt-* \ 411ba6a1819Smrg | msp430-* \ 412549e21daSmrg | nds32-* | nds32le-* | nds32be-* \ 4131bedbe3fSmrg | nios-* | nios2-* | nios2eb-* | nios2el-* \ 414ba6a1819Smrg | none-* | np1-* | ns16k-* | ns32k-* \ 4151bedbe3fSmrg | open8-* \ 416ba6a1819Smrg | orion-* \ 417ba6a1819Smrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 4181bedbe3fSmrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 419ba6a1819Smrg | pyramid-* \ 4201bedbe3fSmrg | rl78-* | romp-* | rs6000-* | rx-* \ 421549e21daSmrg | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 422ba6a1819Smrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 423549e21daSmrg | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 424ba6a1819Smrg | sparclite-* \ 4251bedbe3fSmrg | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 4261bedbe3fSmrg | tahoe-* \ 427ba6a1819Smrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 4281bedbe3fSmrg | tile*-* \ 429ba6a1819Smrg | tron-* \ 430549e21daSmrg | ubicom32-* \ 4311bedbe3fSmrg | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 4321bedbe3fSmrg | vax-* \ 433ba6a1819Smrg | we32k-* \ 4341bedbe3fSmrg | x86-* | x86_64-* | xc16x-* | xps100-* \ 435549e21daSmrg | xstormy16-* | xtensa*-* \ 436ba6a1819Smrg | ymp-* \ 437549e21daSmrg | z8k-* | z80-*) 438ba6a1819Smrg ;; 439549e21daSmrg # Recognize the basic CPU types without company name, with glob match. 440549e21daSmrg xtensa*) 441549e21daSmrg basic_machine=$basic_machine-unknown 442ba6a1819Smrg ;; 443ba6a1819Smrg # Recognize the various machine names and aliases which stand 444ba6a1819Smrg # for a CPU type and a company and sometimes even an OS. 445ba6a1819Smrg 386bsd) 446ba6a1819Smrg basic_machine=i386-unknown 447ba6a1819Smrg os=-bsd 448ba6a1819Smrg ;; 449ba6a1819Smrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 450ba6a1819Smrg basic_machine=m68000-att 451ba6a1819Smrg ;; 452ba6a1819Smrg 3b*) 453ba6a1819Smrg basic_machine=we32k-att 454ba6a1819Smrg ;; 455ba6a1819Smrg a29khif) 456ba6a1819Smrg basic_machine=a29k-amd 457ba6a1819Smrg os=-udi 458ba6a1819Smrg ;; 4591bedbe3fSmrg abacus) 460ba6a1819Smrg basic_machine=abacus-unknown 461ba6a1819Smrg ;; 462ba6a1819Smrg adobe68k) 463ba6a1819Smrg basic_machine=m68010-adobe 464ba6a1819Smrg os=-scout 465ba6a1819Smrg ;; 466ba6a1819Smrg alliant | fx80) 467ba6a1819Smrg basic_machine=fx80-alliant 468ba6a1819Smrg ;; 469ba6a1819Smrg altos | altos3068) 470ba6a1819Smrg basic_machine=m68k-altos 471ba6a1819Smrg ;; 472ba6a1819Smrg am29k) 473ba6a1819Smrg basic_machine=a29k-none 474ba6a1819Smrg os=-bsd 475ba6a1819Smrg ;; 476ba6a1819Smrg amd64) 477ba6a1819Smrg basic_machine=x86_64-pc 478ba6a1819Smrg ;; 479ba6a1819Smrg amd64-*) 480ba6a1819Smrg basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 481ba6a1819Smrg ;; 482ba6a1819Smrg amdahl) 483ba6a1819Smrg basic_machine=580-amdahl 484ba6a1819Smrg os=-sysv 485ba6a1819Smrg ;; 486ba6a1819Smrg amiga | amiga-*) 487ba6a1819Smrg basic_machine=m68k-unknown 488ba6a1819Smrg ;; 489ba6a1819Smrg amigaos | amigados) 490ba6a1819Smrg basic_machine=m68k-unknown 491ba6a1819Smrg os=-amigaos 492ba6a1819Smrg ;; 493ba6a1819Smrg amigaunix | amix) 494ba6a1819Smrg basic_machine=m68k-unknown 495ba6a1819Smrg os=-sysv4 496ba6a1819Smrg ;; 497ba6a1819Smrg apollo68) 498ba6a1819Smrg basic_machine=m68k-apollo 499ba6a1819Smrg os=-sysv 500ba6a1819Smrg ;; 501ba6a1819Smrg apollo68bsd) 502ba6a1819Smrg basic_machine=m68k-apollo 503ba6a1819Smrg os=-bsd 504ba6a1819Smrg ;; 505549e21daSmrg aros) 506549e21daSmrg basic_machine=i386-pc 507549e21daSmrg os=-aros 508549e21daSmrg ;; 509ba6a1819Smrg aux) 510ba6a1819Smrg basic_machine=m68k-apple 511ba6a1819Smrg os=-aux 512ba6a1819Smrg ;; 513ba6a1819Smrg balance) 514ba6a1819Smrg basic_machine=ns32k-sequent 515ba6a1819Smrg os=-dynix 516ba6a1819Smrg ;; 517549e21daSmrg blackfin) 518549e21daSmrg basic_machine=bfin-unknown 519549e21daSmrg os=-linux 520549e21daSmrg ;; 521549e21daSmrg blackfin-*) 522549e21daSmrg basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 523549e21daSmrg os=-linux 524549e21daSmrg ;; 525549e21daSmrg bluegene*) 526549e21daSmrg basic_machine=powerpc-ibm 527549e21daSmrg os=-cnk 528549e21daSmrg ;; 529549e21daSmrg c54x-*) 530549e21daSmrg basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 531549e21daSmrg ;; 532549e21daSmrg c55x-*) 533549e21daSmrg basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 534549e21daSmrg ;; 535549e21daSmrg c6x-*) 536549e21daSmrg basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 537549e21daSmrg ;; 538ba6a1819Smrg c90) 539ba6a1819Smrg basic_machine=c90-cray 540ba6a1819Smrg os=-unicos 541ba6a1819Smrg ;; 5421bedbe3fSmrg cegcc) 543549e21daSmrg basic_machine=arm-unknown 544549e21daSmrg os=-cegcc 545549e21daSmrg ;; 546ba6a1819Smrg convex-c1) 547ba6a1819Smrg basic_machine=c1-convex 548ba6a1819Smrg os=-bsd 549ba6a1819Smrg ;; 550ba6a1819Smrg convex-c2) 551ba6a1819Smrg basic_machine=c2-convex 552ba6a1819Smrg os=-bsd 553ba6a1819Smrg ;; 554ba6a1819Smrg convex-c32) 555ba6a1819Smrg basic_machine=c32-convex 556ba6a1819Smrg os=-bsd 557ba6a1819Smrg ;; 558ba6a1819Smrg convex-c34) 559ba6a1819Smrg basic_machine=c34-convex 560ba6a1819Smrg os=-bsd 561ba6a1819Smrg ;; 562ba6a1819Smrg convex-c38) 563ba6a1819Smrg basic_machine=c38-convex 564ba6a1819Smrg os=-bsd 565ba6a1819Smrg ;; 566ba6a1819Smrg cray | j90) 567ba6a1819Smrg basic_machine=j90-cray 568ba6a1819Smrg os=-unicos 569ba6a1819Smrg ;; 570ba6a1819Smrg craynv) 571ba6a1819Smrg basic_machine=craynv-cray 572ba6a1819Smrg os=-unicosmp 573ba6a1819Smrg ;; 5741bedbe3fSmrg cr16 | cr16-*) 575549e21daSmrg basic_machine=cr16-unknown 576ba6a1819Smrg os=-elf 577ba6a1819Smrg ;; 578ba6a1819Smrg crds | unos) 579ba6a1819Smrg basic_machine=m68k-crds 580ba6a1819Smrg ;; 581ba6a1819Smrg crisv32 | crisv32-* | etraxfs*) 582ba6a1819Smrg basic_machine=crisv32-axis 583ba6a1819Smrg ;; 584ba6a1819Smrg cris | cris-* | etrax*) 585ba6a1819Smrg basic_machine=cris-axis 586ba6a1819Smrg ;; 587ba6a1819Smrg crx) 588ba6a1819Smrg basic_machine=crx-unknown 589ba6a1819Smrg os=-elf 590ba6a1819Smrg ;; 591ba6a1819Smrg da30 | da30-*) 592ba6a1819Smrg basic_machine=m68k-da30 593ba6a1819Smrg ;; 594ba6a1819Smrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 595ba6a1819Smrg basic_machine=mips-dec 596ba6a1819Smrg ;; 597ba6a1819Smrg decsystem10* | dec10*) 598ba6a1819Smrg basic_machine=pdp10-dec 599ba6a1819Smrg os=-tops10 600ba6a1819Smrg ;; 601ba6a1819Smrg decsystem20* | dec20*) 602ba6a1819Smrg basic_machine=pdp10-dec 603ba6a1819Smrg os=-tops20 604ba6a1819Smrg ;; 605ba6a1819Smrg delta | 3300 | motorola-3300 | motorola-delta \ 606ba6a1819Smrg | 3300-motorola | delta-motorola) 607ba6a1819Smrg basic_machine=m68k-motorola 608ba6a1819Smrg ;; 609ba6a1819Smrg delta88) 610ba6a1819Smrg basic_machine=m88k-motorola 611ba6a1819Smrg os=-sysv3 612ba6a1819Smrg ;; 613549e21daSmrg dicos) 614549e21daSmrg basic_machine=i686-pc 615549e21daSmrg os=-dicos 616549e21daSmrg ;; 617ba6a1819Smrg djgpp) 618ba6a1819Smrg basic_machine=i586-pc 619ba6a1819Smrg os=-msdosdjgpp 620ba6a1819Smrg ;; 621ba6a1819Smrg dpx20 | dpx20-*) 622ba6a1819Smrg basic_machine=rs6000-bull 623ba6a1819Smrg os=-bosx 624ba6a1819Smrg ;; 625ba6a1819Smrg dpx2* | dpx2*-bull) 626ba6a1819Smrg basic_machine=m68k-bull 627ba6a1819Smrg os=-sysv3 628ba6a1819Smrg ;; 629ba6a1819Smrg ebmon29k) 630ba6a1819Smrg basic_machine=a29k-amd 631ba6a1819Smrg os=-ebmon 632ba6a1819Smrg ;; 633ba6a1819Smrg elxsi) 634ba6a1819Smrg basic_machine=elxsi-elxsi 635ba6a1819Smrg os=-bsd 636ba6a1819Smrg ;; 637ba6a1819Smrg encore | umax | mmax) 638ba6a1819Smrg basic_machine=ns32k-encore 639ba6a1819Smrg ;; 640ba6a1819Smrg es1800 | OSE68k | ose68k | ose | OSE) 641ba6a1819Smrg basic_machine=m68k-ericsson 642ba6a1819Smrg os=-ose 643ba6a1819Smrg ;; 644ba6a1819Smrg fx2800) 645ba6a1819Smrg basic_machine=i860-alliant 646ba6a1819Smrg ;; 647ba6a1819Smrg genix) 648ba6a1819Smrg basic_machine=ns32k-ns 649ba6a1819Smrg ;; 650ba6a1819Smrg gmicro) 651ba6a1819Smrg basic_machine=tron-gmicro 652ba6a1819Smrg os=-sysv 653ba6a1819Smrg ;; 654ba6a1819Smrg go32) 655ba6a1819Smrg basic_machine=i386-pc 656ba6a1819Smrg os=-go32 657ba6a1819Smrg ;; 658ba6a1819Smrg h3050r* | hiux*) 659ba6a1819Smrg basic_machine=hppa1.1-hitachi 660ba6a1819Smrg os=-hiuxwe2 661ba6a1819Smrg ;; 662ba6a1819Smrg h8300hms) 663ba6a1819Smrg basic_machine=h8300-hitachi 664ba6a1819Smrg os=-hms 665ba6a1819Smrg ;; 666ba6a1819Smrg h8300xray) 667ba6a1819Smrg basic_machine=h8300-hitachi 668ba6a1819Smrg os=-xray 669ba6a1819Smrg ;; 670ba6a1819Smrg h8500hms) 671ba6a1819Smrg basic_machine=h8500-hitachi 672ba6a1819Smrg os=-hms 673ba6a1819Smrg ;; 674ba6a1819Smrg harris) 675ba6a1819Smrg basic_machine=m88k-harris 676ba6a1819Smrg os=-sysv3 677ba6a1819Smrg ;; 678ba6a1819Smrg hp300-*) 679ba6a1819Smrg basic_machine=m68k-hp 680ba6a1819Smrg ;; 681ba6a1819Smrg hp300bsd) 682ba6a1819Smrg basic_machine=m68k-hp 683ba6a1819Smrg os=-bsd 684ba6a1819Smrg ;; 685ba6a1819Smrg hp300hpux) 686ba6a1819Smrg basic_machine=m68k-hp 687ba6a1819Smrg os=-hpux 688ba6a1819Smrg ;; 689ba6a1819Smrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 690ba6a1819Smrg basic_machine=hppa1.0-hp 691ba6a1819Smrg ;; 692ba6a1819Smrg hp9k2[0-9][0-9] | hp9k31[0-9]) 693ba6a1819Smrg basic_machine=m68000-hp 694ba6a1819Smrg ;; 695ba6a1819Smrg hp9k3[2-9][0-9]) 696ba6a1819Smrg basic_machine=m68k-hp 697ba6a1819Smrg ;; 698ba6a1819Smrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 699ba6a1819Smrg basic_machine=hppa1.0-hp 700ba6a1819Smrg ;; 701ba6a1819Smrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 702ba6a1819Smrg basic_machine=hppa1.1-hp 703ba6a1819Smrg ;; 704ba6a1819Smrg hp9k78[0-9] | hp78[0-9]) 705ba6a1819Smrg # FIXME: really hppa2.0-hp 706ba6a1819Smrg basic_machine=hppa1.1-hp 707ba6a1819Smrg ;; 708ba6a1819Smrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 709ba6a1819Smrg # FIXME: really hppa2.0-hp 710ba6a1819Smrg basic_machine=hppa1.1-hp 711ba6a1819Smrg ;; 712ba6a1819Smrg hp9k8[0-9][13679] | hp8[0-9][13679]) 713ba6a1819Smrg basic_machine=hppa1.1-hp 714ba6a1819Smrg ;; 715ba6a1819Smrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 716ba6a1819Smrg basic_machine=hppa1.0-hp 717ba6a1819Smrg ;; 718ba6a1819Smrg hppa-next) 719ba6a1819Smrg os=-nextstep3 720ba6a1819Smrg ;; 721ba6a1819Smrg hppaosf) 722ba6a1819Smrg basic_machine=hppa1.1-hp 723ba6a1819Smrg os=-osf 724ba6a1819Smrg ;; 725ba6a1819Smrg hppro) 726ba6a1819Smrg basic_machine=hppa1.1-hp 727ba6a1819Smrg os=-proelf 728ba6a1819Smrg ;; 729ba6a1819Smrg i370-ibm* | ibm*) 730ba6a1819Smrg basic_machine=i370-ibm 731ba6a1819Smrg ;; 732ba6a1819Smrg i*86v32) 733ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 734ba6a1819Smrg os=-sysv32 735ba6a1819Smrg ;; 736ba6a1819Smrg i*86v4*) 737ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 738ba6a1819Smrg os=-sysv4 739ba6a1819Smrg ;; 740ba6a1819Smrg i*86v) 741ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 742ba6a1819Smrg os=-sysv 743ba6a1819Smrg ;; 744ba6a1819Smrg i*86sol2) 745ba6a1819Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 746ba6a1819Smrg os=-solaris2 747ba6a1819Smrg ;; 748ba6a1819Smrg i386mach) 749ba6a1819Smrg basic_machine=i386-mach 750ba6a1819Smrg os=-mach 751ba6a1819Smrg ;; 752ba6a1819Smrg i386-vsta | vsta) 753ba6a1819Smrg basic_machine=i386-unknown 754ba6a1819Smrg os=-vsta 755ba6a1819Smrg ;; 756ba6a1819Smrg iris | iris4d) 757ba6a1819Smrg basic_machine=mips-sgi 758ba6a1819Smrg case $os in 759ba6a1819Smrg -irix*) 760ba6a1819Smrg ;; 761ba6a1819Smrg *) 762ba6a1819Smrg os=-irix4 763ba6a1819Smrg ;; 764ba6a1819Smrg esac 765ba6a1819Smrg ;; 766ba6a1819Smrg isi68 | isi) 767ba6a1819Smrg basic_machine=m68k-isi 768ba6a1819Smrg os=-sysv 769ba6a1819Smrg ;; 770549e21daSmrg m68knommu) 771549e21daSmrg basic_machine=m68k-unknown 772549e21daSmrg os=-linux 773549e21daSmrg ;; 774549e21daSmrg m68knommu-*) 775549e21daSmrg basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 776549e21daSmrg os=-linux 777549e21daSmrg ;; 778ba6a1819Smrg m88k-omron*) 779ba6a1819Smrg basic_machine=m88k-omron 780ba6a1819Smrg ;; 781ba6a1819Smrg magnum | m3230) 782ba6a1819Smrg basic_machine=mips-mips 783ba6a1819Smrg os=-sysv 784ba6a1819Smrg ;; 785ba6a1819Smrg merlin) 786ba6a1819Smrg basic_machine=ns32k-utek 787ba6a1819Smrg os=-sysv 788ba6a1819Smrg ;; 7891bedbe3fSmrg microblaze*) 790549e21daSmrg basic_machine=microblaze-xilinx 791549e21daSmrg ;; 7921bedbe3fSmrg mingw64) 7931bedbe3fSmrg basic_machine=x86_64-pc 7941bedbe3fSmrg os=-mingw64 7951bedbe3fSmrg ;; 796ba6a1819Smrg mingw32) 797ba6a1819Smrg basic_machine=i386-pc 798ba6a1819Smrg os=-mingw32 799ba6a1819Smrg ;; 800549e21daSmrg mingw32ce) 801549e21daSmrg basic_machine=arm-unknown 802549e21daSmrg os=-mingw32ce 803549e21daSmrg ;; 804ba6a1819Smrg miniframe) 805ba6a1819Smrg basic_machine=m68000-convergent 806ba6a1819Smrg ;; 807ba6a1819Smrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 808ba6a1819Smrg basic_machine=m68k-atari 809ba6a1819Smrg os=-mint 810ba6a1819Smrg ;; 811ba6a1819Smrg mips3*-*) 812ba6a1819Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 813ba6a1819Smrg ;; 814ba6a1819Smrg mips3*) 815ba6a1819Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 816ba6a1819Smrg ;; 817ba6a1819Smrg monitor) 818ba6a1819Smrg basic_machine=m68k-rom68k 819ba6a1819Smrg os=-coff 820ba6a1819Smrg ;; 821ba6a1819Smrg morphos) 822ba6a1819Smrg basic_machine=powerpc-unknown 823ba6a1819Smrg os=-morphos 824ba6a1819Smrg ;; 825ba6a1819Smrg msdos) 826ba6a1819Smrg basic_machine=i386-pc 827ba6a1819Smrg os=-msdos 828ba6a1819Smrg ;; 829ba6a1819Smrg ms1-*) 830ba6a1819Smrg basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 831ba6a1819Smrg ;; 8321bedbe3fSmrg msys) 8331bedbe3fSmrg basic_machine=i386-pc 8341bedbe3fSmrg os=-msys 8351bedbe3fSmrg ;; 836ba6a1819Smrg mvs) 837ba6a1819Smrg basic_machine=i370-ibm 838ba6a1819Smrg os=-mvs 839ba6a1819Smrg ;; 8401bedbe3fSmrg nacl) 8411bedbe3fSmrg basic_machine=le32-unknown 8421bedbe3fSmrg os=-nacl 8431bedbe3fSmrg ;; 844ba6a1819Smrg ncr3000) 845ba6a1819Smrg basic_machine=i486-ncr 846ba6a1819Smrg os=-sysv4 847ba6a1819Smrg ;; 848ba6a1819Smrg netbsd386) 849ba6a1819Smrg basic_machine=i386-unknown 850ba6a1819Smrg os=-netbsd 851ba6a1819Smrg ;; 852ba6a1819Smrg netwinder) 853ba6a1819Smrg basic_machine=armv4l-rebel 854ba6a1819Smrg os=-linux 855ba6a1819Smrg ;; 856ba6a1819Smrg news | news700 | news800 | news900) 857ba6a1819Smrg basic_machine=m68k-sony 858ba6a1819Smrg os=-newsos 859ba6a1819Smrg ;; 860ba6a1819Smrg news1000) 861ba6a1819Smrg basic_machine=m68030-sony 862ba6a1819Smrg os=-newsos 863ba6a1819Smrg ;; 864ba6a1819Smrg news-3600 | risc-news) 865ba6a1819Smrg basic_machine=mips-sony 866ba6a1819Smrg os=-newsos 867ba6a1819Smrg ;; 868ba6a1819Smrg necv70) 869ba6a1819Smrg basic_machine=v70-nec 870ba6a1819Smrg os=-sysv 871ba6a1819Smrg ;; 872ba6a1819Smrg next | m*-next ) 873ba6a1819Smrg basic_machine=m68k-next 874ba6a1819Smrg case $os in 875ba6a1819Smrg -nextstep* ) 876ba6a1819Smrg ;; 877ba6a1819Smrg -ns2*) 878ba6a1819Smrg os=-nextstep2 879ba6a1819Smrg ;; 880ba6a1819Smrg *) 881ba6a1819Smrg os=-nextstep3 882ba6a1819Smrg ;; 883ba6a1819Smrg esac 884ba6a1819Smrg ;; 885ba6a1819Smrg nh3000) 886ba6a1819Smrg basic_machine=m68k-harris 887ba6a1819Smrg os=-cxux 888ba6a1819Smrg ;; 889ba6a1819Smrg nh[45]000) 890ba6a1819Smrg basic_machine=m88k-harris 891ba6a1819Smrg os=-cxux 892ba6a1819Smrg ;; 893ba6a1819Smrg nindy960) 894ba6a1819Smrg basic_machine=i960-intel 895ba6a1819Smrg os=-nindy 896ba6a1819Smrg ;; 897ba6a1819Smrg mon960) 898ba6a1819Smrg basic_machine=i960-intel 899ba6a1819Smrg os=-mon960 900ba6a1819Smrg ;; 901ba6a1819Smrg nonstopux) 902ba6a1819Smrg basic_machine=mips-compaq 903ba6a1819Smrg os=-nonstopux 904ba6a1819Smrg ;; 905ba6a1819Smrg np1) 906ba6a1819Smrg basic_machine=np1-gould 907ba6a1819Smrg ;; 9081bedbe3fSmrg neo-tandem) 909549e21daSmrg basic_machine=neo-tandem 910549e21daSmrg ;; 9111bedbe3fSmrg nse-tandem) 912549e21daSmrg basic_machine=nse-tandem 913549e21daSmrg ;; 914ba6a1819Smrg nsr-tandem) 915ba6a1819Smrg basic_machine=nsr-tandem 916ba6a1819Smrg ;; 917ba6a1819Smrg op50n-* | op60c-*) 918ba6a1819Smrg basic_machine=hppa1.1-oki 919ba6a1819Smrg os=-proelf 920ba6a1819Smrg ;; 921ba6a1819Smrg openrisc | openrisc-*) 922ba6a1819Smrg basic_machine=or32-unknown 923ba6a1819Smrg ;; 924ba6a1819Smrg os400) 925ba6a1819Smrg basic_machine=powerpc-ibm 926ba6a1819Smrg os=-os400 927ba6a1819Smrg ;; 928ba6a1819Smrg OSE68000 | ose68000) 929ba6a1819Smrg basic_machine=m68000-ericsson 930ba6a1819Smrg os=-ose 931ba6a1819Smrg ;; 932ba6a1819Smrg os68k) 933ba6a1819Smrg basic_machine=m68k-none 934ba6a1819Smrg os=-os68k 935ba6a1819Smrg ;; 936ba6a1819Smrg pa-hitachi) 937ba6a1819Smrg basic_machine=hppa1.1-hitachi 938ba6a1819Smrg os=-hiuxwe2 939ba6a1819Smrg ;; 940ba6a1819Smrg paragon) 941ba6a1819Smrg basic_machine=i860-intel 942ba6a1819Smrg os=-osf 943ba6a1819Smrg ;; 944549e21daSmrg parisc) 945549e21daSmrg basic_machine=hppa-unknown 946549e21daSmrg os=-linux 947549e21daSmrg ;; 948549e21daSmrg parisc-*) 949549e21daSmrg basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 950549e21daSmrg os=-linux 951549e21daSmrg ;; 952ba6a1819Smrg pbd) 953ba6a1819Smrg basic_machine=sparc-tti 954ba6a1819Smrg ;; 955ba6a1819Smrg pbb) 956ba6a1819Smrg basic_machine=m68k-tti 957ba6a1819Smrg ;; 958ba6a1819Smrg pc532 | pc532-*) 959ba6a1819Smrg basic_machine=ns32k-pc532 960ba6a1819Smrg ;; 961549e21daSmrg pc98) 962549e21daSmrg basic_machine=i386-pc 963549e21daSmrg ;; 964549e21daSmrg pc98-*) 965549e21daSmrg basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 966549e21daSmrg ;; 967ba6a1819Smrg pentium | p5 | k5 | k6 | nexgen | viac3) 968ba6a1819Smrg basic_machine=i586-pc 969ba6a1819Smrg ;; 970ba6a1819Smrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 971ba6a1819Smrg basic_machine=i686-pc 972ba6a1819Smrg ;; 973ba6a1819Smrg pentiumii | pentium2 | pentiumiii | pentium3) 974ba6a1819Smrg basic_machine=i686-pc 975ba6a1819Smrg ;; 976ba6a1819Smrg pentium4) 977ba6a1819Smrg basic_machine=i786-pc 978ba6a1819Smrg ;; 979ba6a1819Smrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 980ba6a1819Smrg basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 981ba6a1819Smrg ;; 982ba6a1819Smrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 983ba6a1819Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 984ba6a1819Smrg ;; 985ba6a1819Smrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 986ba6a1819Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 987ba6a1819Smrg ;; 988ba6a1819Smrg pentium4-*) 989ba6a1819Smrg basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 990ba6a1819Smrg ;; 991ba6a1819Smrg pn) 992ba6a1819Smrg basic_machine=pn-gould 993ba6a1819Smrg ;; 994ba6a1819Smrg power) basic_machine=power-ibm 995ba6a1819Smrg ;; 9961bedbe3fSmrg ppc | ppcbe) basic_machine=powerpc-unknown 997ba6a1819Smrg ;; 9981bedbe3fSmrg ppc-* | ppcbe-*) 9991bedbe3fSmrg basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 1000ba6a1819Smrg ;; 1001ba6a1819Smrg ppcle | powerpclittle | ppc-le | powerpc-little) 1002ba6a1819Smrg basic_machine=powerpcle-unknown 1003ba6a1819Smrg ;; 1004ba6a1819Smrg ppcle-* | powerpclittle-*) 1005ba6a1819Smrg basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 1006ba6a1819Smrg ;; 1007ba6a1819Smrg ppc64) basic_machine=powerpc64-unknown 1008ba6a1819Smrg ;; 1009ba6a1819Smrg ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 1010ba6a1819Smrg ;; 1011ba6a1819Smrg ppc64le | powerpc64little | ppc64-le | powerpc64-little) 1012ba6a1819Smrg basic_machine=powerpc64le-unknown 1013ba6a1819Smrg ;; 1014ba6a1819Smrg ppc64le-* | powerpc64little-*) 1015ba6a1819Smrg basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 1016ba6a1819Smrg ;; 1017ba6a1819Smrg ps2) 1018ba6a1819Smrg basic_machine=i386-ibm 1019ba6a1819Smrg ;; 1020ba6a1819Smrg pw32) 1021ba6a1819Smrg basic_machine=i586-unknown 1022ba6a1819Smrg os=-pw32 1023ba6a1819Smrg ;; 10241bedbe3fSmrg rdos | rdos64) 10251bedbe3fSmrg basic_machine=x86_64-pc 10261bedbe3fSmrg os=-rdos 10271bedbe3fSmrg ;; 10281bedbe3fSmrg rdos32) 1029ba6a1819Smrg basic_machine=i386-pc 1030ba6a1819Smrg os=-rdos 1031ba6a1819Smrg ;; 1032ba6a1819Smrg rom68k) 1033ba6a1819Smrg basic_machine=m68k-rom68k 1034ba6a1819Smrg os=-coff 1035ba6a1819Smrg ;; 1036ba6a1819Smrg rm[46]00) 1037ba6a1819Smrg basic_machine=mips-siemens 1038ba6a1819Smrg ;; 1039ba6a1819Smrg rtpc | rtpc-*) 1040ba6a1819Smrg basic_machine=romp-ibm 1041ba6a1819Smrg ;; 1042ba6a1819Smrg s390 | s390-*) 1043ba6a1819Smrg basic_machine=s390-ibm 1044ba6a1819Smrg ;; 1045ba6a1819Smrg s390x | s390x-*) 1046ba6a1819Smrg basic_machine=s390x-ibm 1047ba6a1819Smrg ;; 1048ba6a1819Smrg sa29200) 1049ba6a1819Smrg basic_machine=a29k-amd 1050ba6a1819Smrg os=-udi 1051ba6a1819Smrg ;; 1052ba6a1819Smrg sb1) 1053ba6a1819Smrg basic_machine=mipsisa64sb1-unknown 1054ba6a1819Smrg ;; 1055ba6a1819Smrg sb1el) 1056ba6a1819Smrg basic_machine=mipsisa64sb1el-unknown 1057ba6a1819Smrg ;; 1058549e21daSmrg sde) 1059549e21daSmrg basic_machine=mipsisa32-sde 1060549e21daSmrg os=-elf 1061549e21daSmrg ;; 1062ba6a1819Smrg sei) 1063ba6a1819Smrg basic_machine=mips-sei 1064ba6a1819Smrg os=-seiux 1065ba6a1819Smrg ;; 1066ba6a1819Smrg sequent) 1067ba6a1819Smrg basic_machine=i386-sequent 1068ba6a1819Smrg ;; 1069ba6a1819Smrg sh) 1070ba6a1819Smrg basic_machine=sh-hitachi 1071ba6a1819Smrg os=-hms 1072ba6a1819Smrg ;; 1073549e21daSmrg sh5el) 1074549e21daSmrg basic_machine=sh5le-unknown 1075549e21daSmrg ;; 1076ba6a1819Smrg sh64) 1077ba6a1819Smrg basic_machine=sh64-unknown 1078ba6a1819Smrg ;; 1079ba6a1819Smrg sparclite-wrs | simso-wrs) 1080ba6a1819Smrg basic_machine=sparclite-wrs 1081ba6a1819Smrg os=-vxworks 1082ba6a1819Smrg ;; 1083ba6a1819Smrg sps7) 1084ba6a1819Smrg basic_machine=m68k-bull 1085ba6a1819Smrg os=-sysv2 1086ba6a1819Smrg ;; 1087ba6a1819Smrg spur) 1088ba6a1819Smrg basic_machine=spur-unknown 1089ba6a1819Smrg ;; 1090ba6a1819Smrg st2000) 1091ba6a1819Smrg basic_machine=m68k-tandem 1092ba6a1819Smrg ;; 1093ba6a1819Smrg stratus) 1094ba6a1819Smrg basic_machine=i860-stratus 1095ba6a1819Smrg os=-sysv4 1096ba6a1819Smrg ;; 10971bedbe3fSmrg strongarm-* | thumb-*) 10981bedbe3fSmrg basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` 10991bedbe3fSmrg ;; 1100ba6a1819Smrg sun2) 1101ba6a1819Smrg basic_machine=m68000-sun 1102ba6a1819Smrg ;; 1103ba6a1819Smrg sun2os3) 1104ba6a1819Smrg basic_machine=m68000-sun 1105ba6a1819Smrg os=-sunos3 1106ba6a1819Smrg ;; 1107ba6a1819Smrg sun2os4) 1108ba6a1819Smrg basic_machine=m68000-sun 1109ba6a1819Smrg os=-sunos4 1110ba6a1819Smrg ;; 1111ba6a1819Smrg sun3os3) 1112ba6a1819Smrg basic_machine=m68k-sun 1113ba6a1819Smrg os=-sunos3 1114ba6a1819Smrg ;; 1115ba6a1819Smrg sun3os4) 1116ba6a1819Smrg basic_machine=m68k-sun 1117ba6a1819Smrg os=-sunos4 1118ba6a1819Smrg ;; 1119ba6a1819Smrg sun4os3) 1120ba6a1819Smrg basic_machine=sparc-sun 1121ba6a1819Smrg os=-sunos3 1122ba6a1819Smrg ;; 1123ba6a1819Smrg sun4os4) 1124ba6a1819Smrg basic_machine=sparc-sun 1125ba6a1819Smrg os=-sunos4 1126ba6a1819Smrg ;; 1127ba6a1819Smrg sun4sol2) 1128ba6a1819Smrg basic_machine=sparc-sun 1129ba6a1819Smrg os=-solaris2 1130ba6a1819Smrg ;; 1131ba6a1819Smrg sun3 | sun3-*) 1132ba6a1819Smrg basic_machine=m68k-sun 1133ba6a1819Smrg ;; 1134ba6a1819Smrg sun4) 1135ba6a1819Smrg basic_machine=sparc-sun 1136ba6a1819Smrg ;; 1137ba6a1819Smrg sun386 | sun386i | roadrunner) 1138ba6a1819Smrg basic_machine=i386-sun 1139ba6a1819Smrg ;; 1140ba6a1819Smrg sv1) 1141ba6a1819Smrg basic_machine=sv1-cray 1142ba6a1819Smrg os=-unicos 1143ba6a1819Smrg ;; 1144ba6a1819Smrg symmetry) 1145ba6a1819Smrg basic_machine=i386-sequent 1146ba6a1819Smrg os=-dynix 1147ba6a1819Smrg ;; 1148ba6a1819Smrg t3e) 1149ba6a1819Smrg basic_machine=alphaev5-cray 1150ba6a1819Smrg os=-unicos 1151ba6a1819Smrg ;; 1152ba6a1819Smrg t90) 1153ba6a1819Smrg basic_machine=t90-cray 1154ba6a1819Smrg os=-unicos 1155ba6a1819Smrg ;; 1156549e21daSmrg tile*) 11571bedbe3fSmrg basic_machine=$basic_machine-unknown 1158549e21daSmrg os=-linux-gnu 1159ba6a1819Smrg ;; 1160ba6a1819Smrg tx39) 1161ba6a1819Smrg basic_machine=mipstx39-unknown 1162ba6a1819Smrg ;; 1163ba6a1819Smrg tx39el) 1164ba6a1819Smrg basic_machine=mipstx39el-unknown 1165ba6a1819Smrg ;; 1166ba6a1819Smrg toad1) 1167ba6a1819Smrg basic_machine=pdp10-xkl 1168ba6a1819Smrg os=-tops20 1169ba6a1819Smrg ;; 1170ba6a1819Smrg tower | tower-32) 1171ba6a1819Smrg basic_machine=m68k-ncr 1172ba6a1819Smrg ;; 1173ba6a1819Smrg tpf) 1174ba6a1819Smrg basic_machine=s390x-ibm 1175ba6a1819Smrg os=-tpf 1176ba6a1819Smrg ;; 1177ba6a1819Smrg udi29k) 1178ba6a1819Smrg basic_machine=a29k-amd 1179ba6a1819Smrg os=-udi 1180ba6a1819Smrg ;; 1181ba6a1819Smrg ultra3) 1182ba6a1819Smrg basic_machine=a29k-nyu 1183ba6a1819Smrg os=-sym1 1184ba6a1819Smrg ;; 1185ba6a1819Smrg v810 | necv810) 1186ba6a1819Smrg basic_machine=v810-nec 1187ba6a1819Smrg os=-none 1188ba6a1819Smrg ;; 1189ba6a1819Smrg vaxv) 1190ba6a1819Smrg basic_machine=vax-dec 1191ba6a1819Smrg os=-sysv 1192ba6a1819Smrg ;; 1193ba6a1819Smrg vms) 1194ba6a1819Smrg basic_machine=vax-dec 1195ba6a1819Smrg os=-vms 1196ba6a1819Smrg ;; 1197ba6a1819Smrg vpp*|vx|vx-*) 1198ba6a1819Smrg basic_machine=f301-fujitsu 1199ba6a1819Smrg ;; 1200ba6a1819Smrg vxworks960) 1201ba6a1819Smrg basic_machine=i960-wrs 1202ba6a1819Smrg os=-vxworks 1203ba6a1819Smrg ;; 1204ba6a1819Smrg vxworks68) 1205ba6a1819Smrg basic_machine=m68k-wrs 1206ba6a1819Smrg os=-vxworks 1207ba6a1819Smrg ;; 1208ba6a1819Smrg vxworks29k) 1209ba6a1819Smrg basic_machine=a29k-wrs 1210ba6a1819Smrg os=-vxworks 1211ba6a1819Smrg ;; 1212ba6a1819Smrg w65*) 1213ba6a1819Smrg basic_machine=w65-wdc 1214ba6a1819Smrg os=-none 1215ba6a1819Smrg ;; 1216ba6a1819Smrg w89k-*) 1217ba6a1819Smrg basic_machine=hppa1.1-winbond 1218ba6a1819Smrg os=-proelf 1219ba6a1819Smrg ;; 1220ba6a1819Smrg xbox) 1221ba6a1819Smrg basic_machine=i686-pc 1222ba6a1819Smrg os=-mingw32 1223ba6a1819Smrg ;; 1224ba6a1819Smrg xps | xps100) 1225ba6a1819Smrg basic_machine=xps100-honeywell 1226ba6a1819Smrg ;; 12271bedbe3fSmrg xscale-* | xscalee[bl]-*) 12281bedbe3fSmrg basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` 12291bedbe3fSmrg ;; 1230ba6a1819Smrg ymp) 1231ba6a1819Smrg basic_machine=ymp-cray 1232ba6a1819Smrg os=-unicos 1233ba6a1819Smrg ;; 1234ba6a1819Smrg z8k-*-coff) 1235ba6a1819Smrg basic_machine=z8k-unknown 1236ba6a1819Smrg os=-sim 1237ba6a1819Smrg ;; 1238549e21daSmrg z80-*-coff) 1239549e21daSmrg basic_machine=z80-unknown 1240549e21daSmrg os=-sim 1241549e21daSmrg ;; 1242ba6a1819Smrg none) 1243ba6a1819Smrg basic_machine=none-none 1244ba6a1819Smrg os=-none 1245ba6a1819Smrg ;; 1246ba6a1819Smrg 1247ba6a1819Smrg# Here we handle the default manufacturer of certain CPU types. It is in 1248ba6a1819Smrg# some cases the only manufacturer, in others, it is the most popular. 1249ba6a1819Smrg w89k) 1250ba6a1819Smrg basic_machine=hppa1.1-winbond 1251ba6a1819Smrg ;; 1252ba6a1819Smrg op50n) 1253ba6a1819Smrg basic_machine=hppa1.1-oki 1254ba6a1819Smrg ;; 1255ba6a1819Smrg op60c) 1256ba6a1819Smrg basic_machine=hppa1.1-oki 1257ba6a1819Smrg ;; 1258ba6a1819Smrg romp) 1259ba6a1819Smrg basic_machine=romp-ibm 1260ba6a1819Smrg ;; 1261ba6a1819Smrg mmix) 1262ba6a1819Smrg basic_machine=mmix-knuth 1263ba6a1819Smrg ;; 1264ba6a1819Smrg rs6000) 1265ba6a1819Smrg basic_machine=rs6000-ibm 1266ba6a1819Smrg ;; 1267ba6a1819Smrg vax) 1268ba6a1819Smrg basic_machine=vax-dec 1269ba6a1819Smrg ;; 1270ba6a1819Smrg pdp10) 1271ba6a1819Smrg # there are many clones, so DEC is not a safe bet 1272ba6a1819Smrg basic_machine=pdp10-unknown 1273ba6a1819Smrg ;; 1274ba6a1819Smrg pdp11) 1275ba6a1819Smrg basic_machine=pdp11-dec 1276ba6a1819Smrg ;; 1277ba6a1819Smrg we32k) 1278ba6a1819Smrg basic_machine=we32k-att 1279ba6a1819Smrg ;; 1280549e21daSmrg sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 1281ba6a1819Smrg basic_machine=sh-unknown 1282ba6a1819Smrg ;; 1283549e21daSmrg sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 1284ba6a1819Smrg basic_machine=sparc-sun 1285ba6a1819Smrg ;; 1286ba6a1819Smrg cydra) 1287ba6a1819Smrg basic_machine=cydra-cydrome 1288ba6a1819Smrg ;; 1289ba6a1819Smrg orion) 1290ba6a1819Smrg basic_machine=orion-highlevel 1291ba6a1819Smrg ;; 1292ba6a1819Smrg orion105) 1293ba6a1819Smrg basic_machine=clipper-highlevel 1294ba6a1819Smrg ;; 1295ba6a1819Smrg mac | mpw | mac-mpw) 1296ba6a1819Smrg basic_machine=m68k-apple 1297ba6a1819Smrg ;; 1298ba6a1819Smrg pmac | pmac-mpw) 1299ba6a1819Smrg basic_machine=powerpc-apple 1300ba6a1819Smrg ;; 1301ba6a1819Smrg *-unknown) 1302ba6a1819Smrg # Make sure to match an already-canonicalized machine name. 1303ba6a1819Smrg ;; 1304ba6a1819Smrg *) 1305ba6a1819Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1306ba6a1819Smrg exit 1 1307ba6a1819Smrg ;; 1308ba6a1819Smrgesac 1309ba6a1819Smrg 1310ba6a1819Smrg# Here we canonicalize certain aliases for manufacturers. 1311ba6a1819Smrgcase $basic_machine in 1312ba6a1819Smrg *-digital*) 1313ba6a1819Smrg basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 1314ba6a1819Smrg ;; 1315ba6a1819Smrg *-commodore*) 1316ba6a1819Smrg basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 1317ba6a1819Smrg ;; 1318ba6a1819Smrg *) 1319ba6a1819Smrg ;; 1320ba6a1819Smrgesac 1321ba6a1819Smrg 1322ba6a1819Smrg# Decode manufacturer-specific aliases for certain operating systems. 1323ba6a1819Smrg 1324ba6a1819Smrgif [ x"$os" != x"" ] 1325ba6a1819Smrgthen 1326ba6a1819Smrgcase $os in 13271bedbe3fSmrg # First match some system type aliases 13281bedbe3fSmrg # that might get confused with valid system types. 1329ba6a1819Smrg # -solaris* is a basic system type, with this one exception. 13301bedbe3fSmrg -auroraux) 13311bedbe3fSmrg os=-auroraux 1332549e21daSmrg ;; 1333ba6a1819Smrg -solaris1 | -solaris1.*) 1334ba6a1819Smrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 1335ba6a1819Smrg ;; 1336ba6a1819Smrg -solaris) 1337ba6a1819Smrg os=-solaris2 1338ba6a1819Smrg ;; 1339ba6a1819Smrg -svr4*) 1340ba6a1819Smrg os=-sysv4 1341ba6a1819Smrg ;; 1342ba6a1819Smrg -unixware*) 1343ba6a1819Smrg os=-sysv4.2uw 1344ba6a1819Smrg ;; 1345ba6a1819Smrg -gnu/linux*) 1346ba6a1819Smrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1347ba6a1819Smrg ;; 1348ba6a1819Smrg # First accept the basic system types. 1349ba6a1819Smrg # The portable systems comes first. 1350ba6a1819Smrg # Each alternative MUST END IN A *, to match a version number. 1351ba6a1819Smrg # -sysv* is not here because it comes later, after sysvr4. 1352ba6a1819Smrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1353549e21daSmrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1354549e21daSmrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 13551bedbe3fSmrg | -sym* | -kopensolaris* | -plan9* \ 1356ba6a1819Smrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1357549e21daSmrg | -aos* | -aros* \ 1358ba6a1819Smrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1359ba6a1819Smrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1360549e21daSmrg | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 13611bedbe3fSmrg | -bitrig* | -openbsd* | -solidbsd* \ 1362ba6a1819Smrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1363ba6a1819Smrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1364ba6a1819Smrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1365ba6a1819Smrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1366549e21daSmrg | -chorusos* | -chorusrdb* | -cegcc* \ 13671bedbe3fSmrg | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 13681bedbe3fSmrg | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 13691bedbe3fSmrg | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 1370ba6a1819Smrg | -uxpv* | -beos* | -mpeix* | -udk* \ 1371ba6a1819Smrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1372ba6a1819Smrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1373ba6a1819Smrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1374ba6a1819Smrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1375ba6a1819Smrg | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1376ba6a1819Smrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1377549e21daSmrg | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 1378ba6a1819Smrg # Remember, each alternative MUST END IN *, to match a version number. 1379ba6a1819Smrg ;; 1380ba6a1819Smrg -qnx*) 1381ba6a1819Smrg case $basic_machine in 1382ba6a1819Smrg x86-* | i*86-*) 1383ba6a1819Smrg ;; 1384ba6a1819Smrg *) 1385ba6a1819Smrg os=-nto$os 1386ba6a1819Smrg ;; 1387ba6a1819Smrg esac 1388ba6a1819Smrg ;; 1389ba6a1819Smrg -nto-qnx*) 1390ba6a1819Smrg ;; 1391ba6a1819Smrg -nto*) 1392ba6a1819Smrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 1393ba6a1819Smrg ;; 1394ba6a1819Smrg -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1395ba6a1819Smrg | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 1396ba6a1819Smrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1397ba6a1819Smrg ;; 1398ba6a1819Smrg -mac*) 1399ba6a1819Smrg os=`echo $os | sed -e 's|mac|macos|'` 1400ba6a1819Smrg ;; 1401ba6a1819Smrg -linux-dietlibc) 1402ba6a1819Smrg os=-linux-dietlibc 1403ba6a1819Smrg ;; 1404ba6a1819Smrg -linux*) 1405ba6a1819Smrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 1406ba6a1819Smrg ;; 1407ba6a1819Smrg -sunos5*) 1408ba6a1819Smrg os=`echo $os | sed -e 's|sunos5|solaris2|'` 1409ba6a1819Smrg ;; 1410ba6a1819Smrg -sunos6*) 1411ba6a1819Smrg os=`echo $os | sed -e 's|sunos6|solaris3|'` 1412ba6a1819Smrg ;; 1413ba6a1819Smrg -opened*) 1414ba6a1819Smrg os=-openedition 1415ba6a1819Smrg ;; 14161bedbe3fSmrg -os400*) 1417ba6a1819Smrg os=-os400 1418ba6a1819Smrg ;; 1419ba6a1819Smrg -wince*) 1420ba6a1819Smrg os=-wince 1421ba6a1819Smrg ;; 1422ba6a1819Smrg -osfrose*) 1423ba6a1819Smrg os=-osfrose 1424ba6a1819Smrg ;; 1425ba6a1819Smrg -osf*) 1426ba6a1819Smrg os=-osf 1427ba6a1819Smrg ;; 1428ba6a1819Smrg -utek*) 1429ba6a1819Smrg os=-bsd 1430ba6a1819Smrg ;; 1431ba6a1819Smrg -dynix*) 1432ba6a1819Smrg os=-bsd 1433ba6a1819Smrg ;; 1434ba6a1819Smrg -acis*) 1435ba6a1819Smrg os=-aos 1436ba6a1819Smrg ;; 1437ba6a1819Smrg -atheos*) 1438ba6a1819Smrg os=-atheos 1439ba6a1819Smrg ;; 1440ba6a1819Smrg -syllable*) 1441ba6a1819Smrg os=-syllable 1442ba6a1819Smrg ;; 1443ba6a1819Smrg -386bsd) 1444ba6a1819Smrg os=-bsd 1445ba6a1819Smrg ;; 1446ba6a1819Smrg -ctix* | -uts*) 1447ba6a1819Smrg os=-sysv 1448ba6a1819Smrg ;; 1449ba6a1819Smrg -nova*) 1450ba6a1819Smrg os=-rtmk-nova 1451ba6a1819Smrg ;; 1452ba6a1819Smrg -ns2 ) 1453ba6a1819Smrg os=-nextstep2 1454ba6a1819Smrg ;; 1455ba6a1819Smrg -nsk*) 1456ba6a1819Smrg os=-nsk 1457ba6a1819Smrg ;; 1458ba6a1819Smrg # Preserve the version number of sinix5. 1459ba6a1819Smrg -sinix5.*) 1460ba6a1819Smrg os=`echo $os | sed -e 's|sinix|sysv|'` 1461ba6a1819Smrg ;; 1462ba6a1819Smrg -sinix*) 1463ba6a1819Smrg os=-sysv4 1464ba6a1819Smrg ;; 14651bedbe3fSmrg -tpf*) 1466ba6a1819Smrg os=-tpf 1467ba6a1819Smrg ;; 1468ba6a1819Smrg -triton*) 1469ba6a1819Smrg os=-sysv3 1470ba6a1819Smrg ;; 1471ba6a1819Smrg -oss*) 1472ba6a1819Smrg os=-sysv3 1473ba6a1819Smrg ;; 1474ba6a1819Smrg -svr4) 1475ba6a1819Smrg os=-sysv4 1476ba6a1819Smrg ;; 1477ba6a1819Smrg -svr3) 1478ba6a1819Smrg os=-sysv3 1479ba6a1819Smrg ;; 1480ba6a1819Smrg -sysvr4) 1481ba6a1819Smrg os=-sysv4 1482ba6a1819Smrg ;; 1483ba6a1819Smrg # This must come after -sysvr4. 1484ba6a1819Smrg -sysv*) 1485ba6a1819Smrg ;; 1486ba6a1819Smrg -ose*) 1487ba6a1819Smrg os=-ose 1488ba6a1819Smrg ;; 1489ba6a1819Smrg -es1800*) 1490ba6a1819Smrg os=-ose 1491ba6a1819Smrg ;; 1492ba6a1819Smrg -xenix) 1493ba6a1819Smrg os=-xenix 1494ba6a1819Smrg ;; 1495ba6a1819Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1496ba6a1819Smrg os=-mint 1497ba6a1819Smrg ;; 1498ba6a1819Smrg -aros*) 1499ba6a1819Smrg os=-aros 1500ba6a1819Smrg ;; 1501ba6a1819Smrg -zvmoe) 1502ba6a1819Smrg os=-zvmoe 1503ba6a1819Smrg ;; 1504549e21daSmrg -dicos*) 1505549e21daSmrg os=-dicos 1506549e21daSmrg ;; 15071bedbe3fSmrg -nacl*) 15081bedbe3fSmrg ;; 1509ba6a1819Smrg -none) 1510ba6a1819Smrg ;; 1511ba6a1819Smrg *) 1512ba6a1819Smrg # Get rid of the `-' at the beginning of $os. 1513ba6a1819Smrg os=`echo $os | sed 's/[^-]*-//'` 1514ba6a1819Smrg echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 1515ba6a1819Smrg exit 1 1516ba6a1819Smrg ;; 1517ba6a1819Smrgesac 1518ba6a1819Smrgelse 1519ba6a1819Smrg 1520ba6a1819Smrg# Here we handle the default operating systems that come with various machines. 1521ba6a1819Smrg# The value should be what the vendor currently ships out the door with their 1522ba6a1819Smrg# machine or put another way, the most popular os provided with the machine. 1523ba6a1819Smrg 1524ba6a1819Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 1525ba6a1819Smrg# "-sun"), then you have to tell the case statement up towards the top 1526ba6a1819Smrg# that MANUFACTURER isn't an operating system. Otherwise, code above 1527ba6a1819Smrg# will signal an error saying that MANUFACTURER isn't an operating 1528ba6a1819Smrg# system, and we'll never get to this point. 1529ba6a1819Smrg 1530ba6a1819Smrgcase $basic_machine in 15311bedbe3fSmrg score-*) 1532549e21daSmrg os=-elf 1533549e21daSmrg ;; 15341bedbe3fSmrg spu-*) 1535549e21daSmrg os=-elf 1536549e21daSmrg ;; 1537ba6a1819Smrg *-acorn) 1538ba6a1819Smrg os=-riscix1.2 1539ba6a1819Smrg ;; 1540ba6a1819Smrg arm*-rebel) 1541ba6a1819Smrg os=-linux 1542ba6a1819Smrg ;; 1543ba6a1819Smrg arm*-semi) 1544ba6a1819Smrg os=-aout 1545ba6a1819Smrg ;; 15461bedbe3fSmrg c4x-* | tic4x-*) 15471bedbe3fSmrg os=-coff 15481bedbe3fSmrg ;; 15491bedbe3fSmrg hexagon-*) 15501bedbe3fSmrg os=-elf 1551549e21daSmrg ;; 1552549e21daSmrg tic54x-*) 1553549e21daSmrg os=-coff 1554549e21daSmrg ;; 1555549e21daSmrg tic55x-*) 1556549e21daSmrg os=-coff 1557549e21daSmrg ;; 1558549e21daSmrg tic6x-*) 1559549e21daSmrg os=-coff 1560549e21daSmrg ;; 1561ba6a1819Smrg # This must come before the *-dec entry. 1562ba6a1819Smrg pdp10-*) 1563ba6a1819Smrg os=-tops20 1564ba6a1819Smrg ;; 1565ba6a1819Smrg pdp11-*) 1566ba6a1819Smrg os=-none 1567ba6a1819Smrg ;; 1568ba6a1819Smrg *-dec | vax-*) 1569ba6a1819Smrg os=-ultrix4.2 1570ba6a1819Smrg ;; 1571ba6a1819Smrg m68*-apollo) 1572ba6a1819Smrg os=-domain 1573ba6a1819Smrg ;; 1574ba6a1819Smrg i386-sun) 1575ba6a1819Smrg os=-sunos4.0.2 1576ba6a1819Smrg ;; 1577ba6a1819Smrg m68000-sun) 1578ba6a1819Smrg os=-sunos3 1579ba6a1819Smrg ;; 1580ba6a1819Smrg m68*-cisco) 1581ba6a1819Smrg os=-aout 1582ba6a1819Smrg ;; 15831bedbe3fSmrg mep-*) 1584549e21daSmrg os=-elf 1585549e21daSmrg ;; 1586ba6a1819Smrg mips*-cisco) 1587ba6a1819Smrg os=-elf 1588ba6a1819Smrg ;; 1589ba6a1819Smrg mips*-*) 1590ba6a1819Smrg os=-elf 1591ba6a1819Smrg ;; 15921bedbe3fSmrg or1k-*) 15931bedbe3fSmrg os=-elf 15941bedbe3fSmrg ;; 1595ba6a1819Smrg or32-*) 1596ba6a1819Smrg os=-coff 1597ba6a1819Smrg ;; 1598ba6a1819Smrg *-tti) # must be before sparc entry or we get the wrong os. 1599ba6a1819Smrg os=-sysv3 1600ba6a1819Smrg ;; 1601ba6a1819Smrg sparc-* | *-sun) 1602ba6a1819Smrg os=-sunos4.1.1 1603ba6a1819Smrg ;; 1604ba6a1819Smrg *-be) 1605ba6a1819Smrg os=-beos 1606ba6a1819Smrg ;; 1607ba6a1819Smrg *-haiku) 1608ba6a1819Smrg os=-haiku 1609ba6a1819Smrg ;; 1610ba6a1819Smrg *-ibm) 1611ba6a1819Smrg os=-aix 1612ba6a1819Smrg ;; 16131bedbe3fSmrg *-knuth) 1614ba6a1819Smrg os=-mmixware 1615ba6a1819Smrg ;; 1616ba6a1819Smrg *-wec) 1617ba6a1819Smrg os=-proelf 1618ba6a1819Smrg ;; 1619ba6a1819Smrg *-winbond) 1620ba6a1819Smrg os=-proelf 1621ba6a1819Smrg ;; 1622ba6a1819Smrg *-oki) 1623ba6a1819Smrg os=-proelf 1624ba6a1819Smrg ;; 1625ba6a1819Smrg *-hp) 1626ba6a1819Smrg os=-hpux 1627ba6a1819Smrg ;; 1628ba6a1819Smrg *-hitachi) 1629ba6a1819Smrg os=-hiux 1630ba6a1819Smrg ;; 1631ba6a1819Smrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1632ba6a1819Smrg os=-sysv 1633ba6a1819Smrg ;; 1634ba6a1819Smrg *-cbm) 1635ba6a1819Smrg os=-amigaos 1636ba6a1819Smrg ;; 1637ba6a1819Smrg *-dg) 1638ba6a1819Smrg os=-dgux 1639ba6a1819Smrg ;; 1640ba6a1819Smrg *-dolphin) 1641ba6a1819Smrg os=-sysv3 1642ba6a1819Smrg ;; 1643ba6a1819Smrg m68k-ccur) 1644ba6a1819Smrg os=-rtu 1645ba6a1819Smrg ;; 1646ba6a1819Smrg m88k-omron*) 1647ba6a1819Smrg os=-luna 1648ba6a1819Smrg ;; 1649ba6a1819Smrg *-next ) 1650ba6a1819Smrg os=-nextstep 1651ba6a1819Smrg ;; 1652ba6a1819Smrg *-sequent) 1653ba6a1819Smrg os=-ptx 1654ba6a1819Smrg ;; 1655ba6a1819Smrg *-crds) 1656ba6a1819Smrg os=-unos 1657ba6a1819Smrg ;; 1658ba6a1819Smrg *-ns) 1659ba6a1819Smrg os=-genix 1660ba6a1819Smrg ;; 1661ba6a1819Smrg i370-*) 1662ba6a1819Smrg os=-mvs 1663ba6a1819Smrg ;; 1664ba6a1819Smrg *-next) 1665ba6a1819Smrg os=-nextstep3 1666ba6a1819Smrg ;; 1667ba6a1819Smrg *-gould) 1668ba6a1819Smrg os=-sysv 1669ba6a1819Smrg ;; 1670ba6a1819Smrg *-highlevel) 1671ba6a1819Smrg os=-bsd 1672ba6a1819Smrg ;; 1673ba6a1819Smrg *-encore) 1674ba6a1819Smrg os=-bsd 1675ba6a1819Smrg ;; 1676ba6a1819Smrg *-sgi) 1677ba6a1819Smrg os=-irix 1678ba6a1819Smrg ;; 1679ba6a1819Smrg *-siemens) 1680ba6a1819Smrg os=-sysv4 1681ba6a1819Smrg ;; 1682ba6a1819Smrg *-masscomp) 1683ba6a1819Smrg os=-rtu 1684ba6a1819Smrg ;; 1685ba6a1819Smrg f30[01]-fujitsu | f700-fujitsu) 1686ba6a1819Smrg os=-uxpv 1687ba6a1819Smrg ;; 1688ba6a1819Smrg *-rom68k) 1689ba6a1819Smrg os=-coff 1690ba6a1819Smrg ;; 1691ba6a1819Smrg *-*bug) 1692ba6a1819Smrg os=-coff 1693ba6a1819Smrg ;; 1694ba6a1819Smrg *-apple) 1695ba6a1819Smrg os=-macos 1696ba6a1819Smrg ;; 1697ba6a1819Smrg *-atari*) 1698ba6a1819Smrg os=-mint 1699ba6a1819Smrg ;; 1700ba6a1819Smrg *) 1701ba6a1819Smrg os=-none 1702ba6a1819Smrg ;; 1703ba6a1819Smrgesac 1704ba6a1819Smrgfi 1705ba6a1819Smrg 1706ba6a1819Smrg# Here we handle the case where we know the os, and the CPU type, but not the 1707ba6a1819Smrg# manufacturer. We pick the logical manufacturer. 1708ba6a1819Smrgvendor=unknown 1709ba6a1819Smrgcase $basic_machine in 1710ba6a1819Smrg *-unknown) 1711ba6a1819Smrg case $os in 1712ba6a1819Smrg -riscix*) 1713ba6a1819Smrg vendor=acorn 1714ba6a1819Smrg ;; 1715ba6a1819Smrg -sunos*) 1716ba6a1819Smrg vendor=sun 1717ba6a1819Smrg ;; 1718549e21daSmrg -cnk*|-aix*) 1719ba6a1819Smrg vendor=ibm 1720ba6a1819Smrg ;; 1721ba6a1819Smrg -beos*) 1722ba6a1819Smrg vendor=be 1723ba6a1819Smrg ;; 1724ba6a1819Smrg -hpux*) 1725ba6a1819Smrg vendor=hp 1726ba6a1819Smrg ;; 1727ba6a1819Smrg -mpeix*) 1728ba6a1819Smrg vendor=hp 1729ba6a1819Smrg ;; 1730ba6a1819Smrg -hiux*) 1731ba6a1819Smrg vendor=hitachi 1732ba6a1819Smrg ;; 1733ba6a1819Smrg -unos*) 1734ba6a1819Smrg vendor=crds 1735ba6a1819Smrg ;; 1736ba6a1819Smrg -dgux*) 1737ba6a1819Smrg vendor=dg 1738ba6a1819Smrg ;; 1739ba6a1819Smrg -luna*) 1740ba6a1819Smrg vendor=omron 1741ba6a1819Smrg ;; 1742ba6a1819Smrg -genix*) 1743ba6a1819Smrg vendor=ns 1744ba6a1819Smrg ;; 1745ba6a1819Smrg -mvs* | -opened*) 1746ba6a1819Smrg vendor=ibm 1747ba6a1819Smrg ;; 1748ba6a1819Smrg -os400*) 1749ba6a1819Smrg vendor=ibm 1750ba6a1819Smrg ;; 1751ba6a1819Smrg -ptx*) 1752ba6a1819Smrg vendor=sequent 1753ba6a1819Smrg ;; 1754ba6a1819Smrg -tpf*) 1755ba6a1819Smrg vendor=ibm 1756ba6a1819Smrg ;; 1757ba6a1819Smrg -vxsim* | -vxworks* | -windiss*) 1758ba6a1819Smrg vendor=wrs 1759ba6a1819Smrg ;; 1760ba6a1819Smrg -aux*) 1761ba6a1819Smrg vendor=apple 1762ba6a1819Smrg ;; 1763ba6a1819Smrg -hms*) 1764ba6a1819Smrg vendor=hitachi 1765ba6a1819Smrg ;; 1766ba6a1819Smrg -mpw* | -macos*) 1767ba6a1819Smrg vendor=apple 1768ba6a1819Smrg ;; 1769ba6a1819Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1770ba6a1819Smrg vendor=atari 1771ba6a1819Smrg ;; 1772ba6a1819Smrg -vos*) 1773ba6a1819Smrg vendor=stratus 1774ba6a1819Smrg ;; 1775ba6a1819Smrg esac 1776ba6a1819Smrg basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 1777ba6a1819Smrg ;; 1778ba6a1819Smrgesac 1779ba6a1819Smrg 1780ba6a1819Smrgecho $basic_machine$os 1781ba6a1819Smrgexit 1782ba6a1819Smrg 1783ba6a1819Smrg# Local variables: 1784ba6a1819Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 1785ba6a1819Smrg# time-stamp-start: "timestamp='" 1786ba6a1819Smrg# time-stamp-format: "%:y-%02m-%02d" 1787ba6a1819Smrg# time-stamp-end: "'" 1788ba6a1819Smrg# End: 1789