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