12b15cb3dSCy Schubert#! /bin/sh 22b15cb3dSCy Schubert# Configuration validation subroutine script. 3*2d4e511cSCy Schubert# Copyright 1992-2014 Free Software Foundation, Inc. 42b15cb3dSCy Schubert 5*2d4e511cSCy Schuberttimestamp='2014-12-03' 62b15cb3dSCy Schubert 7f0574f5cSXin LI# This file is free software; you can redistribute it and/or modify it 8f0574f5cSXin LI# under the terms of the GNU General Public License as published by 9f0574f5cSXin LI# the Free Software Foundation; either version 3 of the License, or 102b15cb3dSCy Schubert# (at your option) any later version. 112b15cb3dSCy Schubert# 12f0574f5cSXin LI# This program is distributed in the hope that it will be useful, but 13f0574f5cSXin LI# WITHOUT ANY WARRANTY; without even the implied warranty of 14f0574f5cSXin LI# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15f0574f5cSXin LI# General Public License for more details. 162b15cb3dSCy Schubert# 172b15cb3dSCy Schubert# You should have received a copy of the GNU General Public License 18f0574f5cSXin LI# along with this program; if not, see <http://www.gnu.org/licenses/>. 192b15cb3dSCy Schubert# 202b15cb3dSCy Schubert# As a special exception to the GNU General Public License, if you 212b15cb3dSCy Schubert# distribute this file as part of a program that contains a 222b15cb3dSCy Schubert# configuration script generated by Autoconf, you may include it under 23f0574f5cSXin LI# the same distribution terms that you use for the rest of that 24f0574f5cSXin LI# program. This Exception is an additional permission under section 7 25f0574f5cSXin LI# of the GNU General Public License, version 3 ("GPLv3"). 262b15cb3dSCy Schubert 272b15cb3dSCy Schubert 28f0574f5cSXin LI# Please send patches to <config-patches@gnu.org>. 292b15cb3dSCy Schubert# 302b15cb3dSCy Schubert# Configuration subroutine to validate and canonicalize a configuration type. 312b15cb3dSCy Schubert# Supply the specified configuration type as an argument. 322b15cb3dSCy Schubert# If it is invalid, we print an error message on stderr and exit with code 1. 332b15cb3dSCy Schubert# Otherwise, we print the canonical config type on stdout and succeed. 342b15cb3dSCy Schubert 352b15cb3dSCy Schubert# You can get the latest version of this script from: 362b15cb3dSCy Schubert# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 372b15cb3dSCy Schubert 382b15cb3dSCy Schubert# This file is supposed to be the same for all GNU packages 392b15cb3dSCy Schubert# and recognize all the CPU types, system types and aliases 402b15cb3dSCy Schubert# that are meaningful with *any* GNU software. 412b15cb3dSCy Schubert# Each package is responsible for reporting which valid configurations 422b15cb3dSCy Schubert# it does not support. The user should be able to distinguish 432b15cb3dSCy Schubert# a failure to support a valid configuration from a meaningless 442b15cb3dSCy Schubert# configuration. 452b15cb3dSCy Schubert 462b15cb3dSCy Schubert# The goal of this file is to map all the various variations of a given 472b15cb3dSCy Schubert# machine specification into a single specification in the form: 482b15cb3dSCy Schubert# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 492b15cb3dSCy Schubert# or in some cases, the newer four-part form: 502b15cb3dSCy Schubert# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 512b15cb3dSCy Schubert# It is wrong to echo any other type of specification. 522b15cb3dSCy Schubert 532b15cb3dSCy Schubertme=`echo "$0" | sed -e 's,.*/,,'` 542b15cb3dSCy Schubert 552b15cb3dSCy Schubertusage="\ 562b15cb3dSCy SchubertUsage: $0 [OPTION] CPU-MFR-OPSYS 572b15cb3dSCy Schubert $0 [OPTION] ALIAS 582b15cb3dSCy Schubert 592b15cb3dSCy SchubertCanonicalize a configuration name. 602b15cb3dSCy Schubert 612b15cb3dSCy SchubertOperation modes: 622b15cb3dSCy Schubert -h, --help print this help, then exit 632b15cb3dSCy Schubert -t, --time-stamp print date of last modification, then exit 642b15cb3dSCy Schubert -v, --version print version number, then exit 652b15cb3dSCy Schubert 662b15cb3dSCy SchubertReport bugs and patches to <config-patches@gnu.org>." 672b15cb3dSCy Schubert 682b15cb3dSCy Schubertversion="\ 692b15cb3dSCy SchubertGNU config.sub ($timestamp) 702b15cb3dSCy Schubert 71*2d4e511cSCy SchubertCopyright 1992-2014 Free Software Foundation, Inc. 722b15cb3dSCy Schubert 732b15cb3dSCy SchubertThis is free software; see the source for copying conditions. There is NO 742b15cb3dSCy Schubertwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 752b15cb3dSCy Schubert 762b15cb3dSCy Schuberthelp=" 772b15cb3dSCy SchubertTry \`$me --help' for more information." 782b15cb3dSCy Schubert 792b15cb3dSCy Schubert# Parse command line 802b15cb3dSCy Schubertwhile test $# -gt 0 ; do 812b15cb3dSCy Schubert case $1 in 822b15cb3dSCy Schubert --time-stamp | --time* | -t ) 832b15cb3dSCy Schubert echo "$timestamp" ; exit ;; 842b15cb3dSCy Schubert --version | -v ) 852b15cb3dSCy Schubert echo "$version" ; exit ;; 862b15cb3dSCy Schubert --help | --h* | -h ) 872b15cb3dSCy Schubert echo "$usage"; exit ;; 882b15cb3dSCy Schubert -- ) # Stop option processing 892b15cb3dSCy Schubert shift; break ;; 902b15cb3dSCy Schubert - ) # Use stdin as input. 912b15cb3dSCy Schubert break ;; 922b15cb3dSCy Schubert -* ) 932b15cb3dSCy Schubert echo "$me: invalid option $1$help" 942b15cb3dSCy Schubert exit 1 ;; 952b15cb3dSCy Schubert 962b15cb3dSCy Schubert *local*) 972b15cb3dSCy Schubert # First pass through any local machine types. 982b15cb3dSCy Schubert echo $1 992b15cb3dSCy Schubert exit ;; 1002b15cb3dSCy Schubert 1012b15cb3dSCy Schubert * ) 1022b15cb3dSCy Schubert break ;; 1032b15cb3dSCy Schubert esac 1042b15cb3dSCy Schubertdone 1052b15cb3dSCy Schubert 1062b15cb3dSCy Schubertcase $# in 1072b15cb3dSCy Schubert 0) echo "$me: missing argument$help" >&2 1082b15cb3dSCy Schubert exit 1;; 1092b15cb3dSCy Schubert 1) ;; 1102b15cb3dSCy Schubert *) echo "$me: too many arguments$help" >&2 1112b15cb3dSCy Schubert exit 1;; 1122b15cb3dSCy Schubertesac 1132b15cb3dSCy Schubert 1142b15cb3dSCy Schubert# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 1152b15cb3dSCy Schubert# Here we must recognize all the valid KERNEL-OS combinations. 1162b15cb3dSCy Schubertmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 1172b15cb3dSCy Schubertcase $maybe_os in 1182b15cb3dSCy Schubert nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 119f0574f5cSXin LI linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 120*2d4e511cSCy Schubert knetbsd*-gnu* | netbsd*-gnu* | \ 1212b15cb3dSCy Schubert kopensolaris*-gnu* | \ 1222b15cb3dSCy Schubert storm-chaos* | os2-emx* | rtmk-nova*) 1232b15cb3dSCy Schubert os=-$maybe_os 1242b15cb3dSCy Schubert basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 1252b15cb3dSCy Schubert ;; 126f0574f5cSXin LI android-linux) 127f0574f5cSXin LI os=-linux-android 128f0574f5cSXin LI basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 129f0574f5cSXin LI ;; 1302b15cb3dSCy Schubert *) 1312b15cb3dSCy Schubert basic_machine=`echo $1 | sed 's/-[^-]*$//'` 1322b15cb3dSCy Schubert if [ $basic_machine != $1 ] 1332b15cb3dSCy Schubert then os=`echo $1 | sed 's/.*-/-/'` 1342b15cb3dSCy Schubert else os=; fi 1352b15cb3dSCy Schubert ;; 1362b15cb3dSCy Schubertesac 1372b15cb3dSCy Schubert 1382b15cb3dSCy Schubert### Let's recognize common machines as not being operating systems so 1392b15cb3dSCy Schubert### that things like config.sub decstation-3100 work. We also 1402b15cb3dSCy Schubert### recognize some manufacturers as not being operating systems, so we 1412b15cb3dSCy Schubert### can provide default operating systems below. 1422b15cb3dSCy Schubertcase $os in 1432b15cb3dSCy Schubert -sun*os*) 1442b15cb3dSCy Schubert # Prevent following clause from handling this invalid input. 1452b15cb3dSCy Schubert ;; 1462b15cb3dSCy Schubert -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 1472b15cb3dSCy Schubert -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 1482b15cb3dSCy Schubert -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 1492b15cb3dSCy Schubert -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 1502b15cb3dSCy Schubert -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 1512b15cb3dSCy Schubert -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 152f0574f5cSXin LI -apple | -axis | -knuth | -cray | -microblaze*) 1532b15cb3dSCy Schubert os= 1542b15cb3dSCy Schubert basic_machine=$1 1552b15cb3dSCy Schubert ;; 1562b15cb3dSCy Schubert -bluegene*) 1572b15cb3dSCy Schubert os=-cnk 1582b15cb3dSCy Schubert ;; 1592b15cb3dSCy Schubert -sim | -cisco | -oki | -wec | -winbond) 1602b15cb3dSCy Schubert os= 1612b15cb3dSCy Schubert basic_machine=$1 1622b15cb3dSCy Schubert ;; 1632b15cb3dSCy Schubert -scout) 1642b15cb3dSCy Schubert ;; 1652b15cb3dSCy Schubert -wrs) 1662b15cb3dSCy Schubert os=-vxworks 1672b15cb3dSCy Schubert basic_machine=$1 1682b15cb3dSCy Schubert ;; 1692b15cb3dSCy Schubert -chorusos*) 1702b15cb3dSCy Schubert os=-chorusos 1712b15cb3dSCy Schubert basic_machine=$1 1722b15cb3dSCy Schubert ;; 1732b15cb3dSCy Schubert -chorusrdb) 1742b15cb3dSCy Schubert os=-chorusrdb 1752b15cb3dSCy Schubert basic_machine=$1 1762b15cb3dSCy Schubert ;; 1772b15cb3dSCy Schubert -hiux*) 1782b15cb3dSCy Schubert os=-hiuxwe2 1792b15cb3dSCy Schubert ;; 1802b15cb3dSCy Schubert -sco6) 1812b15cb3dSCy Schubert os=-sco5v6 1822b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1832b15cb3dSCy Schubert ;; 1842b15cb3dSCy Schubert -sco5) 1852b15cb3dSCy Schubert os=-sco3.2v5 1862b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1872b15cb3dSCy Schubert ;; 1882b15cb3dSCy Schubert -sco4) 1892b15cb3dSCy Schubert os=-sco3.2v4 1902b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1912b15cb3dSCy Schubert ;; 1922b15cb3dSCy Schubert -sco3.2.[4-9]*) 1932b15cb3dSCy Schubert os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 1942b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1952b15cb3dSCy Schubert ;; 1962b15cb3dSCy Schubert -sco3.2v[4-9]*) 1972b15cb3dSCy Schubert # Don't forget version if it is 3.2v4 or newer. 1982b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1992b15cb3dSCy Schubert ;; 2002b15cb3dSCy Schubert -sco5v6*) 2012b15cb3dSCy Schubert # Don't forget version if it is 3.2v4 or newer. 2022b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2032b15cb3dSCy Schubert ;; 2042b15cb3dSCy Schubert -sco*) 2052b15cb3dSCy Schubert os=-sco3.2v2 2062b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2072b15cb3dSCy Schubert ;; 2082b15cb3dSCy Schubert -udk*) 2092b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2102b15cb3dSCy Schubert ;; 2112b15cb3dSCy Schubert -isc) 2122b15cb3dSCy Schubert os=-isc2.2 2132b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2142b15cb3dSCy Schubert ;; 2152b15cb3dSCy Schubert -clix*) 2162b15cb3dSCy Schubert basic_machine=clipper-intergraph 2172b15cb3dSCy Schubert ;; 2182b15cb3dSCy Schubert -isc*) 2192b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2202b15cb3dSCy Schubert ;; 221f0574f5cSXin LI -lynx*178) 222f0574f5cSXin LI os=-lynxos178 223f0574f5cSXin LI ;; 224f0574f5cSXin LI -lynx*5) 225f0574f5cSXin LI os=-lynxos5 226f0574f5cSXin LI ;; 2272b15cb3dSCy Schubert -lynx*) 2282b15cb3dSCy Schubert os=-lynxos 2292b15cb3dSCy Schubert ;; 2302b15cb3dSCy Schubert -ptx*) 2312b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 2322b15cb3dSCy Schubert ;; 2332b15cb3dSCy Schubert -windowsnt*) 2342b15cb3dSCy Schubert os=`echo $os | sed -e 's/windowsnt/winnt/'` 2352b15cb3dSCy Schubert ;; 2362b15cb3dSCy Schubert -psos*) 2372b15cb3dSCy Schubert os=-psos 2382b15cb3dSCy Schubert ;; 2392b15cb3dSCy Schubert -mint | -mint[0-9]*) 2402b15cb3dSCy Schubert basic_machine=m68k-atari 2412b15cb3dSCy Schubert os=-mint 2422b15cb3dSCy Schubert ;; 2432b15cb3dSCy Schubertesac 2442b15cb3dSCy Schubert 2452b15cb3dSCy Schubert# Decode aliases for certain CPU-COMPANY combinations. 2462b15cb3dSCy Schubertcase $basic_machine in 2472b15cb3dSCy Schubert # Recognize the basic CPU types without company name. 2482b15cb3dSCy Schubert # Some are omitted here because they have special meanings below. 2492b15cb3dSCy Schubert 1750a | 580 \ 2502b15cb3dSCy Schubert | a29k \ 251f0574f5cSXin LI | aarch64 | aarch64_be \ 2522b15cb3dSCy Schubert | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 2532b15cb3dSCy Schubert | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 2542b15cb3dSCy Schubert | am33_2.0 \ 255f0574f5cSXin LI | arc | arceb \ 256f0574f5cSXin LI | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 257f0574f5cSXin LI | avr | avr32 \ 258f0574f5cSXin LI | be32 | be64 \ 2592b15cb3dSCy Schubert | bfin \ 260f0574f5cSXin LI | c4x | c8051 | clipper \ 2612b15cb3dSCy Schubert | d10v | d30v | dlx | dsp16xx \ 262*2d4e511cSCy Schubert | epiphany \ 263*2d4e511cSCy Schubert | fido | fr30 | frv \ 2642b15cb3dSCy Schubert | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 265f0574f5cSXin LI | hexagon \ 2662b15cb3dSCy Schubert | i370 | i860 | i960 | ia64 \ 2672b15cb3dSCy Schubert | ip2k | iq2000 \ 268f0574f5cSXin LI | k1om \ 269f0574f5cSXin LI | le32 | le64 \ 2702b15cb3dSCy Schubert | lm32 \ 2712b15cb3dSCy Schubert | m32c | m32r | m32rle | m68000 | m68k | m88k \ 272f0574f5cSXin LI | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 2732b15cb3dSCy Schubert | mips | mipsbe | mipseb | mipsel | mipsle \ 2742b15cb3dSCy Schubert | mips16 \ 2752b15cb3dSCy Schubert | mips64 | mips64el \ 2762b15cb3dSCy Schubert | mips64octeon | mips64octeonel \ 2772b15cb3dSCy Schubert | mips64orion | mips64orionel \ 2782b15cb3dSCy Schubert | mips64r5900 | mips64r5900el \ 2792b15cb3dSCy Schubert | mips64vr | mips64vrel \ 2802b15cb3dSCy Schubert | mips64vr4100 | mips64vr4100el \ 2812b15cb3dSCy Schubert | mips64vr4300 | mips64vr4300el \ 2822b15cb3dSCy Schubert | mips64vr5000 | mips64vr5000el \ 2832b15cb3dSCy Schubert | mips64vr5900 | mips64vr5900el \ 2842b15cb3dSCy Schubert | mipsisa32 | mipsisa32el \ 2852b15cb3dSCy Schubert | mipsisa32r2 | mipsisa32r2el \ 286f0574f5cSXin LI | mipsisa32r6 | mipsisa32r6el \ 2872b15cb3dSCy Schubert | mipsisa64 | mipsisa64el \ 2882b15cb3dSCy Schubert | mipsisa64r2 | mipsisa64r2el \ 289f0574f5cSXin LI | mipsisa64r6 | mipsisa64r6el \ 2902b15cb3dSCy Schubert | mipsisa64sb1 | mipsisa64sb1el \ 2912b15cb3dSCy Schubert | mipsisa64sr71k | mipsisa64sr71kel \ 292f0574f5cSXin LI | mipsr5900 | mipsr5900el \ 2932b15cb3dSCy Schubert | mipstx39 | mipstx39el \ 2942b15cb3dSCy Schubert | mn10200 | mn10300 \ 2952b15cb3dSCy Schubert | moxie \ 2962b15cb3dSCy Schubert | mt \ 2972b15cb3dSCy Schubert | msp430 \ 2982b15cb3dSCy Schubert | nds32 | nds32le | nds32be \ 299f0574f5cSXin LI | nios | nios2 | nios2eb | nios2el \ 3002b15cb3dSCy Schubert | ns16k | ns32k \ 301f0574f5cSXin LI | open8 | or1k | or1knd | or32 \ 3022b15cb3dSCy Schubert | pdp10 | pdp11 | pj | pjl \ 303*2d4e511cSCy Schubert | powerpc | powerpc64 | powerpc64le | powerpcle \ 3042b15cb3dSCy Schubert | pyramid \ 305f0574f5cSXin LI | riscv32 | riscv64 \ 306f0574f5cSXin LI | rl78 | rx \ 3072b15cb3dSCy Schubert | score \ 3082b15cb3dSCy Schubert | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 3092b15cb3dSCy Schubert | sh64 | sh64le \ 3102b15cb3dSCy Schubert | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 3112b15cb3dSCy Schubert | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 3122b15cb3dSCy Schubert | spu \ 3132b15cb3dSCy Schubert | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 3142b15cb3dSCy Schubert | ubicom32 \ 3152b15cb3dSCy Schubert | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 316f0574f5cSXin LI | visium \ 3172b15cb3dSCy Schubert | we32k \ 3182b15cb3dSCy Schubert | x86 | xc16x | xstormy16 | xtensa \ 3192b15cb3dSCy Schubert | z8k | z80) 3202b15cb3dSCy Schubert basic_machine=$basic_machine-unknown 3212b15cb3dSCy Schubert ;; 3222b15cb3dSCy Schubert c54x) 3232b15cb3dSCy Schubert basic_machine=tic54x-unknown 3242b15cb3dSCy Schubert ;; 3252b15cb3dSCy Schubert c55x) 3262b15cb3dSCy Schubert basic_machine=tic55x-unknown 3272b15cb3dSCy Schubert ;; 3282b15cb3dSCy Schubert c6x) 3292b15cb3dSCy Schubert basic_machine=tic6x-unknown 3302b15cb3dSCy Schubert ;; 331f0574f5cSXin LI leon|leon[3-9]) 332f0574f5cSXin LI basic_machine=sparc-$basic_machine 333f0574f5cSXin LI ;; 334f0574f5cSXin LI m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) 3352b15cb3dSCy Schubert basic_machine=$basic_machine-unknown 3362b15cb3dSCy Schubert os=-none 3372b15cb3dSCy Schubert ;; 3382b15cb3dSCy Schubert m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 3392b15cb3dSCy Schubert ;; 3402b15cb3dSCy Schubert ms1) 3412b15cb3dSCy Schubert basic_machine=mt-unknown 3422b15cb3dSCy Schubert ;; 3432b15cb3dSCy Schubert 3442b15cb3dSCy Schubert strongarm | thumb | xscale) 3452b15cb3dSCy Schubert basic_machine=arm-unknown 3462b15cb3dSCy Schubert ;; 347f0574f5cSXin LI xgate) 348f0574f5cSXin LI basic_machine=$basic_machine-unknown 349f0574f5cSXin LI os=-none 350f0574f5cSXin LI ;; 3512b15cb3dSCy Schubert xscaleeb) 3522b15cb3dSCy Schubert basic_machine=armeb-unknown 3532b15cb3dSCy Schubert ;; 3542b15cb3dSCy Schubert 3552b15cb3dSCy Schubert xscaleel) 3562b15cb3dSCy Schubert basic_machine=armel-unknown 3572b15cb3dSCy Schubert ;; 3582b15cb3dSCy Schubert 3592b15cb3dSCy Schubert # We use `pc' rather than `unknown' 3602b15cb3dSCy Schubert # because (1) that's what they normally are, and 3612b15cb3dSCy Schubert # (2) the word "unknown" tends to confuse beginning users. 3622b15cb3dSCy Schubert i*86 | x86_64) 3632b15cb3dSCy Schubert basic_machine=$basic_machine-pc 3642b15cb3dSCy Schubert ;; 3652b15cb3dSCy Schubert # Object if more than one company name word. 3662b15cb3dSCy Schubert *-*-*) 3672b15cb3dSCy Schubert echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 3682b15cb3dSCy Schubert exit 1 3692b15cb3dSCy Schubert ;; 3702b15cb3dSCy Schubert # Recognize the basic CPU types with company name. 3712b15cb3dSCy Schubert 580-* \ 3722b15cb3dSCy Schubert | a29k-* \ 373f0574f5cSXin LI | aarch64-* | aarch64_be-* \ 3742b15cb3dSCy Schubert | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 3752b15cb3dSCy Schubert | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 376*2d4e511cSCy Schubert | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ 3772b15cb3dSCy Schubert | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 3782b15cb3dSCy Schubert | avr-* | avr32-* \ 379f0574f5cSXin LI | be32-* | be64-* \ 3802b15cb3dSCy Schubert | bfin-* | bs2000-* \ 3812b15cb3dSCy Schubert | c[123]* | c30-* | [cjt]90-* | c4x-* \ 382f0574f5cSXin LI | c8051-* | clipper-* | craynv-* | cydra-* \ 3832b15cb3dSCy Schubert | d10v-* | d30v-* | dlx-* \ 384*2d4e511cSCy Schubert | elxsi-* \ 3852b15cb3dSCy Schubert | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 3862b15cb3dSCy Schubert | h8300-* | h8500-* \ 3872b15cb3dSCy Schubert | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 388f0574f5cSXin LI | hexagon-* \ 3892b15cb3dSCy Schubert | i*86-* | i860-* | i960-* | ia64-* \ 3902b15cb3dSCy Schubert | ip2k-* | iq2000-* \ 391f0574f5cSXin LI | k1om-* \ 392f0574f5cSXin LI | le32-* | le64-* \ 3932b15cb3dSCy Schubert | lm32-* \ 3942b15cb3dSCy Schubert | m32c-* | m32r-* | m32rle-* \ 3952b15cb3dSCy Schubert | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 396f0574f5cSXin LI | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 397f0574f5cSXin LI | microblaze-* | microblazeel-* \ 3982b15cb3dSCy Schubert | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 3992b15cb3dSCy Schubert | mips16-* \ 4002b15cb3dSCy Schubert | mips64-* | mips64el-* \ 4012b15cb3dSCy Schubert | mips64octeon-* | mips64octeonel-* \ 4022b15cb3dSCy Schubert | mips64orion-* | mips64orionel-* \ 4032b15cb3dSCy Schubert | mips64r5900-* | mips64r5900el-* \ 4042b15cb3dSCy Schubert | mips64vr-* | mips64vrel-* \ 4052b15cb3dSCy Schubert | mips64vr4100-* | mips64vr4100el-* \ 4062b15cb3dSCy Schubert | mips64vr4300-* | mips64vr4300el-* \ 4072b15cb3dSCy Schubert | mips64vr5000-* | mips64vr5000el-* \ 4082b15cb3dSCy Schubert | mips64vr5900-* | mips64vr5900el-* \ 4092b15cb3dSCy Schubert | mipsisa32-* | mipsisa32el-* \ 4102b15cb3dSCy Schubert | mipsisa32r2-* | mipsisa32r2el-* \ 411f0574f5cSXin LI | mipsisa32r6-* | mipsisa32r6el-* \ 4122b15cb3dSCy Schubert | mipsisa64-* | mipsisa64el-* \ 4132b15cb3dSCy Schubert | mipsisa64r2-* | mipsisa64r2el-* \ 414f0574f5cSXin LI | mipsisa64r6-* | mipsisa64r6el-* \ 4152b15cb3dSCy Schubert | mipsisa64sb1-* | mipsisa64sb1el-* \ 4162b15cb3dSCy Schubert | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 417f0574f5cSXin LI | mipsr5900-* | mipsr5900el-* \ 4182b15cb3dSCy Schubert | mipstx39-* | mipstx39el-* \ 4192b15cb3dSCy Schubert | mmix-* \ 4202b15cb3dSCy Schubert | mt-* \ 4212b15cb3dSCy Schubert | msp430-* \ 4222b15cb3dSCy Schubert | nds32-* | nds32le-* | nds32be-* \ 423f0574f5cSXin LI | nios-* | nios2-* | nios2eb-* | nios2el-* \ 4242b15cb3dSCy Schubert | none-* | np1-* | ns16k-* | ns32k-* \ 4252b15cb3dSCy Schubert | open8-* \ 426f0574f5cSXin LI | or1k*-* \ 4272b15cb3dSCy Schubert | orion-* \ 4282b15cb3dSCy Schubert | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 429*2d4e511cSCy Schubert | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 4302b15cb3dSCy Schubert | pyramid-* \ 431f0574f5cSXin LI | rl78-* | romp-* | rs6000-* | rx-* \ 4322b15cb3dSCy Schubert | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 4332b15cb3dSCy Schubert | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 4342b15cb3dSCy Schubert | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 4352b15cb3dSCy Schubert | sparclite-* \ 4362b15cb3dSCy Schubert | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 4372b15cb3dSCy Schubert | tahoe-* \ 4382b15cb3dSCy Schubert | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 4392b15cb3dSCy Schubert | tile*-* \ 4402b15cb3dSCy Schubert | tron-* \ 4412b15cb3dSCy Schubert | ubicom32-* \ 4422b15cb3dSCy Schubert | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 4432b15cb3dSCy Schubert | vax-* \ 444f0574f5cSXin LI | visium-* \ 4452b15cb3dSCy Schubert | we32k-* \ 4462b15cb3dSCy Schubert | x86-* | x86_64-* | xc16x-* | xps100-* \ 4472b15cb3dSCy Schubert | xstormy16-* | xtensa*-* \ 4482b15cb3dSCy Schubert | ymp-* \ 4492b15cb3dSCy Schubert | z8k-* | z80-*) 4502b15cb3dSCy Schubert ;; 4512b15cb3dSCy Schubert # Recognize the basic CPU types without company name, with glob match. 4522b15cb3dSCy Schubert xtensa*) 4532b15cb3dSCy Schubert basic_machine=$basic_machine-unknown 4542b15cb3dSCy Schubert ;; 4552b15cb3dSCy Schubert # Recognize the various machine names and aliases which stand 4562b15cb3dSCy Schubert # for a CPU type and a company and sometimes even an OS. 4572b15cb3dSCy Schubert 386bsd) 4582b15cb3dSCy Schubert basic_machine=i386-unknown 4592b15cb3dSCy Schubert os=-bsd 4602b15cb3dSCy Schubert ;; 4612b15cb3dSCy Schubert 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 4622b15cb3dSCy Schubert basic_machine=m68000-att 4632b15cb3dSCy Schubert ;; 4642b15cb3dSCy Schubert 3b*) 4652b15cb3dSCy Schubert basic_machine=we32k-att 4662b15cb3dSCy Schubert ;; 4672b15cb3dSCy Schubert a29khif) 4682b15cb3dSCy Schubert basic_machine=a29k-amd 4692b15cb3dSCy Schubert os=-udi 4702b15cb3dSCy Schubert ;; 4712b15cb3dSCy Schubert abacus) 4722b15cb3dSCy Schubert basic_machine=abacus-unknown 4732b15cb3dSCy Schubert ;; 4742b15cb3dSCy Schubert adobe68k) 4752b15cb3dSCy Schubert basic_machine=m68010-adobe 4762b15cb3dSCy Schubert os=-scout 4772b15cb3dSCy Schubert ;; 4782b15cb3dSCy Schubert alliant | fx80) 4792b15cb3dSCy Schubert basic_machine=fx80-alliant 4802b15cb3dSCy Schubert ;; 4812b15cb3dSCy Schubert altos | altos3068) 4822b15cb3dSCy Schubert basic_machine=m68k-altos 4832b15cb3dSCy Schubert ;; 4842b15cb3dSCy Schubert am29k) 4852b15cb3dSCy Schubert basic_machine=a29k-none 4862b15cb3dSCy Schubert os=-bsd 4872b15cb3dSCy Schubert ;; 488*2d4e511cSCy Schubert amd64) 489*2d4e511cSCy Schubert basic_machine=x86_64-pc 490*2d4e511cSCy Schubert ;; 491*2d4e511cSCy Schubert amd64-*) 492*2d4e511cSCy Schubert basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 493*2d4e511cSCy Schubert ;; 4942b15cb3dSCy Schubert amdahl) 4952b15cb3dSCy Schubert basic_machine=580-amdahl 4962b15cb3dSCy Schubert os=-sysv 4972b15cb3dSCy Schubert ;; 4982b15cb3dSCy Schubert amiga | amiga-*) 4992b15cb3dSCy Schubert basic_machine=m68k-unknown 5002b15cb3dSCy Schubert ;; 5012b15cb3dSCy Schubert amigaos | amigados) 5022b15cb3dSCy Schubert basic_machine=m68k-unknown 5032b15cb3dSCy Schubert os=-amigaos 5042b15cb3dSCy Schubert ;; 5052b15cb3dSCy Schubert amigaunix | amix) 5062b15cb3dSCy Schubert basic_machine=m68k-unknown 5072b15cb3dSCy Schubert os=-sysv4 5082b15cb3dSCy Schubert ;; 5092b15cb3dSCy Schubert apollo68) 5102b15cb3dSCy Schubert basic_machine=m68k-apollo 5112b15cb3dSCy Schubert os=-sysv 5122b15cb3dSCy Schubert ;; 5132b15cb3dSCy Schubert apollo68bsd) 5142b15cb3dSCy Schubert basic_machine=m68k-apollo 5152b15cb3dSCy Schubert os=-bsd 5162b15cb3dSCy Schubert ;; 5172b15cb3dSCy Schubert aros) 5182b15cb3dSCy Schubert basic_machine=i386-pc 5192b15cb3dSCy Schubert os=-aros 5202b15cb3dSCy Schubert ;; 5212b15cb3dSCy Schubert aux) 5222b15cb3dSCy Schubert basic_machine=m68k-apple 5232b15cb3dSCy Schubert os=-aux 5242b15cb3dSCy Schubert ;; 5252b15cb3dSCy Schubert balance) 5262b15cb3dSCy Schubert basic_machine=ns32k-sequent 5272b15cb3dSCy Schubert os=-dynix 5282b15cb3dSCy Schubert ;; 5292b15cb3dSCy Schubert blackfin) 5302b15cb3dSCy Schubert basic_machine=bfin-unknown 5312b15cb3dSCy Schubert os=-linux 5322b15cb3dSCy Schubert ;; 5332b15cb3dSCy Schubert blackfin-*) 5342b15cb3dSCy Schubert basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 5352b15cb3dSCy Schubert os=-linux 5362b15cb3dSCy Schubert ;; 5372b15cb3dSCy Schubert bluegene*) 5382b15cb3dSCy Schubert basic_machine=powerpc-ibm 5392b15cb3dSCy Schubert os=-cnk 5402b15cb3dSCy Schubert ;; 5412b15cb3dSCy Schubert c54x-*) 5422b15cb3dSCy Schubert basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 5432b15cb3dSCy Schubert ;; 5442b15cb3dSCy Schubert c55x-*) 5452b15cb3dSCy Schubert basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 5462b15cb3dSCy Schubert ;; 5472b15cb3dSCy Schubert c6x-*) 5482b15cb3dSCy Schubert basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 5492b15cb3dSCy Schubert ;; 5502b15cb3dSCy Schubert c90) 5512b15cb3dSCy Schubert basic_machine=c90-cray 5522b15cb3dSCy Schubert os=-unicos 5532b15cb3dSCy Schubert ;; 5542b15cb3dSCy Schubert cegcc) 5552b15cb3dSCy Schubert basic_machine=arm-unknown 5562b15cb3dSCy Schubert os=-cegcc 5572b15cb3dSCy Schubert ;; 5582b15cb3dSCy Schubert convex-c1) 5592b15cb3dSCy Schubert basic_machine=c1-convex 5602b15cb3dSCy Schubert os=-bsd 5612b15cb3dSCy Schubert ;; 5622b15cb3dSCy Schubert convex-c2) 5632b15cb3dSCy Schubert basic_machine=c2-convex 5642b15cb3dSCy Schubert os=-bsd 5652b15cb3dSCy Schubert ;; 5662b15cb3dSCy Schubert convex-c32) 5672b15cb3dSCy Schubert basic_machine=c32-convex 5682b15cb3dSCy Schubert os=-bsd 5692b15cb3dSCy Schubert ;; 5702b15cb3dSCy Schubert convex-c34) 5712b15cb3dSCy Schubert basic_machine=c34-convex 5722b15cb3dSCy Schubert os=-bsd 5732b15cb3dSCy Schubert ;; 5742b15cb3dSCy Schubert convex-c38) 5752b15cb3dSCy Schubert basic_machine=c38-convex 5762b15cb3dSCy Schubert os=-bsd 5772b15cb3dSCy Schubert ;; 5782b15cb3dSCy Schubert cray | j90) 5792b15cb3dSCy Schubert basic_machine=j90-cray 5802b15cb3dSCy Schubert os=-unicos 5812b15cb3dSCy Schubert ;; 5822b15cb3dSCy Schubert craynv) 5832b15cb3dSCy Schubert basic_machine=craynv-cray 5842b15cb3dSCy Schubert os=-unicosmp 5852b15cb3dSCy Schubert ;; 5862b15cb3dSCy Schubert cr16 | cr16-*) 5872b15cb3dSCy Schubert basic_machine=cr16-unknown 5882b15cb3dSCy Schubert os=-elf 5892b15cb3dSCy Schubert ;; 5902b15cb3dSCy Schubert crds | unos) 5912b15cb3dSCy Schubert basic_machine=m68k-crds 5922b15cb3dSCy Schubert ;; 5932b15cb3dSCy Schubert crisv32 | crisv32-* | etraxfs*) 5942b15cb3dSCy Schubert basic_machine=crisv32-axis 5952b15cb3dSCy Schubert ;; 5962b15cb3dSCy Schubert cris | cris-* | etrax*) 5972b15cb3dSCy Schubert basic_machine=cris-axis 5982b15cb3dSCy Schubert ;; 5992b15cb3dSCy Schubert crx) 6002b15cb3dSCy Schubert basic_machine=crx-unknown 6012b15cb3dSCy Schubert os=-elf 6022b15cb3dSCy Schubert ;; 6032b15cb3dSCy Schubert da30 | da30-*) 6042b15cb3dSCy Schubert basic_machine=m68k-da30 6052b15cb3dSCy Schubert ;; 6062b15cb3dSCy Schubert decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 6072b15cb3dSCy Schubert basic_machine=mips-dec 6082b15cb3dSCy Schubert ;; 6092b15cb3dSCy Schubert decsystem10* | dec10*) 6102b15cb3dSCy Schubert basic_machine=pdp10-dec 6112b15cb3dSCy Schubert os=-tops10 6122b15cb3dSCy Schubert ;; 6132b15cb3dSCy Schubert decsystem20* | dec20*) 6142b15cb3dSCy Schubert basic_machine=pdp10-dec 6152b15cb3dSCy Schubert os=-tops20 6162b15cb3dSCy Schubert ;; 6172b15cb3dSCy Schubert delta | 3300 | motorola-3300 | motorola-delta \ 6182b15cb3dSCy Schubert | 3300-motorola | delta-motorola) 6192b15cb3dSCy Schubert basic_machine=m68k-motorola 6202b15cb3dSCy Schubert ;; 6212b15cb3dSCy Schubert delta88) 6222b15cb3dSCy Schubert basic_machine=m88k-motorola 6232b15cb3dSCy Schubert os=-sysv3 6242b15cb3dSCy Schubert ;; 6252b15cb3dSCy Schubert dicos) 6262b15cb3dSCy Schubert basic_machine=i686-pc 6272b15cb3dSCy Schubert os=-dicos 6282b15cb3dSCy Schubert ;; 6292b15cb3dSCy Schubert djgpp) 6302b15cb3dSCy Schubert basic_machine=i586-pc 6312b15cb3dSCy Schubert os=-msdosdjgpp 6322b15cb3dSCy Schubert ;; 6332b15cb3dSCy Schubert dpx20 | dpx20-*) 6342b15cb3dSCy Schubert basic_machine=rs6000-bull 6352b15cb3dSCy Schubert os=-bosx 6362b15cb3dSCy Schubert ;; 6372b15cb3dSCy Schubert dpx2* | dpx2*-bull) 6382b15cb3dSCy Schubert basic_machine=m68k-bull 6392b15cb3dSCy Schubert os=-sysv3 6402b15cb3dSCy Schubert ;; 6412b15cb3dSCy Schubert ebmon29k) 6422b15cb3dSCy Schubert basic_machine=a29k-amd 6432b15cb3dSCy Schubert os=-ebmon 6442b15cb3dSCy Schubert ;; 6452b15cb3dSCy Schubert elxsi) 6462b15cb3dSCy Schubert basic_machine=elxsi-elxsi 6472b15cb3dSCy Schubert os=-bsd 6482b15cb3dSCy Schubert ;; 6492b15cb3dSCy Schubert encore | umax | mmax) 6502b15cb3dSCy Schubert basic_machine=ns32k-encore 6512b15cb3dSCy Schubert ;; 6522b15cb3dSCy Schubert es1800 | OSE68k | ose68k | ose | OSE) 6532b15cb3dSCy Schubert basic_machine=m68k-ericsson 6542b15cb3dSCy Schubert os=-ose 6552b15cb3dSCy Schubert ;; 6562b15cb3dSCy Schubert fx2800) 6572b15cb3dSCy Schubert basic_machine=i860-alliant 6582b15cb3dSCy Schubert ;; 6592b15cb3dSCy Schubert genix) 6602b15cb3dSCy Schubert basic_machine=ns32k-ns 6612b15cb3dSCy Schubert ;; 6622b15cb3dSCy Schubert gmicro) 6632b15cb3dSCy Schubert basic_machine=tron-gmicro 6642b15cb3dSCy Schubert os=-sysv 6652b15cb3dSCy Schubert ;; 6662b15cb3dSCy Schubert go32) 6672b15cb3dSCy Schubert basic_machine=i386-pc 6682b15cb3dSCy Schubert os=-go32 6692b15cb3dSCy Schubert ;; 6702b15cb3dSCy Schubert h3050r* | hiux*) 6712b15cb3dSCy Schubert basic_machine=hppa1.1-hitachi 6722b15cb3dSCy Schubert os=-hiuxwe2 6732b15cb3dSCy Schubert ;; 6742b15cb3dSCy Schubert h8300hms) 6752b15cb3dSCy Schubert basic_machine=h8300-hitachi 6762b15cb3dSCy Schubert os=-hms 6772b15cb3dSCy Schubert ;; 6782b15cb3dSCy Schubert h8300xray) 6792b15cb3dSCy Schubert basic_machine=h8300-hitachi 6802b15cb3dSCy Schubert os=-xray 6812b15cb3dSCy Schubert ;; 6822b15cb3dSCy Schubert h8500hms) 6832b15cb3dSCy Schubert basic_machine=h8500-hitachi 6842b15cb3dSCy Schubert os=-hms 6852b15cb3dSCy Schubert ;; 6862b15cb3dSCy Schubert harris) 6872b15cb3dSCy Schubert basic_machine=m88k-harris 6882b15cb3dSCy Schubert os=-sysv3 6892b15cb3dSCy Schubert ;; 6902b15cb3dSCy Schubert hp300-*) 6912b15cb3dSCy Schubert basic_machine=m68k-hp 6922b15cb3dSCy Schubert ;; 6932b15cb3dSCy Schubert hp300bsd) 6942b15cb3dSCy Schubert basic_machine=m68k-hp 6952b15cb3dSCy Schubert os=-bsd 6962b15cb3dSCy Schubert ;; 6972b15cb3dSCy Schubert hp300hpux) 6982b15cb3dSCy Schubert basic_machine=m68k-hp 6992b15cb3dSCy Schubert os=-hpux 7002b15cb3dSCy Schubert ;; 7012b15cb3dSCy Schubert hp3k9[0-9][0-9] | hp9[0-9][0-9]) 7022b15cb3dSCy Schubert basic_machine=hppa1.0-hp 7032b15cb3dSCy Schubert ;; 7042b15cb3dSCy Schubert hp9k2[0-9][0-9] | hp9k31[0-9]) 7052b15cb3dSCy Schubert basic_machine=m68000-hp 7062b15cb3dSCy Schubert ;; 7072b15cb3dSCy Schubert hp9k3[2-9][0-9]) 7082b15cb3dSCy Schubert basic_machine=m68k-hp 7092b15cb3dSCy Schubert ;; 7102b15cb3dSCy Schubert hp9k6[0-9][0-9] | hp6[0-9][0-9]) 7112b15cb3dSCy Schubert basic_machine=hppa1.0-hp 7122b15cb3dSCy Schubert ;; 7132b15cb3dSCy Schubert hp9k7[0-79][0-9] | hp7[0-79][0-9]) 7142b15cb3dSCy Schubert basic_machine=hppa1.1-hp 7152b15cb3dSCy Schubert ;; 7162b15cb3dSCy Schubert hp9k78[0-9] | hp78[0-9]) 7172b15cb3dSCy Schubert # FIXME: really hppa2.0-hp 7182b15cb3dSCy Schubert basic_machine=hppa1.1-hp 7192b15cb3dSCy Schubert ;; 7202b15cb3dSCy Schubert hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 7212b15cb3dSCy Schubert # FIXME: really hppa2.0-hp 7222b15cb3dSCy Schubert basic_machine=hppa1.1-hp 7232b15cb3dSCy Schubert ;; 7242b15cb3dSCy Schubert hp9k8[0-9][13679] | hp8[0-9][13679]) 7252b15cb3dSCy Schubert basic_machine=hppa1.1-hp 7262b15cb3dSCy Schubert ;; 7272b15cb3dSCy Schubert hp9k8[0-9][0-9] | hp8[0-9][0-9]) 7282b15cb3dSCy Schubert basic_machine=hppa1.0-hp 7292b15cb3dSCy Schubert ;; 7302b15cb3dSCy Schubert hppa-next) 7312b15cb3dSCy Schubert os=-nextstep3 7322b15cb3dSCy Schubert ;; 7332b15cb3dSCy Schubert hppaosf) 7342b15cb3dSCy Schubert basic_machine=hppa1.1-hp 7352b15cb3dSCy Schubert os=-osf 7362b15cb3dSCy Schubert ;; 7372b15cb3dSCy Schubert hppro) 7382b15cb3dSCy Schubert basic_machine=hppa1.1-hp 7392b15cb3dSCy Schubert os=-proelf 7402b15cb3dSCy Schubert ;; 7412b15cb3dSCy Schubert i370-ibm* | ibm*) 7422b15cb3dSCy Schubert basic_machine=i370-ibm 7432b15cb3dSCy Schubert ;; 7442b15cb3dSCy Schubert i*86v32) 7452b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 7462b15cb3dSCy Schubert os=-sysv32 7472b15cb3dSCy Schubert ;; 7482b15cb3dSCy Schubert i*86v4*) 7492b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 7502b15cb3dSCy Schubert os=-sysv4 7512b15cb3dSCy Schubert ;; 7522b15cb3dSCy Schubert i*86v) 7532b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 7542b15cb3dSCy Schubert os=-sysv 7552b15cb3dSCy Schubert ;; 7562b15cb3dSCy Schubert i*86sol2) 7572b15cb3dSCy Schubert basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 7582b15cb3dSCy Schubert os=-solaris2 7592b15cb3dSCy Schubert ;; 7602b15cb3dSCy Schubert i386mach) 7612b15cb3dSCy Schubert basic_machine=i386-mach 7622b15cb3dSCy Schubert os=-mach 7632b15cb3dSCy Schubert ;; 7642b15cb3dSCy Schubert i386-vsta | vsta) 7652b15cb3dSCy Schubert basic_machine=i386-unknown 7662b15cb3dSCy Schubert os=-vsta 7672b15cb3dSCy Schubert ;; 7682b15cb3dSCy Schubert iris | iris4d) 7692b15cb3dSCy Schubert basic_machine=mips-sgi 7702b15cb3dSCy Schubert case $os in 7712b15cb3dSCy Schubert -irix*) 7722b15cb3dSCy Schubert ;; 7732b15cb3dSCy Schubert *) 7742b15cb3dSCy Schubert os=-irix4 7752b15cb3dSCy Schubert ;; 7762b15cb3dSCy Schubert esac 7772b15cb3dSCy Schubert ;; 7782b15cb3dSCy Schubert isi68 | isi) 7792b15cb3dSCy Schubert basic_machine=m68k-isi 7802b15cb3dSCy Schubert os=-sysv 7812b15cb3dSCy Schubert ;; 782f0574f5cSXin LI leon-*|leon[3-9]-*) 783f0574f5cSXin LI basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` 784f0574f5cSXin LI ;; 7852b15cb3dSCy Schubert m68knommu) 7862b15cb3dSCy Schubert basic_machine=m68k-unknown 7872b15cb3dSCy Schubert os=-linux 7882b15cb3dSCy Schubert ;; 7892b15cb3dSCy Schubert m68knommu-*) 7902b15cb3dSCy Schubert basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 7912b15cb3dSCy Schubert os=-linux 7922b15cb3dSCy Schubert ;; 7932b15cb3dSCy Schubert m88k-omron*) 7942b15cb3dSCy Schubert basic_machine=m88k-omron 7952b15cb3dSCy Schubert ;; 7962b15cb3dSCy Schubert magnum | m3230) 7972b15cb3dSCy Schubert basic_machine=mips-mips 7982b15cb3dSCy Schubert os=-sysv 7992b15cb3dSCy Schubert ;; 8002b15cb3dSCy Schubert merlin) 8012b15cb3dSCy Schubert basic_machine=ns32k-utek 8022b15cb3dSCy Schubert os=-sysv 8032b15cb3dSCy Schubert ;; 804f0574f5cSXin LI microblaze*) 8052b15cb3dSCy Schubert basic_machine=microblaze-xilinx 8062b15cb3dSCy Schubert ;; 807f0574f5cSXin LI mingw64) 808f0574f5cSXin LI basic_machine=x86_64-pc 809f0574f5cSXin LI os=-mingw64 810f0574f5cSXin LI ;; 8112b15cb3dSCy Schubert mingw32) 812f0574f5cSXin LI basic_machine=i686-pc 8132b15cb3dSCy Schubert os=-mingw32 8142b15cb3dSCy Schubert ;; 8152b15cb3dSCy Schubert mingw32ce) 8162b15cb3dSCy Schubert basic_machine=arm-unknown 8172b15cb3dSCy Schubert os=-mingw32ce 8182b15cb3dSCy Schubert ;; 8192b15cb3dSCy Schubert miniframe) 8202b15cb3dSCy Schubert basic_machine=m68000-convergent 8212b15cb3dSCy Schubert ;; 8222b15cb3dSCy Schubert *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 8232b15cb3dSCy Schubert basic_machine=m68k-atari 8242b15cb3dSCy Schubert os=-mint 8252b15cb3dSCy Schubert ;; 8262b15cb3dSCy Schubert mips3*-*) 8272b15cb3dSCy Schubert basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 8282b15cb3dSCy Schubert ;; 8292b15cb3dSCy Schubert mips3*) 8302b15cb3dSCy Schubert basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 8312b15cb3dSCy Schubert ;; 8322b15cb3dSCy Schubert monitor) 8332b15cb3dSCy Schubert basic_machine=m68k-rom68k 8342b15cb3dSCy Schubert os=-coff 8352b15cb3dSCy Schubert ;; 8362b15cb3dSCy Schubert morphos) 8372b15cb3dSCy Schubert basic_machine=powerpc-unknown 8382b15cb3dSCy Schubert os=-morphos 8392b15cb3dSCy Schubert ;; 840f0574f5cSXin LI moxiebox) 841f0574f5cSXin LI basic_machine=moxie-unknown 842f0574f5cSXin LI os=-moxiebox 843f0574f5cSXin LI ;; 8442b15cb3dSCy Schubert msdos) 8452b15cb3dSCy Schubert basic_machine=i386-pc 8462b15cb3dSCy Schubert os=-msdos 8472b15cb3dSCy Schubert ;; 8482b15cb3dSCy Schubert ms1-*) 8492b15cb3dSCy Schubert basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 8502b15cb3dSCy Schubert ;; 851f0574f5cSXin LI msys) 852f0574f5cSXin LI basic_machine=i686-pc 853f0574f5cSXin LI os=-msys 854f0574f5cSXin LI ;; 8552b15cb3dSCy Schubert mvs) 8562b15cb3dSCy Schubert basic_machine=i370-ibm 8572b15cb3dSCy Schubert os=-mvs 8582b15cb3dSCy Schubert ;; 859f0574f5cSXin LI nacl) 860f0574f5cSXin LI basic_machine=le32-unknown 861f0574f5cSXin LI os=-nacl 862f0574f5cSXin LI ;; 8632b15cb3dSCy Schubert ncr3000) 8642b15cb3dSCy Schubert basic_machine=i486-ncr 8652b15cb3dSCy Schubert os=-sysv4 8662b15cb3dSCy Schubert ;; 8672b15cb3dSCy Schubert netbsd386) 8682b15cb3dSCy Schubert basic_machine=i386-unknown 8692b15cb3dSCy Schubert os=-netbsd 8702b15cb3dSCy Schubert ;; 8712b15cb3dSCy Schubert netwinder) 8722b15cb3dSCy Schubert basic_machine=armv4l-rebel 8732b15cb3dSCy Schubert os=-linux 8742b15cb3dSCy Schubert ;; 8752b15cb3dSCy Schubert news | news700 | news800 | news900) 8762b15cb3dSCy Schubert basic_machine=m68k-sony 8772b15cb3dSCy Schubert os=-newsos 8782b15cb3dSCy Schubert ;; 8792b15cb3dSCy Schubert news1000) 8802b15cb3dSCy Schubert basic_machine=m68030-sony 8812b15cb3dSCy Schubert os=-newsos 8822b15cb3dSCy Schubert ;; 8832b15cb3dSCy Schubert news-3600 | risc-news) 8842b15cb3dSCy Schubert basic_machine=mips-sony 8852b15cb3dSCy Schubert os=-newsos 8862b15cb3dSCy Schubert ;; 8872b15cb3dSCy Schubert necv70) 8882b15cb3dSCy Schubert basic_machine=v70-nec 8892b15cb3dSCy Schubert os=-sysv 8902b15cb3dSCy Schubert ;; 8912b15cb3dSCy Schubert next | m*-next ) 8922b15cb3dSCy Schubert basic_machine=m68k-next 8932b15cb3dSCy Schubert case $os in 8942b15cb3dSCy Schubert -nextstep* ) 8952b15cb3dSCy Schubert ;; 8962b15cb3dSCy Schubert -ns2*) 8972b15cb3dSCy Schubert os=-nextstep2 8982b15cb3dSCy Schubert ;; 8992b15cb3dSCy Schubert *) 9002b15cb3dSCy Schubert os=-nextstep3 9012b15cb3dSCy Schubert ;; 9022b15cb3dSCy Schubert esac 9032b15cb3dSCy Schubert ;; 9042b15cb3dSCy Schubert nh3000) 9052b15cb3dSCy Schubert basic_machine=m68k-harris 9062b15cb3dSCy Schubert os=-cxux 9072b15cb3dSCy Schubert ;; 9082b15cb3dSCy Schubert nh[45]000) 9092b15cb3dSCy Schubert basic_machine=m88k-harris 9102b15cb3dSCy Schubert os=-cxux 9112b15cb3dSCy Schubert ;; 9122b15cb3dSCy Schubert nindy960) 9132b15cb3dSCy Schubert basic_machine=i960-intel 9142b15cb3dSCy Schubert os=-nindy 9152b15cb3dSCy Schubert ;; 9162b15cb3dSCy Schubert mon960) 9172b15cb3dSCy Schubert basic_machine=i960-intel 9182b15cb3dSCy Schubert os=-mon960 9192b15cb3dSCy Schubert ;; 9202b15cb3dSCy Schubert nonstopux) 9212b15cb3dSCy Schubert basic_machine=mips-compaq 9222b15cb3dSCy Schubert os=-nonstopux 9232b15cb3dSCy Schubert ;; 9242b15cb3dSCy Schubert np1) 9252b15cb3dSCy Schubert basic_machine=np1-gould 9262b15cb3dSCy Schubert ;; 9272b15cb3dSCy Schubert neo-tandem) 9282b15cb3dSCy Schubert basic_machine=neo-tandem 9292b15cb3dSCy Schubert ;; 9302b15cb3dSCy Schubert nse-tandem) 9312b15cb3dSCy Schubert basic_machine=nse-tandem 9322b15cb3dSCy Schubert ;; 9332b15cb3dSCy Schubert nsr-tandem) 9342b15cb3dSCy Schubert basic_machine=nsr-tandem 9352b15cb3dSCy Schubert ;; 9362b15cb3dSCy Schubert op50n-* | op60c-*) 9372b15cb3dSCy Schubert basic_machine=hppa1.1-oki 9382b15cb3dSCy Schubert os=-proelf 9392b15cb3dSCy Schubert ;; 9402b15cb3dSCy Schubert openrisc | openrisc-*) 9412b15cb3dSCy Schubert basic_machine=or32-unknown 9422b15cb3dSCy Schubert ;; 9432b15cb3dSCy Schubert os400) 9442b15cb3dSCy Schubert basic_machine=powerpc-ibm 9452b15cb3dSCy Schubert os=-os400 9462b15cb3dSCy Schubert ;; 9472b15cb3dSCy Schubert OSE68000 | ose68000) 9482b15cb3dSCy Schubert basic_machine=m68000-ericsson 9492b15cb3dSCy Schubert os=-ose 9502b15cb3dSCy Schubert ;; 9512b15cb3dSCy Schubert os68k) 9522b15cb3dSCy Schubert basic_machine=m68k-none 9532b15cb3dSCy Schubert os=-os68k 9542b15cb3dSCy Schubert ;; 9552b15cb3dSCy Schubert pa-hitachi) 9562b15cb3dSCy Schubert basic_machine=hppa1.1-hitachi 9572b15cb3dSCy Schubert os=-hiuxwe2 9582b15cb3dSCy Schubert ;; 9592b15cb3dSCy Schubert paragon) 9602b15cb3dSCy Schubert basic_machine=i860-intel 9612b15cb3dSCy Schubert os=-osf 9622b15cb3dSCy Schubert ;; 9632b15cb3dSCy Schubert parisc) 9642b15cb3dSCy Schubert basic_machine=hppa-unknown 9652b15cb3dSCy Schubert os=-linux 9662b15cb3dSCy Schubert ;; 9672b15cb3dSCy Schubert parisc-*) 9682b15cb3dSCy Schubert basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 9692b15cb3dSCy Schubert os=-linux 9702b15cb3dSCy Schubert ;; 9712b15cb3dSCy Schubert pbd) 9722b15cb3dSCy Schubert basic_machine=sparc-tti 9732b15cb3dSCy Schubert ;; 9742b15cb3dSCy Schubert pbb) 9752b15cb3dSCy Schubert basic_machine=m68k-tti 9762b15cb3dSCy Schubert ;; 9772b15cb3dSCy Schubert pc532 | pc532-*) 9782b15cb3dSCy Schubert basic_machine=ns32k-pc532 9792b15cb3dSCy Schubert ;; 9802b15cb3dSCy Schubert pc98) 9812b15cb3dSCy Schubert basic_machine=i386-pc 9822b15cb3dSCy Schubert ;; 9832b15cb3dSCy Schubert pc98-*) 9842b15cb3dSCy Schubert basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 9852b15cb3dSCy Schubert ;; 9862b15cb3dSCy Schubert pentium | p5 | k5 | k6 | nexgen | viac3) 9872b15cb3dSCy Schubert basic_machine=i586-pc 9882b15cb3dSCy Schubert ;; 9892b15cb3dSCy Schubert pentiumpro | p6 | 6x86 | athlon | athlon_*) 9902b15cb3dSCy Schubert basic_machine=i686-pc 9912b15cb3dSCy Schubert ;; 9922b15cb3dSCy Schubert pentiumii | pentium2 | pentiumiii | pentium3) 9932b15cb3dSCy Schubert basic_machine=i686-pc 9942b15cb3dSCy Schubert ;; 9952b15cb3dSCy Schubert pentium4) 9962b15cb3dSCy Schubert basic_machine=i786-pc 9972b15cb3dSCy Schubert ;; 9982b15cb3dSCy Schubert pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 9992b15cb3dSCy Schubert basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 10002b15cb3dSCy Schubert ;; 10012b15cb3dSCy Schubert pentiumpro-* | p6-* | 6x86-* | athlon-*) 10022b15cb3dSCy Schubert basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 10032b15cb3dSCy Schubert ;; 10042b15cb3dSCy Schubert pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 10052b15cb3dSCy Schubert basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 10062b15cb3dSCy Schubert ;; 10072b15cb3dSCy Schubert pentium4-*) 10082b15cb3dSCy Schubert basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 10092b15cb3dSCy Schubert ;; 10102b15cb3dSCy Schubert pn) 10112b15cb3dSCy Schubert basic_machine=pn-gould 10122b15cb3dSCy Schubert ;; 10132b15cb3dSCy Schubert power) basic_machine=power-ibm 10142b15cb3dSCy Schubert ;; 10152b15cb3dSCy Schubert ppc | ppcbe) basic_machine=powerpc-unknown 10162b15cb3dSCy Schubert ;; 10172b15cb3dSCy Schubert ppc-* | ppcbe-*) 10182b15cb3dSCy Schubert basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 10192b15cb3dSCy Schubert ;; 10202b15cb3dSCy Schubert ppcle | powerpclittle | ppc-le | powerpc-little) 10212b15cb3dSCy Schubert basic_machine=powerpcle-unknown 10222b15cb3dSCy Schubert ;; 10232b15cb3dSCy Schubert ppcle-* | powerpclittle-*) 10242b15cb3dSCy Schubert basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 10252b15cb3dSCy Schubert ;; 10262b15cb3dSCy Schubert ppc64) basic_machine=powerpc64-unknown 10272b15cb3dSCy Schubert ;; 10282b15cb3dSCy Schubert ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 10292b15cb3dSCy Schubert ;; 10302b15cb3dSCy Schubert ppc64le | powerpc64little | ppc64-le | powerpc64-little) 10312b15cb3dSCy Schubert basic_machine=powerpc64le-unknown 10322b15cb3dSCy Schubert ;; 10332b15cb3dSCy Schubert ppc64le-* | powerpc64little-*) 10342b15cb3dSCy Schubert basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 10352b15cb3dSCy Schubert ;; 10362b15cb3dSCy Schubert ps2) 10372b15cb3dSCy Schubert basic_machine=i386-ibm 10382b15cb3dSCy Schubert ;; 10392b15cb3dSCy Schubert pw32) 10402b15cb3dSCy Schubert basic_machine=i586-unknown 10412b15cb3dSCy Schubert os=-pw32 10422b15cb3dSCy Schubert ;; 1043f0574f5cSXin LI rdos | rdos64) 1044f0574f5cSXin LI basic_machine=x86_64-pc 1045f0574f5cSXin LI os=-rdos 1046f0574f5cSXin LI ;; 1047f0574f5cSXin LI rdos32) 10482b15cb3dSCy Schubert basic_machine=i386-pc 10492b15cb3dSCy Schubert os=-rdos 10502b15cb3dSCy Schubert ;; 10512b15cb3dSCy Schubert rom68k) 10522b15cb3dSCy Schubert basic_machine=m68k-rom68k 10532b15cb3dSCy Schubert os=-coff 10542b15cb3dSCy Schubert ;; 10552b15cb3dSCy Schubert rm[46]00) 10562b15cb3dSCy Schubert basic_machine=mips-siemens 10572b15cb3dSCy Schubert ;; 10582b15cb3dSCy Schubert rtpc | rtpc-*) 10592b15cb3dSCy Schubert basic_machine=romp-ibm 10602b15cb3dSCy Schubert ;; 10612b15cb3dSCy Schubert s390 | s390-*) 10622b15cb3dSCy Schubert basic_machine=s390-ibm 10632b15cb3dSCy Schubert ;; 10642b15cb3dSCy Schubert s390x | s390x-*) 10652b15cb3dSCy Schubert basic_machine=s390x-ibm 10662b15cb3dSCy Schubert ;; 10672b15cb3dSCy Schubert sa29200) 10682b15cb3dSCy Schubert basic_machine=a29k-amd 10692b15cb3dSCy Schubert os=-udi 10702b15cb3dSCy Schubert ;; 10712b15cb3dSCy Schubert sb1) 10722b15cb3dSCy Schubert basic_machine=mipsisa64sb1-unknown 10732b15cb3dSCy Schubert ;; 10742b15cb3dSCy Schubert sb1el) 10752b15cb3dSCy Schubert basic_machine=mipsisa64sb1el-unknown 10762b15cb3dSCy Schubert ;; 10772b15cb3dSCy Schubert sde) 10782b15cb3dSCy Schubert basic_machine=mipsisa32-sde 10792b15cb3dSCy Schubert os=-elf 10802b15cb3dSCy Schubert ;; 10812b15cb3dSCy Schubert sei) 10822b15cb3dSCy Schubert basic_machine=mips-sei 10832b15cb3dSCy Schubert os=-seiux 10842b15cb3dSCy Schubert ;; 10852b15cb3dSCy Schubert sequent) 10862b15cb3dSCy Schubert basic_machine=i386-sequent 10872b15cb3dSCy Schubert ;; 10882b15cb3dSCy Schubert sh) 10892b15cb3dSCy Schubert basic_machine=sh-hitachi 10902b15cb3dSCy Schubert os=-hms 10912b15cb3dSCy Schubert ;; 10922b15cb3dSCy Schubert sh5el) 10932b15cb3dSCy Schubert basic_machine=sh5le-unknown 10942b15cb3dSCy Schubert ;; 10952b15cb3dSCy Schubert sh64) 10962b15cb3dSCy Schubert basic_machine=sh64-unknown 10972b15cb3dSCy Schubert ;; 10982b15cb3dSCy Schubert sparclite-wrs | simso-wrs) 10992b15cb3dSCy Schubert basic_machine=sparclite-wrs 11002b15cb3dSCy Schubert os=-vxworks 11012b15cb3dSCy Schubert ;; 11022b15cb3dSCy Schubert sps7) 11032b15cb3dSCy Schubert basic_machine=m68k-bull 11042b15cb3dSCy Schubert os=-sysv2 11052b15cb3dSCy Schubert ;; 11062b15cb3dSCy Schubert spur) 11072b15cb3dSCy Schubert basic_machine=spur-unknown 11082b15cb3dSCy Schubert ;; 11092b15cb3dSCy Schubert st2000) 11102b15cb3dSCy Schubert basic_machine=m68k-tandem 11112b15cb3dSCy Schubert ;; 11122b15cb3dSCy Schubert stratus) 11132b15cb3dSCy Schubert basic_machine=i860-stratus 11142b15cb3dSCy Schubert os=-sysv4 11152b15cb3dSCy Schubert ;; 11162b15cb3dSCy Schubert strongarm-* | thumb-*) 11172b15cb3dSCy Schubert basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` 11182b15cb3dSCy Schubert ;; 11192b15cb3dSCy Schubert sun2) 11202b15cb3dSCy Schubert basic_machine=m68000-sun 11212b15cb3dSCy Schubert ;; 11222b15cb3dSCy Schubert sun2os3) 11232b15cb3dSCy Schubert basic_machine=m68000-sun 11242b15cb3dSCy Schubert os=-sunos3 11252b15cb3dSCy Schubert ;; 11262b15cb3dSCy Schubert sun2os4) 11272b15cb3dSCy Schubert basic_machine=m68000-sun 11282b15cb3dSCy Schubert os=-sunos4 11292b15cb3dSCy Schubert ;; 11302b15cb3dSCy Schubert sun3os3) 11312b15cb3dSCy Schubert basic_machine=m68k-sun 11322b15cb3dSCy Schubert os=-sunos3 11332b15cb3dSCy Schubert ;; 11342b15cb3dSCy Schubert sun3os4) 11352b15cb3dSCy Schubert basic_machine=m68k-sun 11362b15cb3dSCy Schubert os=-sunos4 11372b15cb3dSCy Schubert ;; 11382b15cb3dSCy Schubert sun4os3) 11392b15cb3dSCy Schubert basic_machine=sparc-sun 11402b15cb3dSCy Schubert os=-sunos3 11412b15cb3dSCy Schubert ;; 11422b15cb3dSCy Schubert sun4os4) 11432b15cb3dSCy Schubert basic_machine=sparc-sun 11442b15cb3dSCy Schubert os=-sunos4 11452b15cb3dSCy Schubert ;; 11462b15cb3dSCy Schubert sun4sol2) 11472b15cb3dSCy Schubert basic_machine=sparc-sun 11482b15cb3dSCy Schubert os=-solaris2 11492b15cb3dSCy Schubert ;; 11502b15cb3dSCy Schubert sun3 | sun3-*) 11512b15cb3dSCy Schubert basic_machine=m68k-sun 11522b15cb3dSCy Schubert ;; 11532b15cb3dSCy Schubert sun4) 11542b15cb3dSCy Schubert basic_machine=sparc-sun 11552b15cb3dSCy Schubert ;; 11562b15cb3dSCy Schubert sun386 | sun386i | roadrunner) 11572b15cb3dSCy Schubert basic_machine=i386-sun 11582b15cb3dSCy Schubert ;; 11592b15cb3dSCy Schubert sv1) 11602b15cb3dSCy Schubert basic_machine=sv1-cray 11612b15cb3dSCy Schubert os=-unicos 11622b15cb3dSCy Schubert ;; 11632b15cb3dSCy Schubert symmetry) 11642b15cb3dSCy Schubert basic_machine=i386-sequent 11652b15cb3dSCy Schubert os=-dynix 11662b15cb3dSCy Schubert ;; 11672b15cb3dSCy Schubert t3e) 11682b15cb3dSCy Schubert basic_machine=alphaev5-cray 11692b15cb3dSCy Schubert os=-unicos 11702b15cb3dSCy Schubert ;; 11712b15cb3dSCy Schubert t90) 11722b15cb3dSCy Schubert basic_machine=t90-cray 11732b15cb3dSCy Schubert os=-unicos 11742b15cb3dSCy Schubert ;; 11752b15cb3dSCy Schubert tile*) 11762b15cb3dSCy Schubert basic_machine=$basic_machine-unknown 11772b15cb3dSCy Schubert os=-linux-gnu 11782b15cb3dSCy Schubert ;; 11792b15cb3dSCy Schubert tx39) 11802b15cb3dSCy Schubert basic_machine=mipstx39-unknown 11812b15cb3dSCy Schubert ;; 11822b15cb3dSCy Schubert tx39el) 11832b15cb3dSCy Schubert basic_machine=mipstx39el-unknown 11842b15cb3dSCy Schubert ;; 11852b15cb3dSCy Schubert toad1) 11862b15cb3dSCy Schubert basic_machine=pdp10-xkl 11872b15cb3dSCy Schubert os=-tops20 11882b15cb3dSCy Schubert ;; 11892b15cb3dSCy Schubert tower | tower-32) 11902b15cb3dSCy Schubert basic_machine=m68k-ncr 11912b15cb3dSCy Schubert ;; 11922b15cb3dSCy Schubert tpf) 11932b15cb3dSCy Schubert basic_machine=s390x-ibm 11942b15cb3dSCy Schubert os=-tpf 11952b15cb3dSCy Schubert ;; 11962b15cb3dSCy Schubert udi29k) 11972b15cb3dSCy Schubert basic_machine=a29k-amd 11982b15cb3dSCy Schubert os=-udi 11992b15cb3dSCy Schubert ;; 12002b15cb3dSCy Schubert ultra3) 12012b15cb3dSCy Schubert basic_machine=a29k-nyu 12022b15cb3dSCy Schubert os=-sym1 12032b15cb3dSCy Schubert ;; 12042b15cb3dSCy Schubert v810 | necv810) 12052b15cb3dSCy Schubert basic_machine=v810-nec 12062b15cb3dSCy Schubert os=-none 12072b15cb3dSCy Schubert ;; 12082b15cb3dSCy Schubert vaxv) 12092b15cb3dSCy Schubert basic_machine=vax-dec 12102b15cb3dSCy Schubert os=-sysv 12112b15cb3dSCy Schubert ;; 12122b15cb3dSCy Schubert vms) 12132b15cb3dSCy Schubert basic_machine=vax-dec 12142b15cb3dSCy Schubert os=-vms 12152b15cb3dSCy Schubert ;; 12162b15cb3dSCy Schubert vpp*|vx|vx-*) 12172b15cb3dSCy Schubert basic_machine=f301-fujitsu 12182b15cb3dSCy Schubert ;; 12192b15cb3dSCy Schubert vxworks960) 12202b15cb3dSCy Schubert basic_machine=i960-wrs 12212b15cb3dSCy Schubert os=-vxworks 12222b15cb3dSCy Schubert ;; 12232b15cb3dSCy Schubert vxworks68) 12242b15cb3dSCy Schubert basic_machine=m68k-wrs 12252b15cb3dSCy Schubert os=-vxworks 12262b15cb3dSCy Schubert ;; 12272b15cb3dSCy Schubert vxworks29k) 12282b15cb3dSCy Schubert basic_machine=a29k-wrs 12292b15cb3dSCy Schubert os=-vxworks 12302b15cb3dSCy Schubert ;; 12312b15cb3dSCy Schubert w65*) 12322b15cb3dSCy Schubert basic_machine=w65-wdc 12332b15cb3dSCy Schubert os=-none 12342b15cb3dSCy Schubert ;; 12352b15cb3dSCy Schubert w89k-*) 12362b15cb3dSCy Schubert basic_machine=hppa1.1-winbond 12372b15cb3dSCy Schubert os=-proelf 12382b15cb3dSCy Schubert ;; 12392b15cb3dSCy Schubert xbox) 12402b15cb3dSCy Schubert basic_machine=i686-pc 12412b15cb3dSCy Schubert os=-mingw32 12422b15cb3dSCy Schubert ;; 12432b15cb3dSCy Schubert xps | xps100) 12442b15cb3dSCy Schubert basic_machine=xps100-honeywell 12452b15cb3dSCy Schubert ;; 12462b15cb3dSCy Schubert xscale-* | xscalee[bl]-*) 12472b15cb3dSCy Schubert basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` 12482b15cb3dSCy Schubert ;; 12492b15cb3dSCy Schubert ymp) 12502b15cb3dSCy Schubert basic_machine=ymp-cray 12512b15cb3dSCy Schubert os=-unicos 12522b15cb3dSCy Schubert ;; 12532b15cb3dSCy Schubert z8k-*-coff) 12542b15cb3dSCy Schubert basic_machine=z8k-unknown 12552b15cb3dSCy Schubert os=-sim 12562b15cb3dSCy Schubert ;; 12572b15cb3dSCy Schubert z80-*-coff) 12582b15cb3dSCy Schubert basic_machine=z80-unknown 12592b15cb3dSCy Schubert os=-sim 12602b15cb3dSCy Schubert ;; 12612b15cb3dSCy Schubert none) 12622b15cb3dSCy Schubert basic_machine=none-none 12632b15cb3dSCy Schubert os=-none 12642b15cb3dSCy Schubert ;; 12652b15cb3dSCy Schubert 12662b15cb3dSCy Schubert# Here we handle the default manufacturer of certain CPU types. It is in 12672b15cb3dSCy Schubert# some cases the only manufacturer, in others, it is the most popular. 12682b15cb3dSCy Schubert w89k) 12692b15cb3dSCy Schubert basic_machine=hppa1.1-winbond 12702b15cb3dSCy Schubert ;; 12712b15cb3dSCy Schubert op50n) 12722b15cb3dSCy Schubert basic_machine=hppa1.1-oki 12732b15cb3dSCy Schubert ;; 12742b15cb3dSCy Schubert op60c) 12752b15cb3dSCy Schubert basic_machine=hppa1.1-oki 12762b15cb3dSCy Schubert ;; 12772b15cb3dSCy Schubert romp) 12782b15cb3dSCy Schubert basic_machine=romp-ibm 12792b15cb3dSCy Schubert ;; 12802b15cb3dSCy Schubert mmix) 12812b15cb3dSCy Schubert basic_machine=mmix-knuth 12822b15cb3dSCy Schubert ;; 12832b15cb3dSCy Schubert rs6000) 12842b15cb3dSCy Schubert basic_machine=rs6000-ibm 12852b15cb3dSCy Schubert ;; 12862b15cb3dSCy Schubert vax) 12872b15cb3dSCy Schubert basic_machine=vax-dec 12882b15cb3dSCy Schubert ;; 12892b15cb3dSCy Schubert pdp10) 12902b15cb3dSCy Schubert # there are many clones, so DEC is not a safe bet 12912b15cb3dSCy Schubert basic_machine=pdp10-unknown 12922b15cb3dSCy Schubert ;; 12932b15cb3dSCy Schubert pdp11) 12942b15cb3dSCy Schubert basic_machine=pdp11-dec 12952b15cb3dSCy Schubert ;; 12962b15cb3dSCy Schubert we32k) 12972b15cb3dSCy Schubert basic_machine=we32k-att 12982b15cb3dSCy Schubert ;; 12992b15cb3dSCy Schubert sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 13002b15cb3dSCy Schubert basic_machine=sh-unknown 13012b15cb3dSCy Schubert ;; 13022b15cb3dSCy Schubert sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 13032b15cb3dSCy Schubert basic_machine=sparc-sun 13042b15cb3dSCy Schubert ;; 13052b15cb3dSCy Schubert cydra) 13062b15cb3dSCy Schubert basic_machine=cydra-cydrome 13072b15cb3dSCy Schubert ;; 13082b15cb3dSCy Schubert orion) 13092b15cb3dSCy Schubert basic_machine=orion-highlevel 13102b15cb3dSCy Schubert ;; 13112b15cb3dSCy Schubert orion105) 13122b15cb3dSCy Schubert basic_machine=clipper-highlevel 13132b15cb3dSCy Schubert ;; 13142b15cb3dSCy Schubert mac | mpw | mac-mpw) 13152b15cb3dSCy Schubert basic_machine=m68k-apple 13162b15cb3dSCy Schubert ;; 13172b15cb3dSCy Schubert pmac | pmac-mpw) 13182b15cb3dSCy Schubert basic_machine=powerpc-apple 13192b15cb3dSCy Schubert ;; 13202b15cb3dSCy Schubert *-unknown) 13212b15cb3dSCy Schubert # Make sure to match an already-canonicalized machine name. 13222b15cb3dSCy Schubert ;; 13232b15cb3dSCy Schubert *) 13242b15cb3dSCy Schubert echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 13252b15cb3dSCy Schubert exit 1 13262b15cb3dSCy Schubert ;; 13272b15cb3dSCy Schubertesac 13282b15cb3dSCy Schubert 13292b15cb3dSCy Schubert# Here we canonicalize certain aliases for manufacturers. 13302b15cb3dSCy Schubertcase $basic_machine in 13312b15cb3dSCy Schubert *-digital*) 13322b15cb3dSCy Schubert basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 13332b15cb3dSCy Schubert ;; 13342b15cb3dSCy Schubert *-commodore*) 13352b15cb3dSCy Schubert basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 13362b15cb3dSCy Schubert ;; 13372b15cb3dSCy Schubert *) 13382b15cb3dSCy Schubert ;; 13392b15cb3dSCy Schubertesac 13402b15cb3dSCy Schubert 13412b15cb3dSCy Schubert# Decode manufacturer-specific aliases for certain operating systems. 13422b15cb3dSCy Schubert 13432b15cb3dSCy Schubertif [ x"$os" != x"" ] 13442b15cb3dSCy Schubertthen 13452b15cb3dSCy Schubertcase $os in 13462b15cb3dSCy Schubert # First match some system type aliases 13472b15cb3dSCy Schubert # that might get confused with valid system types. 13482b15cb3dSCy Schubert # -solaris* is a basic system type, with this one exception. 13492b15cb3dSCy Schubert -auroraux) 13502b15cb3dSCy Schubert os=-auroraux 13512b15cb3dSCy Schubert ;; 13522b15cb3dSCy Schubert -solaris1 | -solaris1.*) 13532b15cb3dSCy Schubert os=`echo $os | sed -e 's|solaris1|sunos4|'` 13542b15cb3dSCy Schubert ;; 13552b15cb3dSCy Schubert -solaris) 13562b15cb3dSCy Schubert os=-solaris2 13572b15cb3dSCy Schubert ;; 13582b15cb3dSCy Schubert -svr4*) 13592b15cb3dSCy Schubert os=-sysv4 13602b15cb3dSCy Schubert ;; 13612b15cb3dSCy Schubert -unixware*) 13622b15cb3dSCy Schubert os=-sysv4.2uw 13632b15cb3dSCy Schubert ;; 13642b15cb3dSCy Schubert -gnu/linux*) 13652b15cb3dSCy Schubert os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 13662b15cb3dSCy Schubert ;; 13672b15cb3dSCy Schubert # First accept the basic system types. 13682b15cb3dSCy Schubert # The portable systems comes first. 13692b15cb3dSCy Schubert # Each alternative MUST END IN A *, to match a version number. 13702b15cb3dSCy Schubert # -sysv* is not here because it comes later, after sysvr4. 13712b15cb3dSCy Schubert -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 13722b15cb3dSCy Schubert | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 13732b15cb3dSCy Schubert | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 1374f0574f5cSXin LI | -sym* | -kopensolaris* | -plan9* \ 13752b15cb3dSCy Schubert | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1376*2d4e511cSCy Schubert | -aos* | -aros* \ 13772b15cb3dSCy Schubert | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 13782b15cb3dSCy Schubert | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 13792b15cb3dSCy Schubert | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1380f0574f5cSXin LI | -bitrig* | -openbsd* | -solidbsd* \ 13812b15cb3dSCy Schubert | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 13822b15cb3dSCy Schubert | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 13832b15cb3dSCy Schubert | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 13842b15cb3dSCy Schubert | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 13852b15cb3dSCy Schubert | -chorusos* | -chorusrdb* | -cegcc* \ 1386f0574f5cSXin LI | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1387f0574f5cSXin LI | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 1388f0574f5cSXin LI | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 1389f0574f5cSXin LI | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ 13902b15cb3dSCy Schubert | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 13912b15cb3dSCy Schubert | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 13922b15cb3dSCy Schubert | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 13932b15cb3dSCy Schubert | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 13942b15cb3dSCy Schubert | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 13952b15cb3dSCy Schubert | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1396f0574f5cSXin LI | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) 13972b15cb3dSCy Schubert # Remember, each alternative MUST END IN *, to match a version number. 13982b15cb3dSCy Schubert ;; 13992b15cb3dSCy Schubert -qnx*) 14002b15cb3dSCy Schubert case $basic_machine in 14012b15cb3dSCy Schubert x86-* | i*86-*) 14022b15cb3dSCy Schubert ;; 14032b15cb3dSCy Schubert *) 14042b15cb3dSCy Schubert os=-nto$os 14052b15cb3dSCy Schubert ;; 14062b15cb3dSCy Schubert esac 14072b15cb3dSCy Schubert ;; 14082b15cb3dSCy Schubert -nto-qnx*) 14092b15cb3dSCy Schubert ;; 14102b15cb3dSCy Schubert -nto*) 14112b15cb3dSCy Schubert os=`echo $os | sed -e 's|nto|nto-qnx|'` 14122b15cb3dSCy Schubert ;; 14132b15cb3dSCy Schubert -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 14142b15cb3dSCy Schubert | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 14152b15cb3dSCy Schubert | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 14162b15cb3dSCy Schubert ;; 14172b15cb3dSCy Schubert -mac*) 14182b15cb3dSCy Schubert os=`echo $os | sed -e 's|mac|macos|'` 14192b15cb3dSCy Schubert ;; 14202b15cb3dSCy Schubert -linux-dietlibc) 14212b15cb3dSCy Schubert os=-linux-dietlibc 14222b15cb3dSCy Schubert ;; 14232b15cb3dSCy Schubert -linux*) 14242b15cb3dSCy Schubert os=`echo $os | sed -e 's|linux|linux-gnu|'` 14252b15cb3dSCy Schubert ;; 14262b15cb3dSCy Schubert -sunos5*) 14272b15cb3dSCy Schubert os=`echo $os | sed -e 's|sunos5|solaris2|'` 14282b15cb3dSCy Schubert ;; 14292b15cb3dSCy Schubert -sunos6*) 14302b15cb3dSCy Schubert os=`echo $os | sed -e 's|sunos6|solaris3|'` 14312b15cb3dSCy Schubert ;; 14322b15cb3dSCy Schubert -opened*) 14332b15cb3dSCy Schubert os=-openedition 14342b15cb3dSCy Schubert ;; 14352b15cb3dSCy Schubert -os400*) 14362b15cb3dSCy Schubert os=-os400 14372b15cb3dSCy Schubert ;; 14382b15cb3dSCy Schubert -wince*) 14392b15cb3dSCy Schubert os=-wince 14402b15cb3dSCy Schubert ;; 14412b15cb3dSCy Schubert -osfrose*) 14422b15cb3dSCy Schubert os=-osfrose 14432b15cb3dSCy Schubert ;; 14442b15cb3dSCy Schubert -osf*) 14452b15cb3dSCy Schubert os=-osf 14462b15cb3dSCy Schubert ;; 14472b15cb3dSCy Schubert -utek*) 14482b15cb3dSCy Schubert os=-bsd 14492b15cb3dSCy Schubert ;; 14502b15cb3dSCy Schubert -dynix*) 14512b15cb3dSCy Schubert os=-bsd 14522b15cb3dSCy Schubert ;; 14532b15cb3dSCy Schubert -acis*) 14542b15cb3dSCy Schubert os=-aos 14552b15cb3dSCy Schubert ;; 14562b15cb3dSCy Schubert -atheos*) 14572b15cb3dSCy Schubert os=-atheos 14582b15cb3dSCy Schubert ;; 14592b15cb3dSCy Schubert -syllable*) 14602b15cb3dSCy Schubert os=-syllable 14612b15cb3dSCy Schubert ;; 14622b15cb3dSCy Schubert -386bsd) 14632b15cb3dSCy Schubert os=-bsd 14642b15cb3dSCy Schubert ;; 14652b15cb3dSCy Schubert -ctix* | -uts*) 14662b15cb3dSCy Schubert os=-sysv 14672b15cb3dSCy Schubert ;; 14682b15cb3dSCy Schubert -nova*) 14692b15cb3dSCy Schubert os=-rtmk-nova 14702b15cb3dSCy Schubert ;; 14712b15cb3dSCy Schubert -ns2 ) 14722b15cb3dSCy Schubert os=-nextstep2 14732b15cb3dSCy Schubert ;; 14742b15cb3dSCy Schubert -nsk*) 14752b15cb3dSCy Schubert os=-nsk 14762b15cb3dSCy Schubert ;; 14772b15cb3dSCy Schubert # Preserve the version number of sinix5. 14782b15cb3dSCy Schubert -sinix5.*) 14792b15cb3dSCy Schubert os=`echo $os | sed -e 's|sinix|sysv|'` 14802b15cb3dSCy Schubert ;; 14812b15cb3dSCy Schubert -sinix*) 14822b15cb3dSCy Schubert os=-sysv4 14832b15cb3dSCy Schubert ;; 14842b15cb3dSCy Schubert -tpf*) 14852b15cb3dSCy Schubert os=-tpf 14862b15cb3dSCy Schubert ;; 14872b15cb3dSCy Schubert -triton*) 14882b15cb3dSCy Schubert os=-sysv3 14892b15cb3dSCy Schubert ;; 14902b15cb3dSCy Schubert -oss*) 14912b15cb3dSCy Schubert os=-sysv3 14922b15cb3dSCy Schubert ;; 14932b15cb3dSCy Schubert -svr4) 14942b15cb3dSCy Schubert os=-sysv4 14952b15cb3dSCy Schubert ;; 14962b15cb3dSCy Schubert -svr3) 14972b15cb3dSCy Schubert os=-sysv3 14982b15cb3dSCy Schubert ;; 14992b15cb3dSCy Schubert -sysvr4) 15002b15cb3dSCy Schubert os=-sysv4 15012b15cb3dSCy Schubert ;; 15022b15cb3dSCy Schubert # This must come after -sysvr4. 15032b15cb3dSCy Schubert -sysv*) 15042b15cb3dSCy Schubert ;; 15052b15cb3dSCy Schubert -ose*) 15062b15cb3dSCy Schubert os=-ose 15072b15cb3dSCy Schubert ;; 15082b15cb3dSCy Schubert -es1800*) 15092b15cb3dSCy Schubert os=-ose 15102b15cb3dSCy Schubert ;; 15112b15cb3dSCy Schubert -xenix) 15122b15cb3dSCy Schubert os=-xenix 15132b15cb3dSCy Schubert ;; 15142b15cb3dSCy Schubert -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 15152b15cb3dSCy Schubert os=-mint 15162b15cb3dSCy Schubert ;; 15172b15cb3dSCy Schubert -aros*) 15182b15cb3dSCy Schubert os=-aros 15192b15cb3dSCy Schubert ;; 15202b15cb3dSCy Schubert -zvmoe) 15212b15cb3dSCy Schubert os=-zvmoe 15222b15cb3dSCy Schubert ;; 15232b15cb3dSCy Schubert -dicos*) 15242b15cb3dSCy Schubert os=-dicos 15252b15cb3dSCy Schubert ;; 15262b15cb3dSCy Schubert -nacl*) 15272b15cb3dSCy Schubert ;; 15282b15cb3dSCy Schubert -none) 15292b15cb3dSCy Schubert ;; 15302b15cb3dSCy Schubert *) 15312b15cb3dSCy Schubert # Get rid of the `-' at the beginning of $os. 15322b15cb3dSCy Schubert os=`echo $os | sed 's/[^-]*-//'` 15332b15cb3dSCy Schubert echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 15342b15cb3dSCy Schubert exit 1 15352b15cb3dSCy Schubert ;; 15362b15cb3dSCy Schubertesac 15372b15cb3dSCy Schubertelse 15382b15cb3dSCy Schubert 15392b15cb3dSCy Schubert# Here we handle the default operating systems that come with various machines. 15402b15cb3dSCy Schubert# The value should be what the vendor currently ships out the door with their 15412b15cb3dSCy Schubert# machine or put another way, the most popular os provided with the machine. 15422b15cb3dSCy Schubert 15432b15cb3dSCy Schubert# Note that if you're going to try to match "-MANUFACTURER" here (say, 15442b15cb3dSCy Schubert# "-sun"), then you have to tell the case statement up towards the top 15452b15cb3dSCy Schubert# that MANUFACTURER isn't an operating system. Otherwise, code above 15462b15cb3dSCy Schubert# will signal an error saying that MANUFACTURER isn't an operating 15472b15cb3dSCy Schubert# system, and we'll never get to this point. 15482b15cb3dSCy Schubert 15492b15cb3dSCy Schubertcase $basic_machine in 15502b15cb3dSCy Schubert score-*) 15512b15cb3dSCy Schubert os=-elf 15522b15cb3dSCy Schubert ;; 15532b15cb3dSCy Schubert spu-*) 15542b15cb3dSCy Schubert os=-elf 15552b15cb3dSCy Schubert ;; 15562b15cb3dSCy Schubert *-acorn) 15572b15cb3dSCy Schubert os=-riscix1.2 15582b15cb3dSCy Schubert ;; 15592b15cb3dSCy Schubert arm*-rebel) 15602b15cb3dSCy Schubert os=-linux 15612b15cb3dSCy Schubert ;; 15622b15cb3dSCy Schubert arm*-semi) 15632b15cb3dSCy Schubert os=-aout 15642b15cb3dSCy Schubert ;; 15652b15cb3dSCy Schubert c4x-* | tic4x-*) 15662b15cb3dSCy Schubert os=-coff 15672b15cb3dSCy Schubert ;; 1568f0574f5cSXin LI c8051-*) 1569f0574f5cSXin LI os=-elf 1570f0574f5cSXin LI ;; 1571f0574f5cSXin LI hexagon-*) 1572f0574f5cSXin LI os=-elf 1573f0574f5cSXin LI ;; 15742b15cb3dSCy Schubert tic54x-*) 15752b15cb3dSCy Schubert os=-coff 15762b15cb3dSCy Schubert ;; 15772b15cb3dSCy Schubert tic55x-*) 15782b15cb3dSCy Schubert os=-coff 15792b15cb3dSCy Schubert ;; 15802b15cb3dSCy Schubert tic6x-*) 15812b15cb3dSCy Schubert os=-coff 15822b15cb3dSCy Schubert ;; 15832b15cb3dSCy Schubert # This must come before the *-dec entry. 15842b15cb3dSCy Schubert pdp10-*) 15852b15cb3dSCy Schubert os=-tops20 15862b15cb3dSCy Schubert ;; 15872b15cb3dSCy Schubert pdp11-*) 15882b15cb3dSCy Schubert os=-none 15892b15cb3dSCy Schubert ;; 15902b15cb3dSCy Schubert *-dec | vax-*) 15912b15cb3dSCy Schubert os=-ultrix4.2 15922b15cb3dSCy Schubert ;; 15932b15cb3dSCy Schubert m68*-apollo) 15942b15cb3dSCy Schubert os=-domain 15952b15cb3dSCy Schubert ;; 15962b15cb3dSCy Schubert i386-sun) 15972b15cb3dSCy Schubert os=-sunos4.0.2 15982b15cb3dSCy Schubert ;; 15992b15cb3dSCy Schubert m68000-sun) 16002b15cb3dSCy Schubert os=-sunos3 16012b15cb3dSCy Schubert ;; 16022b15cb3dSCy Schubert m68*-cisco) 16032b15cb3dSCy Schubert os=-aout 16042b15cb3dSCy Schubert ;; 16052b15cb3dSCy Schubert mep-*) 16062b15cb3dSCy Schubert os=-elf 16072b15cb3dSCy Schubert ;; 16082b15cb3dSCy Schubert mips*-cisco) 16092b15cb3dSCy Schubert os=-elf 16102b15cb3dSCy Schubert ;; 16112b15cb3dSCy Schubert mips*-*) 16122b15cb3dSCy Schubert os=-elf 16132b15cb3dSCy Schubert ;; 16142b15cb3dSCy Schubert or32-*) 16152b15cb3dSCy Schubert os=-coff 16162b15cb3dSCy Schubert ;; 16172b15cb3dSCy Schubert *-tti) # must be before sparc entry or we get the wrong os. 16182b15cb3dSCy Schubert os=-sysv3 16192b15cb3dSCy Schubert ;; 16202b15cb3dSCy Schubert sparc-* | *-sun) 16212b15cb3dSCy Schubert os=-sunos4.1.1 16222b15cb3dSCy Schubert ;; 16232b15cb3dSCy Schubert *-be) 16242b15cb3dSCy Schubert os=-beos 16252b15cb3dSCy Schubert ;; 16262b15cb3dSCy Schubert *-haiku) 16272b15cb3dSCy Schubert os=-haiku 16282b15cb3dSCy Schubert ;; 16292b15cb3dSCy Schubert *-ibm) 16302b15cb3dSCy Schubert os=-aix 16312b15cb3dSCy Schubert ;; 16322b15cb3dSCy Schubert *-knuth) 16332b15cb3dSCy Schubert os=-mmixware 16342b15cb3dSCy Schubert ;; 16352b15cb3dSCy Schubert *-wec) 16362b15cb3dSCy Schubert os=-proelf 16372b15cb3dSCy Schubert ;; 16382b15cb3dSCy Schubert *-winbond) 16392b15cb3dSCy Schubert os=-proelf 16402b15cb3dSCy Schubert ;; 16412b15cb3dSCy Schubert *-oki) 16422b15cb3dSCy Schubert os=-proelf 16432b15cb3dSCy Schubert ;; 16442b15cb3dSCy Schubert *-hp) 16452b15cb3dSCy Schubert os=-hpux 16462b15cb3dSCy Schubert ;; 16472b15cb3dSCy Schubert *-hitachi) 16482b15cb3dSCy Schubert os=-hiux 16492b15cb3dSCy Schubert ;; 16502b15cb3dSCy Schubert i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 16512b15cb3dSCy Schubert os=-sysv 16522b15cb3dSCy Schubert ;; 16532b15cb3dSCy Schubert *-cbm) 16542b15cb3dSCy Schubert os=-amigaos 16552b15cb3dSCy Schubert ;; 16562b15cb3dSCy Schubert *-dg) 16572b15cb3dSCy Schubert os=-dgux 16582b15cb3dSCy Schubert ;; 16592b15cb3dSCy Schubert *-dolphin) 16602b15cb3dSCy Schubert os=-sysv3 16612b15cb3dSCy Schubert ;; 16622b15cb3dSCy Schubert m68k-ccur) 16632b15cb3dSCy Schubert os=-rtu 16642b15cb3dSCy Schubert ;; 16652b15cb3dSCy Schubert m88k-omron*) 16662b15cb3dSCy Schubert os=-luna 16672b15cb3dSCy Schubert ;; 16682b15cb3dSCy Schubert *-next ) 16692b15cb3dSCy Schubert os=-nextstep 16702b15cb3dSCy Schubert ;; 16712b15cb3dSCy Schubert *-sequent) 16722b15cb3dSCy Schubert os=-ptx 16732b15cb3dSCy Schubert ;; 16742b15cb3dSCy Schubert *-crds) 16752b15cb3dSCy Schubert os=-unos 16762b15cb3dSCy Schubert ;; 16772b15cb3dSCy Schubert *-ns) 16782b15cb3dSCy Schubert os=-genix 16792b15cb3dSCy Schubert ;; 16802b15cb3dSCy Schubert i370-*) 16812b15cb3dSCy Schubert os=-mvs 16822b15cb3dSCy Schubert ;; 16832b15cb3dSCy Schubert *-next) 16842b15cb3dSCy Schubert os=-nextstep3 16852b15cb3dSCy Schubert ;; 16862b15cb3dSCy Schubert *-gould) 16872b15cb3dSCy Schubert os=-sysv 16882b15cb3dSCy Schubert ;; 16892b15cb3dSCy Schubert *-highlevel) 16902b15cb3dSCy Schubert os=-bsd 16912b15cb3dSCy Schubert ;; 16922b15cb3dSCy Schubert *-encore) 16932b15cb3dSCy Schubert os=-bsd 16942b15cb3dSCy Schubert ;; 16952b15cb3dSCy Schubert *-sgi) 16962b15cb3dSCy Schubert os=-irix 16972b15cb3dSCy Schubert ;; 16982b15cb3dSCy Schubert *-siemens) 16992b15cb3dSCy Schubert os=-sysv4 17002b15cb3dSCy Schubert ;; 17012b15cb3dSCy Schubert *-masscomp) 17022b15cb3dSCy Schubert os=-rtu 17032b15cb3dSCy Schubert ;; 17042b15cb3dSCy Schubert f30[01]-fujitsu | f700-fujitsu) 17052b15cb3dSCy Schubert os=-uxpv 17062b15cb3dSCy Schubert ;; 17072b15cb3dSCy Schubert *-rom68k) 17082b15cb3dSCy Schubert os=-coff 17092b15cb3dSCy Schubert ;; 17102b15cb3dSCy Schubert *-*bug) 17112b15cb3dSCy Schubert os=-coff 17122b15cb3dSCy Schubert ;; 17132b15cb3dSCy Schubert *-apple) 17142b15cb3dSCy Schubert os=-macos 17152b15cb3dSCy Schubert ;; 17162b15cb3dSCy Schubert *-atari*) 17172b15cb3dSCy Schubert os=-mint 17182b15cb3dSCy Schubert ;; 17192b15cb3dSCy Schubert *) 17202b15cb3dSCy Schubert os=-none 17212b15cb3dSCy Schubert ;; 17222b15cb3dSCy Schubertesac 17232b15cb3dSCy Schubertfi 17242b15cb3dSCy Schubert 17252b15cb3dSCy Schubert# Here we handle the case where we know the os, and the CPU type, but not the 17262b15cb3dSCy Schubert# manufacturer. We pick the logical manufacturer. 17272b15cb3dSCy Schubertvendor=unknown 17282b15cb3dSCy Schubertcase $basic_machine in 17292b15cb3dSCy Schubert *-unknown) 17302b15cb3dSCy Schubert case $os in 17312b15cb3dSCy Schubert -riscix*) 17322b15cb3dSCy Schubert vendor=acorn 17332b15cb3dSCy Schubert ;; 17342b15cb3dSCy Schubert -sunos*) 17352b15cb3dSCy Schubert vendor=sun 17362b15cb3dSCy Schubert ;; 17372b15cb3dSCy Schubert -cnk*|-aix*) 17382b15cb3dSCy Schubert vendor=ibm 17392b15cb3dSCy Schubert ;; 17402b15cb3dSCy Schubert -beos*) 17412b15cb3dSCy Schubert vendor=be 17422b15cb3dSCy Schubert ;; 17432b15cb3dSCy Schubert -hpux*) 17442b15cb3dSCy Schubert vendor=hp 17452b15cb3dSCy Schubert ;; 17462b15cb3dSCy Schubert -mpeix*) 17472b15cb3dSCy Schubert vendor=hp 17482b15cb3dSCy Schubert ;; 17492b15cb3dSCy Schubert -hiux*) 17502b15cb3dSCy Schubert vendor=hitachi 17512b15cb3dSCy Schubert ;; 17522b15cb3dSCy Schubert -unos*) 17532b15cb3dSCy Schubert vendor=crds 17542b15cb3dSCy Schubert ;; 17552b15cb3dSCy Schubert -dgux*) 17562b15cb3dSCy Schubert vendor=dg 17572b15cb3dSCy Schubert ;; 17582b15cb3dSCy Schubert -luna*) 17592b15cb3dSCy Schubert vendor=omron 17602b15cb3dSCy Schubert ;; 17612b15cb3dSCy Schubert -genix*) 17622b15cb3dSCy Schubert vendor=ns 17632b15cb3dSCy Schubert ;; 17642b15cb3dSCy Schubert -mvs* | -opened*) 17652b15cb3dSCy Schubert vendor=ibm 17662b15cb3dSCy Schubert ;; 17672b15cb3dSCy Schubert -os400*) 17682b15cb3dSCy Schubert vendor=ibm 17692b15cb3dSCy Schubert ;; 17702b15cb3dSCy Schubert -ptx*) 17712b15cb3dSCy Schubert vendor=sequent 17722b15cb3dSCy Schubert ;; 17732b15cb3dSCy Schubert -tpf*) 17742b15cb3dSCy Schubert vendor=ibm 17752b15cb3dSCy Schubert ;; 17762b15cb3dSCy Schubert -vxsim* | -vxworks* | -windiss*) 17772b15cb3dSCy Schubert vendor=wrs 17782b15cb3dSCy Schubert ;; 17792b15cb3dSCy Schubert -aux*) 17802b15cb3dSCy Schubert vendor=apple 17812b15cb3dSCy Schubert ;; 17822b15cb3dSCy Schubert -hms*) 17832b15cb3dSCy Schubert vendor=hitachi 17842b15cb3dSCy Schubert ;; 17852b15cb3dSCy Schubert -mpw* | -macos*) 17862b15cb3dSCy Schubert vendor=apple 17872b15cb3dSCy Schubert ;; 17882b15cb3dSCy Schubert -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 17892b15cb3dSCy Schubert vendor=atari 17902b15cb3dSCy Schubert ;; 17912b15cb3dSCy Schubert -vos*) 17922b15cb3dSCy Schubert vendor=stratus 17932b15cb3dSCy Schubert ;; 17942b15cb3dSCy Schubert esac 17952b15cb3dSCy Schubert basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 17962b15cb3dSCy Schubert ;; 17972b15cb3dSCy Schubertesac 17982b15cb3dSCy Schubert 17992b15cb3dSCy Schubertecho $basic_machine$os 18002b15cb3dSCy Schubertexit 18012b15cb3dSCy Schubert 18022b15cb3dSCy Schubert# Local variables: 18032b15cb3dSCy Schubert# eval: (add-hook 'write-file-hooks 'time-stamp) 18042b15cb3dSCy Schubert# time-stamp-start: "timestamp='" 18052b15cb3dSCy Schubert# time-stamp-format: "%:y-%02m-%02d" 18062b15cb3dSCy Schubert# time-stamp-end: "'" 18072b15cb3dSCy Schubert# End: 1808