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