patches/glibc/2.1.3/backport-config.sub.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 # Backport glibc-2.3.2's config.sub to glibc-2.1.3 
     2 # Should fix nonfatal but annoying like
     3 #   checking build system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
     4 #   ../glibc-2.1.3/configure: line 1227: test: i686-unknown-linux-gnu: unary operator expected
     5 #   checking build system type... Configuration name missing.
     6 
     7 
     8 --- glibc-2.1.3/scripts/config.sub	2004-03-24 13:27:06.000000000 -0800
     9 +++ glibc-2.3.2/scripts/config.sub	2002-07-10 00:24:32.000000000 -0700
    10 @@ -1,6 +1,10 @@
    11  #! /bin/sh
    12 -# Configuration validation subroutine script, version 1.1.
    13 -#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
    14 +# Configuration validation subroutine script.
    15 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    16 +#   2000, 2001, 2002 Free Software Foundation, Inc.
    17 +
    18 +timestamp='2002-07-03'
    19 +
    20  # This file is (in principle) common to ALL GNU software.
    21  # The presence of a machine in this file suggests that SOME GNU software
    22  # can handle that machine.  It does not imply ALL GNU software can.
    23 @@ -25,6 +29,9 @@
    24  # configuration script generated by Autoconf, you may include it under
    25  # the same distribution terms that you use for the rest of that program.
    26  
    27 +# Please send patches to <config-patches@gnu.org>.  Submit a context
    28 +# diff and a properly formatted ChangeLog entry.
    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 @@ -45,30 +52,73 @@
    34  #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
    35  # It is wrong to echo any other type of specification.
    36  
    37 -if [ x$1 = x ]
    38 -then
    39 -	echo Configuration name missing. 1>&2
    40 -	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
    41 -	echo "or     $0 ALIAS" 1>&2
    42 -	echo where ALIAS is a recognized configuration type. 1>&2
    43 -	exit 1
    44 -fi
    45 +me=`echo "$0" | sed -e 's,.*/,,'`
    46  
    47 -# First pass through any local machine types.
    48 -case $1 in
    49 -	*local*)
    50 -		echo $1
    51 -		exit 0
    52 -		;;
    53 -	*)
    54 -	;;
    55 +usage="\
    56 +Usage: $0 [OPTION] CPU-MFR-OPSYS
    57 +       $0 [OPTION] ALIAS
    58 +
    59 +Canonicalize a configuration name.
    60 +
    61 +Operation modes:
    62 +  -h, --help         print this help, then exit
    63 +  -t, --time-stamp   print date of last modification, then exit
    64 +  -v, --version      print version number, then exit
    65 +
    66 +Report bugs and patches to <config-patches@gnu.org>."
    67 +
    68 +version="\
    69 +GNU config.sub ($timestamp)
    70 +
    71 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    72 +Free Software Foundation, Inc.
    73 +
    74 +This is free software; see the source for copying conditions.  There is NO
    75 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    76 +
    77 +help="
    78 +Try \`$me --help' for more information."
    79 +
    80 +# Parse command line
    81 +while test $# -gt 0 ; do
    82 +  case $1 in
    83 +    --time-stamp | --time* | -t )
    84 +       echo "$timestamp" ; exit 0 ;;
    85 +    --version | -v )
    86 +       echo "$version" ; exit 0 ;;
    87 +    --help | --h* | -h )
    88 +       echo "$usage"; exit 0 ;;
    89 +    -- )     # Stop option processing
    90 +       shift; break ;;
    91 +    - )	# Use stdin as input.
    92 +       break ;;
    93 +    -* )
    94 +       echo "$me: invalid option $1$help"
    95 +       exit 1 ;;
    96 +
    97 +    *local*)
    98 +       # First pass through any local machine types.
    99 +       echo $1
   100 +       exit 0;;
   101 +
   102 +    * )
   103 +       break ;;
   104 +  esac
   105 +done
   106 +
   107 +case $# in
   108 + 0) echo "$me: missing argument$help" >&2
   109 +    exit 1;;
   110 + 1) ;;
   111 + *) echo "$me: too many arguments$help" >&2
   112 +    exit 1;;
   113  esac
   114  
   115  # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
   116  # Here we must recognize all the valid KERNEL-OS combinations.
   117  maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
   118  case $maybe_os in
   119 -  linux-gnu*)
   120 +  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
   121      os=-$maybe_os
   122      basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
   123      ;;
   124 @@ -94,7 +144,7 @@
   125  	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
   126  	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
   127  	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
   128 -	-apple)
   129 +	-apple | -axis)
   130  		os=
   131  		basic_machine=$1
   132  		;;
   133 @@ -108,6 +158,14 @@
   134  		os=-vxworks
   135  		basic_machine=$1
   136  		;;
   137 +	-chorusos*)
   138 +		os=-chorusos
   139 +		basic_machine=$1
   140 +		;;
   141 + 	-chorusrdb)
   142 + 		os=-chorusrdb
   143 +		basic_machine=$1
   144 + 		;;
   145  	-hiux*)
   146  		os=-hiuxwe2
   147  		;;
   148 @@ -166,27 +224,58 @@
   149  case $basic_machine in
   150  	# Recognize the basic CPU types without company name.
   151  	# Some are omitted here because they have special meanings below.
   152 -	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
   153 -		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
   154 -		| 580 | i960 | h8300 \
   155 -		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
   156 -		| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
   157 -		| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
   158 -		| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
   159 -		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
   160 -		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
   161 -		| mips64vr5000 | miprs64vr5000el | mcore \
   162 -		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
   163 -		| thumb | d10v | fr30)
   164 +	1750a | 580 \
   165 +	| a29k \
   166 +	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
   167 +	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
   168 +	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
   169 +	| c4x | clipper \
   170 +	| d10v | d30v | dlx | dsp16xx \
   171 +	| fr30 | frv \
   172 +	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
   173 +	| i370 | i860 | i960 | ia64 \
   174 +	| ip2k \
   175 +	| m32r | m68000 | m68k | m88k | mcore \
   176 +	| mips | mipsbe | mipseb | mipsel | mipsle \
   177 +	| mips16 \
   178 +	| mips64 | mips64el \
   179 +	| mips64orion | mips64orionel \
   180 +	| mips64vr4100 | mips64vr4100el \
   181 +	| mips64vr4300 | mips64vr4300el \
   182 +	| mips64vr5000 | mips64vr5000el \
   183 +	| mipsisa32 | mipsisa32el \
   184 +	| mipsisa64 | mipsisa64el \
   185 +	| mipsisa64sb1 | mipsisa64sb1el \
   186 +	| mipstx39 | mipstx39el \
   187 +	| mn10200 | mn10300 \
   188 +	| ns16k | ns32k \
   189 +	| openrisc | or32 \
   190 +	| pdp10 | pdp11 | pj | pjl \
   191 +	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
   192 +	| pyramid \
   193 +	| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
   194 +	| sh64 | sh64le \
   195 +	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
   196 +	| strongarm \
   197 +	| tahoe | thumb | tic80 | tron \
   198 +	| v850 | v850e \
   199 +	| we32k \
   200 +	| x86 | xscale | xstormy16 | xtensa \
   201 +	| z8k)
   202 +		basic_machine=$basic_machine-unknown
   203 +		;;
   204 +	m6811 | m68hc11 | m6812 | m68hc12)
   205 +		# Motorola 68HC11/12.
   206  		basic_machine=$basic_machine-unknown
   207 +		os=-none
   208  		;;
   209 -	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
   210 +	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
   211  		;;
   212  
   213  	# We use `pc' rather than `unknown'
   214  	# because (1) that's what they normally are, and
   215  	# (2) the word "unknown" tends to confuse beginning users.
   216 -	i[34567]86)
   217 +	i*86 | x86_64)
   218  	  basic_machine=$basic_machine-pc
   219  	  ;;
   220  	# Object if more than one company name word.
   221 @@ -195,24 +284,54 @@
   222  		exit 1
   223  		;;
   224  	# Recognize the basic CPU types with company name.
   225 -	# FIXME: clean up the formatting here.
   226 -	vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
   227 -	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
   228 -	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
   229 -	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
   230 -	      | xmp-* | ymp-* \
   231 -	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
   232 -	      | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
   233 -	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
   234 -	      | clipper-* | orion-* \
   235 -	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
   236 -	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
   237 -	      | mips64el-* | mips64orion-* | mips64orionel-* \
   238 -	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
   239 -	      | mipstx39-* | mipstx39el-* | mcore-* \
   240 -	      | f301-* | armv*-* | t3e-* \
   241 -	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
   242 -	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
   243 +	580-* \
   244 +	| a29k-* \
   245 +	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
   246 +	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
   247 +	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
   248 +	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
   249 +	| avr-* \
   250 +	| bs2000-* \
   251 +	| c[123]* | c30-* | [cjt]90-* | c54x-* \
   252 +	| clipper-* | cydra-* \
   253 +	| d10v-* | d30v-* | dlx-* \
   254 +	| elxsi-* \
   255 +	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
   256 +	| h8300-* | h8500-* \
   257 +	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
   258 +	| i*86-* | i860-* | i960-* | ia64-* \
   259 +	| ip2k-* \
   260 +	| m32r-* \
   261 +	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
   262 +	| m88110-* | m88k-* | mcore-* \
   263 +	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
   264 +	| mips16-* \
   265 +	| mips64-* | mips64el-* \
   266 +	| mips64orion-* | mips64orionel-* \
   267 +	| mips64vr4100-* | mips64vr4100el-* \
   268 +	| mips64vr4300-* | mips64vr4300el-* \
   269 +	| mips64vr5000-* | mips64vr5000el-* \
   270 +	| mipsisa32-* | mipsisa32el-* \
   271 +	| mipsisa64-* | mipsisa64el-* \
   272 +	| mipsisa64sb1-* | mipsisa64sb1el-* \
   273 +	| mipstx39 | mipstx39el \
   274 +	| none-* | np1-* | ns16k-* | ns32k-* \
   275 +	| orion-* \
   276 +	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
   277 +	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
   278 +	| pyramid-* \
   279 +	| romp-* | rs6000-* \
   280 +	| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
   281 +	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
   282 +	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
   283 +	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
   284 +	| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
   285 +	| v850-* | v850e-* | vax-* \
   286 +	| we32k-* \
   287 +	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
   288 +	| xtensa-* \
   289 +	| ymp-* \
   290 +	| z8k-*)
   291  		;;
   292  	# Recognize the various machine names and aliases which stand
   293  	# for a CPU type and a company and sometimes even an OS.
   294 @@ -249,14 +368,14 @@
   295  		os=-sysv
   296  		;;
   297  	amiga | amiga-*)
   298 -		basic_machine=m68k-cbm
   299 +		basic_machine=m68k-unknown
   300  		;;
   301  	amigaos | amigados)
   302 -		basic_machine=m68k-cbm
   303 +		basic_machine=m68k-unknown
   304  		os=-amigaos
   305  		;;
   306  	amigaunix | amix)
   307 -		basic_machine=m68k-cbm
   308 +		basic_machine=m68k-unknown
   309  		os=-sysv4
   310  		;;
   311  	apollo68)
   312 @@ -275,6 +394,10 @@
   313  		basic_machine=ns32k-sequent
   314  		os=-dynix
   315  		;;
   316 +	c90)
   317 +		basic_machine=c90-cray
   318 +		os=-unicos
   319 +		;;
   320  	convex-c1)
   321  		basic_machine=c1-convex
   322  		os=-bsd
   323 @@ -295,27 +418,30 @@
   324  		basic_machine=c38-convex
   325  		os=-bsd
   326  		;;
   327 -	cray | ymp)
   328 -		basic_machine=ymp-cray
   329 -		os=-unicos
   330 -		;;
   331 -	cray2)
   332 -		basic_machine=cray2-cray
   333 -		os=-unicos
   334 -		;;
   335 -	[ctj]90-cray)
   336 -		basic_machine=c90-cray
   337 +	cray | j90)
   338 +		basic_machine=j90-cray
   339  		os=-unicos
   340  		;;
   341  	crds | unos)
   342  		basic_machine=m68k-crds
   343  		;;
   344 +	cris | cris-* | etrax*)
   345 +		basic_machine=cris-axis
   346 +		;;
   347  	da30 | da30-*)
   348  		basic_machine=m68k-da30
   349  		;;
   350  	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
   351  		basic_machine=mips-dec
   352  		;;
   353 +	decsystem10* | dec10*)
   354 +		basic_machine=pdp10-dec
   355 +		os=-tops10
   356 +		;;
   357 +	decsystem20* | dec20*)
   358 +		basic_machine=pdp10-dec
   359 +		os=-tops20
   360 +		;;
   361  	delta | 3300 | motorola-3300 | motorola-delta \
   362  	      | 3300-motorola | delta-motorola)
   363  		basic_machine=m68k-motorola
   364 @@ -357,6 +483,10 @@
   365  		basic_machine=tron-gmicro
   366  		os=-sysv
   367  		;;
   368 +	go32)
   369 +		basic_machine=i386-pc
   370 +		os=-go32
   371 +		;;
   372  	h3050r* | hiux*)
   373  		basic_machine=hppa1.1-hitachi
   374  		os=-hiuxwe2
   375 @@ -432,19 +562,19 @@
   376  		basic_machine=i370-ibm
   377  		;;
   378  # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
   379 -	i[34567]86v32)
   380 +	i*86v32)
   381  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
   382  		os=-sysv32
   383  		;;
   384 -	i[34567]86v4*)
   385 +	i*86v4*)
   386  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
   387  		os=-sysv4
   388  		;;
   389 -	i[34567]86v)
   390 +	i*86v)
   391  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
   392  		os=-sysv
   393  		;;
   394 -	i[34567]86sol2)
   395 +	i*86sol2)
   396  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
   397  		os=-solaris2
   398  		;;
   399 @@ -456,17 +586,6 @@
   400  		basic_machine=i386-unknown
   401  		os=-vsta
   402  		;;
   403 -	i386-go32 | go32)
   404 -		basic_machine=i386-unknown
   405 -		os=-go32
   406 -		;;
   407 -	i386-mingw32 | mingw32)
   408 -		basic_machine=i386-unknown
   409 -		os=-mingw32
   410 -		;;
   411 -	i386-qnx | qnx)
   412 -		basic_machine=i386-qnx
   413 -		;;
   414  	iris | iris4d)
   415  		basic_machine=mips-sgi
   416  		case $os in
   417 @@ -492,6 +611,10 @@
   418  		basic_machine=ns32k-utek
   419  		os=-sysv
   420  		;;
   421 +	mingw32)
   422 +		basic_machine=i386-pc
   423 +		os=-mingw32
   424 +		;;
   425  	miniframe)
   426  		basic_machine=m68000-convergent
   427  		;;
   428 @@ -499,26 +622,26 @@
   429  		basic_machine=m68k-atari
   430  		os=-mint
   431  		;;
   432 -	mipsel*-linux*)
   433 -		basic_machine=mipsel-unknown
   434 -		os=-linux-gnu
   435 -		;;
   436 -	mips*-linux*)
   437 -		basic_machine=mips-unknown
   438 -		os=-linux-gnu
   439 -		;;
   440  	mips3*-*)
   441  		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
   442  		;;
   443  	mips3*)
   444  		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
   445  		;;
   446 +	mmix*)
   447 +		basic_machine=mmix-knuth
   448 +		os=-mmixware
   449 +		;;
   450  	monitor)
   451  		basic_machine=m68k-rom68k
   452  		os=-coff
   453  		;;
   454 +	morphos)
   455 +		basic_machine=powerpc-unknown
   456 +		os=-morphos
   457 +		;;
   458  	msdos)
   459 -		basic_machine=i386-unknown
   460 +		basic_machine=i386-pc
   461  		os=-msdos
   462  		;;
   463  	mvs)
   464 @@ -582,13 +705,24 @@
   465  		basic_machine=i960-intel
   466  		os=-mon960
   467  		;;
   468 +	nonstopux)
   469 +		basic_machine=mips-compaq
   470 +		os=-nonstopux
   471 +		;;
   472  	np1)
   473  		basic_machine=np1-gould
   474  		;;
   475 +	nsr-tandem)
   476 +		basic_machine=nsr-tandem
   477 +		;;
   478  	op50n-* | op60c-*)
   479  		basic_machine=hppa1.1-oki
   480  		os=-proelf
   481  		;;
   482 +	or32 | or32-*)
   483 +		basic_machine=or32-unknown
   484 +		os=-coff
   485 +		;;
   486  	OSE68000 | ose68000)
   487  		basic_machine=m68000-ericsson
   488  		os=-ose
   489 @@ -614,28 +748,28 @@
   490          pc532 | pc532-*)
   491  		basic_machine=ns32k-pc532
   492  		;;
   493 -	pentium | p5 | k5 | k6 | nexen)
   494 +	pentium | p5 | k5 | k6 | nexgen | viac3)
   495  		basic_machine=i586-pc
   496  		;;
   497 -	pentiumpro | p6 | 6x86)
   498 +	pentiumpro | p6 | 6x86 | athlon)
   499  		basic_machine=i686-pc
   500  		;;
   501  	pentiumii | pentium2)
   502 -		basic_machine=i786-pc
   503 +		basic_machine=i686-pc
   504  		;;
   505 -	pentium-* | p5-* | k5-* | k6-* | nexen-*)
   506 +	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
   507  		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
   508  		;;
   509 -	pentiumpro-* | p6-* | 6x86-*)
   510 +	pentiumpro-* | p6-* | 6x86-* | athlon-*)
   511  		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
   512  		;;
   513  	pentiumii-* | pentium2-*)
   514 -		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
   515 +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
   516  		;;
   517  	pn)
   518  		basic_machine=pn-gould
   519  		;;
   520 -	power)	basic_machine=rs6000-ibm
   521 +	power)	basic_machine=power-ibm
   522  		;;
   523  	ppc)	basic_machine=powerpc-unknown
   524  	        ;;
   525 @@ -647,9 +781,23 @@
   526  	ppcle-* | powerpclittle-*)
   527  		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
   528  		;;
   529 +	ppc64)	basic_machine=powerpc64-unknown
   530 +	        ;;
   531 +	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
   532 +		;;
   533 +	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
   534 +		basic_machine=powerpc64le-unknown
   535 +	        ;;
   536 +	ppc64le-* | powerpc64little-*)
   537 +		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
   538 +		;;
   539  	ps2)
   540  		basic_machine=i386-ibm
   541  		;;
   542 +	pw32)
   543 +		basic_machine=i586-unknown
   544 +		os=-pw32
   545 +		;;
   546  	rom68k)
   547  		basic_machine=m68k-rom68k
   548  		os=-coff
   549 @@ -660,6 +808,12 @@
   550  	rtpc | rtpc-*)
   551  		basic_machine=romp-ibm
   552  		;;
   553 +	s390 | s390-*)
   554 +		basic_machine=s390-ibm
   555 +		;;
   556 +	s390x | s390x-*)
   557 +		basic_machine=s390x-ibm
   558 +		;;
   559  	sa29200)
   560  		basic_machine=a29k-amd
   561  		os=-udi
   562 @@ -671,7 +825,7 @@
   563  		basic_machine=sh-hitachi
   564  		os=-hms
   565  		;;
   566 -	sparclite-wrs)
   567 +	sparclite-wrs | simso-wrs)
   568  		basic_machine=sparclite-wrs
   569  		os=-vxworks
   570  		;;
   571 @@ -729,20 +883,40 @@
   572  	sun386 | sun386i | roadrunner)
   573  		basic_machine=i386-sun
   574  		;;
   575 +        sv1)
   576 +		basic_machine=sv1-cray
   577 +		os=-unicos
   578 +		;;
   579  	symmetry)
   580  		basic_machine=i386-sequent
   581  		os=-dynix
   582  		;;
   583 +	t3d)
   584 +		basic_machine=alpha-cray
   585 +		os=-unicos
   586 +		;;
   587  	t3e)
   588 -		basic_machine=t3e-cray
   589 +		basic_machine=alphaev5-cray
   590 +		os=-unicos
   591 +		;;
   592 +	t90)
   593 +		basic_machine=t90-cray
   594  		os=-unicos
   595  		;;
   596 +	tic54x | c54x*)
   597 +		basic_machine=tic54x-unknown
   598 +		os=-coff
   599 +		;;
   600  	tx39)
   601  		basic_machine=mipstx39-unknown
   602  		;;
   603  	tx39el)
   604  		basic_machine=mipstx39el-unknown
   605  		;;
   606 +	toad1)
   607 +		basic_machine=pdp10-xkl
   608 +		os=-tops20
   609 +		;;
   610  	tower | tower-32)
   611  		basic_machine=m68k-ncr
   612  		;;
   613 @@ -789,13 +963,17 @@
   614  		basic_machine=hppa1.1-winbond
   615  		os=-proelf
   616  		;;
   617 -	xmp)
   618 -		basic_machine=xmp-cray
   619 -		os=-unicos
   620 +	windows32)
   621 +		basic_machine=i386-pc
   622 +		os=-windows32-msvcrt
   623  		;;
   624          xps | xps100)
   625  		basic_machine=xps100-honeywell
   626  		;;
   627 +	ymp)
   628 +		basic_machine=ymp-cray
   629 +		os=-unicos
   630 +		;;
   631  	z8k-*-coff)
   632  		basic_machine=z8k-unknown
   633  		os=-sim
   634 @@ -816,13 +994,6 @@
   635  	op60c)
   636  		basic_machine=hppa1.1-oki
   637  		;;
   638 -	mips)
   639 -		if [ x$os = x-linux-gnu ]; then
   640 -			basic_machine=mips-unknown
   641 -		else
   642 -			basic_machine=mips-mips
   643 -		fi
   644 -		;;
   645  	romp)
   646  		basic_machine=romp-ibm
   647  		;;
   648 @@ -832,13 +1003,23 @@
   649  	vax)
   650  		basic_machine=vax-dec
   651  		;;
   652 +	pdp10)
   653 +		# there are many clones, so DEC is not a safe bet
   654 +		basic_machine=pdp10-unknown
   655 +		;;
   656  	pdp11)
   657  		basic_machine=pdp11-dec
   658  		;;
   659  	we32k)
   660  		basic_machine=we32k-att
   661  		;;
   662 -	sparc | sparcv9)
   663 +	sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
   664 +		basic_machine=sh-unknown
   665 +		;;
   666 +	sh64)
   667 +		basic_machine=sh64-unknown
   668 +		;;
   669 +	sparc | sparcv9 | sparcv9b)
   670  		basic_machine=sparc-sun
   671  		;;
   672          cydra)
   673 @@ -860,6 +1041,9 @@
   674  		basic_machine=c4x-none
   675  		os=-coff
   676  		;;
   677 +	*-unknown)
   678 +		# Make sure to match an already-canonicalized machine name.
   679 +		;;
   680  	*)
   681  		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
   682  		exit 1
   683 @@ -916,14 +1100,31 @@
   684  	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
   685  	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
   686  	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
   687 +	      | -chorusos* | -chorusrdb* \
   688  	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
   689  	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
   690 -	      | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
   691 +	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
   692 +	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
   693 +	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
   694 +	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
   695 +	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
   696  	# Remember, each alternative MUST END IN *, to match a version number.
   697  		;;
   698 +	-qnx*)
   699 +		case $basic_machine in
   700 +		    x86-* | i*86-*)
   701 +			;;
   702 +		    *)
   703 +			os=-nto$os
   704 +			;;
   705 +		esac
   706 +		;;
   707 +	-nto*)
   708 +		os=-nto-qnx
   709 +		;;
   710  	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
   711  	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
   712 -	      | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
   713 +	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
   714  		;;
   715  	-mac*)
   716  		os=`echo $os | sed -e 's|mac|macos|'`
   717 @@ -940,6 +1141,9 @@
   718  	-opened*)
   719  		os=-openedition
   720  		;;
   721 +	-wince*)
   722 +		os=-wince
   723 +		;;
   724  	-osfrose*)
   725  		os=-osfrose
   726  		;;
   727 @@ -955,15 +1159,24 @@
   728  	-acis*)
   729  		os=-aos
   730  		;;
   731 +	-atheos*)
   732 +		os=-atheos
   733 +		;;
   734  	-386bsd)
   735  		os=-bsd
   736  		;;
   737  	-ctix* | -uts*)
   738  		os=-sysv
   739  		;;
   740 +	-nova*)
   741 +		os=-rtmk-nova
   742 +		;;
   743  	-ns2 )
   744  	        os=-nextstep2
   745  		;;
   746 +	-nsk*)
   747 +		os=-nsk
   748 +		;;
   749  	# Preserve the version number of sinix5.
   750  	-sinix5.*)
   751  		os=`echo $os | sed -e 's|sinix|sysv|'`
   752 @@ -977,9 +1190,6 @@
   753  	-oss*)
   754  		os=-sysv3
   755  		;;
   756 -        -qnx)
   757 -		os=-qnx4
   758 -		;;
   759  	-svr4)
   760  		os=-sysv4
   761  		;;
   762 @@ -1001,7 +1211,7 @@
   763  	-xenix)
   764  		os=-xenix
   765  		;;
   766 -        -*mint | -*MiNT)
   767 +        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
   768  	        os=-mint
   769  		;;
   770  	-none)
   771 @@ -1035,6 +1245,10 @@
   772  	arm*-semi)
   773  		os=-aout
   774  		;;
   775 +	# This must come before the *-dec entry.
   776 +	pdp10-*)
   777 +		os=-tops20
   778 +		;;
   779          pdp11-*)
   780  		os=-none
   781  		;;
   782 @@ -1062,6 +1276,9 @@
   783  	mips*-*)
   784  		os=-elf
   785  		;;
   786 +	or32-*)
   787 +		os=-coff
   788 +		;;
   789  	*-tti)	# must be before sparc entry or we get the wrong os.
   790  		os=-sysv3
   791  		;;
   792 @@ -1143,7 +1360,7 @@
   793  	*-masscomp)
   794  		os=-rtu
   795  		;;
   796 -	f301-fujitsu)
   797 +	f30[01]-fujitsu | f700-fujitsu)
   798  		os=-uxpv
   799  		;;
   800  	*-rom68k)
   801 @@ -1209,7 +1426,7 @@
   802  			-ptx*)
   803  				vendor=sequent
   804  				;;
   805 -			-vxsim* | -vxworks*)
   806 +			-vxsim* | -vxworks* | -windiss*)
   807  				vendor=wrs
   808  				;;
   809  			-aux*)
   810 @@ -1221,12 +1438,23 @@
   811  			-mpw* | -macos*)
   812  				vendor=apple
   813  				;;
   814 -			-*mint | -*MiNT)
   815 +			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
   816  				vendor=atari
   817  				;;
   818 +			-vos*)
   819 +				vendor=stratus
   820 +				;;
   821  		esac
   822  		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
   823  		;;
   824  esac
   825  
   826  echo $basic_machine$os
   827 +exit 0
   828 +
   829 +# Local variables:
   830 +# eval: (add-hook 'write-file-hooks 'time-stamp)
   831 +# time-stamp-start: "timestamp='"
   832 +# time-stamp-format: "%:y-%02m-%02d"
   833 +# time-stamp-end: "'"
   834 +# End: