adam@0: #! /bin/sh
adam@0: # Configuration validation subroutine script.
adam@0: # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
adam@12: # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
adam@20: # 2011, 2012 Free Software Foundation, Inc.
adam@0:
adam@20: timestamp='2012-04-18'
adam@0:
adam@0: # This file is (in principle) common to ALL GNU software.
adam@0: # The presence of a machine in this file suggests that SOME GNU software
adam@0: # can handle that machine. It does not imply ALL GNU software can.
adam@0: #
adam@0: # This file is free software; you can redistribute it and/or modify
adam@0: # it under the terms of the GNU General Public License as published by
adam@0: # the Free Software Foundation; either version 2 of the License, or
adam@0: # (at your option) any later version.
adam@0: #
adam@0: # This program is distributed in the hope that it will be useful,
adam@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of
adam@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
adam@0: # GNU General Public License for more details.
adam@0: #
adam@0: # You should have received a copy of the GNU General Public License
adam@20: # along with this program; if not, see .
adam@0: #
adam@0: # As a special exception to the GNU General Public License, if you
adam@0: # distribute this file as part of a program that contains a
adam@0: # configuration script generated by Autoconf, you may include it under
adam@0: # the same distribution terms that you use for the rest of that program.
adam@0:
adam@0:
adam@0: # Please send patches to . Submit a context
adam@0: # diff and a properly formatted GNU ChangeLog entry.
adam@0: #
adam@0: # Configuration subroutine to validate and canonicalize a configuration type.
adam@0: # Supply the specified configuration type as an argument.
adam@0: # If it is invalid, we print an error message on stderr and exit with code 1.
adam@0: # Otherwise, we print the canonical config type on stdout and succeed.
adam@0:
adam@0: # You can get the latest version of this script from:
adam@0: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
adam@0:
adam@0: # This file is supposed to be the same for all GNU packages
adam@0: # and recognize all the CPU types, system types and aliases
adam@0: # that are meaningful with *any* GNU software.
adam@0: # Each package is responsible for reporting which valid configurations
adam@0: # it does not support. The user should be able to distinguish
adam@0: # a failure to support a valid configuration from a meaningless
adam@0: # configuration.
adam@0:
adam@0: # The goal of this file is to map all the various variations of a given
adam@0: # machine specification into a single specification in the form:
adam@0: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
adam@0: # or in some cases, the newer four-part form:
adam@0: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
adam@0: # It is wrong to echo any other type of specification.
adam@0:
adam@0: me=`echo "$0" | sed -e 's,.*/,,'`
adam@0:
adam@0: usage="\
adam@0: Usage: $0 [OPTION] CPU-MFR-OPSYS
adam@0: $0 [OPTION] ALIAS
adam@0:
adam@0: Canonicalize a configuration name.
adam@0:
adam@0: Operation modes:
adam@0: -h, --help print this help, then exit
adam@0: -t, --time-stamp print date of last modification, then exit
adam@0: -v, --version print version number, then exit
adam@0:
adam@0: Report bugs and patches to ."
adam@0:
adam@0: version="\
adam@0: GNU config.sub ($timestamp)
adam@0:
adam@0: Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
adam@20: 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
adam@20: Free Software Foundation, Inc.
adam@0:
adam@0: This is free software; see the source for copying conditions. There is NO
adam@0: warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
adam@0:
adam@0: help="
adam@0: Try \`$me --help' for more information."
adam@0:
adam@0: # Parse command line
adam@0: while test $# -gt 0 ; do
adam@0: case $1 in
adam@0: --time-stamp | --time* | -t )
adam@0: echo "$timestamp" ; exit ;;
adam@0: --version | -v )
adam@0: echo "$version" ; exit ;;
adam@0: --help | --h* | -h )
adam@0: echo "$usage"; exit ;;
adam@0: -- ) # Stop option processing
adam@0: shift; break ;;
adam@0: - ) # Use stdin as input.
adam@0: break ;;
adam@0: -* )
adam@0: echo "$me: invalid option $1$help"
adam@0: exit 1 ;;
adam@0:
adam@0: *local*)
adam@0: # First pass through any local machine types.
adam@0: echo $1
adam@0: exit ;;
adam@0:
adam@0: * )
adam@0: break ;;
adam@0: esac
adam@0: done
adam@0:
adam@0: case $# in
adam@0: 0) echo "$me: missing argument$help" >&2
adam@0: exit 1;;
adam@0: 1) ;;
adam@0: *) echo "$me: too many arguments$help" >&2
adam@0: exit 1;;
adam@0: esac
adam@0:
adam@0: # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
adam@0: # Here we must recognize all the valid KERNEL-OS combinations.
adam@0: maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
adam@0: case $maybe_os in
adam@12: nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
adam@12: linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
adam@12: knetbsd*-gnu* | netbsd*-gnu* | \
adam@0: kopensolaris*-gnu* | \
adam@0: storm-chaos* | os2-emx* | rtmk-nova*)
adam@0: os=-$maybe_os
adam@0: basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
adam@0: ;;
adam@20: android-linux)
adam@20: os=-linux-android
adam@20: basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
adam@20: ;;
adam@0: *)
adam@0: basic_machine=`echo $1 | sed 's/-[^-]*$//'`
adam@0: if [ $basic_machine != $1 ]
adam@0: then os=`echo $1 | sed 's/.*-/-/'`
adam@0: else os=; fi
adam@0: ;;
adam@0: esac
adam@0:
adam@0: ### Let's recognize common machines as not being operating systems so
adam@0: ### that things like config.sub decstation-3100 work. We also
adam@0: ### recognize some manufacturers as not being operating systems, so we
adam@0: ### can provide default operating systems below.
adam@0: case $os in
adam@0: -sun*os*)
adam@0: # Prevent following clause from handling this invalid input.
adam@0: ;;
adam@0: -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
adam@0: -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
adam@0: -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
adam@0: -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
adam@0: -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
adam@0: -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
adam@0: -apple | -axis | -knuth | -cray | -microblaze)
adam@0: os=
adam@0: basic_machine=$1
adam@0: ;;
adam@12: -bluegene*)
adam@12: os=-cnk
adam@0: ;;
adam@0: -sim | -cisco | -oki | -wec | -winbond)
adam@0: os=
adam@0: basic_machine=$1
adam@0: ;;
adam@0: -scout)
adam@0: ;;
adam@0: -wrs)
adam@0: os=-vxworks
adam@0: basic_machine=$1
adam@0: ;;
adam@0: -chorusos*)
adam@0: os=-chorusos
adam@0: basic_machine=$1
adam@0: ;;
adam@12: -chorusrdb)
adam@12: os=-chorusrdb
adam@0: basic_machine=$1
adam@12: ;;
adam@0: -hiux*)
adam@0: os=-hiuxwe2
adam@0: ;;
adam@0: -sco6)
adam@0: os=-sco5v6
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@0: -sco5)
adam@0: os=-sco3.2v5
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@0: -sco4)
adam@0: os=-sco3.2v4
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@0: -sco3.2.[4-9]*)
adam@0: os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@0: -sco3.2v[4-9]*)
adam@0: # Don't forget version if it is 3.2v4 or newer.
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@0: -sco5v6*)
adam@0: # Don't forget version if it is 3.2v4 or newer.
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@0: -sco*)
adam@0: os=-sco3.2v2
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@0: -udk*)
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@0: -isc)
adam@0: os=-isc2.2
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@0: -clix*)
adam@0: basic_machine=clipper-intergraph
adam@0: ;;
adam@0: -isc*)
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
adam@0: ;;
adam@20: -lynx*178)
adam@20: os=-lynxos178
adam@20: ;;
adam@20: -lynx*5)
adam@20: os=-lynxos5
adam@20: ;;
adam@0: -lynx*)
adam@0: os=-lynxos
adam@0: ;;
adam@0: -ptx*)
adam@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
adam@0: ;;
adam@0: -windowsnt*)
adam@0: os=`echo $os | sed -e 's/windowsnt/winnt/'`
adam@0: ;;
adam@0: -psos*)
adam@0: os=-psos
adam@0: ;;
adam@0: -mint | -mint[0-9]*)
adam@0: basic_machine=m68k-atari
adam@0: os=-mint
adam@0: ;;
adam@0: esac
adam@0:
adam@0: # Decode aliases for certain CPU-COMPANY combinations.
adam@0: case $basic_machine in
adam@0: # Recognize the basic CPU types without company name.
adam@0: # Some are omitted here because they have special meanings below.
adam@0: 1750a | 580 \
adam@0: | a29k \
adam@20: | aarch64 | aarch64_be \
adam@0: | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
adam@0: | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
adam@0: | am33_2.0 \
adam@0: | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
adam@20: | be32 | be64 \
adam@0: | bfin \
adam@0: | c4x | clipper \
adam@0: | d10v | d30v | dlx | dsp16xx \
adam@20: | epiphany \
adam@0: | fido | fr30 | frv \
adam@0: | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
adam@20: | hexagon \
adam@0: | i370 | i860 | i960 | ia64 \
adam@0: | ip2k | iq2000 \
adam@20: | le32 | le64 \
adam@0: | lm32 \
adam@0: | m32c | m32r | m32rle | m68000 | m68k | m88k \
adam@0: | maxq | mb | microblaze | mcore | mep | metag \
adam@0: | mips | mipsbe | mipseb | mipsel | mipsle \
adam@0: | mips16 \
adam@0: | mips64 | mips64el \
adam@0: | mips64octeon | mips64octeonel \
adam@0: | mips64orion | mips64orionel \
adam@0: | mips64r5900 | mips64r5900el \
adam@0: | mips64vr | mips64vrel \
adam@0: | mips64vr4100 | mips64vr4100el \
adam@0: | mips64vr4300 | mips64vr4300el \
adam@0: | mips64vr5000 | mips64vr5000el \
adam@0: | mips64vr5900 | mips64vr5900el \
adam@0: | mipsisa32 | mipsisa32el \
adam@0: | mipsisa32r2 | mipsisa32r2el \
adam@0: | mipsisa64 | mipsisa64el \
adam@0: | mipsisa64r2 | mipsisa64r2el \
adam@0: | mipsisa64sb1 | mipsisa64sb1el \
adam@0: | mipsisa64sr71k | mipsisa64sr71kel \
adam@0: | mipstx39 | mipstx39el \
adam@0: | mn10200 | mn10300 \
adam@0: | moxie \
adam@0: | mt \
adam@0: | msp430 \
adam@12: | nds32 | nds32le | nds32be \
adam@0: | nios | nios2 \
adam@0: | ns16k | ns32k \
adam@12: | open8 \
adam@0: | or32 \
adam@0: | pdp10 | pdp11 | pj | pjl \
adam@12: | powerpc | powerpc64 | powerpc64le | powerpcle \
adam@0: | pyramid \
adam@20: | rl78 | rx \
adam@0: | score \
adam@0: | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
adam@0: | sh64 | sh64le \
adam@0: | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
adam@0: | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
adam@12: | spu \
adam@12: | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
adam@0: | ubicom32 \
adam@20: | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
adam@0: | we32k \
adam@12: | x86 | xc16x | xstormy16 | xtensa \
adam@0: | z8k | z80)
adam@0: basic_machine=$basic_machine-unknown
adam@0: ;;
adam@12: c54x)
adam@12: basic_machine=tic54x-unknown
adam@12: ;;
adam@12: c55x)
adam@12: basic_machine=tic55x-unknown
adam@12: ;;
adam@12: c6x)
adam@12: basic_machine=tic6x-unknown
adam@12: ;;
adam@20: m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
adam@0: basic_machine=$basic_machine-unknown
adam@0: os=-none
adam@0: ;;
adam@0: m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
adam@0: ;;
adam@0: ms1)
adam@0: basic_machine=mt-unknown
adam@0: ;;
adam@0:
adam@12: strongarm | thumb | xscale)
adam@12: basic_machine=arm-unknown
adam@12: ;;
adam@20: xgate)
adam@20: basic_machine=$basic_machine-unknown
adam@20: os=-none
adam@20: ;;
adam@12: xscaleeb)
adam@12: basic_machine=armeb-unknown
adam@12: ;;
adam@12:
adam@12: xscaleel)
adam@12: basic_machine=armel-unknown
adam@12: ;;
adam@12:
adam@0: # We use `pc' rather than `unknown'
adam@0: # because (1) that's what they normally are, and
adam@0: # (2) the word "unknown" tends to confuse beginning users.
adam@0: i*86 | x86_64)
adam@0: basic_machine=$basic_machine-pc
adam@0: ;;
adam@0: # Object if more than one company name word.
adam@0: *-*-*)
adam@0: echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
adam@0: exit 1
adam@0: ;;
adam@0: # Recognize the basic CPU types with company name.
adam@0: 580-* \
adam@0: | a29k-* \
adam@20: | aarch64-* | aarch64_be-* \
adam@0: | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
adam@0: | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
adam@0: | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
adam@0: | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
adam@0: | avr-* | avr32-* \
adam@20: | be32-* | be64-* \
adam@0: | bfin-* | bs2000-* \
adam@12: | c[123]* | c30-* | [cjt]90-* | c4x-* \
adam@0: | clipper-* | craynv-* | cydra-* \
adam@0: | d10v-* | d30v-* | dlx-* \
adam@0: | elxsi-* \
adam@0: | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
adam@0: | h8300-* | h8500-* \
adam@0: | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
adam@20: | hexagon-* \
adam@0: | i*86-* | i860-* | i960-* | ia64-* \
adam@0: | ip2k-* | iq2000-* \
adam@20: | le32-* | le64-* \
adam@0: | lm32-* \
adam@0: | m32c-* | m32r-* | m32rle-* \
adam@0: | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
adam@0: | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
adam@0: | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
adam@0: | mips16-* \
adam@0: | mips64-* | mips64el-* \
adam@0: | mips64octeon-* | mips64octeonel-* \
adam@0: | mips64orion-* | mips64orionel-* \
adam@0: | mips64r5900-* | mips64r5900el-* \
adam@0: | mips64vr-* | mips64vrel-* \
adam@0: | mips64vr4100-* | mips64vr4100el-* \
adam@0: | mips64vr4300-* | mips64vr4300el-* \
adam@0: | mips64vr5000-* | mips64vr5000el-* \
adam@0: | mips64vr5900-* | mips64vr5900el-* \
adam@0: | mipsisa32-* | mipsisa32el-* \
adam@0: | mipsisa32r2-* | mipsisa32r2el-* \
adam@0: | mipsisa64-* | mipsisa64el-* \
adam@0: | mipsisa64r2-* | mipsisa64r2el-* \
adam@0: | mipsisa64sb1-* | mipsisa64sb1el-* \
adam@0: | mipsisa64sr71k-* | mipsisa64sr71kel-* \
adam@0: | mipstx39-* | mipstx39el-* \
adam@0: | mmix-* \
adam@0: | mt-* \
adam@0: | msp430-* \
adam@12: | nds32-* | nds32le-* | nds32be-* \
adam@0: | nios-* | nios2-* \
adam@0: | none-* | np1-* | ns16k-* | ns32k-* \
adam@12: | open8-* \
adam@0: | orion-* \
adam@0: | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
adam@12: | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
adam@0: | pyramid-* \
adam@20: | rl78-* | romp-* | rs6000-* | rx-* \
adam@0: | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
adam@0: | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
adam@0: | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
adam@0: | sparclite-* \
adam@12: | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
adam@12: | tahoe-* \
adam@0: | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
adam@20: | tile*-* \
adam@0: | tron-* \
adam@0: | ubicom32-* \
adam@20: | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
adam@20: | vax-* \
adam@0: | we32k-* \
adam@12: | x86-* | x86_64-* | xc16x-* | xps100-* \
adam@0: | xstormy16-* | xtensa*-* \
adam@0: | ymp-* \
adam@0: | z8k-* | z80-*)
adam@0: ;;
adam@0: # Recognize the basic CPU types without company name, with glob match.
adam@0: xtensa*)
adam@0: basic_machine=$basic_machine-unknown
adam@0: ;;
adam@0: # Recognize the various machine names and aliases which stand
adam@0: # for a CPU type and a company and sometimes even an OS.
adam@0: 386bsd)
adam@0: basic_machine=i386-unknown
adam@0: os=-bsd
adam@0: ;;
adam@0: 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
adam@0: basic_machine=m68000-att
adam@0: ;;
adam@0: 3b*)
adam@0: basic_machine=we32k-att
adam@0: ;;
adam@0: a29khif)
adam@0: basic_machine=a29k-amd
adam@0: os=-udi
adam@0: ;;
adam@12: abacus)
adam@0: basic_machine=abacus-unknown
adam@0: ;;
adam@0: adobe68k)
adam@0: basic_machine=m68010-adobe
adam@0: os=-scout
adam@0: ;;
adam@0: alliant | fx80)
adam@0: basic_machine=fx80-alliant
adam@0: ;;
adam@0: altos | altos3068)
adam@0: basic_machine=m68k-altos
adam@0: ;;
adam@0: am29k)
adam@0: basic_machine=a29k-none
adam@0: os=-bsd
adam@0: ;;
adam@0: amd64)
adam@0: basic_machine=x86_64-pc
adam@0: ;;
adam@0: amd64-*)
adam@0: basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: amdahl)
adam@0: basic_machine=580-amdahl
adam@0: os=-sysv
adam@0: ;;
adam@0: amiga | amiga-*)
adam@0: basic_machine=m68k-unknown
adam@0: ;;
adam@0: amigaos | amigados)
adam@0: basic_machine=m68k-unknown
adam@0: os=-amigaos
adam@0: ;;
adam@0: amigaunix | amix)
adam@0: basic_machine=m68k-unknown
adam@0: os=-sysv4
adam@0: ;;
adam@0: apollo68)
adam@0: basic_machine=m68k-apollo
adam@0: os=-sysv
adam@0: ;;
adam@0: apollo68bsd)
adam@0: basic_machine=m68k-apollo
adam@0: os=-bsd
adam@0: ;;
adam@0: aros)
adam@0: basic_machine=i386-pc
adam@0: os=-aros
adam@0: ;;
adam@0: aux)
adam@0: basic_machine=m68k-apple
adam@0: os=-aux
adam@0: ;;
adam@0: balance)
adam@0: basic_machine=ns32k-sequent
adam@0: os=-dynix
adam@0: ;;
adam@0: blackfin)
adam@0: basic_machine=bfin-unknown
adam@0: os=-linux
adam@0: ;;
adam@0: blackfin-*)
adam@0: basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: os=-linux
adam@0: ;;
adam@0: bluegene*)
adam@0: basic_machine=powerpc-ibm
adam@0: os=-cnk
adam@0: ;;
adam@12: c54x-*)
adam@12: basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@12: ;;
adam@12: c55x-*)
adam@12: basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@12: ;;
adam@12: c6x-*)
adam@12: basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@12: ;;
adam@0: c90)
adam@0: basic_machine=c90-cray
adam@0: os=-unicos
adam@0: ;;
adam@12: cegcc)
adam@0: basic_machine=arm-unknown
adam@0: os=-cegcc
adam@0: ;;
adam@0: convex-c1)
adam@0: basic_machine=c1-convex
adam@0: os=-bsd
adam@0: ;;
adam@0: convex-c2)
adam@0: basic_machine=c2-convex
adam@0: os=-bsd
adam@0: ;;
adam@0: convex-c32)
adam@0: basic_machine=c32-convex
adam@0: os=-bsd
adam@0: ;;
adam@0: convex-c34)
adam@0: basic_machine=c34-convex
adam@0: os=-bsd
adam@0: ;;
adam@0: convex-c38)
adam@0: basic_machine=c38-convex
adam@0: os=-bsd
adam@0: ;;
adam@0: cray | j90)
adam@0: basic_machine=j90-cray
adam@0: os=-unicos
adam@0: ;;
adam@0: craynv)
adam@0: basic_machine=craynv-cray
adam@0: os=-unicosmp
adam@0: ;;
adam@12: cr16 | cr16-*)
adam@0: basic_machine=cr16-unknown
adam@0: os=-elf
adam@0: ;;
adam@0: crds | unos)
adam@0: basic_machine=m68k-crds
adam@0: ;;
adam@0: crisv32 | crisv32-* | etraxfs*)
adam@0: basic_machine=crisv32-axis
adam@0: ;;
adam@0: cris | cris-* | etrax*)
adam@0: basic_machine=cris-axis
adam@0: ;;
adam@0: crx)
adam@0: basic_machine=crx-unknown
adam@0: os=-elf
adam@0: ;;
adam@0: da30 | da30-*)
adam@0: basic_machine=m68k-da30
adam@0: ;;
adam@0: decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
adam@0: basic_machine=mips-dec
adam@0: ;;
adam@0: decsystem10* | dec10*)
adam@0: basic_machine=pdp10-dec
adam@0: os=-tops10
adam@0: ;;
adam@0: decsystem20* | dec20*)
adam@0: basic_machine=pdp10-dec
adam@0: os=-tops20
adam@0: ;;
adam@0: delta | 3300 | motorola-3300 | motorola-delta \
adam@0: | 3300-motorola | delta-motorola)
adam@0: basic_machine=m68k-motorola
adam@0: ;;
adam@0: delta88)
adam@0: basic_machine=m88k-motorola
adam@0: os=-sysv3
adam@0: ;;
adam@0: dicos)
adam@0: basic_machine=i686-pc
adam@0: os=-dicos
adam@0: ;;
adam@0: djgpp)
adam@0: basic_machine=i586-pc
adam@0: os=-msdosdjgpp
adam@0: ;;
adam@0: dpx20 | dpx20-*)
adam@0: basic_machine=rs6000-bull
adam@0: os=-bosx
adam@0: ;;
adam@0: dpx2* | dpx2*-bull)
adam@0: basic_machine=m68k-bull
adam@0: os=-sysv3
adam@0: ;;
adam@0: ebmon29k)
adam@0: basic_machine=a29k-amd
adam@0: os=-ebmon
adam@0: ;;
adam@0: elxsi)
adam@0: basic_machine=elxsi-elxsi
adam@0: os=-bsd
adam@0: ;;
adam@0: encore | umax | mmax)
adam@0: basic_machine=ns32k-encore
adam@0: ;;
adam@0: es1800 | OSE68k | ose68k | ose | OSE)
adam@0: basic_machine=m68k-ericsson
adam@0: os=-ose
adam@0: ;;
adam@0: fx2800)
adam@0: basic_machine=i860-alliant
adam@0: ;;
adam@0: genix)
adam@0: basic_machine=ns32k-ns
adam@0: ;;
adam@0: gmicro)
adam@0: basic_machine=tron-gmicro
adam@0: os=-sysv
adam@0: ;;
adam@0: go32)
adam@0: basic_machine=i386-pc
adam@0: os=-go32
adam@0: ;;
adam@0: h3050r* | hiux*)
adam@0: basic_machine=hppa1.1-hitachi
adam@0: os=-hiuxwe2
adam@0: ;;
adam@0: h8300hms)
adam@0: basic_machine=h8300-hitachi
adam@0: os=-hms
adam@0: ;;
adam@0: h8300xray)
adam@0: basic_machine=h8300-hitachi
adam@0: os=-xray
adam@0: ;;
adam@0: h8500hms)
adam@0: basic_machine=h8500-hitachi
adam@0: os=-hms
adam@0: ;;
adam@0: harris)
adam@0: basic_machine=m88k-harris
adam@0: os=-sysv3
adam@0: ;;
adam@0: hp300-*)
adam@0: basic_machine=m68k-hp
adam@0: ;;
adam@0: hp300bsd)
adam@0: basic_machine=m68k-hp
adam@0: os=-bsd
adam@0: ;;
adam@0: hp300hpux)
adam@0: basic_machine=m68k-hp
adam@0: os=-hpux
adam@0: ;;
adam@0: hp3k9[0-9][0-9] | hp9[0-9][0-9])
adam@0: basic_machine=hppa1.0-hp
adam@0: ;;
adam@0: hp9k2[0-9][0-9] | hp9k31[0-9])
adam@0: basic_machine=m68000-hp
adam@0: ;;
adam@0: hp9k3[2-9][0-9])
adam@0: basic_machine=m68k-hp
adam@0: ;;
adam@0: hp9k6[0-9][0-9] | hp6[0-9][0-9])
adam@0: basic_machine=hppa1.0-hp
adam@0: ;;
adam@0: hp9k7[0-79][0-9] | hp7[0-79][0-9])
adam@0: basic_machine=hppa1.1-hp
adam@0: ;;
adam@0: hp9k78[0-9] | hp78[0-9])
adam@0: # FIXME: really hppa2.0-hp
adam@0: basic_machine=hppa1.1-hp
adam@0: ;;
adam@0: hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
adam@0: # FIXME: really hppa2.0-hp
adam@0: basic_machine=hppa1.1-hp
adam@0: ;;
adam@0: hp9k8[0-9][13679] | hp8[0-9][13679])
adam@0: basic_machine=hppa1.1-hp
adam@0: ;;
adam@0: hp9k8[0-9][0-9] | hp8[0-9][0-9])
adam@0: basic_machine=hppa1.0-hp
adam@0: ;;
adam@0: hppa-next)
adam@0: os=-nextstep3
adam@0: ;;
adam@0: hppaosf)
adam@0: basic_machine=hppa1.1-hp
adam@0: os=-osf
adam@0: ;;
adam@0: hppro)
adam@0: basic_machine=hppa1.1-hp
adam@0: os=-proelf
adam@0: ;;
adam@0: i370-ibm* | ibm*)
adam@0: basic_machine=i370-ibm
adam@0: ;;
adam@0: i*86v32)
adam@0: basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
adam@0: os=-sysv32
adam@0: ;;
adam@0: i*86v4*)
adam@0: basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
adam@0: os=-sysv4
adam@0: ;;
adam@0: i*86v)
adam@0: basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
adam@0: os=-sysv
adam@0: ;;
adam@0: i*86sol2)
adam@0: basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
adam@0: os=-solaris2
adam@0: ;;
adam@0: i386mach)
adam@0: basic_machine=i386-mach
adam@0: os=-mach
adam@0: ;;
adam@0: i386-vsta | vsta)
adam@0: basic_machine=i386-unknown
adam@0: os=-vsta
adam@0: ;;
adam@0: iris | iris4d)
adam@0: basic_machine=mips-sgi
adam@0: case $os in
adam@0: -irix*)
adam@0: ;;
adam@0: *)
adam@0: os=-irix4
adam@0: ;;
adam@0: esac
adam@0: ;;
adam@0: isi68 | isi)
adam@0: basic_machine=m68k-isi
adam@0: os=-sysv
adam@0: ;;
adam@0: m68knommu)
adam@0: basic_machine=m68k-unknown
adam@0: os=-linux
adam@0: ;;
adam@0: m68knommu-*)
adam@0: basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: os=-linux
adam@0: ;;
adam@0: m88k-omron*)
adam@0: basic_machine=m88k-omron
adam@0: ;;
adam@0: magnum | m3230)
adam@0: basic_machine=mips-mips
adam@0: os=-sysv
adam@0: ;;
adam@0: merlin)
adam@0: basic_machine=ns32k-utek
adam@0: os=-sysv
adam@0: ;;
adam@12: microblaze)
adam@0: basic_machine=microblaze-xilinx
adam@0: ;;
adam@0: mingw32)
adam@0: basic_machine=i386-pc
adam@0: os=-mingw32
adam@0: ;;
adam@0: mingw32ce)
adam@0: basic_machine=arm-unknown
adam@0: os=-mingw32ce
adam@0: ;;
adam@0: miniframe)
adam@0: basic_machine=m68000-convergent
adam@0: ;;
adam@0: *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
adam@0: basic_machine=m68k-atari
adam@0: os=-mint
adam@0: ;;
adam@0: mips3*-*)
adam@0: basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
adam@0: ;;
adam@0: mips3*)
adam@0: basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
adam@0: ;;
adam@0: monitor)
adam@0: basic_machine=m68k-rom68k
adam@0: os=-coff
adam@0: ;;
adam@0: morphos)
adam@0: basic_machine=powerpc-unknown
adam@0: os=-morphos
adam@0: ;;
adam@0: msdos)
adam@0: basic_machine=i386-pc
adam@0: os=-msdos
adam@0: ;;
adam@0: ms1-*)
adam@0: basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
adam@0: ;;
adam@20: msys)
adam@20: basic_machine=i386-pc
adam@20: os=-msys
adam@20: ;;
adam@0: mvs)
adam@0: basic_machine=i370-ibm
adam@0: os=-mvs
adam@0: ;;
adam@20: nacl)
adam@20: basic_machine=le32-unknown
adam@20: os=-nacl
adam@20: ;;
adam@0: ncr3000)
adam@0: basic_machine=i486-ncr
adam@0: os=-sysv4
adam@0: ;;
adam@0: netbsd386)
adam@0: basic_machine=i386-unknown
adam@0: os=-netbsd
adam@0: ;;
adam@0: netwinder)
adam@0: basic_machine=armv4l-rebel
adam@0: os=-linux
adam@0: ;;
adam@0: news | news700 | news800 | news900)
adam@0: basic_machine=m68k-sony
adam@0: os=-newsos
adam@0: ;;
adam@0: news1000)
adam@0: basic_machine=m68030-sony
adam@0: os=-newsos
adam@0: ;;
adam@0: news-3600 | risc-news)
adam@0: basic_machine=mips-sony
adam@0: os=-newsos
adam@0: ;;
adam@0: necv70)
adam@0: basic_machine=v70-nec
adam@0: os=-sysv
adam@0: ;;
adam@0: next | m*-next )
adam@0: basic_machine=m68k-next
adam@0: case $os in
adam@0: -nextstep* )
adam@0: ;;
adam@0: -ns2*)
adam@0: os=-nextstep2
adam@0: ;;
adam@0: *)
adam@0: os=-nextstep3
adam@0: ;;
adam@0: esac
adam@0: ;;
adam@0: nh3000)
adam@0: basic_machine=m68k-harris
adam@0: os=-cxux
adam@0: ;;
adam@0: nh[45]000)
adam@0: basic_machine=m88k-harris
adam@0: os=-cxux
adam@0: ;;
adam@0: nindy960)
adam@0: basic_machine=i960-intel
adam@0: os=-nindy
adam@0: ;;
adam@0: mon960)
adam@0: basic_machine=i960-intel
adam@0: os=-mon960
adam@0: ;;
adam@0: nonstopux)
adam@0: basic_machine=mips-compaq
adam@0: os=-nonstopux
adam@0: ;;
adam@0: np1)
adam@0: basic_machine=np1-gould
adam@0: ;;
adam@12: neo-tandem)
adam@12: basic_machine=neo-tandem
adam@12: ;;
adam@12: nse-tandem)
adam@12: basic_machine=nse-tandem
adam@12: ;;
adam@0: nsr-tandem)
adam@0: basic_machine=nsr-tandem
adam@0: ;;
adam@0: op50n-* | op60c-*)
adam@0: basic_machine=hppa1.1-oki
adam@0: os=-proelf
adam@0: ;;
adam@0: openrisc | openrisc-*)
adam@0: basic_machine=or32-unknown
adam@0: ;;
adam@0: os400)
adam@0: basic_machine=powerpc-ibm
adam@0: os=-os400
adam@0: ;;
adam@0: OSE68000 | ose68000)
adam@0: basic_machine=m68000-ericsson
adam@0: os=-ose
adam@0: ;;
adam@0: os68k)
adam@0: basic_machine=m68k-none
adam@0: os=-os68k
adam@0: ;;
adam@0: pa-hitachi)
adam@0: basic_machine=hppa1.1-hitachi
adam@0: os=-hiuxwe2
adam@0: ;;
adam@0: paragon)
adam@0: basic_machine=i860-intel
adam@0: os=-osf
adam@0: ;;
adam@0: parisc)
adam@0: basic_machine=hppa-unknown
adam@0: os=-linux
adam@0: ;;
adam@0: parisc-*)
adam@0: basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: os=-linux
adam@0: ;;
adam@0: pbd)
adam@0: basic_machine=sparc-tti
adam@0: ;;
adam@0: pbb)
adam@0: basic_machine=m68k-tti
adam@0: ;;
adam@0: pc532 | pc532-*)
adam@0: basic_machine=ns32k-pc532
adam@0: ;;
adam@0: pc98)
adam@0: basic_machine=i386-pc
adam@0: ;;
adam@0: pc98-*)
adam@0: basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: pentium | p5 | k5 | k6 | nexgen | viac3)
adam@0: basic_machine=i586-pc
adam@0: ;;
adam@0: pentiumpro | p6 | 6x86 | athlon | athlon_*)
adam@0: basic_machine=i686-pc
adam@0: ;;
adam@0: pentiumii | pentium2 | pentiumiii | pentium3)
adam@0: basic_machine=i686-pc
adam@0: ;;
adam@0: pentium4)
adam@0: basic_machine=i786-pc
adam@0: ;;
adam@0: pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
adam@0: basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: pentiumpro-* | p6-* | 6x86-* | athlon-*)
adam@0: basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
adam@0: basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: pentium4-*)
adam@0: basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: pn)
adam@0: basic_machine=pn-gould
adam@0: ;;
adam@0: power) basic_machine=power-ibm
adam@0: ;;
adam@12: ppc | ppcbe) basic_machine=powerpc-unknown
adam@0: ;;
adam@12: ppc-* | ppcbe-*)
adam@12: basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: ppcle | powerpclittle | ppc-le | powerpc-little)
adam@0: basic_machine=powerpcle-unknown
adam@0: ;;
adam@0: ppcle-* | powerpclittle-*)
adam@0: basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: ppc64) basic_machine=powerpc64-unknown
adam@0: ;;
adam@0: ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: ppc64le | powerpc64little | ppc64-le | powerpc64-little)
adam@0: basic_machine=powerpc64le-unknown
adam@0: ;;
adam@0: ppc64le-* | powerpc64little-*)
adam@0: basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@0: ;;
adam@0: ps2)
adam@0: basic_machine=i386-ibm
adam@0: ;;
adam@0: pw32)
adam@0: basic_machine=i586-unknown
adam@0: os=-pw32
adam@0: ;;
adam@0: rdos)
adam@0: basic_machine=i386-pc
adam@0: os=-rdos
adam@0: ;;
adam@0: rom68k)
adam@0: basic_machine=m68k-rom68k
adam@0: os=-coff
adam@0: ;;
adam@0: rm[46]00)
adam@0: basic_machine=mips-siemens
adam@0: ;;
adam@0: rtpc | rtpc-*)
adam@0: basic_machine=romp-ibm
adam@0: ;;
adam@0: s390 | s390-*)
adam@0: basic_machine=s390-ibm
adam@0: ;;
adam@0: s390x | s390x-*)
adam@0: basic_machine=s390x-ibm
adam@0: ;;
adam@0: sa29200)
adam@0: basic_machine=a29k-amd
adam@0: os=-udi
adam@0: ;;
adam@0: sb1)
adam@0: basic_machine=mipsisa64sb1-unknown
adam@0: ;;
adam@0: sb1el)
adam@0: basic_machine=mipsisa64sb1el-unknown
adam@0: ;;
adam@0: sde)
adam@0: basic_machine=mipsisa32-sde
adam@0: os=-elf
adam@0: ;;
adam@0: sei)
adam@0: basic_machine=mips-sei
adam@0: os=-seiux
adam@0: ;;
adam@0: sequent)
adam@0: basic_machine=i386-sequent
adam@0: ;;
adam@0: sh)
adam@0: basic_machine=sh-hitachi
adam@0: os=-hms
adam@0: ;;
adam@0: sh5el)
adam@0: basic_machine=sh5le-unknown
adam@0: ;;
adam@0: sh64)
adam@0: basic_machine=sh64-unknown
adam@0: ;;
adam@0: sparclite-wrs | simso-wrs)
adam@0: basic_machine=sparclite-wrs
adam@0: os=-vxworks
adam@0: ;;
adam@0: sps7)
adam@0: basic_machine=m68k-bull
adam@0: os=-sysv2
adam@0: ;;
adam@0: spur)
adam@0: basic_machine=spur-unknown
adam@0: ;;
adam@0: st2000)
adam@0: basic_machine=m68k-tandem
adam@0: ;;
adam@0: stratus)
adam@0: basic_machine=i860-stratus
adam@0: os=-sysv4
adam@0: ;;
adam@12: strongarm-* | thumb-*)
adam@12: basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
adam@12: ;;
adam@0: sun2)
adam@0: basic_machine=m68000-sun
adam@0: ;;
adam@0: sun2os3)
adam@0: basic_machine=m68000-sun
adam@0: os=-sunos3
adam@0: ;;
adam@0: sun2os4)
adam@0: basic_machine=m68000-sun
adam@0: os=-sunos4
adam@0: ;;
adam@0: sun3os3)
adam@0: basic_machine=m68k-sun
adam@0: os=-sunos3
adam@0: ;;
adam@0: sun3os4)
adam@0: basic_machine=m68k-sun
adam@0: os=-sunos4
adam@0: ;;
adam@0: sun4os3)
adam@0: basic_machine=sparc-sun
adam@0: os=-sunos3
adam@0: ;;
adam@0: sun4os4)
adam@0: basic_machine=sparc-sun
adam@0: os=-sunos4
adam@0: ;;
adam@0: sun4sol2)
adam@0: basic_machine=sparc-sun
adam@0: os=-solaris2
adam@0: ;;
adam@0: sun3 | sun3-*)
adam@0: basic_machine=m68k-sun
adam@0: ;;
adam@0: sun4)
adam@0: basic_machine=sparc-sun
adam@0: ;;
adam@0: sun386 | sun386i | roadrunner)
adam@0: basic_machine=i386-sun
adam@0: ;;
adam@0: sv1)
adam@0: basic_machine=sv1-cray
adam@0: os=-unicos
adam@0: ;;
adam@0: symmetry)
adam@0: basic_machine=i386-sequent
adam@0: os=-dynix
adam@0: ;;
adam@0: t3e)
adam@0: basic_machine=alphaev5-cray
adam@0: os=-unicos
adam@0: ;;
adam@0: t90)
adam@0: basic_machine=t90-cray
adam@0: os=-unicos
adam@0: ;;
adam@0: tile*)
adam@20: basic_machine=$basic_machine-unknown
adam@0: os=-linux-gnu
adam@0: ;;
adam@0: tx39)
adam@0: basic_machine=mipstx39-unknown
adam@0: ;;
adam@0: tx39el)
adam@0: basic_machine=mipstx39el-unknown
adam@0: ;;
adam@0: toad1)
adam@0: basic_machine=pdp10-xkl
adam@0: os=-tops20
adam@0: ;;
adam@0: tower | tower-32)
adam@0: basic_machine=m68k-ncr
adam@0: ;;
adam@0: tpf)
adam@0: basic_machine=s390x-ibm
adam@0: os=-tpf
adam@0: ;;
adam@0: udi29k)
adam@0: basic_machine=a29k-amd
adam@0: os=-udi
adam@0: ;;
adam@0: ultra3)
adam@0: basic_machine=a29k-nyu
adam@0: os=-sym1
adam@0: ;;
adam@0: v810 | necv810)
adam@0: basic_machine=v810-nec
adam@0: os=-none
adam@0: ;;
adam@0: vaxv)
adam@0: basic_machine=vax-dec
adam@0: os=-sysv
adam@0: ;;
adam@0: vms)
adam@0: basic_machine=vax-dec
adam@0: os=-vms
adam@0: ;;
adam@0: vpp*|vx|vx-*)
adam@0: basic_machine=f301-fujitsu
adam@0: ;;
adam@0: vxworks960)
adam@0: basic_machine=i960-wrs
adam@0: os=-vxworks
adam@0: ;;
adam@0: vxworks68)
adam@0: basic_machine=m68k-wrs
adam@0: os=-vxworks
adam@0: ;;
adam@0: vxworks29k)
adam@0: basic_machine=a29k-wrs
adam@0: os=-vxworks
adam@0: ;;
adam@0: w65*)
adam@0: basic_machine=w65-wdc
adam@0: os=-none
adam@0: ;;
adam@0: w89k-*)
adam@0: basic_machine=hppa1.1-winbond
adam@0: os=-proelf
adam@0: ;;
adam@0: xbox)
adam@0: basic_machine=i686-pc
adam@0: os=-mingw32
adam@0: ;;
adam@0: xps | xps100)
adam@0: basic_machine=xps100-honeywell
adam@0: ;;
adam@12: xscale-* | xscalee[bl]-*)
adam@12: basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
adam@12: ;;
adam@0: ymp)
adam@0: basic_machine=ymp-cray
adam@0: os=-unicos
adam@0: ;;
adam@0: z8k-*-coff)
adam@0: basic_machine=z8k-unknown
adam@0: os=-sim
adam@0: ;;
adam@0: z80-*-coff)
adam@0: basic_machine=z80-unknown
adam@0: os=-sim
adam@0: ;;
adam@0: none)
adam@0: basic_machine=none-none
adam@0: os=-none
adam@0: ;;
adam@0:
adam@0: # Here we handle the default manufacturer of certain CPU types. It is in
adam@0: # some cases the only manufacturer, in others, it is the most popular.
adam@0: w89k)
adam@0: basic_machine=hppa1.1-winbond
adam@0: ;;
adam@0: op50n)
adam@0: basic_machine=hppa1.1-oki
adam@0: ;;
adam@0: op60c)
adam@0: basic_machine=hppa1.1-oki
adam@0: ;;
adam@0: romp)
adam@0: basic_machine=romp-ibm
adam@0: ;;
adam@0: mmix)
adam@0: basic_machine=mmix-knuth
adam@0: ;;
adam@0: rs6000)
adam@0: basic_machine=rs6000-ibm
adam@0: ;;
adam@0: vax)
adam@0: basic_machine=vax-dec
adam@0: ;;
adam@0: pdp10)
adam@0: # there are many clones, so DEC is not a safe bet
adam@0: basic_machine=pdp10-unknown
adam@0: ;;
adam@0: pdp11)
adam@0: basic_machine=pdp11-dec
adam@0: ;;
adam@0: we32k)
adam@0: basic_machine=we32k-att
adam@0: ;;
adam@0: sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
adam@0: basic_machine=sh-unknown
adam@0: ;;
adam@0: sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
adam@0: basic_machine=sparc-sun
adam@0: ;;
adam@0: cydra)
adam@0: basic_machine=cydra-cydrome
adam@0: ;;
adam@0: orion)
adam@0: basic_machine=orion-highlevel
adam@0: ;;
adam@0: orion105)
adam@0: basic_machine=clipper-highlevel
adam@0: ;;
adam@0: mac | mpw | mac-mpw)
adam@0: basic_machine=m68k-apple
adam@0: ;;
adam@0: pmac | pmac-mpw)
adam@0: basic_machine=powerpc-apple
adam@0: ;;
adam@0: *-unknown)
adam@0: # Make sure to match an already-canonicalized machine name.
adam@0: ;;
adam@0: *)
adam@0: echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
adam@0: exit 1
adam@0: ;;
adam@0: esac
adam@0:
adam@0: # Here we canonicalize certain aliases for manufacturers.
adam@0: case $basic_machine in
adam@0: *-digital*)
adam@0: basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
adam@0: ;;
adam@0: *-commodore*)
adam@0: basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
adam@0: ;;
adam@0: *)
adam@0: ;;
adam@0: esac
adam@0:
adam@0: # Decode manufacturer-specific aliases for certain operating systems.
adam@0:
adam@0: if [ x"$os" != x"" ]
adam@0: then
adam@0: case $os in
adam@12: # First match some system type aliases
adam@12: # that might get confused with valid system types.
adam@0: # -solaris* is a basic system type, with this one exception.
adam@12: -auroraux)
adam@12: os=-auroraux
adam@0: ;;
adam@0: -solaris1 | -solaris1.*)
adam@0: os=`echo $os | sed -e 's|solaris1|sunos4|'`
adam@0: ;;
adam@0: -solaris)
adam@0: os=-solaris2
adam@0: ;;
adam@0: -svr4*)
adam@0: os=-sysv4
adam@0: ;;
adam@0: -unixware*)
adam@0: os=-sysv4.2uw
adam@0: ;;
adam@0: -gnu/linux*)
adam@0: os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
adam@0: ;;
adam@0: # First accept the basic system types.
adam@0: # The portable systems comes first.
adam@0: # Each alternative MUST END IN A *, to match a version number.
adam@0: # -sysv* is not here because it comes later, after sysvr4.
adam@0: -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
adam@0: | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
adam@0: | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
adam@0: | -sym* | -kopensolaris* \
adam@0: | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
adam@0: | -aos* | -aros* \
adam@0: | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
adam@0: | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
adam@0: | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
adam@0: | -openbsd* | -solidbsd* \
adam@0: | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
adam@0: | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
adam@0: | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
adam@0: | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
adam@0: | -chorusos* | -chorusrdb* | -cegcc* \
adam@20: | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
adam@12: | -mingw32* | -linux-gnu* | -linux-android* \
adam@12: | -linux-newlib* | -linux-uclibc* \
adam@0: | -uxpv* | -beos* | -mpeix* | -udk* \
adam@0: | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
adam@0: | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
adam@0: | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
adam@0: | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
adam@0: | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
adam@0: | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
adam@0: | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
adam@0: # Remember, each alternative MUST END IN *, to match a version number.
adam@0: ;;
adam@0: -qnx*)
adam@0: case $basic_machine in
adam@0: x86-* | i*86-*)
adam@0: ;;
adam@0: *)
adam@0: os=-nto$os
adam@0: ;;
adam@0: esac
adam@0: ;;
adam@0: -nto-qnx*)
adam@0: ;;
adam@0: -nto*)
adam@0: os=`echo $os | sed -e 's|nto|nto-qnx|'`
adam@0: ;;
adam@0: -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
adam@0: | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
adam@0: | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
adam@0: ;;
adam@0: -mac*)
adam@0: os=`echo $os | sed -e 's|mac|macos|'`
adam@0: ;;
adam@0: -linux-dietlibc)
adam@0: os=-linux-dietlibc
adam@0: ;;
adam@0: -linux*)
adam@0: os=`echo $os | sed -e 's|linux|linux-gnu|'`
adam@0: ;;
adam@0: -sunos5*)
adam@0: os=`echo $os | sed -e 's|sunos5|solaris2|'`
adam@0: ;;
adam@0: -sunos6*)
adam@0: os=`echo $os | sed -e 's|sunos6|solaris3|'`
adam@0: ;;
adam@0: -opened*)
adam@0: os=-openedition
adam@0: ;;
adam@12: -os400*)
adam@0: os=-os400
adam@0: ;;
adam@0: -wince*)
adam@0: os=-wince
adam@0: ;;
adam@0: -osfrose*)
adam@0: os=-osfrose
adam@0: ;;
adam@0: -osf*)
adam@0: os=-osf
adam@0: ;;
adam@0: -utek*)
adam@0: os=-bsd
adam@0: ;;
adam@0: -dynix*)
adam@0: os=-bsd
adam@0: ;;
adam@0: -acis*)
adam@0: os=-aos
adam@0: ;;
adam@0: -atheos*)
adam@0: os=-atheos
adam@0: ;;
adam@0: -syllable*)
adam@0: os=-syllable
adam@0: ;;
adam@0: -386bsd)
adam@0: os=-bsd
adam@0: ;;
adam@0: -ctix* | -uts*)
adam@0: os=-sysv
adam@0: ;;
adam@0: -nova*)
adam@0: os=-rtmk-nova
adam@0: ;;
adam@0: -ns2 )
adam@0: os=-nextstep2
adam@0: ;;
adam@0: -nsk*)
adam@0: os=-nsk
adam@0: ;;
adam@0: # Preserve the version number of sinix5.
adam@0: -sinix5.*)
adam@0: os=`echo $os | sed -e 's|sinix|sysv|'`
adam@0: ;;
adam@0: -sinix*)
adam@0: os=-sysv4
adam@0: ;;
adam@12: -tpf*)
adam@0: os=-tpf
adam@0: ;;
adam@0: -triton*)
adam@0: os=-sysv3
adam@0: ;;
adam@0: -oss*)
adam@0: os=-sysv3
adam@0: ;;
adam@0: -svr4)
adam@0: os=-sysv4
adam@0: ;;
adam@0: -svr3)
adam@0: os=-sysv3
adam@0: ;;
adam@0: -sysvr4)
adam@0: os=-sysv4
adam@0: ;;
adam@0: # This must come after -sysvr4.
adam@0: -sysv*)
adam@0: ;;
adam@0: -ose*)
adam@0: os=-ose
adam@0: ;;
adam@0: -es1800*)
adam@0: os=-ose
adam@0: ;;
adam@0: -xenix)
adam@0: os=-xenix
adam@0: ;;
adam@0: -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
adam@0: os=-mint
adam@0: ;;
adam@0: -aros*)
adam@0: os=-aros
adam@0: ;;
adam@0: -kaos*)
adam@0: os=-kaos
adam@0: ;;
adam@0: -zvmoe)
adam@0: os=-zvmoe
adam@0: ;;
adam@0: -dicos*)
adam@0: os=-dicos
adam@0: ;;
adam@12: -nacl*)
adam@12: ;;
adam@0: -none)
adam@0: ;;
adam@0: *)
adam@0: # Get rid of the `-' at the beginning of $os.
adam@0: os=`echo $os | sed 's/[^-]*-//'`
adam@0: echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
adam@0: exit 1
adam@0: ;;
adam@0: esac
adam@0: else
adam@0:
adam@0: # Here we handle the default operating systems that come with various machines.
adam@0: # The value should be what the vendor currently ships out the door with their
adam@0: # machine or put another way, the most popular os provided with the machine.
adam@0:
adam@0: # Note that if you're going to try to match "-MANUFACTURER" here (say,
adam@0: # "-sun"), then you have to tell the case statement up towards the top
adam@0: # that MANUFACTURER isn't an operating system. Otherwise, code above
adam@0: # will signal an error saying that MANUFACTURER isn't an operating
adam@0: # system, and we'll never get to this point.
adam@0:
adam@0: case $basic_machine in
adam@12: score-*)
adam@0: os=-elf
adam@0: ;;
adam@12: spu-*)
adam@0: os=-elf
adam@0: ;;
adam@0: *-acorn)
adam@0: os=-riscix1.2
adam@0: ;;
adam@0: arm*-rebel)
adam@0: os=-linux
adam@0: ;;
adam@0: arm*-semi)
adam@0: os=-aout
adam@0: ;;
adam@12: c4x-* | tic4x-*)
adam@12: os=-coff
adam@12: ;;
adam@20: hexagon-*)
adam@20: os=-elf
adam@20: ;;
adam@12: tic54x-*)
adam@12: os=-coff
adam@12: ;;
adam@12: tic55x-*)
adam@12: os=-coff
adam@12: ;;
adam@12: tic6x-*)
adam@12: os=-coff
adam@0: ;;
adam@0: # This must come before the *-dec entry.
adam@0: pdp10-*)
adam@0: os=-tops20
adam@0: ;;
adam@0: pdp11-*)
adam@0: os=-none
adam@0: ;;
adam@0: *-dec | vax-*)
adam@0: os=-ultrix4.2
adam@0: ;;
adam@0: m68*-apollo)
adam@0: os=-domain
adam@0: ;;
adam@0: i386-sun)
adam@0: os=-sunos4.0.2
adam@0: ;;
adam@0: m68000-sun)
adam@0: os=-sunos3
adam@0: ;;
adam@0: m68*-cisco)
adam@0: os=-aout
adam@0: ;;
adam@12: mep-*)
adam@0: os=-elf
adam@0: ;;
adam@0: mips*-cisco)
adam@0: os=-elf
adam@0: ;;
adam@0: mips*-*)
adam@0: os=-elf
adam@0: ;;
adam@0: or32-*)
adam@0: os=-coff
adam@0: ;;
adam@0: *-tti) # must be before sparc entry or we get the wrong os.
adam@0: os=-sysv3
adam@0: ;;
adam@0: sparc-* | *-sun)
adam@0: os=-sunos4.1.1
adam@0: ;;
adam@0: *-be)
adam@0: os=-beos
adam@0: ;;
adam@0: *-haiku)
adam@0: os=-haiku
adam@0: ;;
adam@0: *-ibm)
adam@0: os=-aix
adam@0: ;;
adam@12: *-knuth)
adam@0: os=-mmixware
adam@0: ;;
adam@0: *-wec)
adam@0: os=-proelf
adam@0: ;;
adam@0: *-winbond)
adam@0: os=-proelf
adam@0: ;;
adam@0: *-oki)
adam@0: os=-proelf
adam@0: ;;
adam@0: *-hp)
adam@0: os=-hpux
adam@0: ;;
adam@0: *-hitachi)
adam@0: os=-hiux
adam@0: ;;
adam@0: i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
adam@0: os=-sysv
adam@0: ;;
adam@0: *-cbm)
adam@0: os=-amigaos
adam@0: ;;
adam@0: *-dg)
adam@0: os=-dgux
adam@0: ;;
adam@0: *-dolphin)
adam@0: os=-sysv3
adam@0: ;;
adam@0: m68k-ccur)
adam@0: os=-rtu
adam@0: ;;
adam@0: m88k-omron*)
adam@0: os=-luna
adam@0: ;;
adam@0: *-next )
adam@0: os=-nextstep
adam@0: ;;
adam@0: *-sequent)
adam@0: os=-ptx
adam@0: ;;
adam@0: *-crds)
adam@0: os=-unos
adam@0: ;;
adam@0: *-ns)
adam@0: os=-genix
adam@0: ;;
adam@0: i370-*)
adam@0: os=-mvs
adam@0: ;;
adam@0: *-next)
adam@0: os=-nextstep3
adam@0: ;;
adam@0: *-gould)
adam@0: os=-sysv
adam@0: ;;
adam@0: *-highlevel)
adam@0: os=-bsd
adam@0: ;;
adam@0: *-encore)
adam@0: os=-bsd
adam@0: ;;
adam@0: *-sgi)
adam@0: os=-irix
adam@0: ;;
adam@0: *-siemens)
adam@0: os=-sysv4
adam@0: ;;
adam@0: *-masscomp)
adam@0: os=-rtu
adam@0: ;;
adam@0: f30[01]-fujitsu | f700-fujitsu)
adam@0: os=-uxpv
adam@0: ;;
adam@0: *-rom68k)
adam@0: os=-coff
adam@0: ;;
adam@0: *-*bug)
adam@0: os=-coff
adam@0: ;;
adam@0: *-apple)
adam@0: os=-macos
adam@0: ;;
adam@0: *-atari*)
adam@0: os=-mint
adam@0: ;;
adam@0: *)
adam@0: os=-none
adam@0: ;;
adam@0: esac
adam@0: fi
adam@0:
adam@0: # Here we handle the case where we know the os, and the CPU type, but not the
adam@0: # manufacturer. We pick the logical manufacturer.
adam@0: vendor=unknown
adam@0: case $basic_machine in
adam@0: *-unknown)
adam@0: case $os in
adam@0: -riscix*)
adam@0: vendor=acorn
adam@0: ;;
adam@0: -sunos*)
adam@0: vendor=sun
adam@0: ;;
adam@0: -cnk*|-aix*)
adam@0: vendor=ibm
adam@0: ;;
adam@0: -beos*)
adam@0: vendor=be
adam@0: ;;
adam@0: -hpux*)
adam@0: vendor=hp
adam@0: ;;
adam@0: -mpeix*)
adam@0: vendor=hp
adam@0: ;;
adam@0: -hiux*)
adam@0: vendor=hitachi
adam@0: ;;
adam@0: -unos*)
adam@0: vendor=crds
adam@0: ;;
adam@0: -dgux*)
adam@0: vendor=dg
adam@0: ;;
adam@0: -luna*)
adam@0: vendor=omron
adam@0: ;;
adam@0: -genix*)
adam@0: vendor=ns
adam@0: ;;
adam@0: -mvs* | -opened*)
adam@0: vendor=ibm
adam@0: ;;
adam@0: -os400*)
adam@0: vendor=ibm
adam@0: ;;
adam@0: -ptx*)
adam@0: vendor=sequent
adam@0: ;;
adam@0: -tpf*)
adam@0: vendor=ibm
adam@0: ;;
adam@0: -vxsim* | -vxworks* | -windiss*)
adam@0: vendor=wrs
adam@0: ;;
adam@0: -aux*)
adam@0: vendor=apple
adam@0: ;;
adam@0: -hms*)
adam@0: vendor=hitachi
adam@0: ;;
adam@0: -mpw* | -macos*)
adam@0: vendor=apple
adam@0: ;;
adam@0: -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
adam@0: vendor=atari
adam@0: ;;
adam@0: -vos*)
adam@0: vendor=stratus
adam@0: ;;
adam@0: esac
adam@0: basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
adam@0: ;;
adam@0: esac
adam@0:
adam@0: echo $basic_machine$os
adam@0: exit
adam@0:
adam@0: # Local variables:
adam@0: # eval: (add-hook 'write-file-hooks 'time-stamp)
adam@0: # time-stamp-start: "timestamp='"
adam@0: # time-stamp-format: "%:y-%02m-%02d"
adam@0: # time-stamp-end: "'"
adam@0: # End: