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