172b676d7Smrg#! /bin/sh 272b676d7Smrg# Configuration validation subroutine script. 374fcc364Smrg# Copyright 1992-2018 Free Software Foundation, Inc. 472b676d7Smrg 574fcc364Smrgtimestamp='2018-02-22' 672b676d7Smrg 793d9adc1Smrg# This file is free software; you can redistribute it and/or modify it 893d9adc1Smrg# under the terms of the GNU General Public License as published by 993d9adc1Smrg# the Free Software Foundation; either version 3 of the License, or 1072b676d7Smrg# (at your option) any later version. 1172b676d7Smrg# 1293d9adc1Smrg# This program is distributed in the hope that it will be useful, but 1393d9adc1Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1493d9adc1Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1593d9adc1Smrg# General Public License for more details. 1672b676d7Smrg# 1772b676d7Smrg# You should have received a copy of the GNU General Public License 1874fcc364Smrg# along with this program; if not, see <https://www.gnu.org/licenses/>. 1972b676d7Smrg# 2072b676d7Smrg# As a special exception to the GNU General Public License, if you 2172b676d7Smrg# distribute this file as part of a program that contains a 2272b676d7Smrg# configuration script generated by Autoconf, you may include it under 2393d9adc1Smrg# the same distribution terms that you use for the rest of that 2493d9adc1Smrg# program. This Exception is an additional permission under section 7 2593d9adc1Smrg# of the GNU General Public License, version 3 ("GPLv3"). 2672b676d7Smrg 2772b676d7Smrg 2893d9adc1Smrg# Please send patches to <config-patches@gnu.org>. 2972b676d7Smrg# 3072b676d7Smrg# Configuration subroutine to validate and canonicalize a configuration type. 3172b676d7Smrg# Supply the specified configuration type as an argument. 3272b676d7Smrg# If it is invalid, we print an error message on stderr and exit with code 1. 3372b676d7Smrg# Otherwise, we print the canonical config type on stdout and succeed. 3472b676d7Smrg 3574c14cd6Smrg# You can get the latest version of this script from: 3674fcc364Smrg# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub 3774c14cd6Smrg 3872b676d7Smrg# This file is supposed to be the same for all GNU packages 3972b676d7Smrg# and recognize all the CPU types, system types and aliases 4072b676d7Smrg# that are meaningful with *any* GNU software. 4172b676d7Smrg# Each package is responsible for reporting which valid configurations 4272b676d7Smrg# it does not support. The user should be able to distinguish 4372b676d7Smrg# a failure to support a valid configuration from a meaningless 4472b676d7Smrg# configuration. 4572b676d7Smrg 4672b676d7Smrg# The goal of this file is to map all the various variations of a given 4772b676d7Smrg# machine specification into a single specification in the form: 4872b676d7Smrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 4972b676d7Smrg# or in some cases, the newer four-part form: 5072b676d7Smrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 5172b676d7Smrg# It is wrong to echo any other type of specification. 5272b676d7Smrg 5372b676d7Smrgme=`echo "$0" | sed -e 's,.*/,,'` 5472b676d7Smrg 5572b676d7Smrgusage="\ 5693d9adc1SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS 5772b676d7Smrg 5872b676d7SmrgCanonicalize a configuration name. 5972b676d7Smrg 6074fcc364SmrgOptions: 6172b676d7Smrg -h, --help print this help, then exit 6272b676d7Smrg -t, --time-stamp print date of last modification, then exit 6372b676d7Smrg -v, --version print version number, then exit 6472b676d7Smrg 6572b676d7SmrgReport bugs and patches to <config-patches@gnu.org>." 6672b676d7Smrg 6772b676d7Smrgversion="\ 6872b676d7SmrgGNU config.sub ($timestamp) 6972b676d7Smrg 7074fcc364SmrgCopyright 1992-2018 Free Software Foundation, Inc. 7172b676d7Smrg 7272b676d7SmrgThis is free software; see the source for copying conditions. There is NO 7372b676d7Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 7472b676d7Smrg 7572b676d7Smrghelp=" 7672b676d7SmrgTry \`$me --help' for more information." 7772b676d7Smrg 7872b676d7Smrg# Parse command line 7972b676d7Smrgwhile test $# -gt 0 ; do 8072b676d7Smrg case $1 in 8172b676d7Smrg --time-stamp | --time* | -t ) 8272b676d7Smrg echo "$timestamp" ; exit ;; 8372b676d7Smrg --version | -v ) 8472b676d7Smrg echo "$version" ; exit ;; 8572b676d7Smrg --help | --h* | -h ) 8672b676d7Smrg echo "$usage"; exit ;; 8772b676d7Smrg -- ) # Stop option processing 8872b676d7Smrg shift; break ;; 8972b676d7Smrg - ) # Use stdin as input. 9072b676d7Smrg break ;; 9172b676d7Smrg -* ) 9272b676d7Smrg echo "$me: invalid option $1$help" 9372b676d7Smrg exit 1 ;; 9472b676d7Smrg 9572b676d7Smrg *local*) 9672b676d7Smrg # First pass through any local machine types. 9774fcc364Smrg echo "$1" 9872b676d7Smrg exit ;; 9972b676d7Smrg 10072b676d7Smrg * ) 10172b676d7Smrg break ;; 10272b676d7Smrg esac 10372b676d7Smrgdone 10472b676d7Smrg 10572b676d7Smrgcase $# in 10672b676d7Smrg 0) echo "$me: missing argument$help" >&2 10772b676d7Smrg exit 1;; 10872b676d7Smrg 1) ;; 10972b676d7Smrg *) echo "$me: too many arguments$help" >&2 11072b676d7Smrg exit 1;; 11172b676d7Smrgesac 11272b676d7Smrg 11372b676d7Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 11472b676d7Smrg# Here we must recognize all the valid KERNEL-OS combinations. 11574fcc364Smrgmaybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 11672b676d7Smrgcase $maybe_os in 11774c14cd6Smrg nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 11893d9adc1Smrg linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 11993d9adc1Smrg knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ 12074fcc364Smrg kopensolaris*-gnu* | cloudabi*-eabi* | \ 12172b676d7Smrg storm-chaos* | os2-emx* | rtmk-nova*) 12272b676d7Smrg os=-$maybe_os 12374fcc364Smrg basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 12472b676d7Smrg ;; 12593d9adc1Smrg android-linux) 12693d9adc1Smrg os=-linux-android 12774fcc364Smrg basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 12893d9adc1Smrg ;; 12972b676d7Smrg *) 13074fcc364Smrg basic_machine=`echo "$1" | sed 's/-[^-]*$//'` 13174fcc364Smrg if [ "$basic_machine" != "$1" ] 13274fcc364Smrg then os=`echo "$1" | sed 's/.*-/-/'` 13372b676d7Smrg else os=; fi 13472b676d7Smrg ;; 13572b676d7Smrgesac 13672b676d7Smrg 13772b676d7Smrg### Let's recognize common machines as not being operating systems so 13872b676d7Smrg### that things like config.sub decstation-3100 work. We also 13972b676d7Smrg### recognize some manufacturers as not being operating systems, so we 14072b676d7Smrg### can provide default operating systems below. 14172b676d7Smrgcase $os in 14272b676d7Smrg -sun*os*) 14372b676d7Smrg # Prevent following clause from handling this invalid input. 14472b676d7Smrg ;; 14572b676d7Smrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 14672b676d7Smrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 14772b676d7Smrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 14872b676d7Smrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 14972b676d7Smrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 15072b676d7Smrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 15193d9adc1Smrg -apple | -axis | -knuth | -cray | -microblaze*) 15272b676d7Smrg os= 15372b676d7Smrg basic_machine=$1 15472b676d7Smrg ;; 15574c14cd6Smrg -bluegene*) 15674c14cd6Smrg os=-cnk 15774c14cd6Smrg ;; 15872b676d7Smrg -sim | -cisco | -oki | -wec | -winbond) 15972b676d7Smrg os= 16072b676d7Smrg basic_machine=$1 16172b676d7Smrg ;; 16272b676d7Smrg -scout) 16372b676d7Smrg ;; 16472b676d7Smrg -wrs) 16572b676d7Smrg os=-vxworks 16672b676d7Smrg basic_machine=$1 16772b676d7Smrg ;; 16872b676d7Smrg -chorusos*) 16972b676d7Smrg os=-chorusos 17072b676d7Smrg basic_machine=$1 17172b676d7Smrg ;; 17274c14cd6Smrg -chorusrdb) 17374c14cd6Smrg os=-chorusrdb 17472b676d7Smrg basic_machine=$1 17574c14cd6Smrg ;; 17672b676d7Smrg -hiux*) 17772b676d7Smrg os=-hiuxwe2 17872b676d7Smrg ;; 17972b676d7Smrg -sco6) 18072b676d7Smrg os=-sco5v6 18174fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 18272b676d7Smrg ;; 18372b676d7Smrg -sco5) 18472b676d7Smrg os=-sco3.2v5 18574fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 18672b676d7Smrg ;; 18772b676d7Smrg -sco4) 18872b676d7Smrg os=-sco3.2v4 18974fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 19072b676d7Smrg ;; 19172b676d7Smrg -sco3.2.[4-9]*) 19272b676d7Smrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 19374fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 19472b676d7Smrg ;; 19572b676d7Smrg -sco3.2v[4-9]*) 19672b676d7Smrg # Don't forget version if it is 3.2v4 or newer. 19774fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 19872b676d7Smrg ;; 19972b676d7Smrg -sco5v6*) 20072b676d7Smrg # Don't forget version if it is 3.2v4 or newer. 20174fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 20272b676d7Smrg ;; 20372b676d7Smrg -sco*) 20472b676d7Smrg os=-sco3.2v2 20574fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 20672b676d7Smrg ;; 20772b676d7Smrg -udk*) 20874fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 20972b676d7Smrg ;; 21072b676d7Smrg -isc) 21172b676d7Smrg os=-isc2.2 21274fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 21372b676d7Smrg ;; 21472b676d7Smrg -clix*) 21572b676d7Smrg basic_machine=clipper-intergraph 21672b676d7Smrg ;; 21772b676d7Smrg -isc*) 21874fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` 21972b676d7Smrg ;; 22093d9adc1Smrg -lynx*178) 22193d9adc1Smrg os=-lynxos178 22293d9adc1Smrg ;; 22393d9adc1Smrg -lynx*5) 22493d9adc1Smrg os=-lynxos5 22593d9adc1Smrg ;; 22672b676d7Smrg -lynx*) 22772b676d7Smrg os=-lynxos 22872b676d7Smrg ;; 22972b676d7Smrg -ptx*) 23074fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` 23172b676d7Smrg ;; 23272b676d7Smrg -psos*) 23372b676d7Smrg os=-psos 23472b676d7Smrg ;; 23572b676d7Smrg -mint | -mint[0-9]*) 23672b676d7Smrg basic_machine=m68k-atari 23772b676d7Smrg os=-mint 23872b676d7Smrg ;; 23972b676d7Smrgesac 24072b676d7Smrg 24172b676d7Smrg# Decode aliases for certain CPU-COMPANY combinations. 24272b676d7Smrgcase $basic_machine in 24372b676d7Smrg # Recognize the basic CPU types without company name. 24472b676d7Smrg # Some are omitted here because they have special meanings below. 24572b676d7Smrg 1750a | 580 \ 24672b676d7Smrg | a29k \ 24793d9adc1Smrg | aarch64 | aarch64_be \ 24872b676d7Smrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 24972b676d7Smrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 25072b676d7Smrg | am33_2.0 \ 25193d9adc1Smrg | arc | arceb \ 25293d9adc1Smrg | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 25393d9adc1Smrg | avr | avr32 \ 25493d9adc1Smrg | ba \ 25593d9adc1Smrg | be32 | be64 \ 25672b676d7Smrg | bfin \ 25793d9adc1Smrg | c4x | c8051 | clipper \ 25874fcc364Smrg | d10v | d30v | dlx | dsp16xx \ 25993d9adc1Smrg | e2k | epiphany \ 26093d9adc1Smrg | fido | fr30 | frv | ft32 \ 26172b676d7Smrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 26293d9adc1Smrg | hexagon \ 26374fcc364Smrg | i370 | i860 | i960 | ia16 | ia64 \ 26472b676d7Smrg | ip2k | iq2000 \ 26593d9adc1Smrg | k1om \ 26693d9adc1Smrg | le32 | le64 \ 26774c14cd6Smrg | lm32 \ 2681fd23544Smrg | m32c | m32r | m32rle | m68000 | m68k | m88k \ 26993d9adc1Smrg | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 27072b676d7Smrg | mips | mipsbe | mipseb | mipsel | mipsle \ 27172b676d7Smrg | mips16 \ 27272b676d7Smrg | mips64 | mips64el \ 27374c14cd6Smrg | mips64octeon | mips64octeonel \ 27472b676d7Smrg | mips64orion | mips64orionel \ 27574c14cd6Smrg | mips64r5900 | mips64r5900el \ 27674c14cd6Smrg | mips64vr | mips64vrel \ 27772b676d7Smrg | mips64vr4100 | mips64vr4100el \ 27872b676d7Smrg | mips64vr4300 | mips64vr4300el \ 27972b676d7Smrg | mips64vr5000 | mips64vr5000el \ 28072b676d7Smrg | mips64vr5900 | mips64vr5900el \ 28172b676d7Smrg | mipsisa32 | mipsisa32el \ 28272b676d7Smrg | mipsisa32r2 | mipsisa32r2el \ 28393d9adc1Smrg | mipsisa32r6 | mipsisa32r6el \ 28472b676d7Smrg | mipsisa64 | mipsisa64el \ 28572b676d7Smrg | mipsisa64r2 | mipsisa64r2el \ 28693d9adc1Smrg | mipsisa64r6 | mipsisa64r6el \ 28772b676d7Smrg | mipsisa64sb1 | mipsisa64sb1el \ 28872b676d7Smrg | mipsisa64sr71k | mipsisa64sr71kel \ 28993d9adc1Smrg | mipsr5900 | mipsr5900el \ 29072b676d7Smrg | mipstx39 | mipstx39el \ 29172b676d7Smrg | mn10200 | mn10300 \ 29274c14cd6Smrg | moxie \ 29372b676d7Smrg | mt \ 29472b676d7Smrg | msp430 \ 29574c14cd6Smrg | nds32 | nds32le | nds32be \ 29693d9adc1Smrg | nios | nios2 | nios2eb | nios2el \ 29772b676d7Smrg | ns16k | ns32k \ 29893d9adc1Smrg | open8 | or1k | or1knd | or32 \ 29974fcc364Smrg | pdp10 | pj | pjl \ 30093d9adc1Smrg | powerpc | powerpc64 | powerpc64le | powerpcle \ 30174fcc364Smrg | pru \ 30272b676d7Smrg | pyramid \ 30393d9adc1Smrg | riscv32 | riscv64 \ 30493d9adc1Smrg | rl78 | rx \ 3051fd23544Smrg | score \ 30693d9adc1Smrg | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 30772b676d7Smrg | sh64 | sh64le \ 3081fd23544Smrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 3091fd23544Smrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 31093d9adc1Smrg | spu \ 31193d9adc1Smrg | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 31274c14cd6Smrg | ubicom32 \ 31393d9adc1Smrg | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 31493d9adc1Smrg | visium \ 31574fcc364Smrg | wasm32 \ 31693d9adc1Smrg | x86 | xc16x | xstormy16 | xtensa \ 31774c14cd6Smrg | z8k | z80) 31872b676d7Smrg basic_machine=$basic_machine-unknown 31972b676d7Smrg ;; 32074c14cd6Smrg c54x) 32174c14cd6Smrg basic_machine=tic54x-unknown 32274c14cd6Smrg ;; 32374c14cd6Smrg c55x) 32474c14cd6Smrg basic_machine=tic55x-unknown 32574c14cd6Smrg ;; 32674c14cd6Smrg c6x) 32774c14cd6Smrg basic_machine=tic6x-unknown 32874c14cd6Smrg ;; 32993d9adc1Smrg leon|leon[3-9]) 33093d9adc1Smrg basic_machine=sparc-$basic_machine 33193d9adc1Smrg ;; 33293d9adc1Smrg m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) 33372b676d7Smrg basic_machine=$basic_machine-unknown 33472b676d7Smrg os=-none 33572b676d7Smrg ;; 33674fcc364Smrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) 33772b676d7Smrg ;; 33872b676d7Smrg ms1) 33972b676d7Smrg basic_machine=mt-unknown 34072b676d7Smrg ;; 34172b676d7Smrg 34293d9adc1Smrg strongarm | thumb | xscale) 34393d9adc1Smrg basic_machine=arm-unknown 34493d9adc1Smrg ;; 34593d9adc1Smrg xgate) 34693d9adc1Smrg basic_machine=$basic_machine-unknown 34793d9adc1Smrg os=-none 34893d9adc1Smrg ;; 34993d9adc1Smrg xscaleeb) 35093d9adc1Smrg basic_machine=armeb-unknown 35193d9adc1Smrg ;; 35293d9adc1Smrg 35393d9adc1Smrg xscaleel) 35493d9adc1Smrg basic_machine=armel-unknown 35593d9adc1Smrg ;; 35693d9adc1Smrg 35772b676d7Smrg # We use `pc' rather than `unknown' 35872b676d7Smrg # because (1) that's what they normally are, and 35972b676d7Smrg # (2) the word "unknown" tends to confuse beginning users. 36072b676d7Smrg i*86 | x86_64) 36172b676d7Smrg basic_machine=$basic_machine-pc 36272b676d7Smrg ;; 36372b676d7Smrg # Object if more than one company name word. 36472b676d7Smrg *-*-*) 36574fcc364Smrg echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 36672b676d7Smrg exit 1 36772b676d7Smrg ;; 36872b676d7Smrg # Recognize the basic CPU types with company name. 36972b676d7Smrg 580-* \ 37072b676d7Smrg | a29k-* \ 37193d9adc1Smrg | aarch64-* | aarch64_be-* \ 37272b676d7Smrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 37372b676d7Smrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 37493d9adc1Smrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ 37572b676d7Smrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 3761fd23544Smrg | avr-* | avr32-* \ 37793d9adc1Smrg | ba-* \ 37893d9adc1Smrg | be32-* | be64-* \ 37972b676d7Smrg | bfin-* | bs2000-* \ 38074c14cd6Smrg | c[123]* | c30-* | [cjt]90-* | c4x-* \ 38193d9adc1Smrg | c8051-* | clipper-* | craynv-* | cydra-* \ 38272b676d7Smrg | d10v-* | d30v-* | dlx-* \ 38393d9adc1Smrg | e2k-* | elxsi-* \ 3841fd23544Smrg | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 38572b676d7Smrg | h8300-* | h8500-* \ 38672b676d7Smrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 38793d9adc1Smrg | hexagon-* \ 38874fcc364Smrg | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ 38972b676d7Smrg | ip2k-* | iq2000-* \ 39093d9adc1Smrg | k1om-* \ 39193d9adc1Smrg | le32-* | le64-* \ 39274c14cd6Smrg | lm32-* \ 3931fd23544Smrg | m32c-* | m32r-* | m32rle-* \ 39472b676d7Smrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 39593d9adc1Smrg | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 39693d9adc1Smrg | microblaze-* | microblazeel-* \ 39772b676d7Smrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 39872b676d7Smrg | mips16-* \ 39972b676d7Smrg | mips64-* | mips64el-* \ 40074c14cd6Smrg | mips64octeon-* | mips64octeonel-* \ 40172b676d7Smrg | mips64orion-* | mips64orionel-* \ 40274c14cd6Smrg | mips64r5900-* | mips64r5900el-* \ 40374c14cd6Smrg | mips64vr-* | mips64vrel-* \ 40472b676d7Smrg | mips64vr4100-* | mips64vr4100el-* \ 40572b676d7Smrg | mips64vr4300-* | mips64vr4300el-* \ 40672b676d7Smrg | mips64vr5000-* | mips64vr5000el-* \ 40772b676d7Smrg | mips64vr5900-* | mips64vr5900el-* \ 40872b676d7Smrg | mipsisa32-* | mipsisa32el-* \ 40972b676d7Smrg | mipsisa32r2-* | mipsisa32r2el-* \ 41093d9adc1Smrg | mipsisa32r6-* | mipsisa32r6el-* \ 41172b676d7Smrg | mipsisa64-* | mipsisa64el-* \ 41272b676d7Smrg | mipsisa64r2-* | mipsisa64r2el-* \ 41393d9adc1Smrg | mipsisa64r6-* | mipsisa64r6el-* \ 41472b676d7Smrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 41572b676d7Smrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 41693d9adc1Smrg | mipsr5900-* | mipsr5900el-* \ 41772b676d7Smrg | mipstx39-* | mipstx39el-* \ 41872b676d7Smrg | mmix-* \ 41972b676d7Smrg | mt-* \ 42072b676d7Smrg | msp430-* \ 42174c14cd6Smrg | nds32-* | nds32le-* | nds32be-* \ 42293d9adc1Smrg | nios-* | nios2-* | nios2eb-* | nios2el-* \ 42372b676d7Smrg | none-* | np1-* | ns16k-* | ns32k-* \ 42493d9adc1Smrg | open8-* \ 42593d9adc1Smrg | or1k*-* \ 42672b676d7Smrg | orion-* \ 42772b676d7Smrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 42893d9adc1Smrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 42974fcc364Smrg | pru-* \ 43072b676d7Smrg | pyramid-* \ 43193d9adc1Smrg | riscv32-* | riscv64-* \ 43293d9adc1Smrg | rl78-* | romp-* | rs6000-* | rx-* \ 43374c14cd6Smrg | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 43472b676d7Smrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 4351fd23544Smrg | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 43672b676d7Smrg | sparclite-* \ 43793d9adc1Smrg | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ 43893d9adc1Smrg | tahoe-* \ 43972b676d7Smrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 44093d9adc1Smrg | tile*-* \ 44172b676d7Smrg | tron-* \ 44274c14cd6Smrg | ubicom32-* \ 44393d9adc1Smrg | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 44493d9adc1Smrg | vax-* \ 44593d9adc1Smrg | visium-* \ 44674fcc364Smrg | wasm32-* \ 44772b676d7Smrg | we32k-* \ 44893d9adc1Smrg | x86-* | x86_64-* | xc16x-* | xps100-* \ 4491fd23544Smrg | xstormy16-* | xtensa*-* \ 45072b676d7Smrg | ymp-* \ 45174c14cd6Smrg | z8k-* | z80-*) 45272b676d7Smrg ;; 4531fd23544Smrg # Recognize the basic CPU types without company name, with glob match. 4541fd23544Smrg xtensa*) 4551fd23544Smrg basic_machine=$basic_machine-unknown 45672b676d7Smrg ;; 45772b676d7Smrg # Recognize the various machine names and aliases which stand 45872b676d7Smrg # for a CPU type and a company and sometimes even an OS. 45972b676d7Smrg 386bsd) 46074fcc364Smrg basic_machine=i386-pc 46172b676d7Smrg os=-bsd 46272b676d7Smrg ;; 46372b676d7Smrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 46472b676d7Smrg basic_machine=m68000-att 46572b676d7Smrg ;; 46672b676d7Smrg 3b*) 46772b676d7Smrg basic_machine=we32k-att 46872b676d7Smrg ;; 46972b676d7Smrg a29khif) 47072b676d7Smrg basic_machine=a29k-amd 47172b676d7Smrg os=-udi 47272b676d7Smrg ;; 47374c14cd6Smrg abacus) 47472b676d7Smrg basic_machine=abacus-unknown 47572b676d7Smrg ;; 47672b676d7Smrg adobe68k) 47772b676d7Smrg basic_machine=m68010-adobe 47872b676d7Smrg os=-scout 47972b676d7Smrg ;; 48072b676d7Smrg alliant | fx80) 48172b676d7Smrg basic_machine=fx80-alliant 48272b676d7Smrg ;; 48372b676d7Smrg altos | altos3068) 48472b676d7Smrg basic_machine=m68k-altos 48572b676d7Smrg ;; 48672b676d7Smrg am29k) 48772b676d7Smrg basic_machine=a29k-none 48872b676d7Smrg os=-bsd 48972b676d7Smrg ;; 49072b676d7Smrg amd64) 49172b676d7Smrg basic_machine=x86_64-pc 49272b676d7Smrg ;; 49372b676d7Smrg amd64-*) 49474fcc364Smrg basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` 49572b676d7Smrg ;; 49672b676d7Smrg amdahl) 49772b676d7Smrg basic_machine=580-amdahl 49872b676d7Smrg os=-sysv 49972b676d7Smrg ;; 50072b676d7Smrg amiga | amiga-*) 50172b676d7Smrg basic_machine=m68k-unknown 50272b676d7Smrg ;; 50372b676d7Smrg amigaos | amigados) 50472b676d7Smrg basic_machine=m68k-unknown 50572b676d7Smrg os=-amigaos 50672b676d7Smrg ;; 50772b676d7Smrg amigaunix | amix) 50872b676d7Smrg basic_machine=m68k-unknown 50972b676d7Smrg os=-sysv4 51072b676d7Smrg ;; 51172b676d7Smrg apollo68) 51272b676d7Smrg basic_machine=m68k-apollo 51372b676d7Smrg os=-sysv 51472b676d7Smrg ;; 51572b676d7Smrg apollo68bsd) 51672b676d7Smrg basic_machine=m68k-apollo 51772b676d7Smrg os=-bsd 51872b676d7Smrg ;; 51974c14cd6Smrg aros) 52074c14cd6Smrg basic_machine=i386-pc 52174c14cd6Smrg os=-aros 52274c14cd6Smrg ;; 52393d9adc1Smrg asmjs) 52493d9adc1Smrg basic_machine=asmjs-unknown 52593d9adc1Smrg ;; 52672b676d7Smrg aux) 52772b676d7Smrg basic_machine=m68k-apple 52872b676d7Smrg os=-aux 52972b676d7Smrg ;; 53072b676d7Smrg balance) 53172b676d7Smrg basic_machine=ns32k-sequent 53272b676d7Smrg os=-dynix 53372b676d7Smrg ;; 5341fd23544Smrg blackfin) 5351fd23544Smrg basic_machine=bfin-unknown 5361fd23544Smrg os=-linux 5371fd23544Smrg ;; 5381fd23544Smrg blackfin-*) 53974fcc364Smrg basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` 5401fd23544Smrg os=-linux 5411fd23544Smrg ;; 54274c14cd6Smrg bluegene*) 54374c14cd6Smrg basic_machine=powerpc-ibm 54474c14cd6Smrg os=-cnk 54574c14cd6Smrg ;; 54674c14cd6Smrg c54x-*) 54774fcc364Smrg basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` 54874c14cd6Smrg ;; 54974c14cd6Smrg c55x-*) 55074fcc364Smrg basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` 55174c14cd6Smrg ;; 55274c14cd6Smrg c6x-*) 55374fcc364Smrg basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` 55474c14cd6Smrg ;; 55572b676d7Smrg c90) 55672b676d7Smrg basic_machine=c90-cray 55772b676d7Smrg os=-unicos 55872b676d7Smrg ;; 55974c14cd6Smrg cegcc) 56074c14cd6Smrg basic_machine=arm-unknown 56174c14cd6Smrg os=-cegcc 56274c14cd6Smrg ;; 56372b676d7Smrg convex-c1) 56472b676d7Smrg basic_machine=c1-convex 56572b676d7Smrg os=-bsd 56672b676d7Smrg ;; 56772b676d7Smrg convex-c2) 56872b676d7Smrg basic_machine=c2-convex 56972b676d7Smrg os=-bsd 57072b676d7Smrg ;; 57172b676d7Smrg convex-c32) 57272b676d7Smrg basic_machine=c32-convex 57372b676d7Smrg os=-bsd 57472b676d7Smrg ;; 57572b676d7Smrg convex-c34) 57672b676d7Smrg basic_machine=c34-convex 57772b676d7Smrg os=-bsd 57872b676d7Smrg ;; 57972b676d7Smrg convex-c38) 58072b676d7Smrg basic_machine=c38-convex 58172b676d7Smrg os=-bsd 58272b676d7Smrg ;; 58372b676d7Smrg cray | j90) 58472b676d7Smrg basic_machine=j90-cray 58572b676d7Smrg os=-unicos 58672b676d7Smrg ;; 58772b676d7Smrg craynv) 58872b676d7Smrg basic_machine=craynv-cray 58972b676d7Smrg os=-unicosmp 59072b676d7Smrg ;; 59174c14cd6Smrg cr16 | cr16-*) 5921fd23544Smrg basic_machine=cr16-unknown 59372b676d7Smrg os=-elf 59472b676d7Smrg ;; 59572b676d7Smrg crds | unos) 59672b676d7Smrg basic_machine=m68k-crds 59772b676d7Smrg ;; 59872b676d7Smrg crisv32 | crisv32-* | etraxfs*) 59972b676d7Smrg basic_machine=crisv32-axis 60072b676d7Smrg ;; 60172b676d7Smrg cris | cris-* | etrax*) 60272b676d7Smrg basic_machine=cris-axis 60372b676d7Smrg ;; 60472b676d7Smrg crx) 60572b676d7Smrg basic_machine=crx-unknown 60672b676d7Smrg os=-elf 60772b676d7Smrg ;; 60872b676d7Smrg da30 | da30-*) 60972b676d7Smrg basic_machine=m68k-da30 61072b676d7Smrg ;; 61172b676d7Smrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 61272b676d7Smrg basic_machine=mips-dec 61372b676d7Smrg ;; 61472b676d7Smrg decsystem10* | dec10*) 61572b676d7Smrg basic_machine=pdp10-dec 61672b676d7Smrg os=-tops10 61772b676d7Smrg ;; 61872b676d7Smrg decsystem20* | dec20*) 61972b676d7Smrg basic_machine=pdp10-dec 62072b676d7Smrg os=-tops20 62172b676d7Smrg ;; 62272b676d7Smrg delta | 3300 | motorola-3300 | motorola-delta \ 62372b676d7Smrg | 3300-motorola | delta-motorola) 62472b676d7Smrg basic_machine=m68k-motorola 62572b676d7Smrg ;; 62672b676d7Smrg delta88) 62772b676d7Smrg basic_machine=m88k-motorola 62872b676d7Smrg os=-sysv3 62972b676d7Smrg ;; 63074c14cd6Smrg dicos) 63174c14cd6Smrg basic_machine=i686-pc 63274c14cd6Smrg os=-dicos 63374c14cd6Smrg ;; 63472b676d7Smrg djgpp) 63572b676d7Smrg basic_machine=i586-pc 63672b676d7Smrg os=-msdosdjgpp 63772b676d7Smrg ;; 63872b676d7Smrg dpx20 | dpx20-*) 63972b676d7Smrg basic_machine=rs6000-bull 64072b676d7Smrg os=-bosx 64172b676d7Smrg ;; 64274fcc364Smrg dpx2*) 64372b676d7Smrg basic_machine=m68k-bull 64472b676d7Smrg os=-sysv3 64572b676d7Smrg ;; 64674fcc364Smrg e500v[12]) 64774fcc364Smrg basic_machine=powerpc-unknown 64874fcc364Smrg os=$os"spe" 64974fcc364Smrg ;; 65074fcc364Smrg e500v[12]-*) 65174fcc364Smrg basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` 65274fcc364Smrg os=$os"spe" 65374fcc364Smrg ;; 65472b676d7Smrg ebmon29k) 65572b676d7Smrg basic_machine=a29k-amd 65672b676d7Smrg os=-ebmon 65772b676d7Smrg ;; 65872b676d7Smrg elxsi) 65972b676d7Smrg basic_machine=elxsi-elxsi 66072b676d7Smrg os=-bsd 66172b676d7Smrg ;; 66272b676d7Smrg encore | umax | mmax) 66372b676d7Smrg basic_machine=ns32k-encore 66472b676d7Smrg ;; 66572b676d7Smrg es1800 | OSE68k | ose68k | ose | OSE) 66672b676d7Smrg basic_machine=m68k-ericsson 66772b676d7Smrg os=-ose 66872b676d7Smrg ;; 66972b676d7Smrg fx2800) 67072b676d7Smrg basic_machine=i860-alliant 67172b676d7Smrg ;; 67272b676d7Smrg genix) 67372b676d7Smrg basic_machine=ns32k-ns 67472b676d7Smrg ;; 67572b676d7Smrg gmicro) 67672b676d7Smrg basic_machine=tron-gmicro 67772b676d7Smrg os=-sysv 67872b676d7Smrg ;; 67972b676d7Smrg go32) 68072b676d7Smrg basic_machine=i386-pc 68172b676d7Smrg os=-go32 68272b676d7Smrg ;; 68372b676d7Smrg h3050r* | hiux*) 68472b676d7Smrg basic_machine=hppa1.1-hitachi 68572b676d7Smrg os=-hiuxwe2 68672b676d7Smrg ;; 68772b676d7Smrg h8300hms) 68872b676d7Smrg basic_machine=h8300-hitachi 68972b676d7Smrg os=-hms 69072b676d7Smrg ;; 69172b676d7Smrg h8300xray) 69272b676d7Smrg basic_machine=h8300-hitachi 69372b676d7Smrg os=-xray 69472b676d7Smrg ;; 69572b676d7Smrg h8500hms) 69672b676d7Smrg basic_machine=h8500-hitachi 69772b676d7Smrg os=-hms 69872b676d7Smrg ;; 69972b676d7Smrg harris) 70072b676d7Smrg basic_machine=m88k-harris 70172b676d7Smrg os=-sysv3 70272b676d7Smrg ;; 70372b676d7Smrg hp300-*) 70472b676d7Smrg basic_machine=m68k-hp 70572b676d7Smrg ;; 70672b676d7Smrg hp300bsd) 70772b676d7Smrg basic_machine=m68k-hp 70872b676d7Smrg os=-bsd 70972b676d7Smrg ;; 71072b676d7Smrg hp300hpux) 71172b676d7Smrg basic_machine=m68k-hp 71272b676d7Smrg os=-hpux 71372b676d7Smrg ;; 71472b676d7Smrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 71572b676d7Smrg basic_machine=hppa1.0-hp 71672b676d7Smrg ;; 71772b676d7Smrg hp9k2[0-9][0-9] | hp9k31[0-9]) 71872b676d7Smrg basic_machine=m68000-hp 71972b676d7Smrg ;; 72072b676d7Smrg hp9k3[2-9][0-9]) 72172b676d7Smrg basic_machine=m68k-hp 72272b676d7Smrg ;; 72372b676d7Smrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 72472b676d7Smrg basic_machine=hppa1.0-hp 72572b676d7Smrg ;; 72672b676d7Smrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 72772b676d7Smrg basic_machine=hppa1.1-hp 72872b676d7Smrg ;; 72972b676d7Smrg hp9k78[0-9] | hp78[0-9]) 73072b676d7Smrg # FIXME: really hppa2.0-hp 73172b676d7Smrg basic_machine=hppa1.1-hp 73272b676d7Smrg ;; 73372b676d7Smrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 73472b676d7Smrg # FIXME: really hppa2.0-hp 73572b676d7Smrg basic_machine=hppa1.1-hp 73672b676d7Smrg ;; 73772b676d7Smrg hp9k8[0-9][13679] | hp8[0-9][13679]) 73872b676d7Smrg basic_machine=hppa1.1-hp 73972b676d7Smrg ;; 74072b676d7Smrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 74172b676d7Smrg basic_machine=hppa1.0-hp 74272b676d7Smrg ;; 74372b676d7Smrg hppaosf) 74472b676d7Smrg basic_machine=hppa1.1-hp 74572b676d7Smrg os=-osf 74672b676d7Smrg ;; 74772b676d7Smrg hppro) 74872b676d7Smrg basic_machine=hppa1.1-hp 74972b676d7Smrg os=-proelf 75072b676d7Smrg ;; 75172b676d7Smrg i370-ibm* | ibm*) 75272b676d7Smrg basic_machine=i370-ibm 75372b676d7Smrg ;; 75472b676d7Smrg i*86v32) 75574fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 75672b676d7Smrg os=-sysv32 75772b676d7Smrg ;; 75872b676d7Smrg i*86v4*) 75974fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 76072b676d7Smrg os=-sysv4 76172b676d7Smrg ;; 76272b676d7Smrg i*86v) 76374fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 76472b676d7Smrg os=-sysv 76572b676d7Smrg ;; 76672b676d7Smrg i*86sol2) 76774fcc364Smrg basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` 76872b676d7Smrg os=-solaris2 76972b676d7Smrg ;; 77072b676d7Smrg i386mach) 77172b676d7Smrg basic_machine=i386-mach 77272b676d7Smrg os=-mach 77372b676d7Smrg ;; 77474fcc364Smrg vsta) 77572b676d7Smrg basic_machine=i386-unknown 77672b676d7Smrg os=-vsta 77772b676d7Smrg ;; 77872b676d7Smrg iris | iris4d) 77972b676d7Smrg basic_machine=mips-sgi 78072b676d7Smrg case $os in 78172b676d7Smrg -irix*) 78272b676d7Smrg ;; 78372b676d7Smrg *) 78472b676d7Smrg os=-irix4 78572b676d7Smrg ;; 78672b676d7Smrg esac 78772b676d7Smrg ;; 78872b676d7Smrg isi68 | isi) 78972b676d7Smrg basic_machine=m68k-isi 79072b676d7Smrg os=-sysv 79172b676d7Smrg ;; 79293d9adc1Smrg leon-*|leon[3-9]-*) 79374fcc364Smrg basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` 79493d9adc1Smrg ;; 7951fd23544Smrg m68knommu) 7961fd23544Smrg basic_machine=m68k-unknown 7971fd23544Smrg os=-linux 7981fd23544Smrg ;; 7991fd23544Smrg m68knommu-*) 80074fcc364Smrg basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` 8011fd23544Smrg os=-linux 8021fd23544Smrg ;; 80372b676d7Smrg magnum | m3230) 80472b676d7Smrg basic_machine=mips-mips 80572b676d7Smrg os=-sysv 80672b676d7Smrg ;; 80772b676d7Smrg merlin) 80872b676d7Smrg basic_machine=ns32k-utek 80972b676d7Smrg os=-sysv 81072b676d7Smrg ;; 81193d9adc1Smrg microblaze*) 81274c14cd6Smrg basic_machine=microblaze-xilinx 81374c14cd6Smrg ;; 81493d9adc1Smrg mingw64) 81593d9adc1Smrg basic_machine=x86_64-pc 81693d9adc1Smrg os=-mingw64 81793d9adc1Smrg ;; 81872b676d7Smrg mingw32) 81993d9adc1Smrg basic_machine=i686-pc 82072b676d7Smrg os=-mingw32 82172b676d7Smrg ;; 8221fd23544Smrg mingw32ce) 8231fd23544Smrg basic_machine=arm-unknown 8241fd23544Smrg os=-mingw32ce 8251fd23544Smrg ;; 82672b676d7Smrg miniframe) 82772b676d7Smrg basic_machine=m68000-convergent 82872b676d7Smrg ;; 82972b676d7Smrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 83072b676d7Smrg basic_machine=m68k-atari 83172b676d7Smrg os=-mint 83272b676d7Smrg ;; 83372b676d7Smrg mips3*-*) 83474fcc364Smrg basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` 83572b676d7Smrg ;; 83672b676d7Smrg mips3*) 83774fcc364Smrg basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown 83872b676d7Smrg ;; 83972b676d7Smrg monitor) 84072b676d7Smrg basic_machine=m68k-rom68k 84172b676d7Smrg os=-coff 84272b676d7Smrg ;; 84372b676d7Smrg morphos) 84472b676d7Smrg basic_machine=powerpc-unknown 84572b676d7Smrg os=-morphos 84672b676d7Smrg ;; 84793d9adc1Smrg moxiebox) 84893d9adc1Smrg basic_machine=moxie-unknown 84993d9adc1Smrg os=-moxiebox 85093d9adc1Smrg ;; 85172b676d7Smrg msdos) 85272b676d7Smrg basic_machine=i386-pc 85372b676d7Smrg os=-msdos 85472b676d7Smrg ;; 85572b676d7Smrg ms1-*) 85674fcc364Smrg basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` 85772b676d7Smrg ;; 85893d9adc1Smrg msys) 85993d9adc1Smrg basic_machine=i686-pc 86093d9adc1Smrg os=-msys 86193d9adc1Smrg ;; 86272b676d7Smrg mvs) 86372b676d7Smrg basic_machine=i370-ibm 86472b676d7Smrg os=-mvs 86572b676d7Smrg ;; 86693d9adc1Smrg nacl) 86793d9adc1Smrg basic_machine=le32-unknown 86893d9adc1Smrg os=-nacl 86993d9adc1Smrg ;; 87072b676d7Smrg ncr3000) 87172b676d7Smrg basic_machine=i486-ncr 87272b676d7Smrg os=-sysv4 87372b676d7Smrg ;; 87472b676d7Smrg netbsd386) 87572b676d7Smrg basic_machine=i386-unknown 87672b676d7Smrg os=-netbsd 87772b676d7Smrg ;; 87872b676d7Smrg netwinder) 87972b676d7Smrg basic_machine=armv4l-rebel 88072b676d7Smrg os=-linux 88172b676d7Smrg ;; 88272b676d7Smrg news | news700 | news800 | news900) 88372b676d7Smrg basic_machine=m68k-sony 88472b676d7Smrg os=-newsos 88572b676d7Smrg ;; 88672b676d7Smrg news1000) 88772b676d7Smrg basic_machine=m68030-sony 88872b676d7Smrg os=-newsos 88972b676d7Smrg ;; 89072b676d7Smrg news-3600 | risc-news) 89172b676d7Smrg basic_machine=mips-sony 89272b676d7Smrg os=-newsos 89372b676d7Smrg ;; 89472b676d7Smrg necv70) 89572b676d7Smrg basic_machine=v70-nec 89672b676d7Smrg os=-sysv 89772b676d7Smrg ;; 89874fcc364Smrg next | m*-next) 89972b676d7Smrg basic_machine=m68k-next 90072b676d7Smrg case $os in 90172b676d7Smrg -nextstep* ) 90272b676d7Smrg ;; 90372b676d7Smrg -ns2*) 90472b676d7Smrg os=-nextstep2 90572b676d7Smrg ;; 90672b676d7Smrg *) 90772b676d7Smrg os=-nextstep3 90872b676d7Smrg ;; 90972b676d7Smrg esac 91072b676d7Smrg ;; 91172b676d7Smrg nh3000) 91272b676d7Smrg basic_machine=m68k-harris 91372b676d7Smrg os=-cxux 91472b676d7Smrg ;; 91572b676d7Smrg nh[45]000) 91672b676d7Smrg basic_machine=m88k-harris 91772b676d7Smrg os=-cxux 91872b676d7Smrg ;; 91972b676d7Smrg nindy960) 92072b676d7Smrg basic_machine=i960-intel 92172b676d7Smrg os=-nindy 92272b676d7Smrg ;; 92372b676d7Smrg mon960) 92472b676d7Smrg basic_machine=i960-intel 92572b676d7Smrg os=-mon960 92672b676d7Smrg ;; 92772b676d7Smrg nonstopux) 92872b676d7Smrg basic_machine=mips-compaq 92972b676d7Smrg os=-nonstopux 93072b676d7Smrg ;; 93172b676d7Smrg np1) 93272b676d7Smrg basic_machine=np1-gould 93372b676d7Smrg ;; 93474c14cd6Smrg neo-tandem) 93574c14cd6Smrg basic_machine=neo-tandem 93674c14cd6Smrg ;; 93774c14cd6Smrg nse-tandem) 93874c14cd6Smrg basic_machine=nse-tandem 93974c14cd6Smrg ;; 94072b676d7Smrg nsr-tandem) 94172b676d7Smrg basic_machine=nsr-tandem 94272b676d7Smrg ;; 94374fcc364Smrg nsv-tandem) 94474fcc364Smrg basic_machine=nsv-tandem 94574fcc364Smrg ;; 94674fcc364Smrg nsx-tandem) 94774fcc364Smrg basic_machine=nsx-tandem 94874fcc364Smrg ;; 94972b676d7Smrg op50n-* | op60c-*) 95072b676d7Smrg basic_machine=hppa1.1-oki 95172b676d7Smrg os=-proelf 95272b676d7Smrg ;; 95372b676d7Smrg openrisc | openrisc-*) 95472b676d7Smrg basic_machine=or32-unknown 95572b676d7Smrg ;; 95672b676d7Smrg os400) 95772b676d7Smrg basic_machine=powerpc-ibm 95872b676d7Smrg os=-os400 95972b676d7Smrg ;; 96072b676d7Smrg OSE68000 | ose68000) 96172b676d7Smrg basic_machine=m68000-ericsson 96272b676d7Smrg os=-ose 96372b676d7Smrg ;; 96472b676d7Smrg os68k) 96572b676d7Smrg basic_machine=m68k-none 96672b676d7Smrg os=-os68k 96772b676d7Smrg ;; 96872b676d7Smrg pa-hitachi) 96972b676d7Smrg basic_machine=hppa1.1-hitachi 97072b676d7Smrg os=-hiuxwe2 97172b676d7Smrg ;; 97272b676d7Smrg paragon) 97372b676d7Smrg basic_machine=i860-intel 97472b676d7Smrg os=-osf 97572b676d7Smrg ;; 9761fd23544Smrg parisc) 9771fd23544Smrg basic_machine=hppa-unknown 9781fd23544Smrg os=-linux 9791fd23544Smrg ;; 9801fd23544Smrg parisc-*) 98174fcc364Smrg basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` 9821fd23544Smrg os=-linux 9831fd23544Smrg ;; 98472b676d7Smrg pbd) 98572b676d7Smrg basic_machine=sparc-tti 98672b676d7Smrg ;; 98772b676d7Smrg pbb) 98872b676d7Smrg basic_machine=m68k-tti 98972b676d7Smrg ;; 99072b676d7Smrg pc532 | pc532-*) 99172b676d7Smrg basic_machine=ns32k-pc532 99272b676d7Smrg ;; 99372b676d7Smrg pc98) 99472b676d7Smrg basic_machine=i386-pc 99572b676d7Smrg ;; 99672b676d7Smrg pc98-*) 99774fcc364Smrg basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` 99872b676d7Smrg ;; 99972b676d7Smrg pentium | p5 | k5 | k6 | nexgen | viac3) 100072b676d7Smrg basic_machine=i586-pc 100172b676d7Smrg ;; 100272b676d7Smrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 100372b676d7Smrg basic_machine=i686-pc 100472b676d7Smrg ;; 100572b676d7Smrg pentiumii | pentium2 | pentiumiii | pentium3) 100672b676d7Smrg basic_machine=i686-pc 100772b676d7Smrg ;; 100872b676d7Smrg pentium4) 100972b676d7Smrg basic_machine=i786-pc 101072b676d7Smrg ;; 101172b676d7Smrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 101274fcc364Smrg basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` 101372b676d7Smrg ;; 101472b676d7Smrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 101574fcc364Smrg basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` 101672b676d7Smrg ;; 101772b676d7Smrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 101874fcc364Smrg basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` 101972b676d7Smrg ;; 102072b676d7Smrg pentium4-*) 102174fcc364Smrg basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` 102272b676d7Smrg ;; 102372b676d7Smrg pn) 102472b676d7Smrg basic_machine=pn-gould 102572b676d7Smrg ;; 102672b676d7Smrg power) basic_machine=power-ibm 102772b676d7Smrg ;; 102893d9adc1Smrg ppc | ppcbe) basic_machine=powerpc-unknown 102972b676d7Smrg ;; 103093d9adc1Smrg ppc-* | ppcbe-*) 103174fcc364Smrg basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` 103272b676d7Smrg ;; 103374fcc364Smrg ppcle | powerpclittle) 103472b676d7Smrg basic_machine=powerpcle-unknown 103572b676d7Smrg ;; 103672b676d7Smrg ppcle-* | powerpclittle-*) 103774fcc364Smrg basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` 103872b676d7Smrg ;; 103972b676d7Smrg ppc64) basic_machine=powerpc64-unknown 104072b676d7Smrg ;; 104174fcc364Smrg ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` 104272b676d7Smrg ;; 104374fcc364Smrg ppc64le | powerpc64little) 104472b676d7Smrg basic_machine=powerpc64le-unknown 104572b676d7Smrg ;; 104672b676d7Smrg ppc64le-* | powerpc64little-*) 104774fcc364Smrg basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` 104872b676d7Smrg ;; 104972b676d7Smrg ps2) 105072b676d7Smrg basic_machine=i386-ibm 105172b676d7Smrg ;; 105272b676d7Smrg pw32) 105372b676d7Smrg basic_machine=i586-unknown 105472b676d7Smrg os=-pw32 105572b676d7Smrg ;; 105693d9adc1Smrg rdos | rdos64) 105793d9adc1Smrg basic_machine=x86_64-pc 105893d9adc1Smrg os=-rdos 105993d9adc1Smrg ;; 106093d9adc1Smrg rdos32) 106172b676d7Smrg basic_machine=i386-pc 106272b676d7Smrg os=-rdos 106372b676d7Smrg ;; 106472b676d7Smrg rom68k) 106572b676d7Smrg basic_machine=m68k-rom68k 106672b676d7Smrg os=-coff 106772b676d7Smrg ;; 106872b676d7Smrg rm[46]00) 106972b676d7Smrg basic_machine=mips-siemens 107072b676d7Smrg ;; 107172b676d7Smrg rtpc | rtpc-*) 107272b676d7Smrg basic_machine=romp-ibm 107372b676d7Smrg ;; 107472b676d7Smrg s390 | s390-*) 107572b676d7Smrg basic_machine=s390-ibm 107672b676d7Smrg ;; 107772b676d7Smrg s390x | s390x-*) 107872b676d7Smrg basic_machine=s390x-ibm 107972b676d7Smrg ;; 108072b676d7Smrg sa29200) 108172b676d7Smrg basic_machine=a29k-amd 108272b676d7Smrg os=-udi 108372b676d7Smrg ;; 108472b676d7Smrg sb1) 108572b676d7Smrg basic_machine=mipsisa64sb1-unknown 108672b676d7Smrg ;; 108772b676d7Smrg sb1el) 108872b676d7Smrg basic_machine=mipsisa64sb1el-unknown 108972b676d7Smrg ;; 10901fd23544Smrg sde) 10911fd23544Smrg basic_machine=mipsisa32-sde 10921fd23544Smrg os=-elf 10931fd23544Smrg ;; 109472b676d7Smrg sei) 109572b676d7Smrg basic_machine=mips-sei 109672b676d7Smrg os=-seiux 109772b676d7Smrg ;; 109872b676d7Smrg sequent) 109972b676d7Smrg basic_machine=i386-sequent 110072b676d7Smrg ;; 11011fd23544Smrg sh5el) 11021fd23544Smrg basic_machine=sh5le-unknown 11031fd23544Smrg ;; 110474fcc364Smrg simso-wrs) 110572b676d7Smrg basic_machine=sparclite-wrs 110672b676d7Smrg os=-vxworks 110772b676d7Smrg ;; 110872b676d7Smrg sps7) 110972b676d7Smrg basic_machine=m68k-bull 111072b676d7Smrg os=-sysv2 111172b676d7Smrg ;; 111272b676d7Smrg spur) 111372b676d7Smrg basic_machine=spur-unknown 111472b676d7Smrg ;; 111572b676d7Smrg st2000) 111672b676d7Smrg basic_machine=m68k-tandem 111772b676d7Smrg ;; 111872b676d7Smrg stratus) 111972b676d7Smrg basic_machine=i860-stratus 112072b676d7Smrg os=-sysv4 112172b676d7Smrg ;; 112293d9adc1Smrg strongarm-* | thumb-*) 112374fcc364Smrg basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` 112493d9adc1Smrg ;; 112572b676d7Smrg sun2) 112672b676d7Smrg basic_machine=m68000-sun 112772b676d7Smrg ;; 112872b676d7Smrg sun2os3) 112972b676d7Smrg basic_machine=m68000-sun 113072b676d7Smrg os=-sunos3 113172b676d7Smrg ;; 113272b676d7Smrg sun2os4) 113372b676d7Smrg basic_machine=m68000-sun 113472b676d7Smrg os=-sunos4 113572b676d7Smrg ;; 113672b676d7Smrg sun3os3) 113772b676d7Smrg basic_machine=m68k-sun 113872b676d7Smrg os=-sunos3 113972b676d7Smrg ;; 114072b676d7Smrg sun3os4) 114172b676d7Smrg basic_machine=m68k-sun 114272b676d7Smrg os=-sunos4 114372b676d7Smrg ;; 114472b676d7Smrg sun4os3) 114572b676d7Smrg basic_machine=sparc-sun 114672b676d7Smrg os=-sunos3 114772b676d7Smrg ;; 114872b676d7Smrg sun4os4) 114972b676d7Smrg basic_machine=sparc-sun 115072b676d7Smrg os=-sunos4 115172b676d7Smrg ;; 115272b676d7Smrg sun4sol2) 115372b676d7Smrg basic_machine=sparc-sun 115472b676d7Smrg os=-solaris2 115572b676d7Smrg ;; 115672b676d7Smrg sun3 | sun3-*) 115772b676d7Smrg basic_machine=m68k-sun 115872b676d7Smrg ;; 115972b676d7Smrg sun4) 116072b676d7Smrg basic_machine=sparc-sun 116172b676d7Smrg ;; 116272b676d7Smrg sun386 | sun386i | roadrunner) 116372b676d7Smrg basic_machine=i386-sun 116472b676d7Smrg ;; 116572b676d7Smrg sv1) 116672b676d7Smrg basic_machine=sv1-cray 116772b676d7Smrg os=-unicos 116872b676d7Smrg ;; 116972b676d7Smrg symmetry) 117072b676d7Smrg basic_machine=i386-sequent 117172b676d7Smrg os=-dynix 117272b676d7Smrg ;; 117372b676d7Smrg t3e) 117472b676d7Smrg basic_machine=alphaev5-cray 117572b676d7Smrg os=-unicos 117672b676d7Smrg ;; 117772b676d7Smrg t90) 117872b676d7Smrg basic_machine=t90-cray 117972b676d7Smrg os=-unicos 118072b676d7Smrg ;; 11811fd23544Smrg tile*) 118293d9adc1Smrg basic_machine=$basic_machine-unknown 11831fd23544Smrg os=-linux-gnu 11841fd23544Smrg ;; 118572b676d7Smrg tx39) 118672b676d7Smrg basic_machine=mipstx39-unknown 118772b676d7Smrg ;; 118872b676d7Smrg tx39el) 118972b676d7Smrg basic_machine=mipstx39el-unknown 119072b676d7Smrg ;; 119172b676d7Smrg toad1) 119272b676d7Smrg basic_machine=pdp10-xkl 119372b676d7Smrg os=-tops20 119472b676d7Smrg ;; 119572b676d7Smrg tower | tower-32) 119672b676d7Smrg basic_machine=m68k-ncr 119772b676d7Smrg ;; 119872b676d7Smrg tpf) 119972b676d7Smrg basic_machine=s390x-ibm 120072b676d7Smrg os=-tpf 120172b676d7Smrg ;; 120272b676d7Smrg udi29k) 120372b676d7Smrg basic_machine=a29k-amd 120472b676d7Smrg os=-udi 120572b676d7Smrg ;; 120672b676d7Smrg ultra3) 120772b676d7Smrg basic_machine=a29k-nyu 120872b676d7Smrg os=-sym1 120972b676d7Smrg ;; 121072b676d7Smrg v810 | necv810) 121172b676d7Smrg basic_machine=v810-nec 121272b676d7Smrg os=-none 121372b676d7Smrg ;; 121472b676d7Smrg vaxv) 121572b676d7Smrg basic_machine=vax-dec 121672b676d7Smrg os=-sysv 121772b676d7Smrg ;; 121872b676d7Smrg vms) 121972b676d7Smrg basic_machine=vax-dec 122072b676d7Smrg os=-vms 122172b676d7Smrg ;; 122272b676d7Smrg vpp*|vx|vx-*) 122372b676d7Smrg basic_machine=f301-fujitsu 122472b676d7Smrg ;; 122572b676d7Smrg vxworks960) 122672b676d7Smrg basic_machine=i960-wrs 122772b676d7Smrg os=-vxworks 122872b676d7Smrg ;; 122972b676d7Smrg vxworks68) 123072b676d7Smrg basic_machine=m68k-wrs 123172b676d7Smrg os=-vxworks 123272b676d7Smrg ;; 123372b676d7Smrg vxworks29k) 123472b676d7Smrg basic_machine=a29k-wrs 123572b676d7Smrg os=-vxworks 123672b676d7Smrg ;; 123772b676d7Smrg w65*) 123872b676d7Smrg basic_machine=w65-wdc 123972b676d7Smrg os=-none 124072b676d7Smrg ;; 124172b676d7Smrg w89k-*) 124272b676d7Smrg basic_machine=hppa1.1-winbond 124372b676d7Smrg os=-proelf 124472b676d7Smrg ;; 124574fcc364Smrg x64) 124674fcc364Smrg basic_machine=x86_64-pc 124774fcc364Smrg ;; 124872b676d7Smrg xbox) 124972b676d7Smrg basic_machine=i686-pc 125072b676d7Smrg os=-mingw32 125172b676d7Smrg ;; 125272b676d7Smrg xps | xps100) 125372b676d7Smrg basic_machine=xps100-honeywell 125472b676d7Smrg ;; 125593d9adc1Smrg xscale-* | xscalee[bl]-*) 125674fcc364Smrg basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` 125793d9adc1Smrg ;; 125872b676d7Smrg ymp) 125972b676d7Smrg basic_machine=ymp-cray 126072b676d7Smrg os=-unicos 126172b676d7Smrg ;; 126272b676d7Smrg none) 126372b676d7Smrg basic_machine=none-none 126472b676d7Smrg os=-none 126572b676d7Smrg ;; 126672b676d7Smrg 126772b676d7Smrg# Here we handle the default manufacturer of certain CPU types. It is in 126872b676d7Smrg# some cases the only manufacturer, in others, it is the most popular. 126972b676d7Smrg w89k) 127072b676d7Smrg basic_machine=hppa1.1-winbond 127172b676d7Smrg ;; 127272b676d7Smrg op50n) 127372b676d7Smrg basic_machine=hppa1.1-oki 127472b676d7Smrg ;; 127572b676d7Smrg op60c) 127672b676d7Smrg basic_machine=hppa1.1-oki 127772b676d7Smrg ;; 127872b676d7Smrg romp) 127972b676d7Smrg basic_machine=romp-ibm 128072b676d7Smrg ;; 128172b676d7Smrg mmix) 128272b676d7Smrg basic_machine=mmix-knuth 128372b676d7Smrg ;; 128472b676d7Smrg rs6000) 128572b676d7Smrg basic_machine=rs6000-ibm 128672b676d7Smrg ;; 128772b676d7Smrg vax) 128872b676d7Smrg basic_machine=vax-dec 128972b676d7Smrg ;; 129072b676d7Smrg pdp11) 129172b676d7Smrg basic_machine=pdp11-dec 129272b676d7Smrg ;; 129372b676d7Smrg we32k) 129472b676d7Smrg basic_machine=we32k-att 129572b676d7Smrg ;; 129674c14cd6Smrg sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 129772b676d7Smrg basic_machine=sh-unknown 129872b676d7Smrg ;; 129972b676d7Smrg cydra) 130072b676d7Smrg basic_machine=cydra-cydrome 130172b676d7Smrg ;; 130272b676d7Smrg orion) 130372b676d7Smrg basic_machine=orion-highlevel 130472b676d7Smrg ;; 130572b676d7Smrg orion105) 130672b676d7Smrg basic_machine=clipper-highlevel 130772b676d7Smrg ;; 130872b676d7Smrg mac | mpw | mac-mpw) 130972b676d7Smrg basic_machine=m68k-apple 131072b676d7Smrg ;; 131172b676d7Smrg pmac | pmac-mpw) 131272b676d7Smrg basic_machine=powerpc-apple 131372b676d7Smrg ;; 131472b676d7Smrg *-unknown) 131572b676d7Smrg # Make sure to match an already-canonicalized machine name. 131672b676d7Smrg ;; 131772b676d7Smrg *) 131874fcc364Smrg echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 131972b676d7Smrg exit 1 132072b676d7Smrg ;; 132172b676d7Smrgesac 132272b676d7Smrg 132372b676d7Smrg# Here we canonicalize certain aliases for manufacturers. 132472b676d7Smrgcase $basic_machine in 132572b676d7Smrg *-digital*) 132674fcc364Smrg basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` 132772b676d7Smrg ;; 132872b676d7Smrg *-commodore*) 132974fcc364Smrg basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` 133072b676d7Smrg ;; 133172b676d7Smrg *) 133272b676d7Smrg ;; 133372b676d7Smrgesac 133472b676d7Smrg 133572b676d7Smrg# Decode manufacturer-specific aliases for certain operating systems. 133672b676d7Smrg 133772b676d7Smrgif [ x"$os" != x"" ] 133872b676d7Smrgthen 133972b676d7Smrgcase $os in 134074fcc364Smrg # First match some system type aliases that might get confused 134174fcc364Smrg # with valid system types. 134272b676d7Smrg # -solaris* is a basic system type, with this one exception. 134374c14cd6Smrg -auroraux) 134474c14cd6Smrg os=-auroraux 134574c14cd6Smrg ;; 134672b676d7Smrg -solaris1 | -solaris1.*) 134772b676d7Smrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 134872b676d7Smrg ;; 134972b676d7Smrg -solaris) 135072b676d7Smrg os=-solaris2 135172b676d7Smrg ;; 135272b676d7Smrg -unixware*) 135372b676d7Smrg os=-sysv4.2uw 135472b676d7Smrg ;; 135572b676d7Smrg -gnu/linux*) 135672b676d7Smrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 135772b676d7Smrg ;; 135874fcc364Smrg # es1800 is here to avoid being matched by es* (a different OS) 135974fcc364Smrg -es1800*) 136074fcc364Smrg os=-ose 136174fcc364Smrg ;; 136274fcc364Smrg # Now accept the basic system types. 136372b676d7Smrg # The portable systems comes first. 136474fcc364Smrg # Each alternative MUST end in a * to match a version number. 136572b676d7Smrg # -sysv* is not here because it comes later, after sysvr4. 136672b676d7Smrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 136774c14cd6Smrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 136874c14cd6Smrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 136993d9adc1Smrg | -sym* | -kopensolaris* | -plan9* \ 137072b676d7Smrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 137193d9adc1Smrg | -aos* | -aros* | -cloudabi* | -sortix* \ 137272b676d7Smrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 137372b676d7Smrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 137474fcc364Smrg | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ 137593d9adc1Smrg | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ 137672b676d7Smrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 137772b676d7Smrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 137872b676d7Smrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 137972b676d7Smrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 138074fcc364Smrg | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ 138193d9adc1Smrg | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 138274fcc364Smrg | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 138393d9adc1Smrg | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 138493d9adc1Smrg | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ 138574fcc364Smrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ 138672b676d7Smrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 138774fcc364Smrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 138872b676d7Smrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 138974fcc364Smrg | -morphos* | -superux* | -rtmk* | -windiss* \ 139072b676d7Smrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 139193d9adc1Smrg | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ 139274fcc364Smrg | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ 139374fcc364Smrg | -midnightbsd*) 139472b676d7Smrg # Remember, each alternative MUST END IN *, to match a version number. 139572b676d7Smrg ;; 139672b676d7Smrg -qnx*) 139772b676d7Smrg case $basic_machine in 139872b676d7Smrg x86-* | i*86-*) 139972b676d7Smrg ;; 140072b676d7Smrg *) 140172b676d7Smrg os=-nto$os 140272b676d7Smrg ;; 140372b676d7Smrg esac 140472b676d7Smrg ;; 140572b676d7Smrg -nto-qnx*) 140672b676d7Smrg ;; 140772b676d7Smrg -nto*) 140872b676d7Smrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 140972b676d7Smrg ;; 141074fcc364Smrg -sim | -xray | -os68k* | -v88r* \ 141174fcc364Smrg | -windows* | -osx | -abug | -netware* | -os9* \ 141272b676d7Smrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 141372b676d7Smrg ;; 141472b676d7Smrg -mac*) 141574fcc364Smrg os=`echo "$os" | sed -e 's|mac|macos|'` 141672b676d7Smrg ;; 141772b676d7Smrg -linux-dietlibc) 141872b676d7Smrg os=-linux-dietlibc 141972b676d7Smrg ;; 142072b676d7Smrg -linux*) 142172b676d7Smrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 142272b676d7Smrg ;; 142372b676d7Smrg -sunos5*) 142474fcc364Smrg os=`echo "$os" | sed -e 's|sunos5|solaris2|'` 142572b676d7Smrg ;; 142672b676d7Smrg -sunos6*) 142774fcc364Smrg os=`echo "$os" | sed -e 's|sunos6|solaris3|'` 142872b676d7Smrg ;; 142972b676d7Smrg -opened*) 143072b676d7Smrg os=-openedition 143172b676d7Smrg ;; 143274c14cd6Smrg -os400*) 143372b676d7Smrg os=-os400 143472b676d7Smrg ;; 143572b676d7Smrg -wince*) 143672b676d7Smrg os=-wince 143772b676d7Smrg ;; 143872b676d7Smrg -utek*) 143972b676d7Smrg os=-bsd 144072b676d7Smrg ;; 144172b676d7Smrg -dynix*) 144272b676d7Smrg os=-bsd 144372b676d7Smrg ;; 144472b676d7Smrg -acis*) 144572b676d7Smrg os=-aos 144672b676d7Smrg ;; 144772b676d7Smrg -atheos*) 144872b676d7Smrg os=-atheos 144972b676d7Smrg ;; 145072b676d7Smrg -syllable*) 145172b676d7Smrg os=-syllable 145272b676d7Smrg ;; 145372b676d7Smrg -386bsd) 145472b676d7Smrg os=-bsd 145572b676d7Smrg ;; 145672b676d7Smrg -ctix* | -uts*) 145772b676d7Smrg os=-sysv 145872b676d7Smrg ;; 145972b676d7Smrg -nova*) 146072b676d7Smrg os=-rtmk-nova 146172b676d7Smrg ;; 146274fcc364Smrg -ns2) 146372b676d7Smrg os=-nextstep2 146472b676d7Smrg ;; 146572b676d7Smrg -nsk*) 146672b676d7Smrg os=-nsk 146772b676d7Smrg ;; 146872b676d7Smrg # Preserve the version number of sinix5. 146972b676d7Smrg -sinix5.*) 147072b676d7Smrg os=`echo $os | sed -e 's|sinix|sysv|'` 147172b676d7Smrg ;; 147272b676d7Smrg -sinix*) 147372b676d7Smrg os=-sysv4 147472b676d7Smrg ;; 147574c14cd6Smrg -tpf*) 147672b676d7Smrg os=-tpf 147772b676d7Smrg ;; 147872b676d7Smrg -triton*) 147972b676d7Smrg os=-sysv3 148072b676d7Smrg ;; 148172b676d7Smrg -oss*) 148272b676d7Smrg os=-sysv3 148372b676d7Smrg ;; 148474fcc364Smrg -svr4*) 148572b676d7Smrg os=-sysv4 148672b676d7Smrg ;; 148772b676d7Smrg -svr3) 148872b676d7Smrg os=-sysv3 148972b676d7Smrg ;; 149072b676d7Smrg -sysvr4) 149172b676d7Smrg os=-sysv4 149272b676d7Smrg ;; 149372b676d7Smrg # This must come after -sysvr4. 149472b676d7Smrg -sysv*) 149572b676d7Smrg ;; 149672b676d7Smrg -ose*) 149772b676d7Smrg os=-ose 149872b676d7Smrg ;; 149972b676d7Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 150072b676d7Smrg os=-mint 150172b676d7Smrg ;; 150272b676d7Smrg -zvmoe) 150372b676d7Smrg os=-zvmoe 150472b676d7Smrg ;; 150574c14cd6Smrg -dicos*) 150674c14cd6Smrg os=-dicos 150774c14cd6Smrg ;; 150874fcc364Smrg -pikeos*) 150974fcc364Smrg # Until real need of OS specific support for 151074fcc364Smrg # particular features comes up, bare metal 151174fcc364Smrg # configurations are quite functional. 151274fcc364Smrg case $basic_machine in 151374fcc364Smrg arm*) 151474fcc364Smrg os=-eabi 151574fcc364Smrg ;; 151674fcc364Smrg *) 151774fcc364Smrg os=-elf 151874fcc364Smrg ;; 151974fcc364Smrg esac 152074fcc364Smrg ;; 152174c14cd6Smrg -nacl*) 152274c14cd6Smrg ;; 152393d9adc1Smrg -ios) 152493d9adc1Smrg ;; 152572b676d7Smrg -none) 152672b676d7Smrg ;; 152772b676d7Smrg *) 152872b676d7Smrg # Get rid of the `-' at the beginning of $os. 152972b676d7Smrg os=`echo $os | sed 's/[^-]*-//'` 153074fcc364Smrg echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 153172b676d7Smrg exit 1 153272b676d7Smrg ;; 153372b676d7Smrgesac 153472b676d7Smrgelse 153572b676d7Smrg 153672b676d7Smrg# Here we handle the default operating systems that come with various machines. 153772b676d7Smrg# The value should be what the vendor currently ships out the door with their 153872b676d7Smrg# machine or put another way, the most popular os provided with the machine. 153972b676d7Smrg 154072b676d7Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 154172b676d7Smrg# "-sun"), then you have to tell the case statement up towards the top 154272b676d7Smrg# that MANUFACTURER isn't an operating system. Otherwise, code above 154372b676d7Smrg# will signal an error saying that MANUFACTURER isn't an operating 154472b676d7Smrg# system, and we'll never get to this point. 154572b676d7Smrg 154672b676d7Smrgcase $basic_machine in 154774c14cd6Smrg score-*) 15481fd23544Smrg os=-elf 15491fd23544Smrg ;; 155074c14cd6Smrg spu-*) 15511fd23544Smrg os=-elf 15521fd23544Smrg ;; 155372b676d7Smrg *-acorn) 155472b676d7Smrg os=-riscix1.2 155572b676d7Smrg ;; 155672b676d7Smrg arm*-rebel) 155772b676d7Smrg os=-linux 155872b676d7Smrg ;; 155972b676d7Smrg arm*-semi) 156072b676d7Smrg os=-aout 156172b676d7Smrg ;; 156274c14cd6Smrg c4x-* | tic4x-*) 156374c14cd6Smrg os=-coff 156474c14cd6Smrg ;; 156593d9adc1Smrg c8051-*) 156693d9adc1Smrg os=-elf 156793d9adc1Smrg ;; 156893d9adc1Smrg hexagon-*) 156993d9adc1Smrg os=-elf 157093d9adc1Smrg ;; 157174c14cd6Smrg tic54x-*) 157274c14cd6Smrg os=-coff 157374c14cd6Smrg ;; 157474c14cd6Smrg tic55x-*) 157574c14cd6Smrg os=-coff 157674c14cd6Smrg ;; 157774c14cd6Smrg tic6x-*) 157874c14cd6Smrg os=-coff 15791fd23544Smrg ;; 158072b676d7Smrg # This must come before the *-dec entry. 158172b676d7Smrg pdp10-*) 158272b676d7Smrg os=-tops20 158372b676d7Smrg ;; 158472b676d7Smrg pdp11-*) 158572b676d7Smrg os=-none 158672b676d7Smrg ;; 158772b676d7Smrg *-dec | vax-*) 158872b676d7Smrg os=-ultrix4.2 158972b676d7Smrg ;; 159072b676d7Smrg m68*-apollo) 159172b676d7Smrg os=-domain 159272b676d7Smrg ;; 159372b676d7Smrg i386-sun) 159472b676d7Smrg os=-sunos4.0.2 159572b676d7Smrg ;; 159672b676d7Smrg m68000-sun) 159772b676d7Smrg os=-sunos3 159872b676d7Smrg ;; 159972b676d7Smrg m68*-cisco) 160072b676d7Smrg os=-aout 160172b676d7Smrg ;; 160274c14cd6Smrg mep-*) 16031fd23544Smrg os=-elf 16041fd23544Smrg ;; 160572b676d7Smrg mips*-cisco) 160672b676d7Smrg os=-elf 160772b676d7Smrg ;; 160872b676d7Smrg mips*-*) 160972b676d7Smrg os=-elf 161072b676d7Smrg ;; 161172b676d7Smrg or32-*) 161272b676d7Smrg os=-coff 161372b676d7Smrg ;; 161472b676d7Smrg *-tti) # must be before sparc entry or we get the wrong os. 161572b676d7Smrg os=-sysv3 161672b676d7Smrg ;; 161772b676d7Smrg sparc-* | *-sun) 161872b676d7Smrg os=-sunos4.1.1 161972b676d7Smrg ;; 162074fcc364Smrg pru-*) 162174fcc364Smrg os=-elf 162274fcc364Smrg ;; 162372b676d7Smrg *-be) 162472b676d7Smrg os=-beos 162572b676d7Smrg ;; 162672b676d7Smrg *-ibm) 162772b676d7Smrg os=-aix 162872b676d7Smrg ;; 162974c14cd6Smrg *-knuth) 163072b676d7Smrg os=-mmixware 163172b676d7Smrg ;; 163272b676d7Smrg *-wec) 163372b676d7Smrg os=-proelf 163472b676d7Smrg ;; 163572b676d7Smrg *-winbond) 163672b676d7Smrg os=-proelf 163772b676d7Smrg ;; 163872b676d7Smrg *-oki) 163972b676d7Smrg os=-proelf 164072b676d7Smrg ;; 164172b676d7Smrg *-hp) 164272b676d7Smrg os=-hpux 164372b676d7Smrg ;; 164472b676d7Smrg *-hitachi) 164572b676d7Smrg os=-hiux 164672b676d7Smrg ;; 164772b676d7Smrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 164872b676d7Smrg os=-sysv 164972b676d7Smrg ;; 165072b676d7Smrg *-cbm) 165172b676d7Smrg os=-amigaos 165272b676d7Smrg ;; 165372b676d7Smrg *-dg) 165472b676d7Smrg os=-dgux 165572b676d7Smrg ;; 165672b676d7Smrg *-dolphin) 165772b676d7Smrg os=-sysv3 165872b676d7Smrg ;; 165972b676d7Smrg m68k-ccur) 166072b676d7Smrg os=-rtu 166172b676d7Smrg ;; 166272b676d7Smrg m88k-omron*) 166372b676d7Smrg os=-luna 166472b676d7Smrg ;; 166574fcc364Smrg *-next) 166672b676d7Smrg os=-nextstep 166772b676d7Smrg ;; 166872b676d7Smrg *-sequent) 166972b676d7Smrg os=-ptx 167072b676d7Smrg ;; 167172b676d7Smrg *-crds) 167272b676d7Smrg os=-unos 167372b676d7Smrg ;; 167472b676d7Smrg *-ns) 167572b676d7Smrg os=-genix 167672b676d7Smrg ;; 167772b676d7Smrg i370-*) 167872b676d7Smrg os=-mvs 167972b676d7Smrg ;; 168072b676d7Smrg *-gould) 168172b676d7Smrg os=-sysv 168272b676d7Smrg ;; 168372b676d7Smrg *-highlevel) 168472b676d7Smrg os=-bsd 168572b676d7Smrg ;; 168672b676d7Smrg *-encore) 168772b676d7Smrg os=-bsd 168872b676d7Smrg ;; 168972b676d7Smrg *-sgi) 169072b676d7Smrg os=-irix 169172b676d7Smrg ;; 169272b676d7Smrg *-siemens) 169372b676d7Smrg os=-sysv4 169472b676d7Smrg ;; 169572b676d7Smrg *-masscomp) 169672b676d7Smrg os=-rtu 169772b676d7Smrg ;; 169872b676d7Smrg f30[01]-fujitsu | f700-fujitsu) 169972b676d7Smrg os=-uxpv 170072b676d7Smrg ;; 170172b676d7Smrg *-rom68k) 170272b676d7Smrg os=-coff 170372b676d7Smrg ;; 170472b676d7Smrg *-*bug) 170572b676d7Smrg os=-coff 170672b676d7Smrg ;; 170772b676d7Smrg *-apple) 170872b676d7Smrg os=-macos 170972b676d7Smrg ;; 171072b676d7Smrg *-atari*) 171172b676d7Smrg os=-mint 171272b676d7Smrg ;; 171372b676d7Smrg *) 171472b676d7Smrg os=-none 171572b676d7Smrg ;; 171672b676d7Smrgesac 171772b676d7Smrgfi 171872b676d7Smrg 171972b676d7Smrg# Here we handle the case where we know the os, and the CPU type, but not the 172072b676d7Smrg# manufacturer. We pick the logical manufacturer. 172172b676d7Smrgvendor=unknown 172272b676d7Smrgcase $basic_machine in 172372b676d7Smrg *-unknown) 172472b676d7Smrg case $os in 172572b676d7Smrg -riscix*) 172672b676d7Smrg vendor=acorn 172772b676d7Smrg ;; 172872b676d7Smrg -sunos*) 172972b676d7Smrg vendor=sun 173072b676d7Smrg ;; 173174c14cd6Smrg -cnk*|-aix*) 173272b676d7Smrg vendor=ibm 173372b676d7Smrg ;; 173472b676d7Smrg -beos*) 173572b676d7Smrg vendor=be 173672b676d7Smrg ;; 173772b676d7Smrg -hpux*) 173872b676d7Smrg vendor=hp 173972b676d7Smrg ;; 174072b676d7Smrg -mpeix*) 174172b676d7Smrg vendor=hp 174272b676d7Smrg ;; 174372b676d7Smrg -hiux*) 174472b676d7Smrg vendor=hitachi 174572b676d7Smrg ;; 174672b676d7Smrg -unos*) 174772b676d7Smrg vendor=crds 174872b676d7Smrg ;; 174972b676d7Smrg -dgux*) 175072b676d7Smrg vendor=dg 175172b676d7Smrg ;; 175272b676d7Smrg -luna*) 175372b676d7Smrg vendor=omron 175472b676d7Smrg ;; 175572b676d7Smrg -genix*) 175672b676d7Smrg vendor=ns 175772b676d7Smrg ;; 175872b676d7Smrg -mvs* | -opened*) 175972b676d7Smrg vendor=ibm 176072b676d7Smrg ;; 176172b676d7Smrg -os400*) 176272b676d7Smrg vendor=ibm 176372b676d7Smrg ;; 176472b676d7Smrg -ptx*) 176572b676d7Smrg vendor=sequent 176672b676d7Smrg ;; 176772b676d7Smrg -tpf*) 176872b676d7Smrg vendor=ibm 176972b676d7Smrg ;; 177072b676d7Smrg -vxsim* | -vxworks* | -windiss*) 177172b676d7Smrg vendor=wrs 177272b676d7Smrg ;; 177372b676d7Smrg -aux*) 177472b676d7Smrg vendor=apple 177572b676d7Smrg ;; 177672b676d7Smrg -hms*) 177772b676d7Smrg vendor=hitachi 177872b676d7Smrg ;; 177972b676d7Smrg -mpw* | -macos*) 178072b676d7Smrg vendor=apple 178172b676d7Smrg ;; 178272b676d7Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 178372b676d7Smrg vendor=atari 178472b676d7Smrg ;; 178572b676d7Smrg -vos*) 178672b676d7Smrg vendor=stratus 178772b676d7Smrg ;; 178872b676d7Smrg esac 178974fcc364Smrg basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` 179072b676d7Smrg ;; 179172b676d7Smrgesac 179272b676d7Smrg 179374fcc364Smrgecho "$basic_machine$os" 179472b676d7Smrgexit 179572b676d7Smrg 179672b676d7Smrg# Local variables: 179774fcc364Smrg# eval: (add-hook 'write-file-functions 'time-stamp) 179872b676d7Smrg# time-stamp-start: "timestamp='" 179972b676d7Smrg# time-stamp-format: "%:y-%02m-%02d" 180072b676d7Smrg# time-stamp-end: "'" 180172b676d7Smrg# End: 1802