build-scripts/config.sub
changeset 11477 6987f7cb0a22
parent 9278 8900afb78a19
equal deleted inserted replaced
11476:b1718d4980ba 11477:6987f7cb0a22
     1 #! /bin/sh
     1 #! /bin/sh
     2 # Configuration validation subroutine script.
     2 # Configuration validation subroutine script.
     3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     3 #   Copyright 1992-2017 Free Software Foundation, Inc.
     4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
     4 
     5 #   2011, 2012 Free Software Foundation, Inc.
     5 timestamp='2017-04-02'
     6 
     6 
     7 timestamp='2012-08-18'
     7 # This file is free software; you can redistribute it and/or modify it
     8 
     8 # under the terms of the GNU General Public License as published by
     9 # This file is (in principle) common to ALL GNU software.
     9 # the Free Software Foundation; either version 3 of the License, or
    10 # The presence of a machine in this file suggests that SOME GNU software
       
    11 # can handle that machine.  It does not imply ALL GNU software can.
       
    12 #
       
    13 # This file is free software; you can redistribute it and/or modify
       
    14 # it under the terms of the GNU General Public License as published by
       
    15 # the Free Software Foundation; either version 2 of the License, or
       
    16 # (at your option) any later version.
    10 # (at your option) any later version.
    17 #
    11 #
    18 # This program is distributed in the hope that it will be useful,
    12 # This program is distributed in the hope that it will be useful, but
    19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    13 # WITHOUT ANY WARRANTY; without even the implied warranty of
    20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    21 # GNU General Public License for more details.
    15 # General Public License for more details.
    22 #
    16 #
    23 # You should have received a copy of the GNU General Public License
    17 # You should have received a copy of the GNU General Public License
    24 # along with this program; if not, see <http://www.gnu.org/licenses/>.
    18 # along with this program; if not, see <http://www.gnu.org/licenses/>.
    25 #
    19 #
    26 # As a special exception to the GNU General Public License, if you
    20 # As a special exception to the GNU General Public License, if you
    27 # distribute this file as part of a program that contains a
    21 # distribute this file as part of a program that contains a
    28 # configuration script generated by Autoconf, you may include it under
    22 # configuration script generated by Autoconf, you may include it under
    29 # the same distribution terms that you use for the rest of that program.
    23 # the same distribution terms that you use for the rest of that
    30 
    24 # program.  This Exception is an additional permission under section 7
    31 
    25 # of the GNU General Public License, version 3 ("GPLv3").
    32 # Please send patches to <config-patches@gnu.org>.  Submit a context
    26 
    33 # diff and a properly formatted GNU ChangeLog entry.
    27 
       
    28 # Please send patches to <config-patches@gnu.org>.
    34 #
    29 #
    35 # Configuration subroutine to validate and canonicalize a configuration type.
    30 # Configuration subroutine to validate and canonicalize a configuration type.
    36 # Supply the specified configuration type as an argument.
    31 # Supply the specified configuration type as an argument.
    37 # If it is invalid, we print an error message on stderr and exit with code 1.
    32 # If it is invalid, we print an error message on stderr and exit with code 1.
    38 # Otherwise, we print the canonical config type on stdout and succeed.
    33 # Otherwise, we print the canonical config type on stdout and succeed.
    39 
    34 
    40 # You can get the latest version of this script from:
    35 # You can get the latest version of this script from:
    41 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
    36 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
    42 
    37 
    43 # This file is supposed to be the same for all GNU packages
    38 # This file is supposed to be the same for all GNU packages
    44 # and recognize all the CPU types, system types and aliases
    39 # and recognize all the CPU types, system types and aliases
    45 # that are meaningful with *any* GNU software.
    40 # that are meaningful with *any* GNU software.
    46 # Each package is responsible for reporting which valid configurations
    41 # Each package is responsible for reporting which valid configurations
    56 # It is wrong to echo any other type of specification.
    51 # It is wrong to echo any other type of specification.
    57 
    52 
    58 me=`echo "$0" | sed -e 's,.*/,,'`
    53 me=`echo "$0" | sed -e 's,.*/,,'`
    59 
    54 
    60 usage="\
    55 usage="\
    61 Usage: $0 [OPTION] CPU-MFR-OPSYS
    56 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
    62        $0 [OPTION] ALIAS
       
    63 
    57 
    64 Canonicalize a configuration name.
    58 Canonicalize a configuration name.
    65 
    59 
    66 Operation modes:
    60 Operation modes:
    67   -h, --help         print this help, then exit
    61   -h, --help         print this help, then exit
    71 Report bugs and patches to <config-patches@gnu.org>."
    65 Report bugs and patches to <config-patches@gnu.org>."
    72 
    66 
    73 version="\
    67 version="\
    74 GNU config.sub ($timestamp)
    68 GNU config.sub ($timestamp)
    75 
    69 
    76 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    70 Copyright 1992-2017 Free Software Foundation, Inc.
    77 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
       
    78 Free Software Foundation, Inc.
       
    79 
    71 
    80 This is free software; see the source for copying conditions.  There is NO
    72 This is free software; see the source for copying conditions.  There is NO
    81 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    82 
    74 
    83 help="
    75 help="
   122 # Here we must recognize all the valid KERNEL-OS combinations.
   114 # Here we must recognize all the valid KERNEL-OS combinations.
   123 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
   115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
   124 case $maybe_os in
   116 case $maybe_os in
   125   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   117   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   126   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   118   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
   127   knetbsd*-gnu* | netbsd*-gnu* | \
   119   knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
   128   kopensolaris*-gnu* | \
   120   kopensolaris*-gnu* | cloudabi*-eabi* | \
   129   storm-chaos* | os2-emx* | rtmk-nova*)
   121   storm-chaos* | os2-emx* | rtmk-nova*)
   130     os=-$maybe_os
   122     os=-$maybe_os
   131     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
   123     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
   132     ;;
   124     ;;
   133   android-linux)
   125   android-linux)
   154 	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
   146 	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
   155 	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
   147 	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
   156 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
   148 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
   157 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
   149 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
   158 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
   150 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
   159 	-apple | -axis | -knuth | -cray | -microblaze)
   151 	-apple | -axis | -knuth | -cray | -microblaze*)
   160 		os=
   152 		os=
   161 		basic_machine=$1
   153 		basic_machine=$1
   162 		;;
   154 		;;
   163 	-bluegene*)
   155 	-bluegene*)
   164 		os=-cnk
   156 		os=-cnk
   257 	| a29k \
   249 	| a29k \
   258 	| aarch64 | aarch64_be \
   250 	| aarch64 | aarch64_be \
   259 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
   251 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
   260 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
   252 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
   261 	| am33_2.0 \
   253 	| am33_2.0 \
   262 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
   254 	| arc | arceb \
   263         | be32 | be64 \
   255 	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
       
   256 	| avr | avr32 \
       
   257 	| ba \
       
   258 	| be32 | be64 \
   264 	| bfin \
   259 	| bfin \
   265 	| c4x | clipper \
   260 	| c4x | c8051 | clipper \
   266 	| d10v | d30v | dlx | dsp16xx \
   261 	| d10v | d30v | dlx | dsp16xx \
   267 	| epiphany \
   262 	| e2k | epiphany \
   268 	| fido | fr30 | frv \
   263 	| fido | fr30 | frv | ft32 \
   269 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
   264 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
   270 	| hexagon \
   265 	| hexagon \
   271 	| i370 | i860 | i960 | ia64 \
   266 	| i370 | i860 | i960 | ia16 | ia64 \
   272 	| ip2k | iq2000 \
   267 	| ip2k | iq2000 \
       
   268 	| k1om \
   273 	| le32 | le64 \
   269 	| le32 | le64 \
   274 	| lm32 \
   270 	| lm32 \
   275 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
   271 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
   276 	| maxq | mb | microblaze | mcore | mep | metag \
   272 	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
   277 	| mips | mipsbe | mipseb | mipsel | mipsle \
   273 	| mips | mipsbe | mipseb | mipsel | mipsle \
   278 	| mips16 \
   274 	| mips16 \
   279 	| mips64 | mips64el \
   275 	| mips64 | mips64el \
   280 	| mips64octeon | mips64octeonel \
   276 	| mips64octeon | mips64octeonel \
   281 	| mips64orion | mips64orionel \
   277 	| mips64orion | mips64orionel \
   285 	| mips64vr4300 | mips64vr4300el \
   281 	| mips64vr4300 | mips64vr4300el \
   286 	| mips64vr5000 | mips64vr5000el \
   282 	| mips64vr5000 | mips64vr5000el \
   287 	| mips64vr5900 | mips64vr5900el \
   283 	| mips64vr5900 | mips64vr5900el \
   288 	| mipsisa32 | mipsisa32el \
   284 	| mipsisa32 | mipsisa32el \
   289 	| mipsisa32r2 | mipsisa32r2el \
   285 	| mipsisa32r2 | mipsisa32r2el \
       
   286 	| mipsisa32r6 | mipsisa32r6el \
   290 	| mipsisa64 | mipsisa64el \
   287 	| mipsisa64 | mipsisa64el \
   291 	| mipsisa64r2 | mipsisa64r2el \
   288 	| mipsisa64r2 | mipsisa64r2el \
       
   289 	| mipsisa64r6 | mipsisa64r6el \
   292 	| mipsisa64sb1 | mipsisa64sb1el \
   290 	| mipsisa64sb1 | mipsisa64sb1el \
   293 	| mipsisa64sr71k | mipsisa64sr71kel \
   291 	| mipsisa64sr71k | mipsisa64sr71kel \
       
   292 	| mipsr5900 | mipsr5900el \
   294 	| mipstx39 | mipstx39el \
   293 	| mipstx39 | mipstx39el \
   295 	| mn10200 | mn10300 \
   294 	| mn10200 | mn10300 \
   296 	| moxie \
   295 	| moxie \
   297 	| mt \
   296 	| mt \
   298 	| msp430 \
   297 	| msp430 \
   299 	| nds32 | nds32le | nds32be \
   298 	| nds32 | nds32le | nds32be \
   300 	| nios | nios2 \
   299 	| nios | nios2 | nios2eb | nios2el \
   301 	| ns16k | ns32k \
   300 	| ns16k | ns32k \
   302 	| open8 \
   301 	| open8 | or1k | or1knd | or32 \
   303 	| or32 \
       
   304 	| pdp10 | pdp11 | pj | pjl \
   302 	| pdp10 | pdp11 | pj | pjl \
   305 	| powerpc | powerpc64 | powerpc64le | powerpcle \
   303 	| powerpc | powerpc64 | powerpc64le | powerpcle \
       
   304 	| pru \
   306 	| pyramid \
   305 	| pyramid \
       
   306 	| riscv32 | riscv64 \
   307 	| rl78 | rx \
   307 	| rl78 | rx \
   308 	| score \
   308 	| score \
   309 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
   309 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
   310 	| sh64 | sh64le \
   310 	| sh64 | sh64le \
   311 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
   311 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
   312 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
   312 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
   313 	| spu \
   313 	| spu \
   314 	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
   314 	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
   315 	| ubicom32 \
   315 	| ubicom32 \
   316 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
   316 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
       
   317 	| visium \
       
   318 	| wasm32 \
   317 	| we32k \
   319 	| we32k \
   318 	| x86 | xc16x | xstormy16 | xtensa \
   320 	| x86 | xc16x | xstormy16 | xtensa \
   319 	| z8k | z80)
   321 	| z8k | z80)
   320 		basic_machine=$basic_machine-unknown
   322 		basic_machine=$basic_machine-unknown
   321 		;;
   323 		;;
   326 		basic_machine=tic55x-unknown
   328 		basic_machine=tic55x-unknown
   327 		;;
   329 		;;
   328 	c6x)
   330 	c6x)
   329 		basic_machine=tic6x-unknown
   331 		basic_machine=tic6x-unknown
   330 		;;
   332 		;;
   331 	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
   333 	leon|leon[3-9])
       
   334 		basic_machine=sparc-$basic_machine
       
   335 		;;
       
   336 	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
   332 		basic_machine=$basic_machine-unknown
   337 		basic_machine=$basic_machine-unknown
   333 		os=-none
   338 		os=-none
   334 		;;
   339 		;;
   335 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
   340 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
   336 		;;
   341 		;;
   381 	580-* \
   386 	580-* \
   382 	| a29k-* \
   387 	| a29k-* \
   383 	| aarch64-* | aarch64_be-* \
   388 	| aarch64-* | aarch64_be-* \
   384 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
   389 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
   385 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
   390 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
   386 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
   391 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
   387 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
   392 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
   388 	| avr-* | avr32-* \
   393 	| avr-* | avr32-* \
       
   394 	| ba-* \
   389 	| be32-* | be64-* \
   395 	| be32-* | be64-* \
   390 	| bfin-* | bs2000-* \
   396 	| bfin-* | bs2000-* \
   391 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
   397 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
   392 	| clipper-* | craynv-* | cydra-* \
   398 	| c8051-* | clipper-* | craynv-* | cydra-* \
   393 	| d10v-* | d30v-* | dlx-* \
   399 	| d10v-* | d30v-* | dlx-* \
   394 	| elxsi-* \
   400 	| e2k-* | elxsi-* \
   395 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
   401 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
   396 	| h8300-* | h8500-* \
   402 	| h8300-* | h8500-* \
   397 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
   403 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
   398 	| hexagon-* \
   404 	| hexagon-* \
   399 	| i*86-* | i860-* | i960-* | ia64-* \
   405 	| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
   400 	| ip2k-* | iq2000-* \
   406 	| ip2k-* | iq2000-* \
       
   407 	| k1om-* \
   401 	| le32-* | le64-* \
   408 	| le32-* | le64-* \
   402 	| lm32-* \
   409 	| lm32-* \
   403 	| m32c-* | m32r-* | m32rle-* \
   410 	| m32c-* | m32r-* | m32rle-* \
   404 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
   411 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
   405 	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
   412 	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
       
   413 	| microblaze-* | microblazeel-* \
   406 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
   414 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
   407 	| mips16-* \
   415 	| mips16-* \
   408 	| mips64-* | mips64el-* \
   416 	| mips64-* | mips64el-* \
   409 	| mips64octeon-* | mips64octeonel-* \
   417 	| mips64octeon-* | mips64octeonel-* \
   410 	| mips64orion-* | mips64orionel-* \
   418 	| mips64orion-* | mips64orionel-* \
   414 	| mips64vr4300-* | mips64vr4300el-* \
   422 	| mips64vr4300-* | mips64vr4300el-* \
   415 	| mips64vr5000-* | mips64vr5000el-* \
   423 	| mips64vr5000-* | mips64vr5000el-* \
   416 	| mips64vr5900-* | mips64vr5900el-* \
   424 	| mips64vr5900-* | mips64vr5900el-* \
   417 	| mipsisa32-* | mipsisa32el-* \
   425 	| mipsisa32-* | mipsisa32el-* \
   418 	| mipsisa32r2-* | mipsisa32r2el-* \
   426 	| mipsisa32r2-* | mipsisa32r2el-* \
       
   427 	| mipsisa32r6-* | mipsisa32r6el-* \
   419 	| mipsisa64-* | mipsisa64el-* \
   428 	| mipsisa64-* | mipsisa64el-* \
   420 	| mipsisa64r2-* | mipsisa64r2el-* \
   429 	| mipsisa64r2-* | mipsisa64r2el-* \
       
   430 	| mipsisa64r6-* | mipsisa64r6el-* \
   421 	| mipsisa64sb1-* | mipsisa64sb1el-* \
   431 	| mipsisa64sb1-* | mipsisa64sb1el-* \
   422 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
   432 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
       
   433 	| mipsr5900-* | mipsr5900el-* \
   423 	| mipstx39-* | mipstx39el-* \
   434 	| mipstx39-* | mipstx39el-* \
   424 	| mmix-* \
   435 	| mmix-* \
   425 	| mt-* \
   436 	| mt-* \
   426 	| msp430-* \
   437 	| msp430-* \
   427 	| nds32-* | nds32le-* | nds32be-* \
   438 	| nds32-* | nds32le-* | nds32be-* \
   428 	| nios-* | nios2-* \
   439 	| nios-* | nios2-* | nios2eb-* | nios2el-* \
   429 	| none-* | np1-* | ns16k-* | ns32k-* \
   440 	| none-* | np1-* | ns16k-* | ns32k-* \
   430 	| open8-* \
   441 	| open8-* \
       
   442 	| or1k*-* \
   431 	| orion-* \
   443 	| orion-* \
   432 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
   444 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
   433 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
   445 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
       
   446 	| pru-* \
   434 	| pyramid-* \
   447 	| pyramid-* \
       
   448 	| riscv32-* | riscv64-* \
   435 	| rl78-* | romp-* | rs6000-* | rx-* \
   449 	| rl78-* | romp-* | rs6000-* | rx-* \
   436 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
   450 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
   437 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
   451 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
   438 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
   452 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
   439 	| sparclite-* \
   453 	| sparclite-* \
   440 	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
   454 	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
   441 	| tahoe-* \
   455 	| tahoe-* \
   442 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
   456 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
   443 	| tile*-* \
   457 	| tile*-* \
   444 	| tron-* \
   458 	| tron-* \
   445 	| ubicom32-* \
   459 	| ubicom32-* \
   446 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
   460 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
   447 	| vax-* \
   461 	| vax-* \
       
   462 	| visium-* \
       
   463 	| wasm32-* \
   448 	| we32k-* \
   464 	| we32k-* \
   449 	| x86-* | x86_64-* | xc16x-* | xps100-* \
   465 	| x86-* | x86_64-* | xc16x-* | xps100-* \
   450 	| xstormy16-* | xtensa*-* \
   466 	| xstormy16-* | xtensa*-* \
   451 	| ymp-* \
   467 	| ymp-* \
   452 	| z8k-* | z80-*)
   468 	| z8k-* | z80-*)
   519 		;;
   535 		;;
   520 	aros)
   536 	aros)
   521 		basic_machine=i386-pc
   537 		basic_machine=i386-pc
   522 		os=-aros
   538 		os=-aros
   523 		;;
   539 		;;
       
   540 	asmjs)
       
   541 		basic_machine=asmjs-unknown
       
   542 		;;
   524 	aux)
   543 	aux)
   525 		basic_machine=m68k-apple
   544 		basic_machine=m68k-apple
   526 		os=-aux
   545 		os=-aux
   527 		;;
   546 		;;
   528 	balance)
   547 	balance)
   638 		os=-bosx
   657 		os=-bosx
   639 		;;
   658 		;;
   640 	dpx2* | dpx2*-bull)
   659 	dpx2* | dpx2*-bull)
   641 		basic_machine=m68k-bull
   660 		basic_machine=m68k-bull
   642 		os=-sysv3
   661 		os=-sysv3
       
   662 		;;
       
   663 	e500v[12])
       
   664 		basic_machine=powerpc-unknown
       
   665 		os=$os"spe"
       
   666 		;;
       
   667 	e500v[12]-*)
       
   668 		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
       
   669 		os=$os"spe"
   643 		;;
   670 		;;
   644 	ebmon29k)
   671 	ebmon29k)
   645 		basic_machine=a29k-amd
   672 		basic_machine=a29k-amd
   646 		os=-ebmon
   673 		os=-ebmon
   647 		;;
   674 		;;
   780 		;;
   807 		;;
   781 	isi68 | isi)
   808 	isi68 | isi)
   782 		basic_machine=m68k-isi
   809 		basic_machine=m68k-isi
   783 		os=-sysv
   810 		os=-sysv
   784 		;;
   811 		;;
       
   812 	leon-*|leon[3-9]-*)
       
   813 		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
       
   814 		;;
   785 	m68knommu)
   815 	m68knommu)
   786 		basic_machine=m68k-unknown
   816 		basic_machine=m68k-unknown
   787 		os=-linux
   817 		os=-linux
   788 		;;
   818 		;;
   789 	m68knommu-*)
   819 	m68knommu-*)
   799 		;;
   829 		;;
   800 	merlin)
   830 	merlin)
   801 		basic_machine=ns32k-utek
   831 		basic_machine=ns32k-utek
   802 		os=-sysv
   832 		os=-sysv
   803 		;;
   833 		;;
   804 	microblaze)
   834 	microblaze*)
   805 		basic_machine=microblaze-xilinx
   835 		basic_machine=microblaze-xilinx
   806 		;;
   836 		;;
   807 	mingw64)
   837 	mingw64)
   808 		basic_machine=x86_64-pc
   838 		basic_machine=x86_64-pc
   809 		os=-mingw64
   839 		os=-mingw64
   810 		;;
   840 		;;
   811 	mingw32)
   841 	mingw32)
   812 		basic_machine=i386-pc
   842 		basic_machine=i686-pc
   813 		os=-mingw32
   843 		os=-mingw32
   814 		;;
   844 		;;
   815 	mingw32ce)
   845 	mingw32ce)
   816 		basic_machine=arm-unknown
   846 		basic_machine=arm-unknown
   817 		os=-mingw32ce
   847 		os=-mingw32ce
   835 		;;
   865 		;;
   836 	morphos)
   866 	morphos)
   837 		basic_machine=powerpc-unknown
   867 		basic_machine=powerpc-unknown
   838 		os=-morphos
   868 		os=-morphos
   839 		;;
   869 		;;
       
   870 	moxiebox)
       
   871 		basic_machine=moxie-unknown
       
   872 		os=-moxiebox
       
   873 		;;
   840 	msdos)
   874 	msdos)
   841 		basic_machine=i386-pc
   875 		basic_machine=i386-pc
   842 		os=-msdos
   876 		os=-msdos
   843 		;;
   877 		;;
   844 	ms1-*)
   878 	ms1-*)
   845 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
   879 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
   846 		;;
   880 		;;
   847 	msys)
   881 	msys)
   848 		basic_machine=i386-pc
   882 		basic_machine=i686-pc
   849 		os=-msys
   883 		os=-msys
   850 		;;
   884 		;;
   851 	mvs)
   885 	mvs)
   852 		basic_machine=i370-ibm
   886 		basic_machine=i370-ibm
   853 		os=-mvs
   887 		os=-mvs
   931 		basic_machine=nse-tandem
   965 		basic_machine=nse-tandem
   932 		;;
   966 		;;
   933 	nsr-tandem)
   967 	nsr-tandem)
   934 		basic_machine=nsr-tandem
   968 		basic_machine=nsr-tandem
   935 		;;
   969 		;;
       
   970 	nsx-tandem)
       
   971 		basic_machine=nsx-tandem
       
   972 		;;
   936 	op50n-* | op60c-*)
   973 	op50n-* | op60c-*)
   937 		basic_machine=hppa1.1-oki
   974 		basic_machine=hppa1.1-oki
   938 		os=-proelf
   975 		os=-proelf
   939 		;;
   976 		;;
   940 	openrisc | openrisc-*)
   977 	openrisc | openrisc-*)
  1015 	ppc | ppcbe)	basic_machine=powerpc-unknown
  1052 	ppc | ppcbe)	basic_machine=powerpc-unknown
  1016 		;;
  1053 		;;
  1017 	ppc-* | ppcbe-*)
  1054 	ppc-* | ppcbe-*)
  1018 		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  1055 		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  1019 		;;
  1056 		;;
  1020 	ppcle | powerpclittle | ppc-le | powerpc-little)
  1057 	ppcle | powerpclittle)
  1021 		basic_machine=powerpcle-unknown
  1058 		basic_machine=powerpcle-unknown
  1022 		;;
  1059 		;;
  1023 	ppcle-* | powerpclittle-*)
  1060 	ppcle-* | powerpclittle-*)
  1024 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  1061 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  1025 		;;
  1062 		;;
  1026 	ppc64)	basic_machine=powerpc64-unknown
  1063 	ppc64)	basic_machine=powerpc64-unknown
  1027 		;;
  1064 		;;
  1028 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
  1065 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
  1029 		;;
  1066 		;;
  1030 	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
  1067 	ppc64le | powerpc64little)
  1031 		basic_machine=powerpc64le-unknown
  1068 		basic_machine=powerpc64le-unknown
  1032 		;;
  1069 		;;
  1033 	ppc64le-* | powerpc64little-*)
  1070 	ppc64le-* | powerpc64little-*)
  1034 		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
  1071 		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
  1035 		;;
  1072 		;;
  1038 		;;
  1075 		;;
  1039 	pw32)
  1076 	pw32)
  1040 		basic_machine=i586-unknown
  1077 		basic_machine=i586-unknown
  1041 		os=-pw32
  1078 		os=-pw32
  1042 		;;
  1079 		;;
  1043 	rdos)
  1080 	rdos | rdos64)
       
  1081 		basic_machine=x86_64-pc
       
  1082 		os=-rdos
       
  1083 		;;
       
  1084 	rdos32)
  1044 		basic_machine=i386-pc
  1085 		basic_machine=i386-pc
  1045 		os=-rdos
  1086 		os=-rdos
  1046 		;;
  1087 		;;
  1047 	rom68k)
  1088 	rom68k)
  1048 		basic_machine=m68k-rom68k
  1089 		basic_machine=m68k-rom68k
  1221 		os=-vxworks
  1262 		os=-vxworks
  1222 		;;
  1263 		;;
  1223 	vxworks29k)
  1264 	vxworks29k)
  1224 		basic_machine=a29k-wrs
  1265 		basic_machine=a29k-wrs
  1225 		os=-vxworks
  1266 		os=-vxworks
       
  1267 		;;
       
  1268 	wasm32)
       
  1269 		basic_machine=wasm32-unknown
  1226 		;;
  1270 		;;
  1227 	w65*)
  1271 	w65*)
  1228 		basic_machine=w65-wdc
  1272 		basic_machine=w65-wdc
  1229 		os=-none
  1273 		os=-none
  1230 		;;
  1274 		;;
  1365 	# Each alternative MUST END IN A *, to match a version number.
  1409 	# Each alternative MUST END IN A *, to match a version number.
  1366 	# -sysv* is not here because it comes later, after sysvr4.
  1410 	# -sysv* is not here because it comes later, after sysvr4.
  1367 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  1411 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  1368 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
  1412 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
  1369 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
  1413 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
  1370 	      | -sym* | -kopensolaris* \
  1414 	      | -sym* | -kopensolaris* | -plan9* \
  1371 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  1415 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  1372 	      | -aos* | -aros* \
  1416 	      | -aos* | -aros* | -cloudabi* | -sortix* \
  1373 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1417 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1374 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1418 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1375 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
  1419 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
  1376 	      | -bitrig* | -openbsd* | -solidbsd* \
  1420 	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
  1377 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
  1421 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
  1378 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1422 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1379 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1423 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1380 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1424 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1381 	      | -chorusos* | -chorusrdb* | -cegcc* \
  1425 	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
  1382 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1426 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1383 	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
  1427 	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
  1384 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
  1428 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
  1385 	      | -uxpv* | -beos* | -mpeix* | -udk* \
  1429 	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
  1386 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  1430 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  1387 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1431 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1388 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  1432 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  1389 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
  1433 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
  1390 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  1434 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  1391 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  1435 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  1392 	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
  1436 	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
       
  1437 	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
  1393 	# Remember, each alternative MUST END IN *, to match a version number.
  1438 	# Remember, each alternative MUST END IN *, to match a version number.
  1394 		;;
  1439 		;;
  1395 	-qnx*)
  1440 	-qnx*)
  1396 		case $basic_machine in
  1441 		case $basic_machine in
  1397 		    x86-* | i*86-*)
  1442 		    x86-* | i*86-*)
  1435 		os=-openedition
  1480 		os=-openedition
  1436 		;;
  1481 		;;
  1437 	-os400*)
  1482 	-os400*)
  1438 		os=-os400
  1483 		os=-os400
  1439 		;;
  1484 		;;
       
  1485 	-cegcc*)
       
  1486 		os=-cegcc
       
  1487 		;;
  1440 	-wince*)
  1488 	-wince*)
  1441 		os=-wince
  1489 		os=-wince
  1442 		;;
  1490 		;;
  1443 	-osfrose*)
  1491 	-osfrose*)
  1444 		os=-osfrose
  1492 		os=-osfrose
  1516 	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1564 	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1517 		os=-mint
  1565 		os=-mint
  1518 		;;
  1566 		;;
  1519 	-aros*)
  1567 	-aros*)
  1520 		os=-aros
  1568 		os=-aros
  1521 		;;
       
  1522 	-kaos*)
       
  1523 		os=-kaos
       
  1524 		;;
  1569 		;;
  1525 	-zvmoe)
  1570 	-zvmoe)
  1526 		os=-zvmoe
  1571 		os=-zvmoe
  1527 		;;
  1572 		;;
  1528 	-dicos*)
  1573 	-dicos*)
  1532         os=-nacl
  1577         os=-nacl
  1533         ;;
  1578         ;;
  1534 	-pnacl*)
  1579 	-pnacl*)
  1535 		os=-pnacl
  1580 		os=-pnacl
  1536 		;;
  1581 		;;
       
  1582 	-ios)
       
  1583 		;;
  1537 	-emscripten*)
  1584 	-emscripten*)
  1538 		;;
  1585 		;;
  1539 	-none)
  1586 	-none)
  1540 		;;
  1587 		;;
  1541 	*)
  1588 	*)
  1574 		os=-aout
  1621 		os=-aout
  1575 		;;
  1622 		;;
  1576 	c4x-* | tic4x-*)
  1623 	c4x-* | tic4x-*)
  1577 		os=-coff
  1624 		os=-coff
  1578 		;;
  1625 		;;
       
  1626 	c8051-*)
       
  1627 		os=-elf
       
  1628 		;;
  1579 	hexagon-*)
  1629 	hexagon-*)
  1580 		os=-elf
  1630 		os=-elf
  1581 		;;
  1631 		;;
  1582 	tic54x-*)
  1632 	tic54x-*)
  1583 		os=-coff
  1633 		os=-coff
  1625 	*-tti)	# must be before sparc entry or we get the wrong os.
  1675 	*-tti)	# must be before sparc entry or we get the wrong os.
  1626 		os=-sysv3
  1676 		os=-sysv3
  1627 		;;
  1677 		;;
  1628 	sparc-* | *-sun)
  1678 	sparc-* | *-sun)
  1629 		os=-sunos4.1.1
  1679 		os=-sunos4.1.1
       
  1680 		;;
       
  1681 	pru-*)
       
  1682 		os=-elf
  1630 		;;
  1683 		;;
  1631 	*-be)
  1684 	*-be)
  1632 		os=-beos
  1685 		os=-beos
  1633 		;;
  1686 		;;
  1634 	*-haiku)
  1687 	*-haiku)