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