1cdf0e10cSrcweir#! /bin/sh 2cdf0e10cSrcweir# Configuration validation subroutine script. 3*ee1eb700SMatthias Seidel# Copyright 1992-2017 Free Software Foundation, Inc. 4cdf0e10cSrcweir 5*ee1eb700SMatthias Seideltimestamp='2017-11-04' 6cdf0e10cSrcweir 7*ee1eb700SMatthias Seidel# This file is free software; you can redistribute it and/or modify it 8*ee1eb700SMatthias Seidel# under the terms of the GNU General Public License as published by 9*ee1eb700SMatthias Seidel# the Free Software Foundation; either version 3 of the License, or 10cdf0e10cSrcweir# (at your option) any later version. 11cdf0e10cSrcweir# 12*ee1eb700SMatthias Seidel# This program is distributed in the hope that it will be useful, but 13*ee1eb700SMatthias Seidel# WITHOUT ANY WARRANTY; without even the implied warranty of 14*ee1eb700SMatthias Seidel# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15*ee1eb700SMatthias Seidel# General Public License for more details. 16cdf0e10cSrcweir# 17cdf0e10cSrcweir# You should have received a copy of the GNU General Public License 18*ee1eb700SMatthias Seidel# along with this program; if not, see <https://www.gnu.org/licenses/>. 19187b4248SPedro Giffuni# 20cdf0e10cSrcweir# As a special exception to the GNU General Public License, if you 21cdf0e10cSrcweir# distribute this file as part of a program that contains a 22cdf0e10cSrcweir# configuration script generated by Autoconf, you may include it under 23*ee1eb700SMatthias Seidel# the same distribution terms that you use for the rest of that 24*ee1eb700SMatthias Seidel# program. This Exception is an additional permission under section 7 25*ee1eb700SMatthias Seidel# of the GNU General Public License, version 3 ("GPLv3"). 26cdf0e10cSrcweir 27187b4248SPedro Giffuni 28*ee1eb700SMatthias Seidel# Please send patches to <config-patches@gnu.org>. 29cdf0e10cSrcweir# 30cdf0e10cSrcweir# Configuration subroutine to validate and canonicalize a configuration type. 31cdf0e10cSrcweir# Supply the specified configuration type as an argument. 32cdf0e10cSrcweir# If it is invalid, we print an error message on stderr and exit with code 1. 33cdf0e10cSrcweir# Otherwise, we print the canonical config type on stdout and succeed. 34cdf0e10cSrcweir 35187b4248SPedro Giffuni# You can get the latest version of this script from: 36*ee1eb700SMatthias Seidel# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub 37187b4248SPedro Giffuni 38cdf0e10cSrcweir# This file is supposed to be the same for all GNU packages 39cdf0e10cSrcweir# and recognize all the CPU types, system types and aliases 40cdf0e10cSrcweir# that are meaningful with *any* GNU software. 41cdf0e10cSrcweir# Each package is responsible for reporting which valid configurations 42cdf0e10cSrcweir# it does not support. The user should be able to distinguish 43cdf0e10cSrcweir# a failure to support a valid configuration from a meaningless 44cdf0e10cSrcweir# configuration. 45cdf0e10cSrcweir 46cdf0e10cSrcweir# The goal of this file is to map all the various variations of a given 47cdf0e10cSrcweir# machine specification into a single specification in the form: 48cdf0e10cSrcweir# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 49cdf0e10cSrcweir# or in some cases, the newer four-part form: 50cdf0e10cSrcweir# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 51cdf0e10cSrcweir# It is wrong to echo any other type of specification. 52cdf0e10cSrcweir 53cdf0e10cSrcweirme=`echo "$0" | sed -e 's,.*/,,'` 54cdf0e10cSrcweir 55cdf0e10cSrcweirusage="\ 56*ee1eb700SMatthias SeidelUsage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS 57cdf0e10cSrcweir 58cdf0e10cSrcweirCanonicalize a configuration name. 59cdf0e10cSrcweir 60*ee1eb700SMatthias SeidelOptions: 61cdf0e10cSrcweir -h, --help print this help, then exit 62cdf0e10cSrcweir -t, --time-stamp print date of last modification, then exit 63cdf0e10cSrcweir -v, --version print version number, then exit 64cdf0e10cSrcweir 65cdf0e10cSrcweirReport bugs and patches to <config-patches@gnu.org>." 66cdf0e10cSrcweir 67cdf0e10cSrcweirversion="\ 68cdf0e10cSrcweirGNU config.sub ($timestamp) 69cdf0e10cSrcweir 70*ee1eb700SMatthias SeidelCopyright 1992-2017 Free Software Foundation, Inc. 71cdf0e10cSrcweir 72cdf0e10cSrcweirThis is free software; see the source for copying conditions. There is NO 73cdf0e10cSrcweirwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 74cdf0e10cSrcweir 75cdf0e10cSrcweirhelp=" 76cdf0e10cSrcweirTry \`$me --help' for more information." 77cdf0e10cSrcweir 78cdf0e10cSrcweir# Parse command line 79cdf0e10cSrcweirwhile test $# -gt 0 ; do 80cdf0e10cSrcweir case $1 in 81cdf0e10cSrcweir --time-stamp | --time* | -t ) 82187b4248SPedro Giffuni echo "$timestamp" ; exit ;; 83cdf0e10cSrcweir --version | -v ) 84187b4248SPedro Giffuni echo "$version" ; exit ;; 85cdf0e10cSrcweir --help | --h* | -h ) 86187b4248SPedro Giffuni echo "$usage"; exit ;; 87cdf0e10cSrcweir -- ) # Stop option processing 88cdf0e10cSrcweir shift; break ;; 89cdf0e10cSrcweir - ) # Use stdin as input. 90cdf0e10cSrcweir break ;; 91cdf0e10cSrcweir -* ) 92cdf0e10cSrcweir echo "$me: invalid option $1$help" 93cdf0e10cSrcweir exit 1 ;; 94cdf0e10cSrcweir 95cdf0e10cSrcweir *local*) 96cdf0e10cSrcweir # First pass through any local machine types. 97cdf0e10cSrcweir echo $1 98187b4248SPedro Giffuni exit ;; 99cdf0e10cSrcweir 100cdf0e10cSrcweir * ) 101cdf0e10cSrcweir break ;; 102cdf0e10cSrcweir esac 103cdf0e10cSrcweirdone 104cdf0e10cSrcweir 105cdf0e10cSrcweircase $# in 106cdf0e10cSrcweir 0) echo "$me: missing argument$help" >&2 107cdf0e10cSrcweir exit 1;; 108cdf0e10cSrcweir 1) ;; 109cdf0e10cSrcweir *) echo "$me: too many arguments$help" >&2 110cdf0e10cSrcweir exit 1;; 111cdf0e10cSrcweiresac 112cdf0e10cSrcweir 113cdf0e10cSrcweir# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 114cdf0e10cSrcweir# Here we must recognize all the valid KERNEL-OS combinations. 115cdf0e10cSrcweirmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 116cdf0e10cSrcweircase $maybe_os in 117*ee1eb700SMatthias Seidel nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 118*ee1eb700SMatthias Seidel linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 119*ee1eb700SMatthias Seidel knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ 120*ee1eb700SMatthias Seidel kopensolaris*-gnu* | cloudabi*-eabi* | \ 121187b4248SPedro Giffuni storm-chaos* | os2-emx* | rtmk-nova*) 122cdf0e10cSrcweir os=-$maybe_os 123cdf0e10cSrcweir basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 124cdf0e10cSrcweir ;; 125*ee1eb700SMatthias Seidel android-linux) 126*ee1eb700SMatthias Seidel os=-linux-android 127*ee1eb700SMatthias Seidel basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 128*ee1eb700SMatthias Seidel ;; 129cdf0e10cSrcweir *) 130cdf0e10cSrcweir basic_machine=`echo $1 | sed 's/-[^-]*$//'` 131cdf0e10cSrcweir if [ $basic_machine != $1 ] 132cdf0e10cSrcweir then os=`echo $1 | sed 's/.*-/-/'` 133cdf0e10cSrcweir else os=; fi 134cdf0e10cSrcweir ;; 135cdf0e10cSrcweiresac 136cdf0e10cSrcweir 137cdf0e10cSrcweir### Let's recognize common machines as not being operating systems so 138cdf0e10cSrcweir### that things like config.sub decstation-3100 work. We also 139cdf0e10cSrcweir### recognize some manufacturers as not being operating systems, so we 140cdf0e10cSrcweir### can provide default operating systems below. 141cdf0e10cSrcweircase $os in 142cdf0e10cSrcweir -sun*os*) 143cdf0e10cSrcweir # Prevent following clause from handling this invalid input. 144cdf0e10cSrcweir ;; 145cdf0e10cSrcweir -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 146cdf0e10cSrcweir -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 147cdf0e10cSrcweir -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 148cdf0e10cSrcweir -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 149cdf0e10cSrcweir -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 150cdf0e10cSrcweir -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 151*ee1eb700SMatthias Seidel -apple | -axis | -knuth | -cray | -microblaze*) 152cdf0e10cSrcweir os= 153cdf0e10cSrcweir basic_machine=$1 154cdf0e10cSrcweir ;; 155187b4248SPedro Giffuni -bluegene*) 156187b4248SPedro Giffuni os=-cnk 157187b4248SPedro Giffuni ;; 158cdf0e10cSrcweir -sim | -cisco | -oki | -wec | -winbond) 159cdf0e10cSrcweir os= 160cdf0e10cSrcweir basic_machine=$1 161cdf0e10cSrcweir ;; 162cdf0e10cSrcweir -scout) 163cdf0e10cSrcweir ;; 164cdf0e10cSrcweir -wrs) 165cdf0e10cSrcweir os=-vxworks 166cdf0e10cSrcweir basic_machine=$1 167cdf0e10cSrcweir ;; 168cdf0e10cSrcweir -chorusos*) 169cdf0e10cSrcweir os=-chorusos 170cdf0e10cSrcweir basic_machine=$1 171cdf0e10cSrcweir ;; 172cdf0e10cSrcweir -chorusrdb) 173cdf0e10cSrcweir os=-chorusrdb 174cdf0e10cSrcweir basic_machine=$1 175cdf0e10cSrcweir ;; 176cdf0e10cSrcweir -hiux*) 177cdf0e10cSrcweir os=-hiuxwe2 178cdf0e10cSrcweir ;; 179187b4248SPedro Giffuni -sco6) 180187b4248SPedro Giffuni os=-sco5v6 181187b4248SPedro Giffuni basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 182187b4248SPedro Giffuni ;; 183cdf0e10cSrcweir -sco5) 184cdf0e10cSrcweir os=-sco3.2v5 185cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 186cdf0e10cSrcweir ;; 187cdf0e10cSrcweir -sco4) 188cdf0e10cSrcweir os=-sco3.2v4 189cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 190cdf0e10cSrcweir ;; 191cdf0e10cSrcweir -sco3.2.[4-9]*) 192cdf0e10cSrcweir os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 193cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 194cdf0e10cSrcweir ;; 195cdf0e10cSrcweir -sco3.2v[4-9]*) 196cdf0e10cSrcweir # Don't forget version if it is 3.2v4 or newer. 197cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 198cdf0e10cSrcweir ;; 199187b4248SPedro Giffuni -sco5v6*) 200187b4248SPedro Giffuni # Don't forget version if it is 3.2v4 or newer. 201187b4248SPedro Giffuni basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 202187b4248SPedro Giffuni ;; 203cdf0e10cSrcweir -sco*) 204cdf0e10cSrcweir os=-sco3.2v2 205cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 206cdf0e10cSrcweir ;; 207cdf0e10cSrcweir -udk*) 208cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 209cdf0e10cSrcweir ;; 210cdf0e10cSrcweir -isc) 211cdf0e10cSrcweir os=-isc2.2 212cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 213cdf0e10cSrcweir ;; 214cdf0e10cSrcweir -clix*) 215cdf0e10cSrcweir basic_machine=clipper-intergraph 216cdf0e10cSrcweir ;; 217cdf0e10cSrcweir -isc*) 218cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 219cdf0e10cSrcweir ;; 220*ee1eb700SMatthias Seidel -lynx*178) 221*ee1eb700SMatthias Seidel os=-lynxos178 222*ee1eb700SMatthias Seidel ;; 223*ee1eb700SMatthias Seidel -lynx*5) 224*ee1eb700SMatthias Seidel os=-lynxos5 225*ee1eb700SMatthias Seidel ;; 226cdf0e10cSrcweir -lynx*) 227cdf0e10cSrcweir os=-lynxos 228cdf0e10cSrcweir ;; 229cdf0e10cSrcweir -ptx*) 230cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 231cdf0e10cSrcweir ;; 232cdf0e10cSrcweir -psos*) 233cdf0e10cSrcweir os=-psos 234cdf0e10cSrcweir ;; 235cdf0e10cSrcweir -mint | -mint[0-9]*) 236cdf0e10cSrcweir basic_machine=m68k-atari 237cdf0e10cSrcweir os=-mint 238cdf0e10cSrcweir ;; 239cdf0e10cSrcweiresac 240cdf0e10cSrcweir 241cdf0e10cSrcweir# Decode aliases for certain CPU-COMPANY combinations. 242cdf0e10cSrcweircase $basic_machine in 243cdf0e10cSrcweir # Recognize the basic CPU types without company name. 244cdf0e10cSrcweir # Some are omitted here because they have special meanings below. 245cdf0e10cSrcweir 1750a | 580 \ 246cdf0e10cSrcweir | a29k \ 247*ee1eb700SMatthias Seidel | aarch64 | aarch64_be \ 248cdf0e10cSrcweir | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 249cdf0e10cSrcweir | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 250187b4248SPedro Giffuni | am33_2.0 \ 251*ee1eb700SMatthias Seidel | arc | arceb \ 252*ee1eb700SMatthias Seidel | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ 253*ee1eb700SMatthias Seidel | avr | avr32 \ 254*ee1eb700SMatthias Seidel | ba \ 255*ee1eb700SMatthias Seidel | be32 | be64 \ 256187b4248SPedro Giffuni | bfin \ 257*ee1eb700SMatthias Seidel | c4x | c8051 | clipper \ 258cdf0e10cSrcweir | d10v | d30v | dlx | dsp16xx \ 259*ee1eb700SMatthias Seidel | e2k | epiphany \ 260*ee1eb700SMatthias Seidel | fido | fr30 | frv | ft32 \ 261cdf0e10cSrcweir | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 262*ee1eb700SMatthias Seidel | hexagon \ 263*ee1eb700SMatthias Seidel | i370 | i860 | i960 | ia16 | ia64 \ 264187b4248SPedro Giffuni | ip2k | iq2000 \ 265*ee1eb700SMatthias Seidel | k1om \ 266*ee1eb700SMatthias Seidel | le32 | le64 \ 267187b4248SPedro Giffuni | lm32 \ 268187b4248SPedro Giffuni | m32c | m32r | m32rle | m68000 | m68k | m88k \ 269*ee1eb700SMatthias Seidel | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ 270cdf0e10cSrcweir | mips | mipsbe | mipseb | mipsel | mipsle \ 271cdf0e10cSrcweir | mips16 \ 272cdf0e10cSrcweir | mips64 | mips64el \ 273187b4248SPedro Giffuni | mips64octeon | mips64octeonel \ 27451df27a2SPedro Giffuni | mips64orion | mips64orionel \ 275187b4248SPedro Giffuni | mips64r5900 | mips64r5900el \ 276187b4248SPedro Giffuni | mips64vr | mips64vrel \ 277cdf0e10cSrcweir | mips64vr4100 | mips64vr4100el \ 278cdf0e10cSrcweir | mips64vr4300 | mips64vr4300el \ 279cdf0e10cSrcweir | mips64vr5000 | mips64vr5000el \ 280187b4248SPedro Giffuni | mips64vr5900 | mips64vr5900el \ 281cdf0e10cSrcweir | mipsisa32 | mipsisa32el \ 282cdf0e10cSrcweir | mipsisa32r2 | mipsisa32r2el \ 283*ee1eb700SMatthias Seidel | mipsisa32r6 | mipsisa32r6el \ 284cdf0e10cSrcweir | mipsisa64 | mipsisa64el \ 285187b4248SPedro Giffuni | mipsisa64r2 | mipsisa64r2el \ 286*ee1eb700SMatthias Seidel | mipsisa64r6 | mipsisa64r6el \ 287cdf0e10cSrcweir | mipsisa64sb1 | mipsisa64sb1el \ 288cdf0e10cSrcweir | mipsisa64sr71k | mipsisa64sr71kel \ 289*ee1eb700SMatthias Seidel | mipsr5900 | mipsr5900el \ 290cdf0e10cSrcweir | mipstx39 | mipstx39el \ 291cdf0e10cSrcweir | mn10200 | mn10300 \ 292187b4248SPedro Giffuni | moxie \ 293187b4248SPedro Giffuni | mt \ 294cdf0e10cSrcweir | msp430 \ 295*ee1eb700SMatthias Seidel | nds32 | nds32le | nds32be \ 296*ee1eb700SMatthias Seidel | nios | nios2 | nios2eb | nios2el \ 297cdf0e10cSrcweir | ns16k | ns32k \ 298*ee1eb700SMatthias Seidel | open8 | or1k | or1knd | or32 \ 299cdf0e10cSrcweir | pdp10 | pdp11 | pj | pjl \ 300*ee1eb700SMatthias Seidel | powerpc | powerpc64 | powerpc64le | powerpcle \ 301*ee1eb700SMatthias Seidel | pru \ 302cdf0e10cSrcweir | pyramid \ 303*ee1eb700SMatthias Seidel | riscv32 | riscv64 \ 304*ee1eb700SMatthias Seidel | rl78 | rx \ 305187b4248SPedro Giffuni | score \ 306*ee1eb700SMatthias Seidel | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 307cdf0e10cSrcweir | sh64 | sh64le \ 308187b4248SPedro Giffuni | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 309187b4248SPedro Giffuni | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 310*ee1eb700SMatthias Seidel | spu \ 311*ee1eb700SMatthias Seidel | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 312187b4248SPedro Giffuni | ubicom32 \ 313*ee1eb700SMatthias Seidel | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 314*ee1eb700SMatthias Seidel | visium \ 315*ee1eb700SMatthias Seidel | wasm32 \ 316*ee1eb700SMatthias Seidel | x86 | xc16x | xstormy16 | xtensa \ 317187b4248SPedro Giffuni | z8k | z80) 318cdf0e10cSrcweir basic_machine=$basic_machine-unknown 319cdf0e10cSrcweir ;; 320*ee1eb700SMatthias Seidel c54x) 321*ee1eb700SMatthias Seidel basic_machine=tic54x-unknown 322*ee1eb700SMatthias Seidel ;; 323*ee1eb700SMatthias Seidel c55x) 324*ee1eb700SMatthias Seidel basic_machine=tic55x-unknown 325*ee1eb700SMatthias Seidel ;; 326*ee1eb700SMatthias Seidel c6x) 327*ee1eb700SMatthias Seidel basic_machine=tic6x-unknown 328*ee1eb700SMatthias Seidel ;; 329*ee1eb700SMatthias Seidel leon|leon[3-9]) 330*ee1eb700SMatthias Seidel basic_machine=sparc-$basic_machine 331*ee1eb700SMatthias Seidel ;; 332*ee1eb700SMatthias Seidel m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) 333cdf0e10cSrcweir basic_machine=$basic_machine-unknown 334cdf0e10cSrcweir os=-none 335cdf0e10cSrcweir ;; 336cdf0e10cSrcweir m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 337cdf0e10cSrcweir ;; 338187b4248SPedro Giffuni ms1) 339187b4248SPedro Giffuni basic_machine=mt-unknown 340187b4248SPedro Giffuni ;; 341cdf0e10cSrcweir 342*ee1eb700SMatthias Seidel strongarm | thumb | xscale) 343*ee1eb700SMatthias Seidel basic_machine=arm-unknown 344*ee1eb700SMatthias Seidel ;; 345*ee1eb700SMatthias Seidel xgate) 346*ee1eb700SMatthias Seidel basic_machine=$basic_machine-unknown 347*ee1eb700SMatthias Seidel os=-none 348*ee1eb700SMatthias Seidel ;; 349*ee1eb700SMatthias Seidel xscaleeb) 350*ee1eb700SMatthias Seidel basic_machine=armeb-unknown 351*ee1eb700SMatthias Seidel ;; 352*ee1eb700SMatthias Seidel 353*ee1eb700SMatthias Seidel xscaleel) 354*ee1eb700SMatthias Seidel basic_machine=armel-unknown 355*ee1eb700SMatthias Seidel ;; 356*ee1eb700SMatthias Seidel 357cdf0e10cSrcweir # We use `pc' rather than `unknown' 358cdf0e10cSrcweir # because (1) that's what they normally are, and 359cdf0e10cSrcweir # (2) the word "unknown" tends to confuse beginning users. 360cdf0e10cSrcweir i*86 | x86_64) 361cdf0e10cSrcweir basic_machine=$basic_machine-pc 362cdf0e10cSrcweir ;; 363cdf0e10cSrcweir # Object if more than one company name word. 364cdf0e10cSrcweir *-*-*) 365cdf0e10cSrcweir echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 366cdf0e10cSrcweir exit 1 367cdf0e10cSrcweir ;; 368cdf0e10cSrcweir # Recognize the basic CPU types with company name. 369cdf0e10cSrcweir 580-* \ 370cdf0e10cSrcweir | a29k-* \ 371*ee1eb700SMatthias Seidel | aarch64-* | aarch64_be-* \ 372cdf0e10cSrcweir | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 373cdf0e10cSrcweir | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 374*ee1eb700SMatthias Seidel | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ 375cdf0e10cSrcweir | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 376187b4248SPedro Giffuni | avr-* | avr32-* \ 377*ee1eb700SMatthias Seidel | ba-* \ 378*ee1eb700SMatthias Seidel | be32-* | be64-* \ 379187b4248SPedro Giffuni | bfin-* | bs2000-* \ 380*ee1eb700SMatthias Seidel | c[123]* | c30-* | [cjt]90-* | c4x-* \ 381*ee1eb700SMatthias Seidel | c8051-* | clipper-* | craynv-* | cydra-* \ 382cdf0e10cSrcweir | d10v-* | d30v-* | dlx-* \ 383*ee1eb700SMatthias Seidel | e2k-* | elxsi-* \ 384187b4248SPedro Giffuni | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 385cdf0e10cSrcweir | h8300-* | h8500-* \ 386cdf0e10cSrcweir | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 387*ee1eb700SMatthias Seidel | hexagon-* \ 388*ee1eb700SMatthias Seidel | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ 389187b4248SPedro Giffuni | ip2k-* | iq2000-* \ 390*ee1eb700SMatthias Seidel | k1om-* \ 391*ee1eb700SMatthias Seidel | le32-* | le64-* \ 392187b4248SPedro Giffuni | lm32-* \ 393187b4248SPedro Giffuni | m32c-* | m32r-* | m32rle-* \ 394cdf0e10cSrcweir | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 395*ee1eb700SMatthias Seidel | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ 396*ee1eb700SMatthias Seidel | microblaze-* | microblazeel-* \ 397cdf0e10cSrcweir | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 398cdf0e10cSrcweir | mips16-* \ 399cdf0e10cSrcweir | mips64-* | mips64el-* \ 400187b4248SPedro Giffuni | mips64octeon-* | mips64octeonel-* \ 40151df27a2SPedro Giffuni | mips64orion-* | mips64orionel-* \ 402187b4248SPedro Giffuni | mips64r5900-* | mips64r5900el-* \ 403187b4248SPedro Giffuni | mips64vr-* | mips64vrel-* \ 404cdf0e10cSrcweir | mips64vr4100-* | mips64vr4100el-* \ 405cdf0e10cSrcweir | mips64vr4300-* | mips64vr4300el-* \ 406cdf0e10cSrcweir | mips64vr5000-* | mips64vr5000el-* \ 407187b4248SPedro Giffuni | mips64vr5900-* | mips64vr5900el-* \ 408cdf0e10cSrcweir | mipsisa32-* | mipsisa32el-* \ 409cdf0e10cSrcweir | mipsisa32r2-* | mipsisa32r2el-* \ 410*ee1eb700SMatthias Seidel | mipsisa32r6-* | mipsisa32r6el-* \ 411cdf0e10cSrcweir | mipsisa64-* | mipsisa64el-* \ 412187b4248SPedro Giffuni | mipsisa64r2-* | mipsisa64r2el-* \ 413*ee1eb700SMatthias Seidel | mipsisa64r6-* | mipsisa64r6el-* \ 414cdf0e10cSrcweir | mipsisa64sb1-* | mipsisa64sb1el-* \ 415cdf0e10cSrcweir | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 416*ee1eb700SMatthias Seidel | mipsr5900-* | mipsr5900el-* \ 417cdf0e10cSrcweir | mipstx39-* | mipstx39el-* \ 418187b4248SPedro Giffuni | mmix-* \ 419187b4248SPedro Giffuni | mt-* \ 420cdf0e10cSrcweir | msp430-* \ 421*ee1eb700SMatthias Seidel | nds32-* | nds32le-* | nds32be-* \ 422*ee1eb700SMatthias Seidel | nios-* | nios2-* | nios2eb-* | nios2el-* \ 423187b4248SPedro Giffuni | none-* | np1-* | ns16k-* | ns32k-* \ 424*ee1eb700SMatthias Seidel | open8-* \ 425*ee1eb700SMatthias Seidel | or1k*-* \ 426cdf0e10cSrcweir | orion-* \ 427cdf0e10cSrcweir | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 428*ee1eb700SMatthias Seidel | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 429*ee1eb700SMatthias Seidel | pru-* \ 430cdf0e10cSrcweir | pyramid-* \ 431*ee1eb700SMatthias Seidel | riscv32-* | riscv64-* \ 432*ee1eb700SMatthias Seidel | rl78-* | romp-* | rs6000-* | rx-* \ 433187b4248SPedro Giffuni | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 434cdf0e10cSrcweir | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 435187b4248SPedro Giffuni | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 436187b4248SPedro Giffuni | sparclite-* \ 437*ee1eb700SMatthias Seidel | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ 438*ee1eb700SMatthias Seidel | tahoe-* \ 439cdf0e10cSrcweir | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 440*ee1eb700SMatthias Seidel | tile*-* \ 441cdf0e10cSrcweir | tron-* \ 442187b4248SPedro Giffuni | ubicom32-* \ 443*ee1eb700SMatthias Seidel | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 444*ee1eb700SMatthias Seidel | vax-* \ 445*ee1eb700SMatthias Seidel | visium-* \ 446*ee1eb700SMatthias Seidel | wasm32-* \ 447cdf0e10cSrcweir | we32k-* \ 448*ee1eb700SMatthias Seidel | x86-* | x86_64-* | xc16x-* | xps100-* \ 449187b4248SPedro Giffuni | xstormy16-* | xtensa*-* \ 450cdf0e10cSrcweir | ymp-* \ 451187b4248SPedro Giffuni | z8k-* | z80-*) 452187b4248SPedro Giffuni ;; 453187b4248SPedro Giffuni # Recognize the basic CPU types without company name, with glob match. 454187b4248SPedro Giffuni xtensa*) 455187b4248SPedro Giffuni basic_machine=$basic_machine-unknown 456cdf0e10cSrcweir ;; 457cdf0e10cSrcweir # Recognize the various machine names and aliases which stand 458cdf0e10cSrcweir # for a CPU type and a company and sometimes even an OS. 459cdf0e10cSrcweir 386bsd) 460cdf0e10cSrcweir basic_machine=i386-unknown 461cdf0e10cSrcweir os=-bsd 462cdf0e10cSrcweir ;; 463cdf0e10cSrcweir 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 464cdf0e10cSrcweir basic_machine=m68000-att 465cdf0e10cSrcweir ;; 466cdf0e10cSrcweir 3b*) 467cdf0e10cSrcweir basic_machine=we32k-att 468cdf0e10cSrcweir ;; 469cdf0e10cSrcweir a29khif) 470cdf0e10cSrcweir basic_machine=a29k-amd 471cdf0e10cSrcweir os=-udi 472cdf0e10cSrcweir ;; 473187b4248SPedro Giffuni abacus) 474187b4248SPedro Giffuni basic_machine=abacus-unknown 475187b4248SPedro Giffuni ;; 476cdf0e10cSrcweir adobe68k) 477cdf0e10cSrcweir basic_machine=m68010-adobe 478cdf0e10cSrcweir os=-scout 479cdf0e10cSrcweir ;; 480cdf0e10cSrcweir alliant | fx80) 481cdf0e10cSrcweir basic_machine=fx80-alliant 482cdf0e10cSrcweir ;; 483cdf0e10cSrcweir altos | altos3068) 484cdf0e10cSrcweir basic_machine=m68k-altos 485cdf0e10cSrcweir ;; 486cdf0e10cSrcweir am29k) 487cdf0e10cSrcweir basic_machine=a29k-none 488cdf0e10cSrcweir os=-bsd 489cdf0e10cSrcweir ;; 490cdf0e10cSrcweir amd64) 491cdf0e10cSrcweir basic_machine=x86_64-pc 492cdf0e10cSrcweir ;; 493187b4248SPedro Giffuni amd64-*) 494187b4248SPedro Giffuni basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 495187b4248SPedro Giffuni ;; 496cdf0e10cSrcweir amdahl) 497cdf0e10cSrcweir basic_machine=580-amdahl 498cdf0e10cSrcweir os=-sysv 499cdf0e10cSrcweir ;; 500cdf0e10cSrcweir amiga | amiga-*) 501cdf0e10cSrcweir basic_machine=m68k-unknown 502cdf0e10cSrcweir ;; 503cdf0e10cSrcweir amigaos | amigados) 504cdf0e10cSrcweir basic_machine=m68k-unknown 505cdf0e10cSrcweir os=-amigaos 506cdf0e10cSrcweir ;; 507cdf0e10cSrcweir amigaunix | amix) 508cdf0e10cSrcweir basic_machine=m68k-unknown 509cdf0e10cSrcweir os=-sysv4 510cdf0e10cSrcweir ;; 511cdf0e10cSrcweir apollo68) 512cdf0e10cSrcweir basic_machine=m68k-apollo 513cdf0e10cSrcweir os=-sysv 514cdf0e10cSrcweir ;; 515cdf0e10cSrcweir apollo68bsd) 516cdf0e10cSrcweir basic_machine=m68k-apollo 517cdf0e10cSrcweir os=-bsd 518cdf0e10cSrcweir ;; 519187b4248SPedro Giffuni aros) 520187b4248SPedro Giffuni basic_machine=i386-pc 521187b4248SPedro Giffuni os=-aros 522187b4248SPedro Giffuni ;; 523*ee1eb700SMatthias Seidel asmjs) 524*ee1eb700SMatthias Seidel basic_machine=asmjs-unknown 525*ee1eb700SMatthias Seidel ;; 526cdf0e10cSrcweir aux) 527cdf0e10cSrcweir basic_machine=m68k-apple 528cdf0e10cSrcweir os=-aux 529cdf0e10cSrcweir ;; 530cdf0e10cSrcweir balance) 531cdf0e10cSrcweir basic_machine=ns32k-sequent 532cdf0e10cSrcweir os=-dynix 533cdf0e10cSrcweir ;; 534187b4248SPedro Giffuni blackfin) 535187b4248SPedro Giffuni basic_machine=bfin-unknown 536187b4248SPedro Giffuni os=-linux 537187b4248SPedro Giffuni ;; 538187b4248SPedro Giffuni blackfin-*) 539187b4248SPedro Giffuni basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 540187b4248SPedro Giffuni os=-linux 541187b4248SPedro Giffuni ;; 542187b4248SPedro Giffuni bluegene*) 543187b4248SPedro Giffuni basic_machine=powerpc-ibm 544187b4248SPedro Giffuni os=-cnk 545187b4248SPedro Giffuni ;; 546*ee1eb700SMatthias Seidel c54x-*) 547*ee1eb700SMatthias Seidel basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 548*ee1eb700SMatthias Seidel ;; 549*ee1eb700SMatthias Seidel c55x-*) 550*ee1eb700SMatthias Seidel basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 551*ee1eb700SMatthias Seidel ;; 552*ee1eb700SMatthias Seidel c6x-*) 553*ee1eb700SMatthias Seidel basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 554*ee1eb700SMatthias Seidel ;; 555cdf0e10cSrcweir c90) 556cdf0e10cSrcweir basic_machine=c90-cray 557cdf0e10cSrcweir os=-unicos 558cdf0e10cSrcweir ;; 559187b4248SPedro Giffuni cegcc) 560187b4248SPedro Giffuni basic_machine=arm-unknown 561187b4248SPedro Giffuni os=-cegcc 562187b4248SPedro Giffuni ;; 563cdf0e10cSrcweir convex-c1) 564cdf0e10cSrcweir basic_machine=c1-convex 565cdf0e10cSrcweir os=-bsd 566cdf0e10cSrcweir ;; 567cdf0e10cSrcweir convex-c2) 568cdf0e10cSrcweir basic_machine=c2-convex 569cdf0e10cSrcweir os=-bsd 570cdf0e10cSrcweir ;; 571cdf0e10cSrcweir convex-c32) 572cdf0e10cSrcweir basic_machine=c32-convex 573cdf0e10cSrcweir os=-bsd 574cdf0e10cSrcweir ;; 575cdf0e10cSrcweir convex-c34) 576cdf0e10cSrcweir basic_machine=c34-convex 577cdf0e10cSrcweir os=-bsd 578cdf0e10cSrcweir ;; 579cdf0e10cSrcweir convex-c38) 580cdf0e10cSrcweir basic_machine=c38-convex 581cdf0e10cSrcweir os=-bsd 582cdf0e10cSrcweir ;; 583cdf0e10cSrcweir cray | j90) 584cdf0e10cSrcweir basic_machine=j90-cray 585cdf0e10cSrcweir os=-unicos 586cdf0e10cSrcweir ;; 587187b4248SPedro Giffuni craynv) 588187b4248SPedro Giffuni basic_machine=craynv-cray 589187b4248SPedro Giffuni os=-unicosmp 590187b4248SPedro Giffuni ;; 591*ee1eb700SMatthias Seidel cr16 | cr16-*) 592187b4248SPedro Giffuni basic_machine=cr16-unknown 593187b4248SPedro Giffuni os=-elf 594187b4248SPedro Giffuni ;; 595cdf0e10cSrcweir crds | unos) 596cdf0e10cSrcweir basic_machine=m68k-crds 597cdf0e10cSrcweir ;; 598187b4248SPedro Giffuni crisv32 | crisv32-* | etraxfs*) 599187b4248SPedro Giffuni basic_machine=crisv32-axis 600187b4248SPedro Giffuni ;; 601cdf0e10cSrcweir cris | cris-* | etrax*) 602cdf0e10cSrcweir basic_machine=cris-axis 603cdf0e10cSrcweir ;; 604187b4248SPedro Giffuni crx) 605187b4248SPedro Giffuni basic_machine=crx-unknown 606187b4248SPedro Giffuni os=-elf 607187b4248SPedro Giffuni ;; 608cdf0e10cSrcweir da30 | da30-*) 609cdf0e10cSrcweir basic_machine=m68k-da30 610cdf0e10cSrcweir ;; 611cdf0e10cSrcweir decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 612cdf0e10cSrcweir basic_machine=mips-dec 613cdf0e10cSrcweir ;; 614cdf0e10cSrcweir decsystem10* | dec10*) 615cdf0e10cSrcweir basic_machine=pdp10-dec 616cdf0e10cSrcweir os=-tops10 617cdf0e10cSrcweir ;; 618cdf0e10cSrcweir decsystem20* | dec20*) 619cdf0e10cSrcweir basic_machine=pdp10-dec 620cdf0e10cSrcweir os=-tops20 621cdf0e10cSrcweir ;; 622cdf0e10cSrcweir delta | 3300 | motorola-3300 | motorola-delta \ 623cdf0e10cSrcweir | 3300-motorola | delta-motorola) 624cdf0e10cSrcweir basic_machine=m68k-motorola 625cdf0e10cSrcweir ;; 626cdf0e10cSrcweir delta88) 627cdf0e10cSrcweir basic_machine=m88k-motorola 628cdf0e10cSrcweir os=-sysv3 629cdf0e10cSrcweir ;; 630187b4248SPedro Giffuni dicos) 631187b4248SPedro Giffuni basic_machine=i686-pc 632187b4248SPedro Giffuni os=-dicos 633187b4248SPedro Giffuni ;; 634187b4248SPedro Giffuni djgpp) 635187b4248SPedro Giffuni basic_machine=i586-pc 636187b4248SPedro Giffuni os=-msdosdjgpp 637187b4248SPedro Giffuni ;; 638cdf0e10cSrcweir dpx20 | dpx20-*) 639cdf0e10cSrcweir basic_machine=rs6000-bull 640cdf0e10cSrcweir os=-bosx 641cdf0e10cSrcweir ;; 642*ee1eb700SMatthias Seidel dpx2*) 643cdf0e10cSrcweir basic_machine=m68k-bull 644cdf0e10cSrcweir os=-sysv3 645cdf0e10cSrcweir ;; 646*ee1eb700SMatthias Seidel e500v[12]) 647*ee1eb700SMatthias Seidel basic_machine=powerpc-unknown 648*ee1eb700SMatthias Seidel os=$os"spe" 649*ee1eb700SMatthias Seidel ;; 650*ee1eb700SMatthias Seidel e500v[12]-*) 651*ee1eb700SMatthias Seidel basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 652*ee1eb700SMatthias Seidel os=$os"spe" 653*ee1eb700SMatthias Seidel ;; 654cdf0e10cSrcweir ebmon29k) 655cdf0e10cSrcweir basic_machine=a29k-amd 656cdf0e10cSrcweir os=-ebmon 657cdf0e10cSrcweir ;; 658cdf0e10cSrcweir elxsi) 659cdf0e10cSrcweir basic_machine=elxsi-elxsi 660cdf0e10cSrcweir os=-bsd 661cdf0e10cSrcweir ;; 662cdf0e10cSrcweir encore | umax | mmax) 663cdf0e10cSrcweir basic_machine=ns32k-encore 664cdf0e10cSrcweir ;; 665cdf0e10cSrcweir es1800 | OSE68k | ose68k | ose | OSE) 666cdf0e10cSrcweir basic_machine=m68k-ericsson 667cdf0e10cSrcweir os=-ose 668cdf0e10cSrcweir ;; 669cdf0e10cSrcweir fx2800) 670cdf0e10cSrcweir basic_machine=i860-alliant 671cdf0e10cSrcweir ;; 672cdf0e10cSrcweir genix) 673cdf0e10cSrcweir basic_machine=ns32k-ns 674cdf0e10cSrcweir ;; 675cdf0e10cSrcweir gmicro) 676cdf0e10cSrcweir basic_machine=tron-gmicro 677cdf0e10cSrcweir os=-sysv 678cdf0e10cSrcweir ;; 679cdf0e10cSrcweir go32) 680cdf0e10cSrcweir basic_machine=i386-pc 681cdf0e10cSrcweir os=-go32 682cdf0e10cSrcweir ;; 683cdf0e10cSrcweir h3050r* | hiux*) 684cdf0e10cSrcweir basic_machine=hppa1.1-hitachi 685cdf0e10cSrcweir os=-hiuxwe2 686cdf0e10cSrcweir ;; 687cdf0e10cSrcweir h8300hms) 688cdf0e10cSrcweir basic_machine=h8300-hitachi 689cdf0e10cSrcweir os=-hms 690cdf0e10cSrcweir ;; 691cdf0e10cSrcweir h8300xray) 692cdf0e10cSrcweir basic_machine=h8300-hitachi 693cdf0e10cSrcweir os=-xray 694cdf0e10cSrcweir ;; 695cdf0e10cSrcweir h8500hms) 696cdf0e10cSrcweir basic_machine=h8500-hitachi 697cdf0e10cSrcweir os=-hms 698cdf0e10cSrcweir ;; 699cdf0e10cSrcweir harris) 700cdf0e10cSrcweir basic_machine=m88k-harris 701cdf0e10cSrcweir os=-sysv3 702cdf0e10cSrcweir ;; 703cdf0e10cSrcweir hp300-*) 704cdf0e10cSrcweir basic_machine=m68k-hp 705cdf0e10cSrcweir ;; 706cdf0e10cSrcweir hp300bsd) 707cdf0e10cSrcweir basic_machine=m68k-hp 708cdf0e10cSrcweir os=-bsd 709cdf0e10cSrcweir ;; 710cdf0e10cSrcweir hp300hpux) 711cdf0e10cSrcweir basic_machine=m68k-hp 712cdf0e10cSrcweir os=-hpux 713cdf0e10cSrcweir ;; 714cdf0e10cSrcweir hp3k9[0-9][0-9] | hp9[0-9][0-9]) 715cdf0e10cSrcweir basic_machine=hppa1.0-hp 716cdf0e10cSrcweir ;; 717cdf0e10cSrcweir hp9k2[0-9][0-9] | hp9k31[0-9]) 718cdf0e10cSrcweir basic_machine=m68000-hp 719cdf0e10cSrcweir ;; 720cdf0e10cSrcweir hp9k3[2-9][0-9]) 721cdf0e10cSrcweir basic_machine=m68k-hp 722cdf0e10cSrcweir ;; 723cdf0e10cSrcweir hp9k6[0-9][0-9] | hp6[0-9][0-9]) 724cdf0e10cSrcweir basic_machine=hppa1.0-hp 725cdf0e10cSrcweir ;; 726cdf0e10cSrcweir hp9k7[0-79][0-9] | hp7[0-79][0-9]) 727cdf0e10cSrcweir basic_machine=hppa1.1-hp 728cdf0e10cSrcweir ;; 729cdf0e10cSrcweir hp9k78[0-9] | hp78[0-9]) 730cdf0e10cSrcweir # FIXME: really hppa2.0-hp 731cdf0e10cSrcweir basic_machine=hppa1.1-hp 732cdf0e10cSrcweir ;; 733cdf0e10cSrcweir hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 734cdf0e10cSrcweir # FIXME: really hppa2.0-hp 735cdf0e10cSrcweir basic_machine=hppa1.1-hp 736cdf0e10cSrcweir ;; 737cdf0e10cSrcweir hp9k8[0-9][13679] | hp8[0-9][13679]) 738cdf0e10cSrcweir basic_machine=hppa1.1-hp 739cdf0e10cSrcweir ;; 740cdf0e10cSrcweir hp9k8[0-9][0-9] | hp8[0-9][0-9]) 741cdf0e10cSrcweir basic_machine=hppa1.0-hp 742cdf0e10cSrcweir ;; 743cdf0e10cSrcweir hppa-next) 744cdf0e10cSrcweir os=-nextstep3 745cdf0e10cSrcweir ;; 746cdf0e10cSrcweir hppaosf) 747cdf0e10cSrcweir basic_machine=hppa1.1-hp 748cdf0e10cSrcweir os=-osf 749cdf0e10cSrcweir ;; 750cdf0e10cSrcweir hppro) 751cdf0e10cSrcweir basic_machine=hppa1.1-hp 752cdf0e10cSrcweir os=-proelf 753cdf0e10cSrcweir ;; 754cdf0e10cSrcweir i370-ibm* | ibm*) 755cdf0e10cSrcweir basic_machine=i370-ibm 756cdf0e10cSrcweir ;; 757cdf0e10cSrcweir i*86v32) 758cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 759cdf0e10cSrcweir os=-sysv32 760cdf0e10cSrcweir ;; 761cdf0e10cSrcweir i*86v4*) 762cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 763cdf0e10cSrcweir os=-sysv4 764cdf0e10cSrcweir ;; 765cdf0e10cSrcweir i*86v) 766cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 767cdf0e10cSrcweir os=-sysv 768cdf0e10cSrcweir ;; 769cdf0e10cSrcweir i*86sol2) 770cdf0e10cSrcweir basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 771cdf0e10cSrcweir os=-solaris2 772cdf0e10cSrcweir ;; 773cdf0e10cSrcweir i386mach) 774cdf0e10cSrcweir basic_machine=i386-mach 775cdf0e10cSrcweir os=-mach 776cdf0e10cSrcweir ;; 777cdf0e10cSrcweir i386-vsta | vsta) 778cdf0e10cSrcweir basic_machine=i386-unknown 779cdf0e10cSrcweir os=-vsta 780cdf0e10cSrcweir ;; 781cdf0e10cSrcweir iris | iris4d) 782cdf0e10cSrcweir basic_machine=mips-sgi 783cdf0e10cSrcweir case $os in 784cdf0e10cSrcweir -irix*) 785cdf0e10cSrcweir ;; 786cdf0e10cSrcweir *) 787cdf0e10cSrcweir os=-irix4 788cdf0e10cSrcweir ;; 789cdf0e10cSrcweir esac 790cdf0e10cSrcweir ;; 791cdf0e10cSrcweir isi68 | isi) 792cdf0e10cSrcweir basic_machine=m68k-isi 793cdf0e10cSrcweir os=-sysv 794cdf0e10cSrcweir ;; 795*ee1eb700SMatthias Seidel leon-*|leon[3-9]-*) 796*ee1eb700SMatthias Seidel basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` 797*ee1eb700SMatthias Seidel ;; 798187b4248SPedro Giffuni m68knommu) 799187b4248SPedro Giffuni basic_machine=m68k-unknown 800187b4248SPedro Giffuni os=-linux 801187b4248SPedro Giffuni ;; 802187b4248SPedro Giffuni m68knommu-*) 803187b4248SPedro Giffuni basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 804187b4248SPedro Giffuni os=-linux 805187b4248SPedro Giffuni ;; 806cdf0e10cSrcweir m88k-omron*) 807cdf0e10cSrcweir basic_machine=m88k-omron 808cdf0e10cSrcweir ;; 809cdf0e10cSrcweir magnum | m3230) 810cdf0e10cSrcweir basic_machine=mips-mips 811cdf0e10cSrcweir os=-sysv 812cdf0e10cSrcweir ;; 813cdf0e10cSrcweir merlin) 814cdf0e10cSrcweir basic_machine=ns32k-utek 815cdf0e10cSrcweir os=-sysv 816cdf0e10cSrcweir ;; 817*ee1eb700SMatthias Seidel microblaze*) 818187b4248SPedro Giffuni basic_machine=microblaze-xilinx 819187b4248SPedro Giffuni ;; 820*ee1eb700SMatthias Seidel mingw64) 821*ee1eb700SMatthias Seidel basic_machine=x86_64-pc 822*ee1eb700SMatthias Seidel os=-mingw64 823*ee1eb700SMatthias Seidel ;; 824cdf0e10cSrcweir mingw32) 825*ee1eb700SMatthias Seidel basic_machine=i686-pc 826cdf0e10cSrcweir os=-mingw32 827cdf0e10cSrcweir ;; 828187b4248SPedro Giffuni mingw32ce) 829187b4248SPedro Giffuni basic_machine=arm-unknown 830187b4248SPedro Giffuni os=-mingw32ce 831187b4248SPedro Giffuni ;; 832cdf0e10cSrcweir miniframe) 833cdf0e10cSrcweir basic_machine=m68000-convergent 834cdf0e10cSrcweir ;; 835cdf0e10cSrcweir *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 836cdf0e10cSrcweir basic_machine=m68k-atari 837cdf0e10cSrcweir os=-mint 838cdf0e10cSrcweir ;; 839cdf0e10cSrcweir mips3*-*) 840cdf0e10cSrcweir basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 841cdf0e10cSrcweir ;; 842cdf0e10cSrcweir mips3*) 843cdf0e10cSrcweir basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 844cdf0e10cSrcweir ;; 845cdf0e10cSrcweir monitor) 846cdf0e10cSrcweir basic_machine=m68k-rom68k 847cdf0e10cSrcweir os=-coff 848cdf0e10cSrcweir ;; 849cdf0e10cSrcweir morphos) 850cdf0e10cSrcweir basic_machine=powerpc-unknown 851cdf0e10cSrcweir os=-morphos 852cdf0e10cSrcweir ;; 853*ee1eb700SMatthias Seidel moxiebox) 854*ee1eb700SMatthias Seidel basic_machine=moxie-unknown 855*ee1eb700SMatthias Seidel os=-moxiebox 856*ee1eb700SMatthias Seidel ;; 857cdf0e10cSrcweir msdos) 858cdf0e10cSrcweir basic_machine=i386-pc 859cdf0e10cSrcweir os=-msdos 860cdf0e10cSrcweir ;; 861187b4248SPedro Giffuni ms1-*) 862187b4248SPedro Giffuni basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 863187b4248SPedro Giffuni ;; 864*ee1eb700SMatthias Seidel msys) 865*ee1eb700SMatthias Seidel basic_machine=i686-pc 866*ee1eb700SMatthias Seidel os=-msys 867*ee1eb700SMatthias Seidel ;; 868cdf0e10cSrcweir mvs) 869cdf0e10cSrcweir basic_machine=i370-ibm 870cdf0e10cSrcweir os=-mvs 871cdf0e10cSrcweir ;; 872*ee1eb700SMatthias Seidel nacl) 873*ee1eb700SMatthias Seidel basic_machine=le32-unknown 874*ee1eb700SMatthias Seidel os=-nacl 875*ee1eb700SMatthias Seidel ;; 876cdf0e10cSrcweir ncr3000) 877cdf0e10cSrcweir basic_machine=i486-ncr 878cdf0e10cSrcweir os=-sysv4 879cdf0e10cSrcweir ;; 880cdf0e10cSrcweir netbsd386) 881cdf0e10cSrcweir basic_machine=i386-unknown 882cdf0e10cSrcweir os=-netbsd 883cdf0e10cSrcweir ;; 884cdf0e10cSrcweir netwinder) 885cdf0e10cSrcweir basic_machine=armv4l-rebel 886cdf0e10cSrcweir os=-linux 887cdf0e10cSrcweir ;; 888cdf0e10cSrcweir news | news700 | news800 | news900) 889cdf0e10cSrcweir basic_machine=m68k-sony 890cdf0e10cSrcweir os=-newsos 891cdf0e10cSrcweir ;; 892cdf0e10cSrcweir news1000) 893cdf0e10cSrcweir basic_machine=m68030-sony 894cdf0e10cSrcweir os=-newsos 895cdf0e10cSrcweir ;; 896cdf0e10cSrcweir news-3600 | risc-news) 897cdf0e10cSrcweir basic_machine=mips-sony 898cdf0e10cSrcweir os=-newsos 899cdf0e10cSrcweir ;; 900cdf0e10cSrcweir necv70) 901cdf0e10cSrcweir basic_machine=v70-nec 902cdf0e10cSrcweir os=-sysv 903cdf0e10cSrcweir ;; 904cdf0e10cSrcweir next | m*-next) 905cdf0e10cSrcweir basic_machine=m68k-next 906cdf0e10cSrcweir case $os in 907cdf0e10cSrcweir -nextstep* ) 908cdf0e10cSrcweir ;; 909cdf0e10cSrcweir -ns2*) 910cdf0e10cSrcweir os=-nextstep2 911cdf0e10cSrcweir ;; 912cdf0e10cSrcweir *) 913cdf0e10cSrcweir os=-nextstep3 914cdf0e10cSrcweir ;; 915cdf0e10cSrcweir esac 916cdf0e10cSrcweir ;; 917cdf0e10cSrcweir nh3000) 918cdf0e10cSrcweir basic_machine=m68k-harris 919cdf0e10cSrcweir os=-cxux 920cdf0e10cSrcweir ;; 921cdf0e10cSrcweir nh[45]000) 922cdf0e10cSrcweir basic_machine=m88k-harris 923cdf0e10cSrcweir os=-cxux 924cdf0e10cSrcweir ;; 925cdf0e10cSrcweir nindy960) 926cdf0e10cSrcweir basic_machine=i960-intel 927cdf0e10cSrcweir os=-nindy 928cdf0e10cSrcweir ;; 929cdf0e10cSrcweir mon960) 930cdf0e10cSrcweir basic_machine=i960-intel 931cdf0e10cSrcweir os=-mon960 932cdf0e10cSrcweir ;; 933cdf0e10cSrcweir nonstopux) 934cdf0e10cSrcweir basic_machine=mips-compaq 935cdf0e10cSrcweir os=-nonstopux 936cdf0e10cSrcweir ;; 937cdf0e10cSrcweir np1) 938cdf0e10cSrcweir basic_machine=np1-gould 939cdf0e10cSrcweir ;; 940*ee1eb700SMatthias Seidel neo-tandem) 941*ee1eb700SMatthias Seidel basic_machine=neo-tandem 942*ee1eb700SMatthias Seidel ;; 943*ee1eb700SMatthias Seidel nse-tandem) 944*ee1eb700SMatthias Seidel basic_machine=nse-tandem 945*ee1eb700SMatthias Seidel ;; 946cdf0e10cSrcweir nsr-tandem) 947cdf0e10cSrcweir basic_machine=nsr-tandem 948cdf0e10cSrcweir ;; 949*ee1eb700SMatthias Seidel nsx-tandem) 950*ee1eb700SMatthias Seidel basic_machine=nsx-tandem 951*ee1eb700SMatthias Seidel ;; 952cdf0e10cSrcweir op50n-* | op60c-*) 953cdf0e10cSrcweir basic_machine=hppa1.1-oki 954cdf0e10cSrcweir os=-proelf 955cdf0e10cSrcweir ;; 956187b4248SPedro Giffuni openrisc | openrisc-*) 957cdf0e10cSrcweir basic_machine=or32-unknown 958187b4248SPedro Giffuni ;; 959187b4248SPedro Giffuni os400) 960187b4248SPedro Giffuni basic_machine=powerpc-ibm 961187b4248SPedro Giffuni os=-os400 962cdf0e10cSrcweir ;; 963cdf0e10cSrcweir OSE68000 | ose68000) 964cdf0e10cSrcweir basic_machine=m68000-ericsson 965cdf0e10cSrcweir os=-ose 966cdf0e10cSrcweir ;; 967cdf0e10cSrcweir os68k) 968cdf0e10cSrcweir basic_machine=m68k-none 969cdf0e10cSrcweir os=-os68k 970cdf0e10cSrcweir ;; 971cdf0e10cSrcweir pa-hitachi) 972cdf0e10cSrcweir basic_machine=hppa1.1-hitachi 973cdf0e10cSrcweir os=-hiuxwe2 974cdf0e10cSrcweir ;; 975cdf0e10cSrcweir paragon) 976cdf0e10cSrcweir basic_machine=i860-intel 977cdf0e10cSrcweir os=-osf 978cdf0e10cSrcweir ;; 979187b4248SPedro Giffuni parisc) 980187b4248SPedro Giffuni basic_machine=hppa-unknown 981187b4248SPedro Giffuni os=-linux 982187b4248SPedro Giffuni ;; 983187b4248SPedro Giffuni parisc-*) 984187b4248SPedro Giffuni basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 985187b4248SPedro Giffuni os=-linux 986187b4248SPedro Giffuni ;; 987cdf0e10cSrcweir pbd) 988cdf0e10cSrcweir basic_machine=sparc-tti 989cdf0e10cSrcweir ;; 990cdf0e10cSrcweir pbb) 991cdf0e10cSrcweir basic_machine=m68k-tti 992cdf0e10cSrcweir ;; 993cdf0e10cSrcweir pc532 | pc532-*) 994cdf0e10cSrcweir basic_machine=ns32k-pc532 995cdf0e10cSrcweir ;; 996187b4248SPedro Giffuni pc98) 997187b4248SPedro Giffuni basic_machine=i386-pc 998187b4248SPedro Giffuni ;; 999187b4248SPedro Giffuni pc98-*) 1000187b4248SPedro Giffuni basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 1001187b4248SPedro Giffuni ;; 1002cdf0e10cSrcweir pentium | p5 | k5 | k6 | nexgen | viac3) 1003cdf0e10cSrcweir basic_machine=i586-pc 1004cdf0e10cSrcweir ;; 1005cdf0e10cSrcweir pentiumpro | p6 | 6x86 | athlon | athlon_*) 1006cdf0e10cSrcweir basic_machine=i686-pc 1007cdf0e10cSrcweir ;; 1008cdf0e10cSrcweir pentiumii | pentium2 | pentiumiii | pentium3) 1009cdf0e10cSrcweir basic_machine=i686-pc 1010cdf0e10cSrcweir ;; 1011cdf0e10cSrcweir pentium4) 1012cdf0e10cSrcweir basic_machine=i786-pc 1013cdf0e10cSrcweir ;; 1014cdf0e10cSrcweir pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 1015cdf0e10cSrcweir basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 1016cdf0e10cSrcweir ;; 1017cdf0e10cSrcweir pentiumpro-* | p6-* | 6x86-* | athlon-*) 1018cdf0e10cSrcweir basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 1019cdf0e10cSrcweir ;; 1020cdf0e10cSrcweir pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 1021cdf0e10cSrcweir basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 1022cdf0e10cSrcweir ;; 1023cdf0e10cSrcweir pentium4-*) 1024cdf0e10cSrcweir basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 1025cdf0e10cSrcweir ;; 1026cdf0e10cSrcweir pn) 1027cdf0e10cSrcweir basic_machine=pn-gould 1028cdf0e10cSrcweir ;; 1029cdf0e10cSrcweir power) basic_machine=power-ibm 1030cdf0e10cSrcweir ;; 1031*ee1eb700SMatthias Seidel ppc | ppcbe) basic_machine=powerpc-unknown 1032cdf0e10cSrcweir ;; 1033*ee1eb700SMatthias Seidel ppc-* | ppcbe-*) 1034*ee1eb700SMatthias Seidel basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 1035cdf0e10cSrcweir ;; 1036*ee1eb700SMatthias Seidel ppcle | powerpclittle) 1037cdf0e10cSrcweir basic_machine=powerpcle-unknown 1038cdf0e10cSrcweir ;; 1039cdf0e10cSrcweir ppcle-* | powerpclittle-*) 1040cdf0e10cSrcweir basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 1041cdf0e10cSrcweir ;; 1042cdf0e10cSrcweir ppc64) basic_machine=powerpc64-unknown 1043cdf0e10cSrcweir ;; 1044cdf0e10cSrcweir ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 1045cdf0e10cSrcweir ;; 1046*ee1eb700SMatthias Seidel ppc64le | powerpc64little) 1047cdf0e10cSrcweir basic_machine=powerpc64le-unknown 1048cdf0e10cSrcweir ;; 1049cdf0e10cSrcweir ppc64le-* | powerpc64little-*) 1050cdf0e10cSrcweir basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 1051cdf0e10cSrcweir ;; 1052cdf0e10cSrcweir ps2) 1053cdf0e10cSrcweir basic_machine=i386-ibm 1054cdf0e10cSrcweir ;; 1055cdf0e10cSrcweir pw32) 1056cdf0e10cSrcweir basic_machine=i586-unknown 1057cdf0e10cSrcweir os=-pw32 1058cdf0e10cSrcweir ;; 1059*ee1eb700SMatthias Seidel rdos | rdos64) 1060*ee1eb700SMatthias Seidel basic_machine=x86_64-pc 1061*ee1eb700SMatthias Seidel os=-rdos 1062*ee1eb700SMatthias Seidel ;; 1063*ee1eb700SMatthias Seidel rdos32) 1064187b4248SPedro Giffuni basic_machine=i386-pc 1065187b4248SPedro Giffuni os=-rdos 1066187b4248SPedro Giffuni ;; 1067cdf0e10cSrcweir rom68k) 1068cdf0e10cSrcweir basic_machine=m68k-rom68k 1069cdf0e10cSrcweir os=-coff 1070cdf0e10cSrcweir ;; 1071cdf0e10cSrcweir rm[46]00) 1072cdf0e10cSrcweir basic_machine=mips-siemens 1073cdf0e10cSrcweir ;; 1074cdf0e10cSrcweir rtpc | rtpc-*) 1075cdf0e10cSrcweir basic_machine=romp-ibm 1076cdf0e10cSrcweir ;; 1077cdf0e10cSrcweir s390 | s390-*) 1078cdf0e10cSrcweir basic_machine=s390-ibm 1079cdf0e10cSrcweir ;; 1080cdf0e10cSrcweir s390x | s390x-*) 1081cdf0e10cSrcweir basic_machine=s390x-ibm 1082cdf0e10cSrcweir ;; 1083cdf0e10cSrcweir sa29200) 1084cdf0e10cSrcweir basic_machine=a29k-amd 1085cdf0e10cSrcweir os=-udi 1086cdf0e10cSrcweir ;; 1087cdf0e10cSrcweir sb1) 1088cdf0e10cSrcweir basic_machine=mipsisa64sb1-unknown 1089cdf0e10cSrcweir ;; 1090cdf0e10cSrcweir sb1el) 1091cdf0e10cSrcweir basic_machine=mipsisa64sb1el-unknown 1092cdf0e10cSrcweir ;; 1093187b4248SPedro Giffuni sde) 1094187b4248SPedro Giffuni basic_machine=mipsisa32-sde 1095187b4248SPedro Giffuni os=-elf 1096187b4248SPedro Giffuni ;; 1097cdf0e10cSrcweir sei) 1098cdf0e10cSrcweir basic_machine=mips-sei 1099cdf0e10cSrcweir os=-seiux 1100cdf0e10cSrcweir ;; 1101cdf0e10cSrcweir sequent) 1102cdf0e10cSrcweir basic_machine=i386-sequent 1103cdf0e10cSrcweir ;; 1104cdf0e10cSrcweir sh) 1105cdf0e10cSrcweir basic_machine=sh-hitachi 1106cdf0e10cSrcweir os=-hms 1107cdf0e10cSrcweir ;; 1108187b4248SPedro Giffuni sh5el) 1109187b4248SPedro Giffuni basic_machine=sh5le-unknown 1110187b4248SPedro Giffuni ;; 1111cdf0e10cSrcweir sh64) 1112cdf0e10cSrcweir basic_machine=sh64-unknown 1113cdf0e10cSrcweir ;; 1114cdf0e10cSrcweir sparclite-wrs | simso-wrs) 1115cdf0e10cSrcweir basic_machine=sparclite-wrs 1116cdf0e10cSrcweir os=-vxworks 1117cdf0e10cSrcweir ;; 1118cdf0e10cSrcweir sps7) 1119cdf0e10cSrcweir basic_machine=m68k-bull 1120cdf0e10cSrcweir os=-sysv2 1121cdf0e10cSrcweir ;; 1122cdf0e10cSrcweir spur) 1123cdf0e10cSrcweir basic_machine=spur-unknown 1124cdf0e10cSrcweir ;; 1125cdf0e10cSrcweir st2000) 1126cdf0e10cSrcweir basic_machine=m68k-tandem 1127cdf0e10cSrcweir ;; 1128cdf0e10cSrcweir stratus) 1129cdf0e10cSrcweir basic_machine=i860-stratus 1130cdf0e10cSrcweir os=-sysv4 1131cdf0e10cSrcweir ;; 1132*ee1eb700SMatthias Seidel strongarm-* | thumb-*) 1133*ee1eb700SMatthias Seidel basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` 1134*ee1eb700SMatthias Seidel ;; 1135cdf0e10cSrcweir sun2) 1136cdf0e10cSrcweir basic_machine=m68000-sun 1137cdf0e10cSrcweir ;; 1138cdf0e10cSrcweir sun2os3) 1139cdf0e10cSrcweir basic_machine=m68000-sun 1140cdf0e10cSrcweir os=-sunos3 1141cdf0e10cSrcweir ;; 1142cdf0e10cSrcweir sun2os4) 1143cdf0e10cSrcweir basic_machine=m68000-sun 1144cdf0e10cSrcweir os=-sunos4 1145cdf0e10cSrcweir ;; 1146cdf0e10cSrcweir sun3os3) 1147cdf0e10cSrcweir basic_machine=m68k-sun 1148cdf0e10cSrcweir os=-sunos3 1149cdf0e10cSrcweir ;; 1150cdf0e10cSrcweir sun3os4) 1151cdf0e10cSrcweir basic_machine=m68k-sun 1152cdf0e10cSrcweir os=-sunos4 1153cdf0e10cSrcweir ;; 1154cdf0e10cSrcweir sun4os3) 1155cdf0e10cSrcweir basic_machine=sparc-sun 1156cdf0e10cSrcweir os=-sunos3 1157cdf0e10cSrcweir ;; 1158cdf0e10cSrcweir sun4os4) 1159cdf0e10cSrcweir basic_machine=sparc-sun 1160cdf0e10cSrcweir os=-sunos4 1161cdf0e10cSrcweir ;; 1162cdf0e10cSrcweir sun4sol2) 1163cdf0e10cSrcweir basic_machine=sparc-sun 1164cdf0e10cSrcweir os=-solaris2 1165cdf0e10cSrcweir ;; 1166cdf0e10cSrcweir sun3 | sun3-*) 1167cdf0e10cSrcweir basic_machine=m68k-sun 1168cdf0e10cSrcweir ;; 1169cdf0e10cSrcweir sun4) 1170cdf0e10cSrcweir basic_machine=sparc-sun 1171cdf0e10cSrcweir ;; 1172cdf0e10cSrcweir sun386 | sun386i | roadrunner) 1173cdf0e10cSrcweir basic_machine=i386-sun 1174cdf0e10cSrcweir ;; 1175cdf0e10cSrcweir sv1) 1176cdf0e10cSrcweir basic_machine=sv1-cray 1177cdf0e10cSrcweir os=-unicos 1178cdf0e10cSrcweir ;; 1179cdf0e10cSrcweir symmetry) 1180cdf0e10cSrcweir basic_machine=i386-sequent 1181cdf0e10cSrcweir os=-dynix 1182cdf0e10cSrcweir ;; 1183cdf0e10cSrcweir t3e) 1184cdf0e10cSrcweir basic_machine=alphaev5-cray 1185cdf0e10cSrcweir os=-unicos 1186cdf0e10cSrcweir ;; 1187cdf0e10cSrcweir t90) 1188cdf0e10cSrcweir basic_machine=t90-cray 1189cdf0e10cSrcweir os=-unicos 1190cdf0e10cSrcweir ;; 1191187b4248SPedro Giffuni tile*) 1192*ee1eb700SMatthias Seidel basic_machine=$basic_machine-unknown 1193187b4248SPedro Giffuni os=-linux-gnu 1194187b4248SPedro Giffuni ;; 1195cdf0e10cSrcweir tx39) 1196cdf0e10cSrcweir basic_machine=mipstx39-unknown 1197cdf0e10cSrcweir ;; 1198cdf0e10cSrcweir tx39el) 1199cdf0e10cSrcweir basic_machine=mipstx39el-unknown 1200cdf0e10cSrcweir ;; 1201cdf0e10cSrcweir toad1) 1202cdf0e10cSrcweir basic_machine=pdp10-xkl 1203cdf0e10cSrcweir os=-tops20 1204cdf0e10cSrcweir ;; 1205cdf0e10cSrcweir tower | tower-32) 1206cdf0e10cSrcweir basic_machine=m68k-ncr 1207cdf0e10cSrcweir ;; 1208187b4248SPedro Giffuni tpf) 1209187b4248SPedro Giffuni basic_machine=s390x-ibm 1210187b4248SPedro Giffuni os=-tpf 1211187b4248SPedro Giffuni ;; 1212cdf0e10cSrcweir udi29k) 1213cdf0e10cSrcweir basic_machine=a29k-amd 1214cdf0e10cSrcweir os=-udi 1215cdf0e10cSrcweir ;; 1216cdf0e10cSrcweir ultra3) 1217cdf0e10cSrcweir basic_machine=a29k-nyu 1218cdf0e10cSrcweir os=-sym1 1219cdf0e10cSrcweir ;; 1220cdf0e10cSrcweir v810 | necv810) 1221cdf0e10cSrcweir basic_machine=v810-nec 1222cdf0e10cSrcweir os=-none 1223cdf0e10cSrcweir ;; 1224cdf0e10cSrcweir vaxv) 1225cdf0e10cSrcweir basic_machine=vax-dec 1226cdf0e10cSrcweir os=-sysv 1227cdf0e10cSrcweir ;; 1228cdf0e10cSrcweir vms) 1229cdf0e10cSrcweir basic_machine=vax-dec 1230cdf0e10cSrcweir os=-vms 1231cdf0e10cSrcweir ;; 1232cdf0e10cSrcweir vpp*|vx|vx-*) 1233cdf0e10cSrcweir basic_machine=f301-fujitsu 1234cdf0e10cSrcweir ;; 1235cdf0e10cSrcweir vxworks960) 1236cdf0e10cSrcweir basic_machine=i960-wrs 1237cdf0e10cSrcweir os=-vxworks 1238cdf0e10cSrcweir ;; 1239cdf0e10cSrcweir vxworks68) 1240cdf0e10cSrcweir basic_machine=m68k-wrs 1241cdf0e10cSrcweir os=-vxworks 1242cdf0e10cSrcweir ;; 1243cdf0e10cSrcweir vxworks29k) 1244cdf0e10cSrcweir basic_machine=a29k-wrs 1245cdf0e10cSrcweir os=-vxworks 1246cdf0e10cSrcweir ;; 1247*ee1eb700SMatthias Seidel wasm32) 1248*ee1eb700SMatthias Seidel basic_machine=wasm32-unknown 1249*ee1eb700SMatthias Seidel ;; 1250cdf0e10cSrcweir w65*) 1251cdf0e10cSrcweir basic_machine=w65-wdc 1252cdf0e10cSrcweir os=-none 1253cdf0e10cSrcweir ;; 1254cdf0e10cSrcweir w89k-*) 1255cdf0e10cSrcweir basic_machine=hppa1.1-winbond 1256cdf0e10cSrcweir os=-proelf 1257cdf0e10cSrcweir ;; 1258*ee1eb700SMatthias Seidel x64) 1259*ee1eb700SMatthias Seidel basic_machine=x86_64-pc 1260*ee1eb700SMatthias Seidel ;; 1261187b4248SPedro Giffuni xbox) 1262187b4248SPedro Giffuni basic_machine=i686-pc 1263187b4248SPedro Giffuni os=-mingw32 1264187b4248SPedro Giffuni ;; 1265cdf0e10cSrcweir xps | xps100) 1266cdf0e10cSrcweir basic_machine=xps100-honeywell 1267cdf0e10cSrcweir ;; 1268*ee1eb700SMatthias Seidel xscale-* | xscalee[bl]-*) 1269*ee1eb700SMatthias Seidel basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` 1270*ee1eb700SMatthias Seidel ;; 1271cdf0e10cSrcweir ymp) 1272cdf0e10cSrcweir basic_machine=ymp-cray 1273cdf0e10cSrcweir os=-unicos 1274cdf0e10cSrcweir ;; 1275cdf0e10cSrcweir z8k-*-coff) 1276cdf0e10cSrcweir basic_machine=z8k-unknown 1277cdf0e10cSrcweir os=-sim 1278cdf0e10cSrcweir ;; 1279187b4248SPedro Giffuni z80-*-coff) 1280187b4248SPedro Giffuni basic_machine=z80-unknown 1281187b4248SPedro Giffuni os=-sim 1282187b4248SPedro Giffuni ;; 1283cdf0e10cSrcweir none) 1284cdf0e10cSrcweir basic_machine=none-none 1285cdf0e10cSrcweir os=-none 1286cdf0e10cSrcweir ;; 1287cdf0e10cSrcweir 1288cdf0e10cSrcweir# Here we handle the default manufacturer of certain CPU types. It is in 1289cdf0e10cSrcweir# some cases the only manufacturer, in others, it is the most popular. 1290cdf0e10cSrcweir w89k) 1291cdf0e10cSrcweir basic_machine=hppa1.1-winbond 1292cdf0e10cSrcweir ;; 1293cdf0e10cSrcweir op50n) 1294cdf0e10cSrcweir basic_machine=hppa1.1-oki 1295cdf0e10cSrcweir ;; 1296cdf0e10cSrcweir op60c) 1297cdf0e10cSrcweir basic_machine=hppa1.1-oki 1298cdf0e10cSrcweir ;; 1299cdf0e10cSrcweir romp) 1300cdf0e10cSrcweir basic_machine=romp-ibm 1301cdf0e10cSrcweir ;; 1302187b4248SPedro Giffuni mmix) 1303187b4248SPedro Giffuni basic_machine=mmix-knuth 1304187b4248SPedro Giffuni ;; 1305cdf0e10cSrcweir rs6000) 1306cdf0e10cSrcweir basic_machine=rs6000-ibm 1307cdf0e10cSrcweir ;; 1308cdf0e10cSrcweir vax) 1309cdf0e10cSrcweir basic_machine=vax-dec 1310cdf0e10cSrcweir ;; 1311cdf0e10cSrcweir pdp10) 1312cdf0e10cSrcweir # there are many clones, so DEC is not a safe bet 1313cdf0e10cSrcweir basic_machine=pdp10-unknown 1314cdf0e10cSrcweir ;; 1315cdf0e10cSrcweir pdp11) 1316cdf0e10cSrcweir basic_machine=pdp11-dec 1317cdf0e10cSrcweir ;; 1318cdf0e10cSrcweir we32k) 1319cdf0e10cSrcweir basic_machine=we32k-att 1320cdf0e10cSrcweir ;; 1321187b4248SPedro Giffuni sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 1322cdf0e10cSrcweir basic_machine=sh-unknown 1323cdf0e10cSrcweir ;; 1324187b4248SPedro Giffuni sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 1325cdf0e10cSrcweir basic_machine=sparc-sun 1326cdf0e10cSrcweir ;; 1327cdf0e10cSrcweir cydra) 1328cdf0e10cSrcweir basic_machine=cydra-cydrome 1329cdf0e10cSrcweir ;; 1330cdf0e10cSrcweir orion) 1331cdf0e10cSrcweir basic_machine=orion-highlevel 1332cdf0e10cSrcweir ;; 1333cdf0e10cSrcweir orion105) 1334cdf0e10cSrcweir basic_machine=clipper-highlevel 1335cdf0e10cSrcweir ;; 1336cdf0e10cSrcweir mac | mpw | mac-mpw) 1337cdf0e10cSrcweir basic_machine=m68k-apple 1338cdf0e10cSrcweir ;; 1339cdf0e10cSrcweir pmac | pmac-mpw) 1340cdf0e10cSrcweir basic_machine=powerpc-apple 1341cdf0e10cSrcweir ;; 1342cdf0e10cSrcweir *-unknown) 1343cdf0e10cSrcweir # Make sure to match an already-canonicalized machine name. 1344cdf0e10cSrcweir ;; 1345cdf0e10cSrcweir *) 1346cdf0e10cSrcweir echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1347cdf0e10cSrcweir exit 1 1348cdf0e10cSrcweir ;; 1349cdf0e10cSrcweiresac 1350cdf0e10cSrcweir 1351cdf0e10cSrcweir# Here we canonicalize certain aliases for manufacturers. 1352cdf0e10cSrcweircase $basic_machine in 1353cdf0e10cSrcweir *-digital*) 1354cdf0e10cSrcweir basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 1355cdf0e10cSrcweir ;; 1356cdf0e10cSrcweir *-commodore*) 1357cdf0e10cSrcweir basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 1358cdf0e10cSrcweir ;; 1359cdf0e10cSrcweir *) 1360cdf0e10cSrcweir ;; 1361cdf0e10cSrcweiresac 1362cdf0e10cSrcweir 1363cdf0e10cSrcweir# Decode manufacturer-specific aliases for certain operating systems. 1364cdf0e10cSrcweir 1365cdf0e10cSrcweirif [ x"$os" != x"" ] 1366cdf0e10cSrcweirthen 1367cdf0e10cSrcweircase $os in 1368*ee1eb700SMatthias Seidel # First match some system type aliases that might get confused 1369*ee1eb700SMatthias Seidel # with valid system types. 1370cdf0e10cSrcweir # -solaris* is a basic system type, with this one exception. 1371187b4248SPedro Giffuni -auroraux) 1372187b4248SPedro Giffuni os=-auroraux 1373187b4248SPedro Giffuni ;; 1374cdf0e10cSrcweir -solaris1 | -solaris1.*) 1375cdf0e10cSrcweir os=`echo $os | sed -e 's|solaris1|sunos4|'` 1376cdf0e10cSrcweir ;; 1377cdf0e10cSrcweir -solaris) 1378cdf0e10cSrcweir os=-solaris2 1379cdf0e10cSrcweir ;; 1380cdf0e10cSrcweir -svr4*) 1381cdf0e10cSrcweir os=-sysv4 1382cdf0e10cSrcweir ;; 1383cdf0e10cSrcweir -unixware*) 1384cdf0e10cSrcweir os=-sysv4.2uw 1385cdf0e10cSrcweir ;; 1386cdf0e10cSrcweir -gnu/linux*) 1387cdf0e10cSrcweir os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1388cdf0e10cSrcweir ;; 1389*ee1eb700SMatthias Seidel # Now accept the basic system types. 1390cdf0e10cSrcweir # The portable systems comes first. 1391*ee1eb700SMatthias Seidel # Each alternative MUST end in a * to match a version number. 1392cdf0e10cSrcweir # -sysv* is not here because it comes later, after sysvr4. 1393cdf0e10cSrcweir -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1394187b4248SPedro Giffuni | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 1395187b4248SPedro Giffuni | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 1396*ee1eb700SMatthias Seidel | -sym* | -kopensolaris* | -plan9* \ 1397cdf0e10cSrcweir | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1398*ee1eb700SMatthias Seidel | -aos* | -aros* | -cloudabi* | -sortix* \ 1399cdf0e10cSrcweir | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1400cdf0e10cSrcweir | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1401187b4248SPedro Giffuni | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 1402*ee1eb700SMatthias Seidel | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ 1403187b4248SPedro Giffuni | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1404187b4248SPedro Giffuni | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1405cdf0e10cSrcweir | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1406cdf0e10cSrcweir | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1407*ee1eb700SMatthias Seidel | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ 1408*ee1eb700SMatthias Seidel | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1409*ee1eb700SMatthias Seidel | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ 1410*ee1eb700SMatthias Seidel | -linux-newlib* | -linux-musl* | -linux-uclibc* \ 1411*ee1eb700SMatthias Seidel | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ 1412cdf0e10cSrcweir | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1413cdf0e10cSrcweir | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1414cdf0e10cSrcweir | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1415cdf0e10cSrcweir | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1416cdf0e10cSrcweir | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1417187b4248SPedro Giffuni | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1418*ee1eb700SMatthias Seidel | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ 1419*ee1eb700SMatthias Seidel | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) 1420cdf0e10cSrcweir # Remember, each alternative MUST END IN *, to match a version number. 1421cdf0e10cSrcweir ;; 1422cdf0e10cSrcweir -qnx*) 1423cdf0e10cSrcweir case $basic_machine in 1424cdf0e10cSrcweir x86-* | i*86-*) 1425cdf0e10cSrcweir ;; 1426cdf0e10cSrcweir *) 1427cdf0e10cSrcweir os=-nto$os 1428cdf0e10cSrcweir ;; 1429cdf0e10cSrcweir esac 1430cdf0e10cSrcweir ;; 1431cdf0e10cSrcweir -nto-qnx*) 1432cdf0e10cSrcweir ;; 1433cdf0e10cSrcweir -nto*) 1434cdf0e10cSrcweir os=`echo $os | sed -e 's|nto|nto-qnx|'` 1435cdf0e10cSrcweir ;; 1436cdf0e10cSrcweir -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1437187b4248SPedro Giffuni | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 1438cdf0e10cSrcweir | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1439cdf0e10cSrcweir ;; 1440cdf0e10cSrcweir -mac*) 1441cdf0e10cSrcweir os=`echo $os | sed -e 's|mac|macos|'` 1442cdf0e10cSrcweir ;; 1443187b4248SPedro Giffuni -linux-dietlibc) 1444187b4248SPedro Giffuni os=-linux-dietlibc 1445187b4248SPedro Giffuni ;; 1446cdf0e10cSrcweir -linux*) 1447cdf0e10cSrcweir os=`echo $os | sed -e 's|linux|linux-gnu|'` 1448cdf0e10cSrcweir ;; 1449cdf0e10cSrcweir -sunos5*) 1450cdf0e10cSrcweir os=`echo $os | sed -e 's|sunos5|solaris2|'` 1451cdf0e10cSrcweir ;; 1452cdf0e10cSrcweir -sunos6*) 1453cdf0e10cSrcweir os=`echo $os | sed -e 's|sunos6|solaris3|'` 1454cdf0e10cSrcweir ;; 1455cdf0e10cSrcweir -opened*) 1456cdf0e10cSrcweir os=-openedition 1457cdf0e10cSrcweir ;; 1458187b4248SPedro Giffuni -os400*) 1459187b4248SPedro Giffuni os=-os400 1460187b4248SPedro Giffuni ;; 1461cdf0e10cSrcweir -wince*) 1462cdf0e10cSrcweir os=-wince 1463cdf0e10cSrcweir ;; 1464cdf0e10cSrcweir -osfrose*) 1465cdf0e10cSrcweir os=-osfrose 1466cdf0e10cSrcweir ;; 1467cdf0e10cSrcweir -osf*) 1468cdf0e10cSrcweir os=-osf 1469cdf0e10cSrcweir ;; 1470cdf0e10cSrcweir -utek*) 1471cdf0e10cSrcweir os=-bsd 1472cdf0e10cSrcweir ;; 1473cdf0e10cSrcweir -dynix*) 1474cdf0e10cSrcweir os=-bsd 1475cdf0e10cSrcweir ;; 1476cdf0e10cSrcweir -acis*) 1477cdf0e10cSrcweir os=-aos 1478cdf0e10cSrcweir ;; 1479cdf0e10cSrcweir -atheos*) 1480cdf0e10cSrcweir os=-atheos 1481cdf0e10cSrcweir ;; 1482187b4248SPedro Giffuni -syllable*) 1483187b4248SPedro Giffuni os=-syllable 1484187b4248SPedro Giffuni ;; 1485cdf0e10cSrcweir -386bsd) 1486cdf0e10cSrcweir os=-bsd 1487cdf0e10cSrcweir ;; 1488cdf0e10cSrcweir -ctix* | -uts*) 1489cdf0e10cSrcweir os=-sysv 1490cdf0e10cSrcweir ;; 1491cdf0e10cSrcweir -nova*) 1492cdf0e10cSrcweir os=-rtmk-nova 1493cdf0e10cSrcweir ;; 1494cdf0e10cSrcweir -ns2) 1495cdf0e10cSrcweir os=-nextstep2 1496cdf0e10cSrcweir ;; 1497cdf0e10cSrcweir -nsk*) 1498cdf0e10cSrcweir os=-nsk 1499cdf0e10cSrcweir ;; 1500cdf0e10cSrcweir # Preserve the version number of sinix5. 1501cdf0e10cSrcweir -sinix5.*) 1502cdf0e10cSrcweir os=`echo $os | sed -e 's|sinix|sysv|'` 1503cdf0e10cSrcweir ;; 1504cdf0e10cSrcweir -sinix*) 1505cdf0e10cSrcweir os=-sysv4 1506cdf0e10cSrcweir ;; 1507187b4248SPedro Giffuni -tpf*) 1508187b4248SPedro Giffuni os=-tpf 1509187b4248SPedro Giffuni ;; 1510cdf0e10cSrcweir -triton*) 1511cdf0e10cSrcweir os=-sysv3 1512cdf0e10cSrcweir ;; 1513cdf0e10cSrcweir -oss*) 1514cdf0e10cSrcweir os=-sysv3 1515cdf0e10cSrcweir ;; 1516cdf0e10cSrcweir -svr4) 1517cdf0e10cSrcweir os=-sysv4 1518cdf0e10cSrcweir ;; 1519cdf0e10cSrcweir -svr3) 1520cdf0e10cSrcweir os=-sysv3 1521cdf0e10cSrcweir ;; 1522cdf0e10cSrcweir -sysvr4) 1523cdf0e10cSrcweir os=-sysv4 1524cdf0e10cSrcweir ;; 1525cdf0e10cSrcweir # This must come after -sysvr4. 1526cdf0e10cSrcweir -sysv*) 1527cdf0e10cSrcweir ;; 1528cdf0e10cSrcweir -ose*) 1529cdf0e10cSrcweir os=-ose 1530cdf0e10cSrcweir ;; 1531cdf0e10cSrcweir -es1800*) 1532cdf0e10cSrcweir os=-ose 1533cdf0e10cSrcweir ;; 1534cdf0e10cSrcweir -xenix) 1535cdf0e10cSrcweir os=-xenix 1536cdf0e10cSrcweir ;; 1537cdf0e10cSrcweir -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1538cdf0e10cSrcweir os=-mint 1539cdf0e10cSrcweir ;; 1540cdf0e10cSrcweir -aros*) 1541cdf0e10cSrcweir os=-aros 1542cdf0e10cSrcweir ;; 1543187b4248SPedro Giffuni -zvmoe) 1544187b4248SPedro Giffuni os=-zvmoe 1545187b4248SPedro Giffuni ;; 1546187b4248SPedro Giffuni -dicos*) 1547187b4248SPedro Giffuni os=-dicos 1548187b4248SPedro Giffuni ;; 1549187b4248SPedro Giffuni -nacl*) 1550187b4248SPedro Giffuni ;; 1551*ee1eb700SMatthias Seidel -ios) 1552*ee1eb700SMatthias Seidel ;; 1553cdf0e10cSrcweir -none) 1554cdf0e10cSrcweir ;; 1555cdf0e10cSrcweir *) 1556cdf0e10cSrcweir # Get rid of the `-' at the beginning of $os. 1557cdf0e10cSrcweir os=`echo $os | sed 's/[^-]*-//'` 1558cdf0e10cSrcweir echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 1559cdf0e10cSrcweir exit 1 1560cdf0e10cSrcweir ;; 1561cdf0e10cSrcweiresac 1562cdf0e10cSrcweirelse 1563cdf0e10cSrcweir 1564cdf0e10cSrcweir# Here we handle the default operating systems that come with various machines. 1565cdf0e10cSrcweir# The value should be what the vendor currently ships out the door with their 1566cdf0e10cSrcweir# machine or put another way, the most popular os provided with the machine. 1567cdf0e10cSrcweir 1568cdf0e10cSrcweir# Note that if you're going to try to match "-MANUFACTURER" here (say, 1569cdf0e10cSrcweir# "-sun"), then you have to tell the case statement up towards the top 1570cdf0e10cSrcweir# that MANUFACTURER isn't an operating system. Otherwise, code above 1571cdf0e10cSrcweir# will signal an error saying that MANUFACTURER isn't an operating 1572cdf0e10cSrcweir# system, and we'll never get to this point. 1573cdf0e10cSrcweir 1574cdf0e10cSrcweircase $basic_machine in 1575187b4248SPedro Giffuni score-*) 1576187b4248SPedro Giffuni os=-elf 1577187b4248SPedro Giffuni ;; 1578187b4248SPedro Giffuni spu-*) 1579187b4248SPedro Giffuni os=-elf 1580187b4248SPedro Giffuni ;; 1581cdf0e10cSrcweir *-acorn) 1582cdf0e10cSrcweir os=-riscix1.2 1583cdf0e10cSrcweir ;; 1584cdf0e10cSrcweir arm*-rebel) 1585cdf0e10cSrcweir os=-linux 1586cdf0e10cSrcweir ;; 1587cdf0e10cSrcweir arm*-semi) 1588cdf0e10cSrcweir os=-aout 1589cdf0e10cSrcweir ;; 1590cdf0e10cSrcweir c4x-* | tic4x-*) 1591cdf0e10cSrcweir os=-coff 1592cdf0e10cSrcweir ;; 1593*ee1eb700SMatthias Seidel c8051-*) 1594*ee1eb700SMatthias Seidel os=-elf 1595*ee1eb700SMatthias Seidel ;; 1596*ee1eb700SMatthias Seidel hexagon-*) 1597*ee1eb700SMatthias Seidel os=-elf 1598*ee1eb700SMatthias Seidel ;; 1599*ee1eb700SMatthias Seidel tic54x-*) 1600*ee1eb700SMatthias Seidel os=-coff 1601*ee1eb700SMatthias Seidel ;; 1602*ee1eb700SMatthias Seidel tic55x-*) 1603*ee1eb700SMatthias Seidel os=-coff 1604*ee1eb700SMatthias Seidel ;; 1605*ee1eb700SMatthias Seidel tic6x-*) 1606*ee1eb700SMatthias Seidel os=-coff 1607*ee1eb700SMatthias Seidel ;; 1608cdf0e10cSrcweir # This must come before the *-dec entry. 1609cdf0e10cSrcweir pdp10-*) 1610cdf0e10cSrcweir os=-tops20 1611cdf0e10cSrcweir ;; 1612cdf0e10cSrcweir pdp11-*) 1613cdf0e10cSrcweir os=-none 1614cdf0e10cSrcweir ;; 1615cdf0e10cSrcweir *-dec | vax-*) 1616cdf0e10cSrcweir os=-ultrix4.2 1617cdf0e10cSrcweir ;; 1618cdf0e10cSrcweir m68*-apollo) 1619cdf0e10cSrcweir os=-domain 1620cdf0e10cSrcweir ;; 1621cdf0e10cSrcweir i386-sun) 1622cdf0e10cSrcweir os=-sunos4.0.2 1623cdf0e10cSrcweir ;; 1624cdf0e10cSrcweir m68000-sun) 1625cdf0e10cSrcweir os=-sunos3 1626cdf0e10cSrcweir ;; 1627cdf0e10cSrcweir m68*-cisco) 1628cdf0e10cSrcweir os=-aout 1629cdf0e10cSrcweir ;; 1630187b4248SPedro Giffuni mep-*) 1631187b4248SPedro Giffuni os=-elf 1632187b4248SPedro Giffuni ;; 1633cdf0e10cSrcweir mips*-cisco) 1634cdf0e10cSrcweir os=-elf 1635cdf0e10cSrcweir ;; 1636cdf0e10cSrcweir mips*-*) 1637cdf0e10cSrcweir os=-elf 1638cdf0e10cSrcweir ;; 1639cdf0e10cSrcweir or32-*) 1640cdf0e10cSrcweir os=-coff 1641cdf0e10cSrcweir ;; 1642cdf0e10cSrcweir *-tti) # must be before sparc entry or we get the wrong os. 1643cdf0e10cSrcweir os=-sysv3 1644cdf0e10cSrcweir ;; 1645cdf0e10cSrcweir sparc-* | *-sun) 1646cdf0e10cSrcweir os=-sunos4.1.1 1647cdf0e10cSrcweir ;; 1648*ee1eb700SMatthias Seidel pru-*) 1649*ee1eb700SMatthias Seidel os=-elf 1650*ee1eb700SMatthias Seidel ;; 1651cdf0e10cSrcweir *-be) 1652cdf0e10cSrcweir os=-beos 1653cdf0e10cSrcweir ;; 1654187b4248SPedro Giffuni *-haiku) 1655187b4248SPedro Giffuni os=-haiku 1656187b4248SPedro Giffuni ;; 1657cdf0e10cSrcweir *-ibm) 1658cdf0e10cSrcweir os=-aix 1659cdf0e10cSrcweir ;; 1660187b4248SPedro Giffuni *-knuth) 1661187b4248SPedro Giffuni os=-mmixware 1662187b4248SPedro Giffuni ;; 1663cdf0e10cSrcweir *-wec) 1664cdf0e10cSrcweir os=-proelf 1665cdf0e10cSrcweir ;; 1666cdf0e10cSrcweir *-winbond) 1667cdf0e10cSrcweir os=-proelf 1668cdf0e10cSrcweir ;; 1669cdf0e10cSrcweir *-oki) 1670cdf0e10cSrcweir os=-proelf 1671cdf0e10cSrcweir ;; 1672cdf0e10cSrcweir *-hp) 1673cdf0e10cSrcweir os=-hpux 1674cdf0e10cSrcweir ;; 1675cdf0e10cSrcweir *-hitachi) 1676cdf0e10cSrcweir os=-hiux 1677cdf0e10cSrcweir ;; 1678cdf0e10cSrcweir i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1679cdf0e10cSrcweir os=-sysv 1680cdf0e10cSrcweir ;; 1681cdf0e10cSrcweir *-cbm) 1682cdf0e10cSrcweir os=-amigaos 1683cdf0e10cSrcweir ;; 1684cdf0e10cSrcweir *-dg) 1685cdf0e10cSrcweir os=-dgux 1686cdf0e10cSrcweir ;; 1687cdf0e10cSrcweir *-dolphin) 1688cdf0e10cSrcweir os=-sysv3 1689cdf0e10cSrcweir ;; 1690cdf0e10cSrcweir m68k-ccur) 1691cdf0e10cSrcweir os=-rtu 1692cdf0e10cSrcweir ;; 1693cdf0e10cSrcweir m88k-omron*) 1694cdf0e10cSrcweir os=-luna 1695cdf0e10cSrcweir ;; 1696cdf0e10cSrcweir *-next) 1697cdf0e10cSrcweir os=-nextstep 1698cdf0e10cSrcweir ;; 1699cdf0e10cSrcweir *-sequent) 1700cdf0e10cSrcweir os=-ptx 1701cdf0e10cSrcweir ;; 1702cdf0e10cSrcweir *-crds) 1703cdf0e10cSrcweir os=-unos 1704cdf0e10cSrcweir ;; 1705cdf0e10cSrcweir *-ns) 1706cdf0e10cSrcweir os=-genix 1707cdf0e10cSrcweir ;; 1708cdf0e10cSrcweir i370-*) 1709cdf0e10cSrcweir os=-mvs 1710cdf0e10cSrcweir ;; 1711cdf0e10cSrcweir *-next) 1712cdf0e10cSrcweir os=-nextstep3 1713cdf0e10cSrcweir ;; 1714cdf0e10cSrcweir *-gould) 1715cdf0e10cSrcweir os=-sysv 1716cdf0e10cSrcweir ;; 1717cdf0e10cSrcweir *-highlevel) 1718cdf0e10cSrcweir os=-bsd 1719cdf0e10cSrcweir ;; 1720cdf0e10cSrcweir *-encore) 1721cdf0e10cSrcweir os=-bsd 1722cdf0e10cSrcweir ;; 1723cdf0e10cSrcweir *-sgi) 1724cdf0e10cSrcweir os=-irix 1725cdf0e10cSrcweir ;; 1726cdf0e10cSrcweir *-siemens) 1727cdf0e10cSrcweir os=-sysv4 1728cdf0e10cSrcweir ;; 1729cdf0e10cSrcweir *-masscomp) 1730cdf0e10cSrcweir os=-rtu 1731cdf0e10cSrcweir ;; 1732cdf0e10cSrcweir f30[01]-fujitsu | f700-fujitsu) 1733cdf0e10cSrcweir os=-uxpv 1734cdf0e10cSrcweir ;; 1735cdf0e10cSrcweir *-rom68k) 1736cdf0e10cSrcweir os=-coff 1737cdf0e10cSrcweir ;; 1738cdf0e10cSrcweir *-*bug) 1739cdf0e10cSrcweir os=-coff 1740cdf0e10cSrcweir ;; 1741cdf0e10cSrcweir *-apple) 1742cdf0e10cSrcweir os=-macos 1743cdf0e10cSrcweir ;; 1744cdf0e10cSrcweir *-atari*) 1745cdf0e10cSrcweir os=-mint 1746cdf0e10cSrcweir ;; 1747cdf0e10cSrcweir *) 1748cdf0e10cSrcweir os=-none 1749cdf0e10cSrcweir ;; 1750cdf0e10cSrcweiresac 1751cdf0e10cSrcweirfi 1752cdf0e10cSrcweir 1753cdf0e10cSrcweir# Here we handle the case where we know the os, and the CPU type, but not the 1754cdf0e10cSrcweir# manufacturer. We pick the logical manufacturer. 1755cdf0e10cSrcweirvendor=unknown 1756cdf0e10cSrcweircase $basic_machine in 1757cdf0e10cSrcweir *-unknown) 1758cdf0e10cSrcweir case $os in 1759cdf0e10cSrcweir -riscix*) 1760cdf0e10cSrcweir vendor=acorn 1761cdf0e10cSrcweir ;; 1762cdf0e10cSrcweir -sunos*) 1763cdf0e10cSrcweir vendor=sun 1764cdf0e10cSrcweir ;; 1765187b4248SPedro Giffuni -cnk*|-aix*) 1766cdf0e10cSrcweir vendor=ibm 1767cdf0e10cSrcweir ;; 1768cdf0e10cSrcweir -beos*) 1769cdf0e10cSrcweir vendor=be 1770cdf0e10cSrcweir ;; 1771cdf0e10cSrcweir -hpux*) 1772cdf0e10cSrcweir vendor=hp 1773cdf0e10cSrcweir ;; 1774cdf0e10cSrcweir -mpeix*) 1775cdf0e10cSrcweir vendor=hp 1776cdf0e10cSrcweir ;; 1777cdf0e10cSrcweir -hiux*) 1778cdf0e10cSrcweir vendor=hitachi 1779cdf0e10cSrcweir ;; 1780cdf0e10cSrcweir -unos*) 1781cdf0e10cSrcweir vendor=crds 1782cdf0e10cSrcweir ;; 1783cdf0e10cSrcweir -dgux*) 1784cdf0e10cSrcweir vendor=dg 1785cdf0e10cSrcweir ;; 1786cdf0e10cSrcweir -luna*) 1787cdf0e10cSrcweir vendor=omron 1788cdf0e10cSrcweir ;; 1789cdf0e10cSrcweir -genix*) 1790cdf0e10cSrcweir vendor=ns 1791cdf0e10cSrcweir ;; 1792cdf0e10cSrcweir -mvs* | -opened*) 1793cdf0e10cSrcweir vendor=ibm 1794cdf0e10cSrcweir ;; 1795187b4248SPedro Giffuni -os400*) 1796187b4248SPedro Giffuni vendor=ibm 1797187b4248SPedro Giffuni ;; 1798cdf0e10cSrcweir -ptx*) 1799cdf0e10cSrcweir vendor=sequent 1800cdf0e10cSrcweir ;; 1801187b4248SPedro Giffuni -tpf*) 1802187b4248SPedro Giffuni vendor=ibm 1803187b4248SPedro Giffuni ;; 1804cdf0e10cSrcweir -vxsim* | -vxworks* | -windiss*) 1805cdf0e10cSrcweir vendor=wrs 1806cdf0e10cSrcweir ;; 1807cdf0e10cSrcweir -aux*) 1808cdf0e10cSrcweir vendor=apple 1809cdf0e10cSrcweir ;; 1810cdf0e10cSrcweir -hms*) 1811cdf0e10cSrcweir vendor=hitachi 1812cdf0e10cSrcweir ;; 1813cdf0e10cSrcweir -mpw* | -macos*) 1814cdf0e10cSrcweir vendor=apple 1815cdf0e10cSrcweir ;; 1816cdf0e10cSrcweir -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1817cdf0e10cSrcweir vendor=atari 1818cdf0e10cSrcweir ;; 1819cdf0e10cSrcweir -vos*) 1820cdf0e10cSrcweir vendor=stratus 1821cdf0e10cSrcweir ;; 1822cdf0e10cSrcweir esac 1823cdf0e10cSrcweir basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 1824cdf0e10cSrcweir ;; 1825cdf0e10cSrcweiresac 1826cdf0e10cSrcweir 1827cdf0e10cSrcweirecho $basic_machine$os 1828187b4248SPedro Giffuniexit 1829cdf0e10cSrcweir 1830cdf0e10cSrcweir# Local variables: 1831*ee1eb700SMatthias Seidel# eval: (add-hook 'write-file-functions 'time-stamp) 1832cdf0e10cSrcweir# time-stamp-start: "timestamp='" 1833cdf0e10cSrcweir# time-stamp-format: "%:y-%02m-%02d" 1834cdf0e10cSrcweir# time-stamp-end: "'" 1835cdf0e10cSrcweir# End: 1836