config.sub revision 19019ffe
1c582b7e3Smrg#! /bin/sh 2c582b7e3Smrg# Configuration validation subroutine script. 3c582b7e3Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 419019ffeSmrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 519019ffeSmrg# Free Software Foundation, Inc. 6c582b7e3Smrg 719019ffeSmrgtimestamp='2008-01-16' 8c582b7e3Smrg 9c582b7e3Smrg# This file is (in principle) common to ALL GNU software. 10c582b7e3Smrg# The presence of a machine in this file suggests that SOME GNU software 11c582b7e3Smrg# can handle that machine. It does not imply ALL GNU software can. 12c582b7e3Smrg# 13c582b7e3Smrg# This file is free software; you can redistribute it and/or modify 14c582b7e3Smrg# it under the terms of the GNU General Public License as published by 15c582b7e3Smrg# the Free Software Foundation; either version 2 of the License, or 16c582b7e3Smrg# (at your option) any later version. 17c582b7e3Smrg# 18c582b7e3Smrg# This program is distributed in the hope that it will be useful, 19c582b7e3Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 20c582b7e3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21c582b7e3Smrg# GNU General Public License for more details. 22c582b7e3Smrg# 23c582b7e3Smrg# You should have received a copy of the GNU General Public License 24c582b7e3Smrg# along with this program; if not, write to the Free Software 25c582b7e3Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 26c582b7e3Smrg# 02110-1301, USA. 27c582b7e3Smrg# 28c582b7e3Smrg# As a special exception to the GNU General Public License, if you 29c582b7e3Smrg# distribute this file as part of a program that contains a 30c582b7e3Smrg# configuration script generated by Autoconf, you may include it under 31c582b7e3Smrg# the same distribution terms that you use for the rest of that program. 32c582b7e3Smrg 33c582b7e3Smrg 34c582b7e3Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 35c582b7e3Smrg# diff and a properly formatted ChangeLog entry. 36c582b7e3Smrg# 37c582b7e3Smrg# Configuration subroutine to validate and canonicalize a configuration type. 38c582b7e3Smrg# Supply the specified configuration type as an argument. 39c582b7e3Smrg# If it is invalid, we print an error message on stderr and exit with code 1. 40c582b7e3Smrg# Otherwise, we print the canonical config type on stdout and succeed. 41c582b7e3Smrg 42c582b7e3Smrg# This file is supposed to be the same for all GNU packages 43c582b7e3Smrg# and recognize all the CPU types, system types and aliases 44c582b7e3Smrg# that are meaningful with *any* GNU software. 45c582b7e3Smrg# Each package is responsible for reporting which valid configurations 46c582b7e3Smrg# it does not support. The user should be able to distinguish 47c582b7e3Smrg# a failure to support a valid configuration from a meaningless 48c582b7e3Smrg# configuration. 49c582b7e3Smrg 50c582b7e3Smrg# The goal of this file is to map all the various variations of a given 51c582b7e3Smrg# machine specification into a single specification in the form: 52c582b7e3Smrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 53c582b7e3Smrg# or in some cases, the newer four-part form: 54c582b7e3Smrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 55c582b7e3Smrg# It is wrong to echo any other type of specification. 56c582b7e3Smrg 57c582b7e3Smrgme=`echo "$0" | sed -e 's,.*/,,'` 58c582b7e3Smrg 59c582b7e3Smrgusage="\ 60c582b7e3SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS 61c582b7e3Smrg $0 [OPTION] ALIAS 62c582b7e3Smrg 63c582b7e3SmrgCanonicalize a configuration name. 64c582b7e3Smrg 65c582b7e3SmrgOperation modes: 66c582b7e3Smrg -h, --help print this help, then exit 67c582b7e3Smrg -t, --time-stamp print date of last modification, then exit 68c582b7e3Smrg -v, --version print version number, then exit 69c582b7e3Smrg 70c582b7e3SmrgReport bugs and patches to <config-patches@gnu.org>." 71c582b7e3Smrg 72c582b7e3Smrgversion="\ 73c582b7e3SmrgGNU config.sub ($timestamp) 74c582b7e3Smrg 7519019ffeSmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 7619019ffeSmrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 77c582b7e3Smrg 78c582b7e3SmrgThis is free software; see the source for copying conditions. There is NO 79c582b7e3Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 80c582b7e3Smrg 81c582b7e3Smrghelp=" 82c582b7e3SmrgTry \`$me --help' for more information." 83c582b7e3Smrg 84c582b7e3Smrg# Parse command line 85c582b7e3Smrgwhile test $# -gt 0 ; do 86c582b7e3Smrg case $1 in 87c582b7e3Smrg --time-stamp | --time* | -t ) 88c582b7e3Smrg echo "$timestamp" ; exit ;; 89c582b7e3Smrg --version | -v ) 90c582b7e3Smrg echo "$version" ; exit ;; 91c582b7e3Smrg --help | --h* | -h ) 92c582b7e3Smrg echo "$usage"; exit ;; 93c582b7e3Smrg -- ) # Stop option processing 94c582b7e3Smrg shift; break ;; 95c582b7e3Smrg - ) # Use stdin as input. 96c582b7e3Smrg break ;; 97c582b7e3Smrg -* ) 98c582b7e3Smrg echo "$me: invalid option $1$help" 99c582b7e3Smrg exit 1 ;; 100c582b7e3Smrg 101c582b7e3Smrg *local*) 102c582b7e3Smrg # First pass through any local machine types. 103c582b7e3Smrg echo $1 104c582b7e3Smrg exit ;; 105c582b7e3Smrg 106c582b7e3Smrg * ) 107c582b7e3Smrg break ;; 108c582b7e3Smrg esac 109c582b7e3Smrgdone 110c582b7e3Smrg 111c582b7e3Smrgcase $# in 112c582b7e3Smrg 0) echo "$me: missing argument$help" >&2 113c582b7e3Smrg exit 1;; 114c582b7e3Smrg 1) ;; 115c582b7e3Smrg *) echo "$me: too many arguments$help" >&2 116c582b7e3Smrg exit 1;; 117c582b7e3Smrgesac 118c582b7e3Smrg 119c582b7e3Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 120c582b7e3Smrg# Here we must recognize all the valid KERNEL-OS combinations. 121c582b7e3Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 122c582b7e3Smrgcase $maybe_os in 123c582b7e3Smrg nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 124c582b7e3Smrg uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 125c582b7e3Smrg storm-chaos* | os2-emx* | rtmk-nova*) 126c582b7e3Smrg os=-$maybe_os 127c582b7e3Smrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 128c582b7e3Smrg ;; 129c582b7e3Smrg *) 130c582b7e3Smrg basic_machine=`echo $1 | sed 's/-[^-]*$//'` 131c582b7e3Smrg if [ $basic_machine != $1 ] 132c582b7e3Smrg then os=`echo $1 | sed 's/.*-/-/'` 133c582b7e3Smrg else os=; fi 134c582b7e3Smrg ;; 135c582b7e3Smrgesac 136c582b7e3Smrg 137c582b7e3Smrg### Let's recognize common machines as not being operating systems so 138c582b7e3Smrg### that things like config.sub decstation-3100 work. We also 139c582b7e3Smrg### recognize some manufacturers as not being operating systems, so we 140c582b7e3Smrg### can provide default operating systems below. 141c582b7e3Smrgcase $os in 142c582b7e3Smrg -sun*os*) 143c582b7e3Smrg # Prevent following clause from handling this invalid input. 144c582b7e3Smrg ;; 145c582b7e3Smrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 146c582b7e3Smrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 147c582b7e3Smrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 148c582b7e3Smrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 149c582b7e3Smrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 150c582b7e3Smrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 151c582b7e3Smrg -apple | -axis | -knuth | -cray) 152c582b7e3Smrg os= 153c582b7e3Smrg basic_machine=$1 154c582b7e3Smrg ;; 155c582b7e3Smrg -sim | -cisco | -oki | -wec | -winbond) 156c582b7e3Smrg os= 157c582b7e3Smrg basic_machine=$1 158c582b7e3Smrg ;; 159c582b7e3Smrg -scout) 160c582b7e3Smrg ;; 161c582b7e3Smrg -wrs) 162c582b7e3Smrg os=-vxworks 163c582b7e3Smrg basic_machine=$1 164c582b7e3Smrg ;; 165c582b7e3Smrg -chorusos*) 166c582b7e3Smrg os=-chorusos 167c582b7e3Smrg basic_machine=$1 168c582b7e3Smrg ;; 169c582b7e3Smrg -chorusrdb) 170c582b7e3Smrg os=-chorusrdb 171c582b7e3Smrg basic_machine=$1 172c582b7e3Smrg ;; 173c582b7e3Smrg -hiux*) 174c582b7e3Smrg os=-hiuxwe2 175c582b7e3Smrg ;; 176c582b7e3Smrg -sco6) 177c582b7e3Smrg os=-sco5v6 178c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 179c582b7e3Smrg ;; 180c582b7e3Smrg -sco5) 181c582b7e3Smrg os=-sco3.2v5 182c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 183c582b7e3Smrg ;; 184c582b7e3Smrg -sco4) 185c582b7e3Smrg os=-sco3.2v4 186c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 187c582b7e3Smrg ;; 188c582b7e3Smrg -sco3.2.[4-9]*) 189c582b7e3Smrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 190c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 191c582b7e3Smrg ;; 192c582b7e3Smrg -sco3.2v[4-9]*) 193c582b7e3Smrg # Don't forget version if it is 3.2v4 or newer. 194c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 195c582b7e3Smrg ;; 196c582b7e3Smrg -sco5v6*) 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 -sco*) 201c582b7e3Smrg os=-sco3.2v2 202c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 203c582b7e3Smrg ;; 204c582b7e3Smrg -udk*) 205c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 206c582b7e3Smrg ;; 207c582b7e3Smrg -isc) 208c582b7e3Smrg os=-isc2.2 209c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 210c582b7e3Smrg ;; 211c582b7e3Smrg -clix*) 212c582b7e3Smrg basic_machine=clipper-intergraph 213c582b7e3Smrg ;; 214c582b7e3Smrg -isc*) 215c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 216c582b7e3Smrg ;; 217c582b7e3Smrg -lynx*) 218c582b7e3Smrg os=-lynxos 219c582b7e3Smrg ;; 220c582b7e3Smrg -ptx*) 221c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 222c582b7e3Smrg ;; 223c582b7e3Smrg -windowsnt*) 224c582b7e3Smrg os=`echo $os | sed -e 's/windowsnt/winnt/'` 225c582b7e3Smrg ;; 226c582b7e3Smrg -psos*) 227c582b7e3Smrg os=-psos 228c582b7e3Smrg ;; 229c582b7e3Smrg -mint | -mint[0-9]*) 230c582b7e3Smrg basic_machine=m68k-atari 231c582b7e3Smrg os=-mint 232c582b7e3Smrg ;; 233c582b7e3Smrgesac 234c582b7e3Smrg 235c582b7e3Smrg# Decode aliases for certain CPU-COMPANY combinations. 236c582b7e3Smrgcase $basic_machine in 237c582b7e3Smrg # Recognize the basic CPU types without company name. 238c582b7e3Smrg # Some are omitted here because they have special meanings below. 239c582b7e3Smrg 1750a | 580 \ 240c582b7e3Smrg | a29k \ 241c582b7e3Smrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 242c582b7e3Smrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 243c582b7e3Smrg | am33_2.0 \ 244c582b7e3Smrg | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 245c582b7e3Smrg | bfin \ 246c582b7e3Smrg | c4x | clipper \ 247c582b7e3Smrg | d10v | d30v | dlx | dsp16xx \ 248c582b7e3Smrg | fido | fr30 | frv \ 249c582b7e3Smrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 250c582b7e3Smrg | i370 | i860 | i960 | ia64 \ 251c582b7e3Smrg | ip2k | iq2000 \ 252c582b7e3Smrg | m32c | m32r | m32rle | m68000 | m68k | m88k \ 253c582b7e3Smrg | maxq | mb | microblaze | mcore | mep \ 254c582b7e3Smrg | mips | mipsbe | mipseb | mipsel | mipsle \ 255c582b7e3Smrg | mips16 \ 256c582b7e3Smrg | mips64 | mips64el \ 257c582b7e3Smrg | mips64vr | mips64vrel \ 258c582b7e3Smrg | mips64orion | mips64orionel \ 259c582b7e3Smrg | mips64vr4100 | mips64vr4100el \ 260c582b7e3Smrg | mips64vr4300 | mips64vr4300el \ 261c582b7e3Smrg | mips64vr5000 | mips64vr5000el \ 262c582b7e3Smrg | mips64vr5900 | mips64vr5900el \ 263c582b7e3Smrg | mipsisa32 | mipsisa32el \ 264c582b7e3Smrg | mipsisa32r2 | mipsisa32r2el \ 265c582b7e3Smrg | mipsisa64 | mipsisa64el \ 266c582b7e3Smrg | mipsisa64r2 | mipsisa64r2el \ 267c582b7e3Smrg | mipsisa64sb1 | mipsisa64sb1el \ 268c582b7e3Smrg | mipsisa64sr71k | mipsisa64sr71kel \ 269c582b7e3Smrg | mipstx39 | mipstx39el \ 270c582b7e3Smrg | mn10200 | mn10300 \ 271c582b7e3Smrg | mt \ 272c582b7e3Smrg | msp430 \ 273c582b7e3Smrg | nios | nios2 \ 274c582b7e3Smrg | ns16k | ns32k \ 275c582b7e3Smrg | or32 \ 276c582b7e3Smrg | pdp10 | pdp11 | pj | pjl \ 277c582b7e3Smrg | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 278c582b7e3Smrg | pyramid \ 279c582b7e3Smrg | score \ 280c582b7e3Smrg | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 281c582b7e3Smrg | sh64 | sh64le \ 282c582b7e3Smrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 283c582b7e3Smrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 284c582b7e3Smrg | spu | strongarm \ 285c582b7e3Smrg | tahoe | thumb | tic4x | tic80 | tron \ 286c582b7e3Smrg | v850 | v850e \ 287c582b7e3Smrg | we32k \ 288c582b7e3Smrg | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 289c582b7e3Smrg | z8k) 290c582b7e3Smrg basic_machine=$basic_machine-unknown 291c582b7e3Smrg ;; 292c582b7e3Smrg m6811 | m68hc11 | m6812 | m68hc12) 293c582b7e3Smrg # Motorola 68HC11/12. 294c582b7e3Smrg basic_machine=$basic_machine-unknown 295c582b7e3Smrg os=-none 296c582b7e3Smrg ;; 297c582b7e3Smrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 298c582b7e3Smrg ;; 299c582b7e3Smrg ms1) 300c582b7e3Smrg basic_machine=mt-unknown 301c582b7e3Smrg ;; 302c582b7e3Smrg 303c582b7e3Smrg # We use `pc' rather than `unknown' 304c582b7e3Smrg # because (1) that's what they normally are, and 305c582b7e3Smrg # (2) the word "unknown" tends to confuse beginning users. 306c582b7e3Smrg i*86 | x86_64) 307c582b7e3Smrg basic_machine=$basic_machine-pc 308c582b7e3Smrg ;; 309c582b7e3Smrg # Object if more than one company name word. 310c582b7e3Smrg *-*-*) 311c582b7e3Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 312c582b7e3Smrg exit 1 313c582b7e3Smrg ;; 314c582b7e3Smrg # Recognize the basic CPU types with company name. 315c582b7e3Smrg 580-* \ 316c582b7e3Smrg | a29k-* \ 317c582b7e3Smrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 318c582b7e3Smrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 319c582b7e3Smrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 320c582b7e3Smrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 321c582b7e3Smrg | avr-* | avr32-* \ 322c582b7e3Smrg | bfin-* | bs2000-* \ 323c582b7e3Smrg | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 324c582b7e3Smrg | clipper-* | craynv-* | cydra-* \ 325c582b7e3Smrg | d10v-* | d30v-* | dlx-* \ 326c582b7e3Smrg | elxsi-* \ 327c582b7e3Smrg | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 328c582b7e3Smrg | h8300-* | h8500-* \ 329c582b7e3Smrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 330c582b7e3Smrg | i*86-* | i860-* | i960-* | ia64-* \ 331c582b7e3Smrg | ip2k-* | iq2000-* \ 332c582b7e3Smrg | m32c-* | m32r-* | m32rle-* \ 333c582b7e3Smrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 334c582b7e3Smrg | m88110-* | m88k-* | maxq-* | mcore-* \ 335c582b7e3Smrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 336c582b7e3Smrg | mips16-* \ 337c582b7e3Smrg | mips64-* | mips64el-* \ 338c582b7e3Smrg | mips64vr-* | mips64vrel-* \ 339c582b7e3Smrg | mips64orion-* | mips64orionel-* \ 340c582b7e3Smrg | mips64vr4100-* | mips64vr4100el-* \ 341c582b7e3Smrg | mips64vr4300-* | mips64vr4300el-* \ 342c582b7e3Smrg | mips64vr5000-* | mips64vr5000el-* \ 343c582b7e3Smrg | mips64vr5900-* | mips64vr5900el-* \ 344c582b7e3Smrg | mipsisa32-* | mipsisa32el-* \ 345c582b7e3Smrg | mipsisa32r2-* | mipsisa32r2el-* \ 346c582b7e3Smrg | mipsisa64-* | mipsisa64el-* \ 347c582b7e3Smrg | mipsisa64r2-* | mipsisa64r2el-* \ 348c582b7e3Smrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 349c582b7e3Smrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 350c582b7e3Smrg | mipstx39-* | mipstx39el-* \ 351c582b7e3Smrg | mmix-* \ 352c582b7e3Smrg | mt-* \ 353c582b7e3Smrg | msp430-* \ 354c582b7e3Smrg | nios-* | nios2-* \ 355c582b7e3Smrg | none-* | np1-* | ns16k-* | ns32k-* \ 356c582b7e3Smrg | orion-* \ 357c582b7e3Smrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 358c582b7e3Smrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 359c582b7e3Smrg | pyramid-* \ 360c582b7e3Smrg | romp-* | rs6000-* \ 361c582b7e3Smrg | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 362c582b7e3Smrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 363c582b7e3Smrg | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 364c582b7e3Smrg | sparclite-* \ 365c582b7e3Smrg | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 366c582b7e3Smrg | tahoe-* | thumb-* \ 367c582b7e3Smrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 368c582b7e3Smrg | tron-* \ 369c582b7e3Smrg | v850-* | v850e-* | vax-* \ 370c582b7e3Smrg | we32k-* \ 371c582b7e3Smrg | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 37219019ffeSmrg | xstormy16-* | xtensa*-* \ 373c582b7e3Smrg | ymp-* \ 374c582b7e3Smrg | z8k-*) 375c582b7e3Smrg ;; 37619019ffeSmrg # Recognize the basic CPU types without company name, with glob match. 37719019ffeSmrg xtensa*) 37819019ffeSmrg basic_machine=$basic_machine-unknown 37919019ffeSmrg ;; 380c582b7e3Smrg # Recognize the various machine names and aliases which stand 381c582b7e3Smrg # for a CPU type and a company and sometimes even an OS. 382c582b7e3Smrg 386bsd) 383c582b7e3Smrg basic_machine=i386-unknown 384c582b7e3Smrg os=-bsd 385c582b7e3Smrg ;; 386c582b7e3Smrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 387c582b7e3Smrg basic_machine=m68000-att 388c582b7e3Smrg ;; 389c582b7e3Smrg 3b*) 390c582b7e3Smrg basic_machine=we32k-att 391c582b7e3Smrg ;; 392c582b7e3Smrg a29khif) 393c582b7e3Smrg basic_machine=a29k-amd 394c582b7e3Smrg os=-udi 395c582b7e3Smrg ;; 396c582b7e3Smrg abacus) 397c582b7e3Smrg basic_machine=abacus-unknown 398c582b7e3Smrg ;; 399c582b7e3Smrg adobe68k) 400c582b7e3Smrg basic_machine=m68010-adobe 401c582b7e3Smrg os=-scout 402c582b7e3Smrg ;; 403c582b7e3Smrg alliant | fx80) 404c582b7e3Smrg basic_machine=fx80-alliant 405c582b7e3Smrg ;; 406c582b7e3Smrg altos | altos3068) 407c582b7e3Smrg basic_machine=m68k-altos 408c582b7e3Smrg ;; 409c582b7e3Smrg am29k) 410c582b7e3Smrg basic_machine=a29k-none 411c582b7e3Smrg os=-bsd 412c582b7e3Smrg ;; 413c582b7e3Smrg amd64) 414c582b7e3Smrg basic_machine=x86_64-pc 415c582b7e3Smrg ;; 416c582b7e3Smrg amd64-*) 417c582b7e3Smrg basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 418c582b7e3Smrg ;; 419c582b7e3Smrg amdahl) 420c582b7e3Smrg basic_machine=580-amdahl 421c582b7e3Smrg os=-sysv 422c582b7e3Smrg ;; 423c582b7e3Smrg amiga | amiga-*) 424c582b7e3Smrg basic_machine=m68k-unknown 425c582b7e3Smrg ;; 426c582b7e3Smrg amigaos | amigados) 427c582b7e3Smrg basic_machine=m68k-unknown 428c582b7e3Smrg os=-amigaos 429c582b7e3Smrg ;; 430c582b7e3Smrg amigaunix | amix) 431c582b7e3Smrg basic_machine=m68k-unknown 432c582b7e3Smrg os=-sysv4 433c582b7e3Smrg ;; 434c582b7e3Smrg apollo68) 435c582b7e3Smrg basic_machine=m68k-apollo 436c582b7e3Smrg os=-sysv 437c582b7e3Smrg ;; 438c582b7e3Smrg apollo68bsd) 439c582b7e3Smrg basic_machine=m68k-apollo 440c582b7e3Smrg os=-bsd 441c582b7e3Smrg ;; 442c582b7e3Smrg aux) 443c582b7e3Smrg basic_machine=m68k-apple 444c582b7e3Smrg os=-aux 445c582b7e3Smrg ;; 446c582b7e3Smrg balance) 447c582b7e3Smrg basic_machine=ns32k-sequent 448c582b7e3Smrg os=-dynix 449c582b7e3Smrg ;; 45019019ffeSmrg blackfin) 45119019ffeSmrg basic_machine=bfin-unknown 45219019ffeSmrg os=-linux 45319019ffeSmrg ;; 45419019ffeSmrg blackfin-*) 45519019ffeSmrg basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 45619019ffeSmrg os=-linux 45719019ffeSmrg ;; 458c582b7e3Smrg c90) 459c582b7e3Smrg basic_machine=c90-cray 460c582b7e3Smrg os=-unicos 461c582b7e3Smrg ;; 462c582b7e3Smrg convex-c1) 463c582b7e3Smrg basic_machine=c1-convex 464c582b7e3Smrg os=-bsd 465c582b7e3Smrg ;; 466c582b7e3Smrg convex-c2) 467c582b7e3Smrg basic_machine=c2-convex 468c582b7e3Smrg os=-bsd 469c582b7e3Smrg ;; 470c582b7e3Smrg convex-c32) 471c582b7e3Smrg basic_machine=c32-convex 472c582b7e3Smrg os=-bsd 473c582b7e3Smrg ;; 474c582b7e3Smrg convex-c34) 475c582b7e3Smrg basic_machine=c34-convex 476c582b7e3Smrg os=-bsd 477c582b7e3Smrg ;; 478c582b7e3Smrg convex-c38) 479c582b7e3Smrg basic_machine=c38-convex 480c582b7e3Smrg os=-bsd 481c582b7e3Smrg ;; 482c582b7e3Smrg cray | j90) 483c582b7e3Smrg basic_machine=j90-cray 484c582b7e3Smrg os=-unicos 485c582b7e3Smrg ;; 486c582b7e3Smrg craynv) 487c582b7e3Smrg basic_machine=craynv-cray 488c582b7e3Smrg os=-unicosmp 489c582b7e3Smrg ;; 49019019ffeSmrg cr16) 49119019ffeSmrg basic_machine=cr16-unknown 492c582b7e3Smrg os=-elf 493c582b7e3Smrg ;; 494c582b7e3Smrg crds | unos) 495c582b7e3Smrg basic_machine=m68k-crds 496c582b7e3Smrg ;; 497c582b7e3Smrg crisv32 | crisv32-* | etraxfs*) 498c582b7e3Smrg basic_machine=crisv32-axis 499c582b7e3Smrg ;; 500c582b7e3Smrg cris | cris-* | etrax*) 501c582b7e3Smrg basic_machine=cris-axis 502c582b7e3Smrg ;; 503c582b7e3Smrg crx) 504c582b7e3Smrg basic_machine=crx-unknown 505c582b7e3Smrg os=-elf 506c582b7e3Smrg ;; 507c582b7e3Smrg da30 | da30-*) 508c582b7e3Smrg basic_machine=m68k-da30 509c582b7e3Smrg ;; 510c582b7e3Smrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 511c582b7e3Smrg basic_machine=mips-dec 512c582b7e3Smrg ;; 513c582b7e3Smrg decsystem10* | dec10*) 514c582b7e3Smrg basic_machine=pdp10-dec 515c582b7e3Smrg os=-tops10 516c582b7e3Smrg ;; 517c582b7e3Smrg decsystem20* | dec20*) 518c582b7e3Smrg basic_machine=pdp10-dec 519c582b7e3Smrg os=-tops20 520c582b7e3Smrg ;; 521c582b7e3Smrg delta | 3300 | motorola-3300 | motorola-delta \ 522c582b7e3Smrg | 3300-motorola | delta-motorola) 523c582b7e3Smrg basic_machine=m68k-motorola 524c582b7e3Smrg ;; 525c582b7e3Smrg delta88) 526c582b7e3Smrg basic_machine=m88k-motorola 527c582b7e3Smrg os=-sysv3 528c582b7e3Smrg ;; 529c582b7e3Smrg djgpp) 530c582b7e3Smrg basic_machine=i586-pc 531c582b7e3Smrg os=-msdosdjgpp 532c582b7e3Smrg ;; 533c582b7e3Smrg dpx20 | dpx20-*) 534c582b7e3Smrg basic_machine=rs6000-bull 535c582b7e3Smrg os=-bosx 536c582b7e3Smrg ;; 537c582b7e3Smrg dpx2* | dpx2*-bull) 538c582b7e3Smrg basic_machine=m68k-bull 539c582b7e3Smrg os=-sysv3 540c582b7e3Smrg ;; 541c582b7e3Smrg ebmon29k) 542c582b7e3Smrg basic_machine=a29k-amd 543c582b7e3Smrg os=-ebmon 544c582b7e3Smrg ;; 545c582b7e3Smrg elxsi) 546c582b7e3Smrg basic_machine=elxsi-elxsi 547c582b7e3Smrg os=-bsd 548c582b7e3Smrg ;; 549c582b7e3Smrg encore | umax | mmax) 550c582b7e3Smrg basic_machine=ns32k-encore 551c582b7e3Smrg ;; 552c582b7e3Smrg es1800 | OSE68k | ose68k | ose | OSE) 553c582b7e3Smrg basic_machine=m68k-ericsson 554c582b7e3Smrg os=-ose 555c582b7e3Smrg ;; 556c582b7e3Smrg fx2800) 557c582b7e3Smrg basic_machine=i860-alliant 558c582b7e3Smrg ;; 559c582b7e3Smrg genix) 560c582b7e3Smrg basic_machine=ns32k-ns 561c582b7e3Smrg ;; 562c582b7e3Smrg gmicro) 563c582b7e3Smrg basic_machine=tron-gmicro 564c582b7e3Smrg os=-sysv 565c582b7e3Smrg ;; 566c582b7e3Smrg go32) 567c582b7e3Smrg basic_machine=i386-pc 568c582b7e3Smrg os=-go32 569c582b7e3Smrg ;; 570c582b7e3Smrg h3050r* | hiux*) 571c582b7e3Smrg basic_machine=hppa1.1-hitachi 572c582b7e3Smrg os=-hiuxwe2 573c582b7e3Smrg ;; 574c582b7e3Smrg h8300hms) 575c582b7e3Smrg basic_machine=h8300-hitachi 576c582b7e3Smrg os=-hms 577c582b7e3Smrg ;; 578c582b7e3Smrg h8300xray) 579c582b7e3Smrg basic_machine=h8300-hitachi 580c582b7e3Smrg os=-xray 581c582b7e3Smrg ;; 582c582b7e3Smrg h8500hms) 583c582b7e3Smrg basic_machine=h8500-hitachi 584c582b7e3Smrg os=-hms 585c582b7e3Smrg ;; 586c582b7e3Smrg harris) 587c582b7e3Smrg basic_machine=m88k-harris 588c582b7e3Smrg os=-sysv3 589c582b7e3Smrg ;; 590c582b7e3Smrg hp300-*) 591c582b7e3Smrg basic_machine=m68k-hp 592c582b7e3Smrg ;; 593c582b7e3Smrg hp300bsd) 594c582b7e3Smrg basic_machine=m68k-hp 595c582b7e3Smrg os=-bsd 596c582b7e3Smrg ;; 597c582b7e3Smrg hp300hpux) 598c582b7e3Smrg basic_machine=m68k-hp 599c582b7e3Smrg os=-hpux 600c582b7e3Smrg ;; 601c582b7e3Smrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 602c582b7e3Smrg basic_machine=hppa1.0-hp 603c582b7e3Smrg ;; 604c582b7e3Smrg hp9k2[0-9][0-9] | hp9k31[0-9]) 605c582b7e3Smrg basic_machine=m68000-hp 606c582b7e3Smrg ;; 607c582b7e3Smrg hp9k3[2-9][0-9]) 608c582b7e3Smrg basic_machine=m68k-hp 609c582b7e3Smrg ;; 610c582b7e3Smrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 611c582b7e3Smrg basic_machine=hppa1.0-hp 612c582b7e3Smrg ;; 613c582b7e3Smrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 614c582b7e3Smrg basic_machine=hppa1.1-hp 615c582b7e3Smrg ;; 616c582b7e3Smrg hp9k78[0-9] | hp78[0-9]) 617c582b7e3Smrg # FIXME: really hppa2.0-hp 618c582b7e3Smrg basic_machine=hppa1.1-hp 619c582b7e3Smrg ;; 620c582b7e3Smrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 621c582b7e3Smrg # FIXME: really hppa2.0-hp 622c582b7e3Smrg basic_machine=hppa1.1-hp 623c582b7e3Smrg ;; 624c582b7e3Smrg hp9k8[0-9][13679] | hp8[0-9][13679]) 625c582b7e3Smrg basic_machine=hppa1.1-hp 626c582b7e3Smrg ;; 627c582b7e3Smrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 628c582b7e3Smrg basic_machine=hppa1.0-hp 629c582b7e3Smrg ;; 630c582b7e3Smrg hppa-next) 631c582b7e3Smrg os=-nextstep3 632c582b7e3Smrg ;; 633c582b7e3Smrg hppaosf) 634c582b7e3Smrg basic_machine=hppa1.1-hp 635c582b7e3Smrg os=-osf 636c582b7e3Smrg ;; 637c582b7e3Smrg hppro) 638c582b7e3Smrg basic_machine=hppa1.1-hp 639c582b7e3Smrg os=-proelf 640c582b7e3Smrg ;; 641c582b7e3Smrg i370-ibm* | ibm*) 642c582b7e3Smrg basic_machine=i370-ibm 643c582b7e3Smrg ;; 644c582b7e3Smrg# I'm not sure what "Sysv32" means. Should this be sysv3.2? 645c582b7e3Smrg i*86v32) 646c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 647c582b7e3Smrg os=-sysv32 648c582b7e3Smrg ;; 649c582b7e3Smrg i*86v4*) 650c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 651c582b7e3Smrg os=-sysv4 652c582b7e3Smrg ;; 653c582b7e3Smrg i*86v) 654c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 655c582b7e3Smrg os=-sysv 656c582b7e3Smrg ;; 657c582b7e3Smrg i*86sol2) 658c582b7e3Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 659c582b7e3Smrg os=-solaris2 660c582b7e3Smrg ;; 661c582b7e3Smrg i386mach) 662c582b7e3Smrg basic_machine=i386-mach 663c582b7e3Smrg os=-mach 664c582b7e3Smrg ;; 665c582b7e3Smrg i386-vsta | vsta) 666c582b7e3Smrg basic_machine=i386-unknown 667c582b7e3Smrg os=-vsta 668c582b7e3Smrg ;; 669c582b7e3Smrg iris | iris4d) 670c582b7e3Smrg basic_machine=mips-sgi 671c582b7e3Smrg case $os in 672c582b7e3Smrg -irix*) 673c582b7e3Smrg ;; 674c582b7e3Smrg *) 675c582b7e3Smrg os=-irix4 676c582b7e3Smrg ;; 677c582b7e3Smrg esac 678c582b7e3Smrg ;; 679c582b7e3Smrg isi68 | isi) 680c582b7e3Smrg basic_machine=m68k-isi 681c582b7e3Smrg os=-sysv 682c582b7e3Smrg ;; 68319019ffeSmrg m68knommu) 68419019ffeSmrg basic_machine=m68k-unknown 68519019ffeSmrg os=-linux 68619019ffeSmrg ;; 68719019ffeSmrg m68knommu-*) 68819019ffeSmrg basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 68919019ffeSmrg os=-linux 69019019ffeSmrg ;; 691c582b7e3Smrg m88k-omron*) 692c582b7e3Smrg basic_machine=m88k-omron 693c582b7e3Smrg ;; 694c582b7e3Smrg magnum | m3230) 695c582b7e3Smrg basic_machine=mips-mips 696c582b7e3Smrg os=-sysv 697c582b7e3Smrg ;; 698c582b7e3Smrg merlin) 699c582b7e3Smrg basic_machine=ns32k-utek 700c582b7e3Smrg os=-sysv 701c582b7e3Smrg ;; 702c582b7e3Smrg mingw32) 703c582b7e3Smrg basic_machine=i386-pc 704c582b7e3Smrg os=-mingw32 705c582b7e3Smrg ;; 706c582b7e3Smrg mingw32ce) 707c582b7e3Smrg basic_machine=arm-unknown 708c582b7e3Smrg os=-mingw32ce 709c582b7e3Smrg ;; 710c582b7e3Smrg miniframe) 711c582b7e3Smrg basic_machine=m68000-convergent 712c582b7e3Smrg ;; 713c582b7e3Smrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 714c582b7e3Smrg basic_machine=m68k-atari 715c582b7e3Smrg os=-mint 716c582b7e3Smrg ;; 717c582b7e3Smrg mips3*-*) 718c582b7e3Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 719c582b7e3Smrg ;; 720c582b7e3Smrg mips3*) 721c582b7e3Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 722c582b7e3Smrg ;; 723c582b7e3Smrg monitor) 724c582b7e3Smrg basic_machine=m68k-rom68k 725c582b7e3Smrg os=-coff 726c582b7e3Smrg ;; 727c582b7e3Smrg morphos) 728c582b7e3Smrg basic_machine=powerpc-unknown 729c582b7e3Smrg os=-morphos 730c582b7e3Smrg ;; 731c582b7e3Smrg msdos) 732c582b7e3Smrg basic_machine=i386-pc 733c582b7e3Smrg os=-msdos 734c582b7e3Smrg ;; 735c582b7e3Smrg ms1-*) 736c582b7e3Smrg basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 737c582b7e3Smrg ;; 738c582b7e3Smrg mvs) 739c582b7e3Smrg basic_machine=i370-ibm 740c582b7e3Smrg os=-mvs 741c582b7e3Smrg ;; 742c582b7e3Smrg ncr3000) 743c582b7e3Smrg basic_machine=i486-ncr 744c582b7e3Smrg os=-sysv4 745c582b7e3Smrg ;; 746c582b7e3Smrg netbsd386) 747c582b7e3Smrg basic_machine=i386-unknown 748c582b7e3Smrg os=-netbsd 749c582b7e3Smrg ;; 750c582b7e3Smrg netwinder) 751c582b7e3Smrg basic_machine=armv4l-rebel 752c582b7e3Smrg os=-linux 753c582b7e3Smrg ;; 754c582b7e3Smrg news | news700 | news800 | news900) 755c582b7e3Smrg basic_machine=m68k-sony 756c582b7e3Smrg os=-newsos 757c582b7e3Smrg ;; 758c582b7e3Smrg news1000) 759c582b7e3Smrg basic_machine=m68030-sony 760c582b7e3Smrg os=-newsos 761c582b7e3Smrg ;; 762c582b7e3Smrg news-3600 | risc-news) 763c582b7e3Smrg basic_machine=mips-sony 764c582b7e3Smrg os=-newsos 765c582b7e3Smrg ;; 766c582b7e3Smrg necv70) 767c582b7e3Smrg basic_machine=v70-nec 768c582b7e3Smrg os=-sysv 769c582b7e3Smrg ;; 770c582b7e3Smrg next | m*-next ) 771c582b7e3Smrg basic_machine=m68k-next 772c582b7e3Smrg case $os in 773c582b7e3Smrg -nextstep* ) 774c582b7e3Smrg ;; 775c582b7e3Smrg -ns2*) 776c582b7e3Smrg os=-nextstep2 777c582b7e3Smrg ;; 778c582b7e3Smrg *) 779c582b7e3Smrg os=-nextstep3 780c582b7e3Smrg ;; 781c582b7e3Smrg esac 782c582b7e3Smrg ;; 783c582b7e3Smrg nh3000) 784c582b7e3Smrg basic_machine=m68k-harris 785c582b7e3Smrg os=-cxux 786c582b7e3Smrg ;; 787c582b7e3Smrg nh[45]000) 788c582b7e3Smrg basic_machine=m88k-harris 789c582b7e3Smrg os=-cxux 790c582b7e3Smrg ;; 791c582b7e3Smrg nindy960) 792c582b7e3Smrg basic_machine=i960-intel 793c582b7e3Smrg os=-nindy 794c582b7e3Smrg ;; 795c582b7e3Smrg mon960) 796c582b7e3Smrg basic_machine=i960-intel 797c582b7e3Smrg os=-mon960 798c582b7e3Smrg ;; 799c582b7e3Smrg nonstopux) 800c582b7e3Smrg basic_machine=mips-compaq 801c582b7e3Smrg os=-nonstopux 802c582b7e3Smrg ;; 803c582b7e3Smrg np1) 804c582b7e3Smrg basic_machine=np1-gould 805c582b7e3Smrg ;; 806c582b7e3Smrg nsr-tandem) 807c582b7e3Smrg basic_machine=nsr-tandem 808c582b7e3Smrg ;; 809c582b7e3Smrg op50n-* | op60c-*) 810c582b7e3Smrg basic_machine=hppa1.1-oki 811c582b7e3Smrg os=-proelf 812c582b7e3Smrg ;; 813c582b7e3Smrg openrisc | openrisc-*) 814c582b7e3Smrg basic_machine=or32-unknown 815c582b7e3Smrg ;; 816c582b7e3Smrg os400) 817c582b7e3Smrg basic_machine=powerpc-ibm 818c582b7e3Smrg os=-os400 819c582b7e3Smrg ;; 820c582b7e3Smrg OSE68000 | ose68000) 821c582b7e3Smrg basic_machine=m68000-ericsson 822c582b7e3Smrg os=-ose 823c582b7e3Smrg ;; 824c582b7e3Smrg os68k) 825c582b7e3Smrg basic_machine=m68k-none 826c582b7e3Smrg os=-os68k 827c582b7e3Smrg ;; 828c582b7e3Smrg pa-hitachi) 829c582b7e3Smrg basic_machine=hppa1.1-hitachi 830c582b7e3Smrg os=-hiuxwe2 831c582b7e3Smrg ;; 832c582b7e3Smrg paragon) 833c582b7e3Smrg basic_machine=i860-intel 834c582b7e3Smrg os=-osf 835c582b7e3Smrg ;; 83619019ffeSmrg parisc) 83719019ffeSmrg basic_machine=hppa-unknown 83819019ffeSmrg os=-linux 83919019ffeSmrg ;; 84019019ffeSmrg parisc-*) 84119019ffeSmrg basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 84219019ffeSmrg os=-linux 84319019ffeSmrg ;; 844c582b7e3Smrg pbd) 845c582b7e3Smrg basic_machine=sparc-tti 846c582b7e3Smrg ;; 847c582b7e3Smrg pbb) 848c582b7e3Smrg basic_machine=m68k-tti 849c582b7e3Smrg ;; 850c582b7e3Smrg pc532 | pc532-*) 851c582b7e3Smrg basic_machine=ns32k-pc532 852c582b7e3Smrg ;; 853c582b7e3Smrg pc98) 854c582b7e3Smrg basic_machine=i386-pc 855c582b7e3Smrg ;; 856c582b7e3Smrg pc98-*) 857c582b7e3Smrg basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 858c582b7e3Smrg ;; 859c582b7e3Smrg pentium | p5 | k5 | k6 | nexgen | viac3) 860c582b7e3Smrg basic_machine=i586-pc 861c582b7e3Smrg ;; 862c582b7e3Smrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 863c582b7e3Smrg basic_machine=i686-pc 864c582b7e3Smrg ;; 865c582b7e3Smrg pentiumii | pentium2 | pentiumiii | pentium3) 866c582b7e3Smrg basic_machine=i686-pc 867c582b7e3Smrg ;; 868c582b7e3Smrg pentium4) 869c582b7e3Smrg basic_machine=i786-pc 870c582b7e3Smrg ;; 871c582b7e3Smrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 872c582b7e3Smrg basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 873c582b7e3Smrg ;; 874c582b7e3Smrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 875c582b7e3Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 876c582b7e3Smrg ;; 877c582b7e3Smrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 878c582b7e3Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 879c582b7e3Smrg ;; 880c582b7e3Smrg pentium4-*) 881c582b7e3Smrg basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 882c582b7e3Smrg ;; 883c582b7e3Smrg pn) 884c582b7e3Smrg basic_machine=pn-gould 885c582b7e3Smrg ;; 886c582b7e3Smrg power) basic_machine=power-ibm 887c582b7e3Smrg ;; 888c582b7e3Smrg ppc) basic_machine=powerpc-unknown 889c582b7e3Smrg ;; 890c582b7e3Smrg ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 891c582b7e3Smrg ;; 892c582b7e3Smrg ppcle | powerpclittle | ppc-le | powerpc-little) 893c582b7e3Smrg basic_machine=powerpcle-unknown 894c582b7e3Smrg ;; 895c582b7e3Smrg ppcle-* | powerpclittle-*) 896c582b7e3Smrg basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 897c582b7e3Smrg ;; 898c582b7e3Smrg ppc64) basic_machine=powerpc64-unknown 899c582b7e3Smrg ;; 900c582b7e3Smrg ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 901c582b7e3Smrg ;; 902c582b7e3Smrg ppc64le | powerpc64little | ppc64-le | powerpc64-little) 903c582b7e3Smrg basic_machine=powerpc64le-unknown 904c582b7e3Smrg ;; 905c582b7e3Smrg ppc64le-* | powerpc64little-*) 906c582b7e3Smrg basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 907c582b7e3Smrg ;; 908c582b7e3Smrg ps2) 909c582b7e3Smrg basic_machine=i386-ibm 910c582b7e3Smrg ;; 911c582b7e3Smrg pw32) 912c582b7e3Smrg basic_machine=i586-unknown 913c582b7e3Smrg os=-pw32 914c582b7e3Smrg ;; 915c582b7e3Smrg rdos) 916c582b7e3Smrg basic_machine=i386-pc 917c582b7e3Smrg os=-rdos 918c582b7e3Smrg ;; 919c582b7e3Smrg rom68k) 920c582b7e3Smrg basic_machine=m68k-rom68k 921c582b7e3Smrg os=-coff 922c582b7e3Smrg ;; 923c582b7e3Smrg rm[46]00) 924c582b7e3Smrg basic_machine=mips-siemens 925c582b7e3Smrg ;; 926c582b7e3Smrg rtpc | rtpc-*) 927c582b7e3Smrg basic_machine=romp-ibm 928c582b7e3Smrg ;; 929c582b7e3Smrg s390 | s390-*) 930c582b7e3Smrg basic_machine=s390-ibm 931c582b7e3Smrg ;; 932c582b7e3Smrg s390x | s390x-*) 933c582b7e3Smrg basic_machine=s390x-ibm 934c582b7e3Smrg ;; 935c582b7e3Smrg sa29200) 936c582b7e3Smrg basic_machine=a29k-amd 937c582b7e3Smrg os=-udi 938c582b7e3Smrg ;; 939c582b7e3Smrg sb1) 940c582b7e3Smrg basic_machine=mipsisa64sb1-unknown 941c582b7e3Smrg ;; 942c582b7e3Smrg sb1el) 943c582b7e3Smrg basic_machine=mipsisa64sb1el-unknown 944c582b7e3Smrg ;; 945c582b7e3Smrg sde) 946c582b7e3Smrg basic_machine=mipsisa32-sde 947c582b7e3Smrg os=-elf 948c582b7e3Smrg ;; 949c582b7e3Smrg sei) 950c582b7e3Smrg basic_machine=mips-sei 951c582b7e3Smrg os=-seiux 952c582b7e3Smrg ;; 953c582b7e3Smrg sequent) 954c582b7e3Smrg basic_machine=i386-sequent 955c582b7e3Smrg ;; 956c582b7e3Smrg sh) 957c582b7e3Smrg basic_machine=sh-hitachi 958c582b7e3Smrg os=-hms 959c582b7e3Smrg ;; 960c582b7e3Smrg sh5el) 961c582b7e3Smrg basic_machine=sh5le-unknown 962c582b7e3Smrg ;; 963c582b7e3Smrg sh64) 964c582b7e3Smrg basic_machine=sh64-unknown 965c582b7e3Smrg ;; 966c582b7e3Smrg sparclite-wrs | simso-wrs) 967c582b7e3Smrg basic_machine=sparclite-wrs 968c582b7e3Smrg os=-vxworks 969c582b7e3Smrg ;; 970c582b7e3Smrg sps7) 971c582b7e3Smrg basic_machine=m68k-bull 972c582b7e3Smrg os=-sysv2 973c582b7e3Smrg ;; 974c582b7e3Smrg spur) 975c582b7e3Smrg basic_machine=spur-unknown 976c582b7e3Smrg ;; 977c582b7e3Smrg st2000) 978c582b7e3Smrg basic_machine=m68k-tandem 979c582b7e3Smrg ;; 980c582b7e3Smrg stratus) 981c582b7e3Smrg basic_machine=i860-stratus 982c582b7e3Smrg os=-sysv4 983c582b7e3Smrg ;; 984c582b7e3Smrg sun2) 985c582b7e3Smrg basic_machine=m68000-sun 986c582b7e3Smrg ;; 987c582b7e3Smrg sun2os3) 988c582b7e3Smrg basic_machine=m68000-sun 989c582b7e3Smrg os=-sunos3 990c582b7e3Smrg ;; 991c582b7e3Smrg sun2os4) 992c582b7e3Smrg basic_machine=m68000-sun 993c582b7e3Smrg os=-sunos4 994c582b7e3Smrg ;; 995c582b7e3Smrg sun3os3) 996c582b7e3Smrg basic_machine=m68k-sun 997c582b7e3Smrg os=-sunos3 998c582b7e3Smrg ;; 999c582b7e3Smrg sun3os4) 1000c582b7e3Smrg basic_machine=m68k-sun 1001c582b7e3Smrg os=-sunos4 1002c582b7e3Smrg ;; 1003c582b7e3Smrg sun4os3) 1004c582b7e3Smrg basic_machine=sparc-sun 1005c582b7e3Smrg os=-sunos3 1006c582b7e3Smrg ;; 1007c582b7e3Smrg sun4os4) 1008c582b7e3Smrg basic_machine=sparc-sun 1009c582b7e3Smrg os=-sunos4 1010c582b7e3Smrg ;; 1011c582b7e3Smrg sun4sol2) 1012c582b7e3Smrg basic_machine=sparc-sun 1013c582b7e3Smrg os=-solaris2 1014c582b7e3Smrg ;; 1015c582b7e3Smrg sun3 | sun3-*) 1016c582b7e3Smrg basic_machine=m68k-sun 1017c582b7e3Smrg ;; 1018c582b7e3Smrg sun4) 1019c582b7e3Smrg basic_machine=sparc-sun 1020c582b7e3Smrg ;; 1021c582b7e3Smrg sun386 | sun386i | roadrunner) 1022c582b7e3Smrg basic_machine=i386-sun 1023c582b7e3Smrg ;; 1024c582b7e3Smrg sv1) 1025c582b7e3Smrg basic_machine=sv1-cray 1026c582b7e3Smrg os=-unicos 1027c582b7e3Smrg ;; 1028c582b7e3Smrg symmetry) 1029c582b7e3Smrg basic_machine=i386-sequent 1030c582b7e3Smrg os=-dynix 1031c582b7e3Smrg ;; 1032c582b7e3Smrg t3e) 1033c582b7e3Smrg basic_machine=alphaev5-cray 1034c582b7e3Smrg os=-unicos 1035c582b7e3Smrg ;; 1036c582b7e3Smrg t90) 1037c582b7e3Smrg basic_machine=t90-cray 1038c582b7e3Smrg os=-unicos 1039c582b7e3Smrg ;; 1040c582b7e3Smrg tic54x | c54x*) 1041c582b7e3Smrg basic_machine=tic54x-unknown 1042c582b7e3Smrg os=-coff 1043c582b7e3Smrg ;; 1044c582b7e3Smrg tic55x | c55x*) 1045c582b7e3Smrg basic_machine=tic55x-unknown 1046c582b7e3Smrg os=-coff 1047c582b7e3Smrg ;; 1048c582b7e3Smrg tic6x | c6x*) 1049c582b7e3Smrg basic_machine=tic6x-unknown 1050c582b7e3Smrg os=-coff 1051c582b7e3Smrg ;; 105219019ffeSmrg tile*) 105319019ffeSmrg basic_machine=tile-unknown 105419019ffeSmrg os=-linux-gnu 105519019ffeSmrg ;; 1056c582b7e3Smrg tx39) 1057c582b7e3Smrg basic_machine=mipstx39-unknown 1058c582b7e3Smrg ;; 1059c582b7e3Smrg tx39el) 1060c582b7e3Smrg basic_machine=mipstx39el-unknown 1061c582b7e3Smrg ;; 1062c582b7e3Smrg toad1) 1063c582b7e3Smrg basic_machine=pdp10-xkl 1064c582b7e3Smrg os=-tops20 1065c582b7e3Smrg ;; 1066c582b7e3Smrg tower | tower-32) 1067c582b7e3Smrg basic_machine=m68k-ncr 1068c582b7e3Smrg ;; 1069c582b7e3Smrg tpf) 1070c582b7e3Smrg basic_machine=s390x-ibm 1071c582b7e3Smrg os=-tpf 1072c582b7e3Smrg ;; 1073c582b7e3Smrg udi29k) 1074c582b7e3Smrg basic_machine=a29k-amd 1075c582b7e3Smrg os=-udi 1076c582b7e3Smrg ;; 1077c582b7e3Smrg ultra3) 1078c582b7e3Smrg basic_machine=a29k-nyu 1079c582b7e3Smrg os=-sym1 1080c582b7e3Smrg ;; 1081c582b7e3Smrg v810 | necv810) 1082c582b7e3Smrg basic_machine=v810-nec 1083c582b7e3Smrg os=-none 1084c582b7e3Smrg ;; 1085c582b7e3Smrg vaxv) 1086c582b7e3Smrg basic_machine=vax-dec 1087c582b7e3Smrg os=-sysv 1088c582b7e3Smrg ;; 1089c582b7e3Smrg vms) 1090c582b7e3Smrg basic_machine=vax-dec 1091c582b7e3Smrg os=-vms 1092c582b7e3Smrg ;; 1093c582b7e3Smrg vpp*|vx|vx-*) 1094c582b7e3Smrg basic_machine=f301-fujitsu 1095c582b7e3Smrg ;; 1096c582b7e3Smrg vxworks960) 1097c582b7e3Smrg basic_machine=i960-wrs 1098c582b7e3Smrg os=-vxworks 1099c582b7e3Smrg ;; 1100c582b7e3Smrg vxworks68) 1101c582b7e3Smrg basic_machine=m68k-wrs 1102c582b7e3Smrg os=-vxworks 1103c582b7e3Smrg ;; 1104c582b7e3Smrg vxworks29k) 1105c582b7e3Smrg basic_machine=a29k-wrs 1106c582b7e3Smrg os=-vxworks 1107c582b7e3Smrg ;; 1108c582b7e3Smrg w65*) 1109c582b7e3Smrg basic_machine=w65-wdc 1110c582b7e3Smrg os=-none 1111c582b7e3Smrg ;; 1112c582b7e3Smrg w89k-*) 1113c582b7e3Smrg basic_machine=hppa1.1-winbond 1114c582b7e3Smrg os=-proelf 1115c582b7e3Smrg ;; 1116c582b7e3Smrg xbox) 1117c582b7e3Smrg basic_machine=i686-pc 1118c582b7e3Smrg os=-mingw32 1119c582b7e3Smrg ;; 1120c582b7e3Smrg xps | xps100) 1121c582b7e3Smrg basic_machine=xps100-honeywell 1122c582b7e3Smrg ;; 1123c582b7e3Smrg ymp) 1124c582b7e3Smrg basic_machine=ymp-cray 1125c582b7e3Smrg os=-unicos 1126c582b7e3Smrg ;; 1127c582b7e3Smrg z8k-*-coff) 1128c582b7e3Smrg basic_machine=z8k-unknown 1129c582b7e3Smrg os=-sim 1130c582b7e3Smrg ;; 1131c582b7e3Smrg none) 1132c582b7e3Smrg basic_machine=none-none 1133c582b7e3Smrg os=-none 1134c582b7e3Smrg ;; 1135c582b7e3Smrg 1136c582b7e3Smrg# Here we handle the default manufacturer of certain CPU types. It is in 1137c582b7e3Smrg# some cases the only manufacturer, in others, it is the most popular. 1138c582b7e3Smrg w89k) 1139c582b7e3Smrg basic_machine=hppa1.1-winbond 1140c582b7e3Smrg ;; 1141c582b7e3Smrg op50n) 1142c582b7e3Smrg basic_machine=hppa1.1-oki 1143c582b7e3Smrg ;; 1144c582b7e3Smrg op60c) 1145c582b7e3Smrg basic_machine=hppa1.1-oki 1146c582b7e3Smrg ;; 1147c582b7e3Smrg romp) 1148c582b7e3Smrg basic_machine=romp-ibm 1149c582b7e3Smrg ;; 1150c582b7e3Smrg mmix) 1151c582b7e3Smrg basic_machine=mmix-knuth 1152c582b7e3Smrg ;; 1153c582b7e3Smrg rs6000) 1154c582b7e3Smrg basic_machine=rs6000-ibm 1155c582b7e3Smrg ;; 1156c582b7e3Smrg vax) 1157c582b7e3Smrg basic_machine=vax-dec 1158c582b7e3Smrg ;; 1159c582b7e3Smrg pdp10) 1160c582b7e3Smrg # there are many clones, so DEC is not a safe bet 1161c582b7e3Smrg basic_machine=pdp10-unknown 1162c582b7e3Smrg ;; 1163c582b7e3Smrg pdp11) 1164c582b7e3Smrg basic_machine=pdp11-dec 1165c582b7e3Smrg ;; 1166c582b7e3Smrg we32k) 1167c582b7e3Smrg basic_machine=we32k-att 1168c582b7e3Smrg ;; 1169c582b7e3Smrg sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) 1170c582b7e3Smrg basic_machine=sh-unknown 1171c582b7e3Smrg ;; 1172c582b7e3Smrg sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 1173c582b7e3Smrg basic_machine=sparc-sun 1174c582b7e3Smrg ;; 1175c582b7e3Smrg cydra) 1176c582b7e3Smrg basic_machine=cydra-cydrome 1177c582b7e3Smrg ;; 1178c582b7e3Smrg orion) 1179c582b7e3Smrg basic_machine=orion-highlevel 1180c582b7e3Smrg ;; 1181c582b7e3Smrg orion105) 1182c582b7e3Smrg basic_machine=clipper-highlevel 1183c582b7e3Smrg ;; 1184c582b7e3Smrg mac | mpw | mac-mpw) 1185c582b7e3Smrg basic_machine=m68k-apple 1186c582b7e3Smrg ;; 1187c582b7e3Smrg pmac | pmac-mpw) 1188c582b7e3Smrg basic_machine=powerpc-apple 1189c582b7e3Smrg ;; 1190c582b7e3Smrg *-unknown) 1191c582b7e3Smrg # Make sure to match an already-canonicalized machine name. 1192c582b7e3Smrg ;; 1193c582b7e3Smrg *) 1194c582b7e3Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1195c582b7e3Smrg exit 1 1196c582b7e3Smrg ;; 1197c582b7e3Smrgesac 1198c582b7e3Smrg 1199c582b7e3Smrg# Here we canonicalize certain aliases for manufacturers. 1200c582b7e3Smrgcase $basic_machine in 1201c582b7e3Smrg *-digital*) 1202c582b7e3Smrg basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 1203c582b7e3Smrg ;; 1204c582b7e3Smrg *-commodore*) 1205c582b7e3Smrg basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 1206c582b7e3Smrg ;; 1207c582b7e3Smrg *) 1208c582b7e3Smrg ;; 1209c582b7e3Smrgesac 1210c582b7e3Smrg 1211c582b7e3Smrg# Decode manufacturer-specific aliases for certain operating systems. 1212c582b7e3Smrg 1213c582b7e3Smrgif [ x"$os" != x"" ] 1214c582b7e3Smrgthen 1215c582b7e3Smrgcase $os in 1216c582b7e3Smrg # First match some system type aliases 1217c582b7e3Smrg # that might get confused with valid system types. 1218c582b7e3Smrg # -solaris* is a basic system type, with this one exception. 1219c582b7e3Smrg -solaris1 | -solaris1.*) 1220c582b7e3Smrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 1221c582b7e3Smrg ;; 1222c582b7e3Smrg -solaris) 1223c582b7e3Smrg os=-solaris2 1224c582b7e3Smrg ;; 1225c582b7e3Smrg -svr4*) 1226c582b7e3Smrg os=-sysv4 1227c582b7e3Smrg ;; 1228c582b7e3Smrg -unixware*) 1229c582b7e3Smrg os=-sysv4.2uw 1230c582b7e3Smrg ;; 1231c582b7e3Smrg -gnu/linux*) 1232c582b7e3Smrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1233c582b7e3Smrg ;; 1234c582b7e3Smrg # First accept the basic system types. 1235c582b7e3Smrg # The portable systems comes first. 1236c582b7e3Smrg # Each alternative MUST END IN A *, to match a version number. 1237c582b7e3Smrg # -sysv* is not here because it comes later, after sysvr4. 1238c582b7e3Smrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1239c582b7e3Smrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 1240c582b7e3Smrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 1241c582b7e3Smrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1242c582b7e3Smrg | -aos* \ 1243c582b7e3Smrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1244c582b7e3Smrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1245c582b7e3Smrg | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1246c582b7e3Smrg | -openbsd* | -solidbsd* \ 1247c582b7e3Smrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1248c582b7e3Smrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1249c582b7e3Smrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1250c582b7e3Smrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1251c582b7e3Smrg | -chorusos* | -chorusrdb* \ 1252c582b7e3Smrg | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1253c582b7e3Smrg | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ 1254c582b7e3Smrg | -uxpv* | -beos* | -mpeix* | -udk* \ 1255c582b7e3Smrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1256c582b7e3Smrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1257c582b7e3Smrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1258c582b7e3Smrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1259c582b7e3Smrg | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1260c582b7e3Smrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1261c582b7e3Smrg | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) 1262c582b7e3Smrg # Remember, each alternative MUST END IN *, to match a version number. 1263c582b7e3Smrg ;; 1264c582b7e3Smrg -qnx*) 1265c582b7e3Smrg case $basic_machine in 1266c582b7e3Smrg x86-* | i*86-*) 1267c582b7e3Smrg ;; 1268c582b7e3Smrg *) 1269c582b7e3Smrg os=-nto$os 1270c582b7e3Smrg ;; 1271c582b7e3Smrg esac 1272c582b7e3Smrg ;; 1273c582b7e3Smrg -nto-qnx*) 1274c582b7e3Smrg ;; 1275c582b7e3Smrg -nto*) 1276c582b7e3Smrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 1277c582b7e3Smrg ;; 1278c582b7e3Smrg -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1279c582b7e3Smrg | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 1280c582b7e3Smrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1281c582b7e3Smrg ;; 1282c582b7e3Smrg -mac*) 1283c582b7e3Smrg os=`echo $os | sed -e 's|mac|macos|'` 1284c582b7e3Smrg ;; 1285c582b7e3Smrg -linux-dietlibc) 1286c582b7e3Smrg os=-linux-dietlibc 1287c582b7e3Smrg ;; 1288c582b7e3Smrg -linux*) 1289c582b7e3Smrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 1290c582b7e3Smrg ;; 1291c582b7e3Smrg -sunos5*) 1292c582b7e3Smrg os=`echo $os | sed -e 's|sunos5|solaris2|'` 1293c582b7e3Smrg ;; 1294c582b7e3Smrg -sunos6*) 1295c582b7e3Smrg os=`echo $os | sed -e 's|sunos6|solaris3|'` 1296c582b7e3Smrg ;; 1297c582b7e3Smrg -opened*) 1298c582b7e3Smrg os=-openedition 1299c582b7e3Smrg ;; 1300c582b7e3Smrg -os400*) 1301c582b7e3Smrg os=-os400 1302c582b7e3Smrg ;; 1303c582b7e3Smrg -wince*) 1304c582b7e3Smrg os=-wince 1305c582b7e3Smrg ;; 1306c582b7e3Smrg -osfrose*) 1307c582b7e3Smrg os=-osfrose 1308c582b7e3Smrg ;; 1309c582b7e3Smrg -osf*) 1310c582b7e3Smrg os=-osf 1311c582b7e3Smrg ;; 1312c582b7e3Smrg -utek*) 1313c582b7e3Smrg os=-bsd 1314c582b7e3Smrg ;; 1315c582b7e3Smrg -dynix*) 1316c582b7e3Smrg os=-bsd 1317c582b7e3Smrg ;; 1318c582b7e3Smrg -acis*) 1319c582b7e3Smrg os=-aos 1320c582b7e3Smrg ;; 1321c582b7e3Smrg -atheos*) 1322c582b7e3Smrg os=-atheos 1323c582b7e3Smrg ;; 1324c582b7e3Smrg -syllable*) 1325c582b7e3Smrg os=-syllable 1326c582b7e3Smrg ;; 1327c582b7e3Smrg -386bsd) 1328c582b7e3Smrg os=-bsd 1329c582b7e3Smrg ;; 1330c582b7e3Smrg -ctix* | -uts*) 1331c582b7e3Smrg os=-sysv 1332c582b7e3Smrg ;; 1333c582b7e3Smrg -nova*) 1334c582b7e3Smrg os=-rtmk-nova 1335c582b7e3Smrg ;; 1336c582b7e3Smrg -ns2 ) 1337c582b7e3Smrg os=-nextstep2 1338c582b7e3Smrg ;; 1339c582b7e3Smrg -nsk*) 1340c582b7e3Smrg os=-nsk 1341c582b7e3Smrg ;; 1342c582b7e3Smrg # Preserve the version number of sinix5. 1343c582b7e3Smrg -sinix5.*) 1344c582b7e3Smrg os=`echo $os | sed -e 's|sinix|sysv|'` 1345c582b7e3Smrg ;; 1346c582b7e3Smrg -sinix*) 1347c582b7e3Smrg os=-sysv4 1348c582b7e3Smrg ;; 1349c582b7e3Smrg -tpf*) 1350c582b7e3Smrg os=-tpf 1351c582b7e3Smrg ;; 1352c582b7e3Smrg -triton*) 1353c582b7e3Smrg os=-sysv3 1354c582b7e3Smrg ;; 1355c582b7e3Smrg -oss*) 1356c582b7e3Smrg os=-sysv3 1357c582b7e3Smrg ;; 1358c582b7e3Smrg -svr4) 1359c582b7e3Smrg os=-sysv4 1360c582b7e3Smrg ;; 1361c582b7e3Smrg -svr3) 1362c582b7e3Smrg os=-sysv3 1363c582b7e3Smrg ;; 1364c582b7e3Smrg -sysvr4) 1365c582b7e3Smrg os=-sysv4 1366c582b7e3Smrg ;; 1367c582b7e3Smrg # This must come after -sysvr4. 1368c582b7e3Smrg -sysv*) 1369c582b7e3Smrg ;; 1370c582b7e3Smrg -ose*) 1371c582b7e3Smrg os=-ose 1372c582b7e3Smrg ;; 1373c582b7e3Smrg -es1800*) 1374c582b7e3Smrg os=-ose 1375c582b7e3Smrg ;; 1376c582b7e3Smrg -xenix) 1377c582b7e3Smrg os=-xenix 1378c582b7e3Smrg ;; 1379c582b7e3Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1380c582b7e3Smrg os=-mint 1381c582b7e3Smrg ;; 1382c582b7e3Smrg -aros*) 1383c582b7e3Smrg os=-aros 1384c582b7e3Smrg ;; 1385c582b7e3Smrg -kaos*) 1386c582b7e3Smrg os=-kaos 1387c582b7e3Smrg ;; 1388c582b7e3Smrg -zvmoe) 1389c582b7e3Smrg os=-zvmoe 1390c582b7e3Smrg ;; 1391c582b7e3Smrg -none) 1392c582b7e3Smrg ;; 1393c582b7e3Smrg *) 1394c582b7e3Smrg # Get rid of the `-' at the beginning of $os. 1395c582b7e3Smrg os=`echo $os | sed 's/[^-]*-//'` 1396c582b7e3Smrg echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 1397c582b7e3Smrg exit 1 1398c582b7e3Smrg ;; 1399c582b7e3Smrgesac 1400c582b7e3Smrgelse 1401c582b7e3Smrg 1402c582b7e3Smrg# Here we handle the default operating systems that come with various machines. 1403c582b7e3Smrg# The value should be what the vendor currently ships out the door with their 1404c582b7e3Smrg# machine or put another way, the most popular os provided with the machine. 1405c582b7e3Smrg 1406c582b7e3Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 1407c582b7e3Smrg# "-sun"), then you have to tell the case statement up towards the top 1408c582b7e3Smrg# that MANUFACTURER isn't an operating system. Otherwise, code above 1409c582b7e3Smrg# will signal an error saying that MANUFACTURER isn't an operating 1410c582b7e3Smrg# system, and we'll never get to this point. 1411c582b7e3Smrg 1412c582b7e3Smrgcase $basic_machine in 1413c582b7e3Smrg score-*) 1414c582b7e3Smrg os=-elf 1415c582b7e3Smrg ;; 1416c582b7e3Smrg spu-*) 1417c582b7e3Smrg os=-elf 1418c582b7e3Smrg ;; 1419c582b7e3Smrg *-acorn) 1420c582b7e3Smrg os=-riscix1.2 1421c582b7e3Smrg ;; 1422c582b7e3Smrg arm*-rebel) 1423c582b7e3Smrg os=-linux 1424c582b7e3Smrg ;; 1425c582b7e3Smrg arm*-semi) 1426c582b7e3Smrg os=-aout 1427c582b7e3Smrg ;; 1428c582b7e3Smrg c4x-* | tic4x-*) 1429c582b7e3Smrg os=-coff 1430c582b7e3Smrg ;; 1431c582b7e3Smrg # This must come before the *-dec entry. 1432c582b7e3Smrg pdp10-*) 1433c582b7e3Smrg os=-tops20 1434c582b7e3Smrg ;; 1435c582b7e3Smrg pdp11-*) 1436c582b7e3Smrg os=-none 1437c582b7e3Smrg ;; 1438c582b7e3Smrg *-dec | vax-*) 1439c582b7e3Smrg os=-ultrix4.2 1440c582b7e3Smrg ;; 1441c582b7e3Smrg m68*-apollo) 1442c582b7e3Smrg os=-domain 1443c582b7e3Smrg ;; 1444c582b7e3Smrg i386-sun) 1445c582b7e3Smrg os=-sunos4.0.2 1446c582b7e3Smrg ;; 1447c582b7e3Smrg m68000-sun) 1448c582b7e3Smrg os=-sunos3 1449c582b7e3Smrg # This also exists in the configure program, but was not the 1450c582b7e3Smrg # default. 1451c582b7e3Smrg # os=-sunos4 1452c582b7e3Smrg ;; 1453c582b7e3Smrg m68*-cisco) 1454c582b7e3Smrg os=-aout 1455c582b7e3Smrg ;; 1456c582b7e3Smrg mep-*) 1457c582b7e3Smrg os=-elf 1458c582b7e3Smrg ;; 1459c582b7e3Smrg mips*-cisco) 1460c582b7e3Smrg os=-elf 1461c582b7e3Smrg ;; 1462c582b7e3Smrg mips*-*) 1463c582b7e3Smrg os=-elf 1464c582b7e3Smrg ;; 1465c582b7e3Smrg or32-*) 1466c582b7e3Smrg os=-coff 1467c582b7e3Smrg ;; 1468c582b7e3Smrg *-tti) # must be before sparc entry or we get the wrong os. 1469c582b7e3Smrg os=-sysv3 1470c582b7e3Smrg ;; 1471c582b7e3Smrg sparc-* | *-sun) 1472c582b7e3Smrg os=-sunos4.1.1 1473c582b7e3Smrg ;; 1474c582b7e3Smrg *-be) 1475c582b7e3Smrg os=-beos 1476c582b7e3Smrg ;; 1477c582b7e3Smrg *-haiku) 1478c582b7e3Smrg os=-haiku 1479c582b7e3Smrg ;; 1480c582b7e3Smrg *-ibm) 1481c582b7e3Smrg os=-aix 1482c582b7e3Smrg ;; 1483c582b7e3Smrg *-knuth) 1484c582b7e3Smrg os=-mmixware 1485c582b7e3Smrg ;; 1486c582b7e3Smrg *-wec) 1487c582b7e3Smrg os=-proelf 1488c582b7e3Smrg ;; 1489c582b7e3Smrg *-winbond) 1490c582b7e3Smrg os=-proelf 1491c582b7e3Smrg ;; 1492c582b7e3Smrg *-oki) 1493c582b7e3Smrg os=-proelf 1494c582b7e3Smrg ;; 1495c582b7e3Smrg *-hp) 1496c582b7e3Smrg os=-hpux 1497c582b7e3Smrg ;; 1498c582b7e3Smrg *-hitachi) 1499c582b7e3Smrg os=-hiux 1500c582b7e3Smrg ;; 1501c582b7e3Smrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1502c582b7e3Smrg os=-sysv 1503c582b7e3Smrg ;; 1504c582b7e3Smrg *-cbm) 1505c582b7e3Smrg os=-amigaos 1506c582b7e3Smrg ;; 1507c582b7e3Smrg *-dg) 1508c582b7e3Smrg os=-dgux 1509c582b7e3Smrg ;; 1510c582b7e3Smrg *-dolphin) 1511c582b7e3Smrg os=-sysv3 1512c582b7e3Smrg ;; 1513c582b7e3Smrg m68k-ccur) 1514c582b7e3Smrg os=-rtu 1515c582b7e3Smrg ;; 1516c582b7e3Smrg m88k-omron*) 1517c582b7e3Smrg os=-luna 1518c582b7e3Smrg ;; 1519c582b7e3Smrg *-next ) 1520c582b7e3Smrg os=-nextstep 1521c582b7e3Smrg ;; 1522c582b7e3Smrg *-sequent) 1523c582b7e3Smrg os=-ptx 1524c582b7e3Smrg ;; 1525c582b7e3Smrg *-crds) 1526c582b7e3Smrg os=-unos 1527c582b7e3Smrg ;; 1528c582b7e3Smrg *-ns) 1529c582b7e3Smrg os=-genix 1530c582b7e3Smrg ;; 1531c582b7e3Smrg i370-*) 1532c582b7e3Smrg os=-mvs 1533c582b7e3Smrg ;; 1534c582b7e3Smrg *-next) 1535c582b7e3Smrg os=-nextstep3 1536c582b7e3Smrg ;; 1537c582b7e3Smrg *-gould) 1538c582b7e3Smrg os=-sysv 1539c582b7e3Smrg ;; 1540c582b7e3Smrg *-highlevel) 1541c582b7e3Smrg os=-bsd 1542c582b7e3Smrg ;; 1543c582b7e3Smrg *-encore) 1544c582b7e3Smrg os=-bsd 1545c582b7e3Smrg ;; 1546c582b7e3Smrg *-sgi) 1547c582b7e3Smrg os=-irix 1548c582b7e3Smrg ;; 1549c582b7e3Smrg *-siemens) 1550c582b7e3Smrg os=-sysv4 1551c582b7e3Smrg ;; 1552c582b7e3Smrg *-masscomp) 1553c582b7e3Smrg os=-rtu 1554c582b7e3Smrg ;; 1555c582b7e3Smrg f30[01]-fujitsu | f700-fujitsu) 1556c582b7e3Smrg os=-uxpv 1557c582b7e3Smrg ;; 1558c582b7e3Smrg *-rom68k) 1559c582b7e3Smrg os=-coff 1560c582b7e3Smrg ;; 1561c582b7e3Smrg *-*bug) 1562c582b7e3Smrg os=-coff 1563c582b7e3Smrg ;; 1564c582b7e3Smrg *-apple) 1565c582b7e3Smrg os=-macos 1566c582b7e3Smrg ;; 1567c582b7e3Smrg *-atari*) 1568c582b7e3Smrg os=-mint 1569c582b7e3Smrg ;; 1570c582b7e3Smrg *) 1571c582b7e3Smrg os=-none 1572c582b7e3Smrg ;; 1573c582b7e3Smrgesac 1574c582b7e3Smrgfi 1575c582b7e3Smrg 1576c582b7e3Smrg# Here we handle the case where we know the os, and the CPU type, but not the 1577c582b7e3Smrg# manufacturer. We pick the logical manufacturer. 1578c582b7e3Smrgvendor=unknown 1579c582b7e3Smrgcase $basic_machine in 1580c582b7e3Smrg *-unknown) 1581c582b7e3Smrg case $os in 1582c582b7e3Smrg -riscix*) 1583c582b7e3Smrg vendor=acorn 1584c582b7e3Smrg ;; 1585c582b7e3Smrg -sunos*) 1586c582b7e3Smrg vendor=sun 1587c582b7e3Smrg ;; 1588c582b7e3Smrg -aix*) 1589c582b7e3Smrg vendor=ibm 1590c582b7e3Smrg ;; 1591c582b7e3Smrg -beos*) 1592c582b7e3Smrg vendor=be 1593c582b7e3Smrg ;; 1594c582b7e3Smrg -hpux*) 1595c582b7e3Smrg vendor=hp 1596c582b7e3Smrg ;; 1597c582b7e3Smrg -mpeix*) 1598c582b7e3Smrg vendor=hp 1599c582b7e3Smrg ;; 1600c582b7e3Smrg -hiux*) 1601c582b7e3Smrg vendor=hitachi 1602c582b7e3Smrg ;; 1603c582b7e3Smrg -unos*) 1604c582b7e3Smrg vendor=crds 1605c582b7e3Smrg ;; 1606c582b7e3Smrg -dgux*) 1607c582b7e3Smrg vendor=dg 1608c582b7e3Smrg ;; 1609c582b7e3Smrg -luna*) 1610c582b7e3Smrg vendor=omron 1611c582b7e3Smrg ;; 1612c582b7e3Smrg -genix*) 1613c582b7e3Smrg vendor=ns 1614c582b7e3Smrg ;; 1615c582b7e3Smrg -mvs* | -opened*) 1616c582b7e3Smrg vendor=ibm 1617c582b7e3Smrg ;; 1618c582b7e3Smrg -os400*) 1619c582b7e3Smrg vendor=ibm 1620c582b7e3Smrg ;; 1621c582b7e3Smrg -ptx*) 1622c582b7e3Smrg vendor=sequent 1623c582b7e3Smrg ;; 1624c582b7e3Smrg -tpf*) 1625c582b7e3Smrg vendor=ibm 1626c582b7e3Smrg ;; 1627c582b7e3Smrg -vxsim* | -vxworks* | -windiss*) 1628c582b7e3Smrg vendor=wrs 1629c582b7e3Smrg ;; 1630c582b7e3Smrg -aux*) 1631c582b7e3Smrg vendor=apple 1632c582b7e3Smrg ;; 1633c582b7e3Smrg -hms*) 1634c582b7e3Smrg vendor=hitachi 1635c582b7e3Smrg ;; 1636c582b7e3Smrg -mpw* | -macos*) 1637c582b7e3Smrg vendor=apple 1638c582b7e3Smrg ;; 1639c582b7e3Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1640c582b7e3Smrg vendor=atari 1641c582b7e3Smrg ;; 1642c582b7e3Smrg -vos*) 1643c582b7e3Smrg vendor=stratus 1644c582b7e3Smrg ;; 1645c582b7e3Smrg esac 1646c582b7e3Smrg basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 1647c582b7e3Smrg ;; 1648c582b7e3Smrgesac 1649c582b7e3Smrg 1650c582b7e3Smrgecho $basic_machine$os 1651c582b7e3Smrgexit 1652c582b7e3Smrg 1653c582b7e3Smrg# Local variables: 1654c582b7e3Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 1655c582b7e3Smrg# time-stamp-start: "timestamp='" 1656c582b7e3Smrg# time-stamp-format: "%:y-%02m-%02d" 1657c582b7e3Smrg# time-stamp-end: "'" 1658c582b7e3Smrg# End: 1659