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