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