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