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