View | Details | Raw Unified | Return to bug 229176
Collapse All | Expand All

(-)config.sub (-838 / +837 lines)
Lines 1-8 Link Here
1
#! /bin/sh
1
#! /bin/sh
2
# Configuration validation subroutine script.
2
# Configuration validation subroutine script.
3
#   Copyright 1992-2015 Free Software Foundation, Inc.
3
#   Copyright 1992-2018 Free Software Foundation, Inc.
4
4
5
timestamp='2015-03-08'
5
timestamp='2018-05-24'
6
6
7
# This file is free software; you can redistribute it and/or modify it
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
8
# under the terms of the GNU General Public License as published by
Lines 15-21 Link Here
15
# General Public License for more details.
15
# General Public License for more details.
16
#
16
#
17
# 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
18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
18
# along with this program; if not, see <https://www.gnu.org/licenses/>.
19
#
19
#
20
# 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
21
# distribute this file as part of a program that contains a
21
# distribute this file as part of a program that contains a
Lines 33-39 Link Here
33
# Otherwise, we print the canonical config type on stdout and succeed.
33
# Otherwise, we print the canonical config type on stdout and succeed.
34
34
35
# You can get the latest version of this script from:
35
# You can get the latest version of this script from:
36
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
36
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
37
37
38
# 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
39
# and recognize all the CPU types, system types and aliases
39
# and recognize all the CPU types, system types and aliases
Lines 53-64 Link Here
53
me=`echo "$0" | sed -e 's,.*/,,'`
53
me=`echo "$0" | sed -e 's,.*/,,'`
54
54
55
usage="\
55
usage="\
56
Usage: $0 [OPTION] CPU-MFR-OPSYS
56
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
57
       $0 [OPTION] ALIAS
58
57
59
Canonicalize a configuration name.
58
Canonicalize a configuration name.
60
59
61
Operation modes:
60
Options:
62
  -h, --help         print this help, then exit
61
  -h, --help         print this help, then exit
63
  -t, --time-stamp   print date of last modification, then exit
62
  -t, --time-stamp   print date of last modification, then exit
64
  -v, --version      print version number, then exit
63
  -v, --version      print version number, then exit
Lines 68-74 Link Here
68
version="\
67
version="\
69
GNU config.sub ($timestamp)
68
GNU config.sub ($timestamp)
70
69
71
Copyright 1992-2015 Free Software Foundation, Inc.
70
Copyright 1992-2018 Free Software Foundation, Inc.
72
71
73
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
74
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
73
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
Lines 95-101 Link Here
95
94
96
    *local*)
95
    *local*)
97
       # First pass through any local machine types.
96
       # First pass through any local machine types.
98
       echo $1
97
       echo "$1"
99
       exit ;;
98
       exit ;;
100
99
101
    * )
100
    * )
Lines 111-245 Link Here
111
    exit 1;;
110
    exit 1;;
112
esac
111
esac
113
112
114
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
113
# Split fields of configuration type
115
# Here we must recognize all the valid KERNEL-OS combinations.
114
IFS="-" read -r field1 field2 field3 field4 <<EOF
116
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
115
$1
117
case $maybe_os in
116
EOF
118
  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
119
  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
120
  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
121
  kopensolaris*-gnu* | \
122
  storm-chaos* | os2-emx* | rtmk-nova*)
123
    os=-$maybe_os
124
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
125
    ;;
126
  android-linux)
127
    os=-linux-android
128
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
129
    ;;
130
  *)
131
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
132
    if [ $basic_machine != $1 ]
133
    then os=`echo $1 | sed 's/.*-/-/'`
134
    else os=; fi
135
    ;;
136
esac
137
117
138
### Let's recognize common machines as not being operating systems so
118
# Separate into logical components for further validation
139
### that things like config.sub decstation-3100 work.  We also
119
case $1 in
140
### recognize some manufacturers as not being operating systems, so we
120
	*-*-*-*-*)
141
### can provide default operating systems below.
121
		echo Invalid configuration \`"$1"\': more than four components >&2
142
case $os in
122
		exit 1
143
	-sun*os*)
144
		# Prevent following clause from handling this invalid input.
145
		;;
123
		;;
146
	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
124
	*-*-*-*)
147
	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
125
		basic_machine=$field1-$field2
148
	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
126
		os=$field3-$field4
149
	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
150
	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
151
	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
152
	-apple | -axis | -knuth | -cray | -microblaze*)
153
		os=
154
		basic_machine=$1
155
		;;
127
		;;
156
	-bluegene*)
128
	*-*-*)
157
		os=-cnk
129
		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
130
		# parts
131
		maybe_os=$field2-$field3
132
		case $maybe_os in
133
			nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
134
			| linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
135
			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
136
			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
137
			| storm-chaos* | os2-emx* | rtmk-nova*)
138
				basic_machine=$field1
139
				os=$maybe_os
140
				;;
141
			android-linux)
142
				basic_machine=$field1-unknown
143
				os=linux-android
144
				;;
145
			*)
146
				basic_machine=$field1-$field2
147
				os=$field3
148
				;;
149
		esac
158
		;;
150
		;;
159
	-sim | -cisco | -oki | -wec | -winbond)
151
	*-*)
160
		os=
152
		# Second component is usually, but not always the OS
161
		basic_machine=$1
153
		case $field2 in
154
			# Prevent following clause from handling this valid os
155
			sun*os*)
156
				basic_machine=$field1
157
				os=$field2
158
				;;
159
			# Manufacturers
160
			dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \
161
			| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
162
			| unicom* | ibm* | next | hp | isi* | apollo | altos* \
163
			| convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \
164
			| c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \
165
			| harris | dolphin | highlevel | gould | cbm | ns | masscomp \
166
			| apple | axis | knuth | cray | microblaze* \
167
			| sim | cisco | oki | wec | wrs | winbond)
168
				basic_machine=$field1-$field2
169
				os=
170
				;;
171
			*)
172
				basic_machine=$field1
173
				os=$field2
174
				;;
175
		esac
162
		;;
176
		;;
163
	-scout)
177
	*)
178
		# Convert single-component short-hands not valid as part of
179
		# multi-component configurations.
180
		case $field1 in
181
			386bsd)
182
				basic_machine=i386-pc
183
				os=bsd
184
				;;
185
			a29khif)
186
				basic_machine=a29k-amd
187
				os=udi
188
				;;
189
			adobe68k)
190
				basic_machine=m68010-adobe
191
				os=scout
192
				;;
193
			am29k)
194
				basic_machine=a29k-none
195
				os=bsd
196
				;;
197
			amdahl)
198
				basic_machine=580-amdahl
199
				os=sysv
200
				;;
201
			amigaos | amigados)
202
				basic_machine=m68k-unknown
203
				os=amigaos
204
				;;
205
			amigaunix | amix)
206
				basic_machine=m68k-unknown
207
				os=sysv4
208
				;;
209
			apollo68)
210
				basic_machine=m68k-apollo
211
				os=sysv
212
				;;
213
			apollo68bsd)
214
				basic_machine=m68k-apollo
215
				os=bsd
216
				;;
217
			aros)
218
				basic_machine=i386-pc
219
				os=aros
220
				;;
221
			aux)
222
				basic_machine=m68k-apple
223
				os=aux
224
				;;
225
			balance)
226
				basic_machine=ns32k-sequent
227
				os=dynix
228
				;;
229
			blackfin)
230
				basic_machine=bfin-unknown
231
				os=linux
232
				;;
233
			cegcc)
234
				basic_machine=arm-unknown
235
				os=cegcc
236
				;;
237
			cray)
238
				basic_machine=j90-cray
239
				os=unicos
240
				;;
241
			craynv)
242
				basic_machine=craynv-cray
243
				os=unicosmp
244
				;;
245
			delta88)
246
				basic_machine=m88k-motorola
247
				os=sysv3
248
				;;
249
			dicos)
250
				basic_machine=i686-pc
251
				os=dicos
252
				;;
253
			djgpp)
254
				basic_machine=i586-pc
255
				os=msdosdjgpp
256
				;;
257
			ebmon29k)
258
				basic_machine=a29k-amd
259
				os=ebmon
260
				;;
261
			es1800 | OSE68k | ose68k | ose | OSE)
262
				basic_machine=m68k-ericsson
263
				os=ose
264
				;;
265
			gmicro)
266
				basic_machine=tron-gmicro
267
				os=sysv
268
				;;
269
			go32)
270
				basic_machine=i386-pc
271
				os=go32
272
				;;
273
			h8300hms)
274
				basic_machine=h8300-hitachi
275
				os=hms
276
				;;
277
			h8300xray)
278
				basic_machine=h8300-hitachi
279
				os=xray
280
				;;
281
			h8500hms)
282
				basic_machine=h8500-hitachi
283
				os=hms
284
				;;
285
			harris)
286
				basic_machine=m88k-harris
287
				os=sysv3
288
				;;
289
			hp300bsd)
290
				basic_machine=m68k-hp
291
				os=bsd
292
				;;
293
			hp300hpux)
294
				basic_machine=m68k-hp
295
				os=hpux
296
				;;
297
			hppaosf)
298
				basic_machine=hppa1.1-hp
299
				os=osf
300
				;;
301
			hppro)
302
				basic_machine=hppa1.1-hp
303
				os=proelf
304
				;;
305
			i386mach)
306
				basic_machine=i386-mach
307
				os=mach
308
				;;
309
			vsta)
310
				basic_machine=i386-unknown
311
				os=vsta
312
				;;
313
			isi68 | isi)
314
				basic_machine=m68k-isi
315
				os=sysv
316
				;;
317
			m68knommu)
318
				basic_machine=m68k-unknown
319
				os=linux
320
				;;
321
			magnum | m3230)
322
				basic_machine=mips-mips
323
				os=sysv
324
				;;
325
			merlin)
326
				basic_machine=ns32k-utek
327
				os=sysv
328
				;;
329
			mingw64)
330
				basic_machine=x86_64-pc
331
				os=mingw64
332
				;;
333
			mingw32)
334
				basic_machine=i686-pc
335
				os=mingw32
336
				;;
337
			mingw32ce)
338
				basic_machine=arm-unknown
339
				os=mingw32ce
340
				;;
341
			monitor)
342
				basic_machine=m68k-rom68k
343
				os=coff
344
				;;
345
			morphos)
346
				basic_machine=powerpc-unknown
347
				os=morphos
348
				;;
349
			moxiebox)
350
				basic_machine=moxie-unknown
351
				os=moxiebox
352
				;;
353
			msdos)
354
				basic_machine=i386-pc
355
				os=msdos
356
				;;
357
			msys)
358
				basic_machine=i686-pc
359
				os=msys
360
				;;
361
			mvs)
362
				basic_machine=i370-ibm
363
				os=mvs
364
				;;
365
			nacl)
366
				basic_machine=le32-unknown
367
				os=nacl
368
				;;
369
			ncr3000)
370
				basic_machine=i486-ncr
371
				os=sysv4
372
				;;
373
			netbsd386)
374
				basic_machine=i386-unknown
375
				os=netbsd
376
				;;
377
			netwinder)
378
				basic_machine=armv4l-rebel
379
				os=linux
380
				;;
381
			news | news700 | news800 | news900)
382
				basic_machine=m68k-sony
383
				os=newsos
384
				;;
385
			news1000)
386
				basic_machine=m68030-sony
387
				os=newsos
388
				;;
389
			necv70)
390
				basic_machine=v70-nec
391
				os=sysv
392
				;;
393
			nh3000)
394
				basic_machine=m68k-harris
395
				os=cxux
396
				;;
397
			nh[45]000)
398
				basic_machine=m88k-harris
399
				os=cxux
400
				;;
401
			nindy960)
402
				basic_machine=i960-intel
403
				os=nindy
404
				;;
405
			mon960)
406
				basic_machine=i960-intel
407
				os=mon960
408
				;;
409
			nonstopux)
410
				basic_machine=mips-compaq
411
				os=nonstopux
412
				;;
413
			os400)
414
				basic_machine=powerpc-ibm
415
				os=os400
416
				;;
417
			OSE68000 | ose68000)
418
				basic_machine=m68000-ericsson
419
				os=ose
420
				;;
421
			os68k)
422
				basic_machine=m68k-none
423
				os=os68k
424
				;;
425
			paragon)
426
				basic_machine=i860-intel
427
				os=osf
428
				;;
429
			parisc)
430
				basic_machine=hppa-unknown
431
				os=linux
432
				;;
433
			pw32)
434
				basic_machine=i586-unknown
435
				os=pw32
436
				;;
437
			rdos | rdos64)
438
				basic_machine=x86_64-pc
439
				os=rdos
440
				;;
441
			rdos32)
442
				basic_machine=i386-pc
443
				os=rdos
444
				;;
445
			rom68k)
446
				basic_machine=m68k-rom68k
447
				os=coff
448
				;;
449
			sa29200)
450
				basic_machine=a29k-amd
451
				os=udi
452
				;;
453
			sei)
454
				basic_machine=mips-sei
455
				os=seiux
456
				;;
457
			sps7)
458
				basic_machine=m68k-bull
459
				os=sysv2
460
				;;
461
			stratus)
462
				basic_machine=i860-stratus
463
				os=sysv4
464
				;;
465
			sun2os3)
466
				basic_machine=m68000-sun
467
				os=sunos3
468
				;;
469
			sun2os4)
470
				basic_machine=m68000-sun
471
				os=sunos4
472
				;;
473
			sun3os3)
474
				basic_machine=m68k-sun
475
				os=sunos3
476
				;;
477
			sun3os4)
478
				basic_machine=m68k-sun
479
				os=sunos4
480
				;;
481
			sun4os3)
482
				basic_machine=sparc-sun
483
				os=sunos3
484
				;;
485
			sun4os4)
486
				basic_machine=sparc-sun
487
				os=sunos4
488
				;;
489
			sun4sol2)
490
				basic_machine=sparc-sun
491
				os=solaris2
492
				;;
493
			sv1)
494
				basic_machine=sv1-cray
495
				os=unicos
496
				;;
497
			symmetry)
498
				basic_machine=i386-sequent
499
				os=dynix
500
				;;
501
			t3e)
502
				basic_machine=alphaev5-cray
503
				os=unicos
504
				;;
505
			t90)
506
				basic_machine=t90-cray
507
				os=unicos
508
				;;
509
			toad1)
510
				basic_machine=pdp10-xkl
511
				os=tops20
512
				;;
513
			tpf)
514
				basic_machine=s390x-ibm
515
				os=tpf
516
				;;
517
			udi29k)
518
				basic_machine=a29k-amd
519
				os=udi
520
				;;
521
			ultra3)
522
				basic_machine=a29k-nyu
523
				os=sym1
524
				;;
525
			v810 | necv810)
526
				basic_machine=v810-nec
527
				os=none
528
				;;
529
			vaxv)
530
				basic_machine=vax-dec
531
				os=sysv
532
				;;
533
			vms)
534
				basic_machine=vax-dec
535
				os=vms
536
				;;
537
			vxworks960)
538
				basic_machine=i960-wrs
539
				os=vxworks
540
				;;
541
			vxworks68)
542
				basic_machine=m68k-wrs
543
				os=vxworks
544
				;;
545
			vxworks29k)
546
				basic_machine=a29k-wrs
547
				os=vxworks
548
				;;
549
			xbox)
550
				basic_machine=i686-pc
551
				os=mingw32
552
				;;
553
			ymp)
554
				basic_machine=ymp-cray
555
				os=unicos
556
				;;
557
			*)
558
				basic_machine=$1
559
				os=
560
				;;
561
		esac
164
		;;
562
		;;
165
	-wrs)
166
		os=-vxworks
167
		basic_machine=$1
168
		;;
169
	-chorusos*)
170
		os=-chorusos
171
		basic_machine=$1
172
		;;
173
	-chorusrdb)
174
		os=-chorusrdb
175
		basic_machine=$1
176
		;;
177
	-hiux*)
178
		os=-hiuxwe2
179
		;;
180
	-sco6)
181
		os=-sco5v6
182
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183
		;;
184
	-sco5)
185
		os=-sco3.2v5
186
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187
		;;
188
	-sco4)
189
		os=-sco3.2v4
190
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191
		;;
192
	-sco3.2.[4-9]*)
193
		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
194
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195
		;;
196
	-sco3.2v[4-9]*)
197
		# Don't forget version if it is 3.2v4 or newer.
198
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199
		;;
200
	-sco5v6*)
201
		# Don't forget version if it is 3.2v4 or newer.
202
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203
		;;
204
	-sco*)
205
		os=-sco3.2v2
206
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207
		;;
208
	-udk*)
209
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210
		;;
211
	-isc)
212
		os=-isc2.2
213
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214
		;;
215
	-clix*)
216
		basic_machine=clipper-intergraph
217
		;;
218
	-isc*)
219
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
220
		;;
221
	-lynx*178)
222
		os=-lynxos178
223
		;;
224
	-lynx*5)
225
		os=-lynxos5
226
		;;
227
	-lynx*)
228
		os=-lynxos
229
		;;
230
	-ptx*)
231
		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
232
		;;
233
	-windowsnt*)
234
		os=`echo $os | sed -e 's/windowsnt/winnt/'`
235
		;;
236
	-psos*)
237
		os=-psos
238
		;;
239
	-mint | -mint[0-9]*)
240
		basic_machine=m68k-atari
241
		os=-mint
242
		;;
243
esac
563
esac
244
564
245
# Decode aliases for certain CPU-COMPANY combinations.
565
# Decode aliases for certain CPU-COMPANY combinations.
Lines 253-269 Link Here
253
	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
573
	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
254
	| am33_2.0 \
574
	| am33_2.0 \
255
	| arc | arceb \
575
	| arc | arceb \
256
	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
576
	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
257
	| avr | avr32 \
577
	| avr | avr32 \
578
	| ba \
258
	| be32 | be64 \
579
	| be32 | be64 \
259
	| bfin \
580
	| bfin \
260
	| c4x | c8051 | clipper \
581
	| c4x | c8051 | clipper | csky \
261
	| d10v | d30v | dlx | dsp16xx \
582
	| d10v | d30v | dlx | dsp16xx \
262
	| e2k | epiphany \
583
	| e2k | epiphany \
263
	| fido | fr30 | frv | ft32 \
584
	| fido | fr30 | frv | ft32 \
264
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
585
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
265
	| hexagon \
586
	| hexagon \
266
	| i370 | i860 | i960 | ia64 \
587
	| i370 | i860 | i960 | ia16 | ia64 \
267
	| ip2k | iq2000 \
588
	| ip2k | iq2000 \
268
	| k1om \
589
	| k1om \
269
	| le32 | le64 \
590
	| le32 | le64 \
Lines 296-311 Link Here
296
	| mt \
617
	| mt \
297
	| msp430 \
618
	| msp430 \
298
	| nds32 | nds32le | nds32be \
619
	| nds32 | nds32le | nds32be \
620
	| nfp \
299
	| nios | nios2 | nios2eb | nios2el \
621
	| nios | nios2 | nios2eb | nios2el \
300
	| ns16k | ns32k \
622
	| ns16k | ns32k \
301
	| open8 | or1k | or1knd | or32 \
623
	| open8 | or1k | or1knd | or32 \
302
	| pdp10 | pdp11 | pj | pjl \
624
	| pdp10 | pj | pjl \
303
	| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
625
	| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
626
	| pru \
304
	| pyramid \
627
	| pyramid \
305
	| riscv32 | riscv64 \
628
	| riscv32 | riscv64 \
306
	| rl78 | rx \
629
	| rl78 | rx \
307
	| score \
630
	| score \
308
	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
631
	| 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 \
632
	| sh64 | sh64le \
310
	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
633
	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
311
	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
634
	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
Lines 314-320 Link Here
314
	| ubicom32 \
637
	| ubicom32 \
315
	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
638
	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
316
	| visium \
639
	| visium \
317
	| we32k \
640
	| wasm32 \
318
	| x86 | xc16x | xstormy16 | xtensa \
641
	| x86 | xc16x | xstormy16 | xtensa \
319
	| z8k | z80)
642
	| z8k | z80)
320
		basic_machine=$basic_machine-unknown
643
		basic_machine=$basic_machine-unknown
Lines 333-352 Link Here
333
		;;
656
		;;
334
	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
657
	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
335
		basic_machine=$basic_machine-unknown
658
		basic_machine=$basic_machine-unknown
336
		os=-none
659
		os=${os:-none}
337
		;;
660
		;;
338
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
661
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
339
		;;
662
		;;
663
	m9s12z | m68hcs12z | hcs12z | s12z)
664
		basic_machine=s12z-unknown
665
		os=${os:-none}
666
		;;
340
	ms1)
667
	ms1)
341
		basic_machine=mt-unknown
668
		basic_machine=mt-unknown
342
		;;
669
		;;
343
344
	strongarm | thumb | xscale)
670
	strongarm | thumb | xscale)
345
		basic_machine=arm-unknown
671
		basic_machine=arm-unknown
346
		;;
672
		;;
347
	xgate)
673
	xgate)
348
		basic_machine=$basic_machine-unknown
674
		basic_machine=$basic_machine-unknown
349
		os=-none
675
		os=${os:-none}
350
		;;
676
		;;
351
	xscaleeb)
677
	xscaleeb)
352
		basic_machine=armeb-unknown
678
		basic_machine=armeb-unknown
Lines 362-372 Link Here
362
	i*86 | x86_64)
688
	i*86 | x86_64)
363
	  basic_machine=$basic_machine-pc
689
	  basic_machine=$basic_machine-pc
364
	  ;;
690
	  ;;
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.
691
	# Recognize the basic CPU types with company name.
371
	580-* \
692
	580-* \
372
	| a29k-* \
693
	| a29k-* \
Lines 373-385 Link Here
373
	| aarch64-* | aarch64_be-* \
694
	| aarch64-* | aarch64_be-* \
374
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
695
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
375
	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
696
	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
697
	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
376
	| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
698
	| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
377
	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
699
	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
378
	| avr-* | avr32-* \
700
	| avr-* | avr32-* \
701
	| ba-* \
379
	| be32-* | be64-* \
702
	| be32-* | be64-* \
380
	| bfin-* | bs2000-* \
703
	| bfin-* | bs2000-* \
381
	| c[123]* | c30-* | [cjt]90-* | c4x-* \
704
	| c[123]* | c30-* | [cjt]90-* | c4x-* \
382
	| c8051-* | clipper-* | craynv-* | cydra-* \
705
	| c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
383
	| d10v-* | d30v-* | dlx-* \
706
	| d10v-* | d30v-* | dlx-* \
384
	| e2k-* | elxsi-* \
707
	| e2k-* | elxsi-* \
385
	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
708
	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
Lines 386-392 Link Here
386
	| h8300-* | h8500-* \
709
	| h8300-* | h8500-* \
387
	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
710
	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
388
	| hexagon-* \
711
	| hexagon-* \
389
	| i*86-* | i860-* | i960-* | ia64-* \
712
	| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
390
	| ip2k-* | iq2000-* \
713
	| ip2k-* | iq2000-* \
391
	| k1om-* \
714
	| k1om-* \
392
	| le32-* | le64-* \
715
	| le32-* | le64-* \
Lines 420-425 Link Here
420
	| mt-* \
743
	| mt-* \
421
	| msp430-* \
744
	| msp430-* \
422
	| nds32-* | nds32le-* | nds32be-* \
745
	| nds32-* | nds32le-* | nds32be-* \
746
	| nfp-* \
423
	| nios-* | nios2-* | nios2eb-* | nios2el-* \
747
	| nios-* | nios2-* | nios2eb-* | nios2el-* \
424
	| none-* | np1-* | ns16k-* | ns32k-* \
748
	| none-* | np1-* | ns16k-* | ns32k-* \
425
	| open8-* \
749
	| open8-* \
Lines 427-439 Link Here
427
	| orion-* \
751
	| orion-* \
428
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
752
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
429
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | powerpcspe-* \
753
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | powerpcspe-* \
754
	| pru-* \
430
	| pyramid-* \
755
	| pyramid-* \
756
	| riscv32-* | riscv64-* \
431
	| rl78-* | romp-* | rs6000-* | rx-* \
757
	| rl78-* | romp-* | rs6000-* | rx-* \
432
	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
758
	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
433
	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
759
	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
434
	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
760
	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
435
	| sparclite-* \
761
	| sparclite-* \
436
	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
762
	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
437
	| tahoe-* \
763
	| tahoe-* \
438
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
764
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
439
	| tile*-* \
765
	| tile*-* \
Lines 442-447 Link Here
442
	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
768
	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
443
	| vax-* \
769
	| vax-* \
444
	| visium-* \
770
	| visium-* \
771
	| wasm32-* \
445
	| we32k-* \
772
	| we32k-* \
446
	| x86-* | x86_64-* | xc16x-* | xps100-* \
773
	| x86-* | x86_64-* | xc16x-* | xps100-* \
447
	| xstormy16-* | xtensa*-* \
774
	| xstormy16-* | xtensa*-* \
Lines 454-463 Link Here
454
		;;
781
		;;
455
	# Recognize the various machine names and aliases which stand
782
	# Recognize the various machine names and aliases which stand
456
	# for a CPU type and a company and sometimes even an OS.
783
	# for a CPU type and a company and sometimes even an OS.
457
	386bsd)
458
		basic_machine=i386-unknown
459
		os=-bsd
460
		;;
461
	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
784
	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
462
		basic_machine=m68000-att
785
		basic_machine=m68000-att
463
		;;
786
		;;
Lines 464-480 Link Here
464
	3b*)
787
	3b*)
465
		basic_machine=we32k-att
788
		basic_machine=we32k-att
466
		;;
789
		;;
467
	a29khif)
468
		basic_machine=a29k-amd
469
		os=-udi
470
		;;
471
	abacus)
790
	abacus)
472
		basic_machine=abacus-unknown
791
		basic_machine=abacus-unknown
473
		;;
792
		;;
474
	adobe68k)
475
		basic_machine=m68010-adobe
476
		os=-scout
477
		;;
478
	alliant | fx80)
793
	alliant | fx80)
479
		basic_machine=fx80-alliant
794
		basic_machine=fx80-alliant
480
		;;
795
		;;
Lines 481-588 Link Here
481
	altos | altos3068)
796
	altos | altos3068)
482
		basic_machine=m68k-altos
797
		basic_machine=m68k-altos
483
		;;
798
		;;
484
	am29k)
485
		basic_machine=a29k-none
486
		os=-bsd
487
		;;
488
	amdahl)
489
		basic_machine=580-amdahl
490
		os=-sysv
491
		;;
492
	amiga | amiga-*)
799
	amiga | amiga-*)
493
		basic_machine=m68k-unknown
800
		basic_machine=m68k-unknown
494
		;;
801
		;;
495
	amigaos | amigados)
802
	asmjs)
496
		basic_machine=m68k-unknown
497
		os=-amigaos
498
		;;
499
	amigaunix | amix)
500
		basic_machine=m68k-unknown
501
		os=-sysv4
502
		;;
503
	apollo68)
504
		basic_machine=m68k-apollo
505
		os=-sysv
506
		;;
507
	apollo68bsd)
508
		basic_machine=m68k-apollo
509
		os=-bsd
510
		;;
511
	aros)
512
		basic_machine=i386-pc
513
		os=-aros
514
		;;
515
        asmjs)
516
		basic_machine=asmjs-unknown
803
		basic_machine=asmjs-unknown
517
		;;
804
		;;
518
	aux)
519
		basic_machine=m68k-apple
520
		os=-aux
521
		;;
522
	balance)
523
		basic_machine=ns32k-sequent
524
		os=-dynix
525
		;;
526
	blackfin)
527
		basic_machine=bfin-unknown
528
		os=-linux
529
		;;
530
	blackfin-*)
805
	blackfin-*)
531
		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
806
		basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
532
		os=-linux
807
		os=linux
533
		;;
808
		;;
534
	bluegene*)
809
	bluegene*)
535
		basic_machine=powerpc-ibm
810
		basic_machine=powerpc-ibm
536
		os=-cnk
811
		os=cnk
537
		;;
812
		;;
538
	c54x-*)
813
	c54x-*)
539
		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
814
		basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
540
		;;
815
		;;
541
	c55x-*)
816
	c55x-*)
542
		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
817
		basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
543
		;;
818
		;;
544
	c6x-*)
819
	c6x-*)
545
		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
820
		basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
546
		;;
821
		;;
547
	c90)
822
	c90)
548
		basic_machine=c90-cray
823
		basic_machine=c90-cray
549
		os=-unicos
824
		os=${os:-unicos}
550
		;;
825
		;;
551
	cegcc)
552
		basic_machine=arm-unknown
553
		os=-cegcc
554
		;;
555
	convex-c1)
826
	convex-c1)
556
		basic_machine=c1-convex
827
		basic_machine=c1-convex
557
		os=-bsd
828
		os=bsd
558
		;;
829
		;;
559
	convex-c2)
830
	convex-c2)
560
		basic_machine=c2-convex
831
		basic_machine=c2-convex
561
		os=-bsd
832
		os=bsd
562
		;;
833
		;;
563
	convex-c32)
834
	convex-c32)
564
		basic_machine=c32-convex
835
		basic_machine=c32-convex
565
		os=-bsd
836
		os=bsd
566
		;;
837
		;;
567
	convex-c34)
838
	convex-c34)
568
		basic_machine=c34-convex
839
		basic_machine=c34-convex
569
		os=-bsd
840
		os=bsd
570
		;;
841
		;;
571
	convex-c38)
842
	convex-c38)
572
		basic_machine=c38-convex
843
		basic_machine=c38-convex
573
		os=-bsd
844
		os=bsd
574
		;;
845
		;;
575
	cray | j90)
576
		basic_machine=j90-cray
577
		os=-unicos
578
		;;
579
	craynv)
580
		basic_machine=craynv-cray
581
		os=-unicosmp
582
		;;
583
	cr16 | cr16-*)
846
	cr16 | cr16-*)
584
		basic_machine=cr16-unknown
847
		basic_machine=cr16-unknown
585
		os=-elf
848
		os=${os:-elf}
586
		;;
849
		;;
587
	crds | unos)
850
	crds | unos)
588
		basic_machine=m68k-crds
851
		basic_machine=m68k-crds
Lines 595-601 Link Here
595
		;;
858
		;;
596
	crx)
859
	crx)
597
		basic_machine=crx-unknown
860
		basic_machine=crx-unknown
598
		os=-elf
861
		os=${os:-elf}
599
		;;
862
		;;
600
	da30 | da30-*)
863
	da30 | da30-*)
601
		basic_machine=m68k-da30
864
		basic_machine=m68k-da30
Lines 605-654 Link Here
605
		;;
868
		;;
606
	decsystem10* | dec10*)
869
	decsystem10* | dec10*)
607
		basic_machine=pdp10-dec
870
		basic_machine=pdp10-dec
608
		os=-tops10
871
		os=tops10
609
		;;
872
		;;
610
	decsystem20* | dec20*)
873
	decsystem20* | dec20*)
611
		basic_machine=pdp10-dec
874
		basic_machine=pdp10-dec
612
		os=-tops20
875
		os=tops20
613
		;;
876
		;;
614
	delta | 3300 | motorola-3300 | motorola-delta \
877
	delta | 3300 | motorola-3300 | motorola-delta \
615
	      | 3300-motorola | delta-motorola)
878
	      | 3300-motorola | delta-motorola)
616
		basic_machine=m68k-motorola
879
		basic_machine=m68k-motorola
617
		;;
880
		;;
618
	delta88)
619
		basic_machine=m88k-motorola
620
		os=-sysv3
621
		;;
622
	dicos)
623
		basic_machine=i686-pc
624
		os=-dicos
625
		;;
626
	djgpp)
627
		basic_machine=i586-pc
628
		os=-msdosdjgpp
629
		;;
630
	dpx20 | dpx20-*)
881
	dpx20 | dpx20-*)
631
		basic_machine=rs6000-bull
882
		basic_machine=rs6000-bull
632
		os=-bosx
883
		os=${os:-bosx}
633
		;;
884
		;;
634
	dpx2* | dpx2*-bull)
885
	dpx2*)
635
		basic_machine=m68k-bull
886
		basic_machine=m68k-bull
636
		os=-sysv3
887
		os=sysv3
637
		;;
888
		;;
638
	ebmon29k)
889
	e500v[12])
639
		basic_machine=a29k-amd
890
		basic_machine=powerpc-unknown
640
		os=-ebmon
891
		os=$os"spe"
641
		;;
892
		;;
642
	elxsi)
893
	e500v[12]-*)
643
		basic_machine=elxsi-elxsi
894
		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
644
		os=-bsd
895
		os=$os"spe"
645
		;;
896
		;;
646
	encore | umax | mmax)
897
	encore | umax | mmax)
647
		basic_machine=ns32k-encore
898
		basic_machine=ns32k-encore
648
		;;
899
		;;
649
	es1800 | OSE68k | ose68k | ose | OSE)
900
	elxsi)
650
		basic_machine=m68k-ericsson
901
		basic_machine=elxsi-elxsi
651
		os=-ose
902
		os=${os:-bsd}
652
		;;
903
		;;
653
	fx2800)
904
	fx2800)
654
		basic_machine=i860-alliant
905
		basic_machine=i860-alliant
Lines 656-700 Link Here
656
	genix)
907
	genix)
657
		basic_machine=ns32k-ns
908
		basic_machine=ns32k-ns
658
		;;
909
		;;
659
	gmicro)
660
		basic_machine=tron-gmicro
661
		os=-sysv
662
		;;
663
	go32)
664
		basic_machine=i386-pc
665
		os=-go32
666
		;;
667
	h3050r* | hiux*)
910
	h3050r* | hiux*)
668
		basic_machine=hppa1.1-hitachi
911
		basic_machine=hppa1.1-hitachi
669
		os=-hiuxwe2
912
		os=hiuxwe2
670
		;;
913
		;;
671
	h8300hms)
672
		basic_machine=h8300-hitachi
673
		os=-hms
674
		;;
675
	h8300xray)
676
		basic_machine=h8300-hitachi
677
		os=-xray
678
		;;
679
	h8500hms)
680
		basic_machine=h8500-hitachi
681
		os=-hms
682
		;;
683
	harris)
684
		basic_machine=m88k-harris
685
		os=-sysv3
686
		;;
687
	hp300-*)
914
	hp300-*)
688
		basic_machine=m68k-hp
915
		basic_machine=m68k-hp
689
		;;
916
		;;
690
	hp300bsd)
691
		basic_machine=m68k-hp
692
		os=-bsd
693
		;;
694
	hp300hpux)
695
		basic_machine=m68k-hp
696
		os=-hpux
697
		;;
698
	hp3k9[0-9][0-9] | hp9[0-9][0-9])
917
	hp3k9[0-9][0-9] | hp9[0-9][0-9])
699
		basic_machine=hppa1.0-hp
918
		basic_machine=hppa1.0-hp
700
		;;
919
		;;
Lines 724-923 Link Here
724
	hp9k8[0-9][0-9] | hp8[0-9][0-9])
943
	hp9k8[0-9][0-9] | hp8[0-9][0-9])
725
		basic_machine=hppa1.0-hp
944
		basic_machine=hppa1.0-hp
726
		;;
945
		;;
727
	hppa-next)
728
		os=-nextstep3
729
		;;
730
	hppaosf)
731
		basic_machine=hppa1.1-hp
732
		os=-osf
733
		;;
734
	hppro)
735
		basic_machine=hppa1.1-hp
736
		os=-proelf
737
		;;
738
	i370-ibm* | ibm*)
946
	i370-ibm* | ibm*)
739
		basic_machine=i370-ibm
947
		basic_machine=i370-ibm
740
		;;
948
		;;
741
	i*86v32)
949
	i*86v32)
742
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
950
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
743
		os=-sysv32
951
		os=sysv32
744
		;;
952
		;;
745
	i*86v4*)
953
	i*86v4*)
746
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
954
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
747
		os=-sysv4
955
		os=sysv4
748
		;;
956
		;;
749
	i*86v)
957
	i*86v)
750
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
958
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
751
		os=-sysv
959
		os=sysv
752
		;;
960
		;;
753
	i*86sol2)
961
	i*86sol2)
754
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
962
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
755
		os=-solaris2
963
		os=solaris2
756
		;;
964
		;;
757
	i386mach)
965
	j90 | j90-cray)
758
		basic_machine=i386-mach
966
		basic_machine=j90-cray
759
		os=-mach
967
		os=${os:-unicos}
760
		;;
968
		;;
761
	i386-vsta | vsta)
762
		basic_machine=i386-unknown
763
		os=-vsta
764
		;;
765
	iris | iris4d)
969
	iris | iris4d)
766
		basic_machine=mips-sgi
970
		basic_machine=mips-sgi
767
		case $os in
971
		case $os in
768
		    -irix*)
972
		    irix*)
769
			;;
973
			;;
770
		    *)
974
		    *)
771
			os=-irix4
975
			os=irix4
772
			;;
976
			;;
773
		esac
977
		esac
774
		;;
978
		;;
775
	isi68 | isi)
776
		basic_machine=m68k-isi
777
		os=-sysv
778
		;;
779
	leon-*|leon[3-9]-*)
979
	leon-*|leon[3-9]-*)
780
		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
980
		basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
781
		;;
981
		;;
782
	m68knommu)
783
		basic_machine=m68k-unknown
784
		os=-linux
785
		;;
786
	m68knommu-*)
982
	m68knommu-*)
787
		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
983
		basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
788
		os=-linux
984
		os=linux
789
		;;
985
		;;
790
	m88k-omron*)
791
		basic_machine=m88k-omron
792
		;;
793
	magnum | m3230)
794
		basic_machine=mips-mips
795
		os=-sysv
796
		;;
797
	merlin)
798
		basic_machine=ns32k-utek
799
		os=-sysv
800
		;;
801
	microblaze*)
986
	microblaze*)
802
		basic_machine=microblaze-xilinx
987
		basic_machine=microblaze-xilinx
803
		;;
988
		;;
804
	mingw64)
805
		basic_machine=x86_64-pc
806
		os=-mingw64
807
		;;
808
	mingw32)
809
		basic_machine=i686-pc
810
		os=-mingw32
811
		;;
812
	mingw32ce)
813
		basic_machine=arm-unknown
814
		os=-mingw32ce
815
		;;
816
	miniframe)
989
	miniframe)
817
		basic_machine=m68000-convergent
990
		basic_machine=m68000-convergent
818
		;;
991
		;;
819
	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
992
	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
820
		basic_machine=m68k-atari
993
		basic_machine=m68k-atari
821
		os=-mint
994
		os=mint
822
		;;
995
		;;
823
	mips3*-*)
996
	mips3*-*)
824
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
997
		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
825
		;;
998
		;;
826
	mips3*)
999
	mips3*)
827
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
1000
		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
828
		;;
1001
		;;
829
	monitor)
830
		basic_machine=m68k-rom68k
831
		os=-coff
832
		;;
833
	morphos)
834
		basic_machine=powerpc-unknown
835
		os=-morphos
836
		;;
837
	moxiebox)
838
		basic_machine=moxie-unknown
839
		os=-moxiebox
840
		;;
841
	msdos)
842
		basic_machine=i386-pc
843
		os=-msdos
844
		;;
845
	ms1-*)
1002
	ms1-*)
846
		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
1003
		basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
847
		;;
1004
		;;
848
	msys)
849
		basic_machine=i686-pc
850
		os=-msys
851
		;;
852
	mvs)
853
		basic_machine=i370-ibm
854
		os=-mvs
855
		;;
856
	nacl)
857
		basic_machine=le32-unknown
858
		os=-nacl
859
		;;
860
	ncr3000)
861
		basic_machine=i486-ncr
862
		os=-sysv4
863
		;;
864
	netbsd386)
865
		basic_machine=i386-unknown
866
		os=-netbsd
867
		;;
868
	netwinder)
869
		basic_machine=armv4l-rebel
870
		os=-linux
871
		;;
872
	news | news700 | news800 | news900)
873
		basic_machine=m68k-sony
874
		os=-newsos
875
		;;
876
	news1000)
877
		basic_machine=m68030-sony
878
		os=-newsos
879
		;;
880
	news-3600 | risc-news)
1005
	news-3600 | risc-news)
881
		basic_machine=mips-sony
1006
		basic_machine=mips-sony
882
		os=-newsos
1007
		os=newsos
883
		;;
1008
		;;
884
	necv70)
1009
	next | m*-next)
885
		basic_machine=v70-nec
886
		os=-sysv
887
		;;
888
	next | m*-next )
889
		basic_machine=m68k-next
1010
		basic_machine=m68k-next
890
		case $os in
1011
		case $os in
891
		    -nextstep* )
1012
		    nextstep* )
892
			;;
1013
			;;
893
		    -ns2*)
1014
		    ns2*)
894
		      os=-nextstep2
1015
		      os=nextstep2
895
			;;
1016
			;;
896
		    *)
1017
		    *)
897
		      os=-nextstep3
1018
		      os=nextstep3
898
			;;
1019
			;;
899
		esac
1020
		esac
900
		;;
1021
		;;
901
	nh3000)
902
		basic_machine=m68k-harris
903
		os=-cxux
904
		;;
905
	nh[45]000)
906
		basic_machine=m88k-harris
907
		os=-cxux
908
		;;
909
	nindy960)
910
		basic_machine=i960-intel
911
		os=-nindy
912
		;;
913
	mon960)
914
		basic_machine=i960-intel
915
		os=-mon960
916
		;;
917
	nonstopux)
918
		basic_machine=mips-compaq
919
		os=-nonstopux
920
		;;
921
	np1)
1022
	np1)
922
		basic_machine=np1-gould
1023
		basic_machine=np1-gould
923
		;;
1024
		;;
Lines 930-969 Link Here
930
	nsr-tandem)
1031
	nsr-tandem)
931
		basic_machine=nsr-tandem
1032
		basic_machine=nsr-tandem
932
		;;
1033
		;;
1034
	nsv-tandem)
1035
		basic_machine=nsv-tandem
1036
		;;
1037
	nsx-tandem)
1038
		basic_machine=nsx-tandem
1039
		;;
933
	op50n-* | op60c-*)
1040
	op50n-* | op60c-*)
934
		basic_machine=hppa1.1-oki
1041
		basic_machine=hppa1.1-oki
935
		os=-proelf
1042
		os=proelf
936
		;;
1043
		;;
937
	openrisc | openrisc-*)
1044
	openrisc | openrisc-*)
938
		basic_machine=or32-unknown
1045
		basic_machine=or32-unknown
939
		;;
1046
		;;
940
	os400)
941
		basic_machine=powerpc-ibm
942
		os=-os400
943
		;;
944
	OSE68000 | ose68000)
945
		basic_machine=m68000-ericsson
946
		os=-ose
947
		;;
948
	os68k)
949
		basic_machine=m68k-none
950
		os=-os68k
951
		;;
952
	pa-hitachi)
1047
	pa-hitachi)
953
		basic_machine=hppa1.1-hitachi
1048
		basic_machine=hppa1.1-hitachi
954
		os=-hiuxwe2
1049
		os=hiuxwe2
955
		;;
1050
		;;
956
	paragon)
957
		basic_machine=i860-intel
958
		os=-osf
959
		;;
960
	parisc)
961
		basic_machine=hppa-unknown
962
		os=-linux
963
		;;
964
	parisc-*)
1051
	parisc-*)
965
		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
1052
		basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
966
		os=-linux
1053
		os=linux
967
		;;
1054
		;;
968
	pbd)
1055
	pbd)
969
		basic_machine=sparc-tti
1056
		basic_machine=sparc-tti
Lines 978-984 Link Here
978
		basic_machine=i386-pc
1065
		basic_machine=i386-pc
979
		;;
1066
		;;
980
	pc98-*)
1067
	pc98-*)
981
		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
1068
		basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
982
		;;
1069
		;;
983
	pentium | p5 | k5 | k6 | nexgen | viac3)
1070
	pentium | p5 | k5 | k6 | nexgen | viac3)
984
		basic_machine=i586-pc
1071
		basic_machine=i586-pc
Lines 993-1008 Link Here
993
		basic_machine=i786-pc
1080
		basic_machine=i786-pc
994
		;;
1081
		;;
995
	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1082
	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
996
		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1083
		basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
997
		;;
1084
		;;
998
	pentiumpro-* | p6-* | 6x86-* | athlon-*)
1085
	pentiumpro-* | p6-* | 6x86-* | athlon-*)
999
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1086
		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1000
		;;
1087
		;;
1001
	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1088
	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1002
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1089
		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1003
		;;
1090
		;;
1004
	pentium4-*)
1091
	pentium4-*)
1005
		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1092
		basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1006
		;;
1093
		;;
1007
	pn)
1094
	pn)
1008
		basic_machine=pn-gould
1095
		basic_machine=pn-gould
Lines 1012-1054 Link Here
1012
	ppc | ppcbe)	basic_machine=powerpc-unknown
1099
	ppc | ppcbe)	basic_machine=powerpc-unknown
1013
		;;
1100
		;;
1014
	ppc-* | ppcbe-*)
1101
	ppc-* | ppcbe-*)
1015
		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1102
		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1016
		;;
1103
		;;
1017
	ppcle | powerpclittle | ppc-le | powerpc-little)
1104
	ppcle | powerpclittle)
1018
		basic_machine=powerpcle-unknown
1105
		basic_machine=powerpcle-unknown
1019
		;;
1106
		;;
1020
	ppcle-* | powerpclittle-*)
1107
	ppcle-* | powerpclittle-*)
1021
		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1108
		basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1022
		;;
1109
		;;
1023
	ppc64)	basic_machine=powerpc64-unknown
1110
	ppc64)	basic_machine=powerpc64-unknown
1024
		;;
1111
		;;
1025
	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1112
	ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1026
		;;
1113
		;;
1027
	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1114
	ppc64le | powerpc64little)
1028
		basic_machine=powerpc64le-unknown
1115
		basic_machine=powerpc64le-unknown
1029
		;;
1116
		;;
1030
	ppc64le-* | powerpc64little-*)
1117
	ppc64le-* | powerpc64little-*)
1031
		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1118
		basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1032
		;;
1119
		;;
1033
	ps2)
1120
	ps2)
1034
		basic_machine=i386-ibm
1121
		basic_machine=i386-ibm
1035
		;;
1122
		;;
1036
	pw32)
1037
		basic_machine=i586-unknown
1038
		os=-pw32
1039
		;;
1040
	rdos | rdos64)
1041
		basic_machine=x86_64-pc
1042
		os=-rdos
1043
		;;
1044
	rdos32)
1045
		basic_machine=i386-pc
1046
		os=-rdos
1047
		;;
1048
	rom68k)
1049
		basic_machine=m68k-rom68k
1050
		os=-coff
1051
		;;
1052
	rm[46]00)
1123
	rm[46]00)
1053
		basic_machine=mips-siemens
1124
		basic_machine=mips-siemens
1054
		;;
1125
		;;
Lines 1061-1070 Link Here
1061
	s390x | s390x-*)
1132
	s390x | s390x-*)
1062
		basic_machine=s390x-ibm
1133
		basic_machine=s390x-ibm
1063
		;;
1134
		;;
1064
	sa29200)
1065
		basic_machine=a29k-amd
1066
		os=-udi
1067
		;;
1068
	sb1)
1135
	sb1)
1069
		basic_machine=mipsisa64sb1-unknown
1136
		basic_machine=mipsisa64sb1-unknown
1070
		;;
1137
		;;
Lines 1073-1105 Link Here
1073
		;;
1140
		;;
1074
	sde)
1141
	sde)
1075
		basic_machine=mipsisa32-sde
1142
		basic_machine=mipsisa32-sde
1076
		os=-elf
1143
		os=${os:-elf}
1077
		;;
1144
		;;
1078
	sei)
1079
		basic_machine=mips-sei
1080
		os=-seiux
1081
		;;
1082
	sequent)
1145
	sequent)
1083
		basic_machine=i386-sequent
1146
		basic_machine=i386-sequent
1084
		;;
1147
		;;
1085
	sh)
1086
		basic_machine=sh-hitachi
1087
		os=-hms
1088
		;;
1089
	sh5el)
1148
	sh5el)
1090
		basic_machine=sh5le-unknown
1149
		basic_machine=sh5le-unknown
1091
		;;
1150
		;;
1092
	sh64)
1151
	simso-wrs)
1093
		basic_machine=sh64-unknown
1094
		;;
1095
	sparclite-wrs | simso-wrs)
1096
		basic_machine=sparclite-wrs
1152
		basic_machine=sparclite-wrs
1097
		os=-vxworks
1153
		os=vxworks
1098
		;;
1154
		;;
1099
	sps7)
1100
		basic_machine=m68k-bull
1101
		os=-sysv2
1102
		;;
1103
	spur)
1155
	spur)
1104
		basic_machine=spur-unknown
1156
		basic_machine=spur-unknown
1105
		;;
1157
		;;
Lines 1106-1149 Link Here
1106
	st2000)
1158
	st2000)
1107
		basic_machine=m68k-tandem
1159
		basic_machine=m68k-tandem
1108
		;;
1160
		;;
1109
	stratus)
1110
		basic_machine=i860-stratus
1111
		os=-sysv4
1112
		;;
1113
	strongarm-* | thumb-*)
1161
	strongarm-* | thumb-*)
1114
		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1162
		basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
1115
		;;
1163
		;;
1116
	sun2)
1164
	sun2)
1117
		basic_machine=m68000-sun
1165
		basic_machine=m68000-sun
1118
		;;
1166
		;;
1119
	sun2os3)
1120
		basic_machine=m68000-sun
1121
		os=-sunos3
1122
		;;
1123
	sun2os4)
1124
		basic_machine=m68000-sun
1125
		os=-sunos4
1126
		;;
1127
	sun3os3)
1128
		basic_machine=m68k-sun
1129
		os=-sunos3
1130
		;;
1131
	sun3os4)
1132
		basic_machine=m68k-sun
1133
		os=-sunos4
1134
		;;
1135
	sun4os3)
1136
		basic_machine=sparc-sun
1137
		os=-sunos3
1138
		;;
1139
	sun4os4)
1140
		basic_machine=sparc-sun
1141
		os=-sunos4
1142
		;;
1143
	sun4sol2)
1144
		basic_machine=sparc-sun
1145
		os=-solaris2
1146
		;;
1147
	sun3 | sun3-*)
1167
	sun3 | sun3-*)
1148
		basic_machine=m68k-sun
1168
		basic_machine=m68k-sun
1149
		;;
1169
		;;
Lines 1153-1177 Link Here
1153
	sun386 | sun386i | roadrunner)
1173
	sun386 | sun386i | roadrunner)
1154
		basic_machine=i386-sun
1174
		basic_machine=i386-sun
1155
		;;
1175
		;;
1156
	sv1)
1157
		basic_machine=sv1-cray
1158
		os=-unicos
1159
		;;
1160
	symmetry)
1161
		basic_machine=i386-sequent
1162
		os=-dynix
1163
		;;
1164
	t3e)
1165
		basic_machine=alphaev5-cray
1166
		os=-unicos
1167
		;;
1168
	t90)
1169
		basic_machine=t90-cray
1170
		os=-unicos
1171
		;;
1172
	tile*)
1176
	tile*)
1173
		basic_machine=$basic_machine-unknown
1177
		basic_machine=$basic_machine-unknown
1174
		os=-linux-gnu
1178
		os=linux-gnu
1175
		;;
1179
		;;
1176
	tx39)
1180
	tx39)
1177
		basic_machine=mipstx39-unknown
1181
		basic_machine=mipstx39-unknown
Lines 1179-1263 Link Here
1179
	tx39el)
1183
	tx39el)
1180
		basic_machine=mipstx39el-unknown
1184
		basic_machine=mipstx39el-unknown
1181
		;;
1185
		;;
1182
	toad1)
1183
		basic_machine=pdp10-xkl
1184
		os=-tops20
1185
		;;
1186
	tower | tower-32)
1186
	tower | tower-32)
1187
		basic_machine=m68k-ncr
1187
		basic_machine=m68k-ncr
1188
		;;
1188
		;;
1189
	tpf)
1190
		basic_machine=s390x-ibm
1191
		os=-tpf
1192
		;;
1193
	udi29k)
1194
		basic_machine=a29k-amd
1195
		os=-udi
1196
		;;
1197
	ultra3)
1198
		basic_machine=a29k-nyu
1199
		os=-sym1
1200
		;;
1201
	v810 | necv810)
1202
		basic_machine=v810-nec
1203
		os=-none
1204
		;;
1205
	vaxv)
1206
		basic_machine=vax-dec
1207
		os=-sysv
1208
		;;
1209
	vms)
1210
		basic_machine=vax-dec
1211
		os=-vms
1212
		;;
1213
	vpp*|vx|vx-*)
1189
	vpp*|vx|vx-*)
1214
		basic_machine=f301-fujitsu
1190
		basic_machine=f301-fujitsu
1215
		;;
1191
		;;
1216
	vxworks960)
1217
		basic_machine=i960-wrs
1218
		os=-vxworks
1219
		;;
1220
	vxworks68)
1221
		basic_machine=m68k-wrs
1222
		os=-vxworks
1223
		;;
1224
	vxworks29k)
1225
		basic_machine=a29k-wrs
1226
		os=-vxworks
1227
		;;
1228
	w65*)
1192
	w65*)
1229
		basic_machine=w65-wdc
1193
		basic_machine=w65-wdc
1230
		os=-none
1194
		os=none
1231
		;;
1195
		;;
1232
	w89k-*)
1196
	w89k-*)
1233
		basic_machine=hppa1.1-winbond
1197
		basic_machine=hppa1.1-winbond
1234
		os=-proelf
1198
		os=proelf
1235
		;;
1199
		;;
1236
	xbox)
1200
	x64)
1237
		basic_machine=i686-pc
1201
		basic_machine=x86_64-pc
1238
		os=-mingw32
1239
		;;
1202
		;;
1240
	xps | xps100)
1203
	xps | xps100)
1241
		basic_machine=xps100-honeywell
1204
		basic_machine=xps100-honeywell
1242
		;;
1205
		;;
1243
	xscale-* | xscalee[bl]-*)
1206
	xscale-* | xscalee[bl]-*)
1244
		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1207
		basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
1245
		;;
1208
		;;
1246
	ymp)
1247
		basic_machine=ymp-cray
1248
		os=-unicos
1249
		;;
1250
	z8k-*-coff)
1251
		basic_machine=z8k-unknown
1252
		os=-sim
1253
		;;
1254
	z80-*-coff)
1255
		basic_machine=z80-unknown
1256
		os=-sim
1257
		;;
1258
	none)
1209
	none)
1259
		basic_machine=none-none
1210
		basic_machine=none-none
1260
		os=-none
1211
		os=${os:-none}
1261
		;;
1212
		;;
1262
1213
1263
# Here we handle the default manufacturer of certain CPU types.  It is in
1214
# Here we handle the default manufacturer of certain CPU types.  It is in
Lines 1283-1292 Link Here
1283
	vax)
1234
	vax)
1284
		basic_machine=vax-dec
1235
		basic_machine=vax-dec
1285
		;;
1236
		;;
1286
	pdp10)
1287
		# there are many clones, so DEC is not a safe bet
1288
		basic_machine=pdp10-unknown
1289
		;;
1290
	pdp11)
1237
	pdp11)
1291
		basic_machine=pdp11-dec
1238
		basic_machine=pdp11-dec
1292
		;;
1239
		;;
Lines 1296-1304 Link Here
1296
	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1243
	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1297
		basic_machine=sh-unknown
1244
		basic_machine=sh-unknown
1298
		;;
1245
		;;
1299
	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1300
		basic_machine=sparc-sun
1301
		;;
1302
	cydra)
1246
	cydra)
1303
		basic_machine=cydra-cydrome
1247
		basic_machine=cydra-cydrome
1304
		;;
1248
		;;
Lines 1318-1324 Link Here
1318
		# Make sure to match an already-canonicalized machine name.
1262
		# Make sure to match an already-canonicalized machine name.
1319
		;;
1263
		;;
1320
	*)
1264
	*)
1321
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1265
		echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
1322
		exit 1
1266
		exit 1
1323
		;;
1267
		;;
1324
esac
1268
esac
Lines 1326-1335 Link Here
1326
# Here we canonicalize certain aliases for manufacturers.
1270
# Here we canonicalize certain aliases for manufacturers.
1327
case $basic_machine in
1271
case $basic_machine in
1328
	*-digital*)
1272
	*-digital*)
1329
		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1273
		basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
1330
		;;
1274
		;;
1331
	*-commodore*)
1275
	*-commodore*)
1332
		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1276
		basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
1333
		;;
1277
		;;
1334
	*)
1278
	*)
1335
		;;
1279
		;;
Lines 1337-1533 Link Here
1337
1281
1338
# Decode manufacturer-specific aliases for certain operating systems.
1282
# Decode manufacturer-specific aliases for certain operating systems.
1339
1283
1340
if [ x"$os" != x"" ]
1284
if [ x$os != x ]
1341
then
1285
then
1342
case $os in
1286
case $os in
1343
	# First match some system type aliases
1287
	# First match some system type aliases that might get confused
1344
	# that might get confused with valid system types.
1288
	# with valid system types.
1345
	# -solaris* is a basic system type, with this one exception.
1289
	# solaris* is a basic system type, with this one exception.
1346
	-auroraux)
1290
	auroraux)
1347
		os=-auroraux
1291
		os=auroraux
1348
		;;
1292
		;;
1349
	-solaris1 | -solaris1.*)
1293
	bluegene*)
1294
		os=cnk
1295
		;;
1296
	solaris1 | solaris1.*)
1350
		os=`echo $os | sed -e 's|solaris1|sunos4|'`
1297
		os=`echo $os | sed -e 's|solaris1|sunos4|'`
1351
		;;
1298
		;;
1352
	-solaris)
1299
	solaris)
1353
		os=-solaris2
1300
		os=solaris2
1354
		;;
1301
		;;
1355
	-svr4*)
1302
	unixware*)
1356
		os=-sysv4
1303
		os=sysv4.2uw
1357
		;;
1304
		;;
1358
	-unixware*)
1305
	gnu/linux*)
1359
		os=-sysv4.2uw
1360
		;;
1361
	-gnu/linux*)
1362
		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1306
		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1363
		;;
1307
		;;
1364
	# First accept the basic system types.
1308
	# es1800 is here to avoid being matched by es* (a different OS)
1309
	es1800*)
1310
		os=ose
1311
		;;
1312
	# Some version numbers need modification
1313
	chorusos*)
1314
		os=chorusos
1315
		;;
1316
	isc)
1317
		os=isc2.2
1318
		;;
1319
	sco6)
1320
		os=sco5v6
1321
		;;
1322
	sco5)
1323
		os=sco3.2v5
1324
		;;
1325
	sco4)
1326
		os=sco3.2v4
1327
		;;
1328
	sco3.2.[4-9]*)
1329
		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
1330
		;;
1331
	sco3.2v[4-9]* | sco5v6*)
1332
		# Don't forget version if it is 3.2v4 or newer.
1333
		;;
1334
	scout)
1335
		# Don't match below
1336
		;;
1337
	sco*)
1338
		os=sco3.2v2
1339
		;;
1340
	psos*)
1341
		os=psos
1342
		;;
1343
	# Now accept the basic system types.
1365
	# The portable systems comes first.
1344
	# The portable systems comes first.
1366
	# Each alternative MUST END IN A *, to match a version number.
1345
	# Each alternative MUST end in a * to match a version number.
1367
	# -sysv* is not here because it comes later, after sysvr4.
1346
	# sysv* is not here because it comes later, after sysvr4.
1368
	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1347
	gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1369
	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1348
	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
1370
	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1349
	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1371
	      | -sym* | -kopensolaris* | -plan9* \
1350
	     | sym* | kopensolaris* | plan9* \
1372
	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1351
	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1373
	      | -aos* | -aros* | -cloudabi* \
1352
	     | aos* | aros* | cloudabi* | sortix* \
1374
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1353
	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1375
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1354
	     | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
1376
	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1355
	     | knetbsd* | mirbsd* | netbsd* \
1377
	      | -bitrig* | -openbsd* | -solidbsd* \
1356
	     | bitrig* | openbsd* | solidbsd* | libertybsd* \
1378
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1357
	     | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
1379
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1358
	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1380
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1359
	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1381
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1360
	     | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
1382
	      | -chorusos* | -chorusrdb* | -cegcc* \
1361
	     | chorusrdb* | cegcc* | glidix* \
1383
	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1362
	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1384
	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1363
	     | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
1385
	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1364
	     | linux-newlib* | linux-musl* | linux-uclibc* \
1386
	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1365
	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1387
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1366
	     | interix* | uwin* | mks* | rhapsody* | darwin* \
1388
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1367
	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
1389
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1368
	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
1390
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1369
	     | os2* | vos* | palmos* | uclinux* | nucleus* \
1391
	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1370
	     | morphos* | superux* | rtmk* | windiss* \
1392
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1371
	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1393
	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1372
	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1373
	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1374
	     | midnightbsd*)
1394
	# Remember, each alternative MUST END IN *, to match a version number.
1375
	# Remember, each alternative MUST END IN *, to match a version number.
1395
		;;
1376
		;;
1396
	-qnx*)
1377
	qnx*)
1397
		case $basic_machine in
1378
		case $basic_machine in
1398
		    x86-* | i*86-*)
1379
		    x86-* | i*86-*)
1399
			;;
1380
			;;
1400
		    *)
1381
		    *)
1401
			os=-nto$os
1382
			os=nto-$os
1402
			;;
1383
			;;
1403
		esac
1384
		esac
1404
		;;
1385
		;;
1405
	-nto-qnx*)
1386
	hiux*)
1387
		os=hiuxwe2
1406
		;;
1388
		;;
1407
	-nto*)
1389
	nto-qnx*)
1390
		;;
1391
	nto*)
1408
		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1392
		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1409
		;;
1393
		;;
1410
	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1394
	sim | xray | os68k* | v88r* \
1411
	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1395
	    | windows* | osx | abug | netware* | os9* \
1412
	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1396
	    | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
1413
		;;
1397
		;;
1414
	-mac*)
1398
	linux-dietlibc)
1415
		os=`echo $os | sed -e 's|mac|macos|'`
1399
		os=linux-dietlibc
1416
		;;
1400
		;;
1417
	-linux-dietlibc)
1401
	linux*)
1418
		os=-linux-dietlibc
1419
		;;
1420
	-linux*)
1421
		os=`echo $os | sed -e 's|linux|linux-gnu|'`
1402
		os=`echo $os | sed -e 's|linux|linux-gnu|'`
1422
		;;
1403
		;;
1423
	-sunos5*)
1404
	lynx*178)
1424
		os=`echo $os | sed -e 's|sunos5|solaris2|'`
1405
		os=lynxos178
1425
		;;
1406
		;;
1426
	-sunos6*)
1407
	lynx*5)
1427
		os=`echo $os | sed -e 's|sunos6|solaris3|'`
1408
		os=lynxos5
1428
		;;
1409
		;;
1429
	-opened*)
1410
	lynx*)
1430
		os=-openedition
1411
		os=lynxos
1431
		;;
1412
		;;
1432
	-os400*)
1413
	mac*)
1433
		os=-os400
1414
		os=`echo "$os" | sed -e 's|mac|macos|'`
1434
		;;
1415
		;;
1435
	-wince*)
1416
	opened*)
1436
		os=-wince
1417
		os=openedition
1437
		;;
1418
		;;
1438
	-osfrose*)
1419
	os400*)
1439
		os=-osfrose
1420
		os=os400
1440
		;;
1421
		;;
1441
	-osf*)
1422
	sunos5*)
1442
		os=-osf
1423
		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
1443
		;;
1424
		;;
1444
	-utek*)
1425
	sunos6*)
1445
		os=-bsd
1426
		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
1446
		;;
1427
		;;
1447
	-dynix*)
1428
	wince*)
1448
		os=-bsd
1429
		os=wince
1449
		;;
1430
		;;
1450
	-acis*)
1431
	utek*)
1451
		os=-aos
1432
		os=bsd
1452
		;;
1433
		;;
1453
	-atheos*)
1434
	dynix*)
1454
		os=-atheos
1435
		os=bsd
1455
		;;
1436
		;;
1456
	-syllable*)
1437
	acis*)
1457
		os=-syllable
1438
		os=aos
1458
		;;
1439
		;;
1459
	-386bsd)
1440
	atheos*)
1460
		os=-bsd
1441
		os=atheos
1461
		;;
1442
		;;
1462
	-ctix* | -uts*)
1443
	syllable*)
1463
		os=-sysv
1444
		os=syllable
1464
		;;
1445
		;;
1465
	-nova*)
1446
	386bsd)
1466
		os=-rtmk-nova
1447
		os=bsd
1467
		;;
1448
		;;
1468
	-ns2 )
1449
	ctix* | uts*)
1469
		os=-nextstep2
1450
		os=sysv
1470
		;;
1451
		;;
1471
	-nsk*)
1452
	nova*)
1472
		os=-nsk
1453
		os=rtmk-nova
1473
		;;
1454
		;;
1455
	ns2)
1456
		os=nextstep2
1457
		;;
1458
	nsk*)
1459
		os=nsk
1460
		;;
1474
	# Preserve the version number of sinix5.
1461
	# Preserve the version number of sinix5.
1475
	-sinix5.*)
1462
	sinix5.*)
1476
		os=`echo $os | sed -e 's|sinix|sysv|'`
1463
		os=`echo $os | sed -e 's|sinix|sysv|'`
1477
		;;
1464
		;;
1478
	-sinix*)
1465
	sinix*)
1479
		os=-sysv4
1466
		os=sysv4
1480
		;;
1467
		;;
1481
	-tpf*)
1468
	tpf*)
1482
		os=-tpf
1469
		os=tpf
1483
		;;
1470
		;;
1484
	-triton*)
1471
	triton*)
1485
		os=-sysv3
1472
		os=sysv3
1486
		;;
1473
		;;
1487
	-oss*)
1474
	oss*)
1488
		os=-sysv3
1475
		os=sysv3
1489
		;;
1476
		;;
1490
	-svr4)
1477
	svr4*)
1491
		os=-sysv4
1478
		os=sysv4
1492
		;;
1479
		;;
1493
	-svr3)
1480
	svr3)
1494
		os=-sysv3
1481
		os=sysv3
1495
		;;
1482
		;;
1496
	-sysvr4)
1483
	sysvr4)
1497
		os=-sysv4
1484
		os=sysv4
1498
		;;
1485
		;;
1499
	# This must come after -sysvr4.
1486
	# This must come after sysvr4.
1500
	-sysv*)
1487
	sysv*)
1501
		;;
1488
		;;
1502
	-ose*)
1489
	ose*)
1503
		os=-ose
1490
		os=ose
1504
		;;
1491
		;;
1505
	-es1800*)
1492
	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1506
		os=-ose
1493
		os=mint
1507
		;;
1494
		;;
1508
	-xenix)
1495
	zvmoe)
1509
		os=-xenix
1496
		os=zvmoe
1510
		;;
1497
		;;
1511
	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1498
	dicos*)
1512
		os=-mint
1499
		os=dicos
1513
		;;
1500
		;;
1514
	-aros*)
1501
	pikeos*)
1515
		os=-aros
1502
		# Until real need of OS specific support for
1503
		# particular features comes up, bare metal
1504
		# configurations are quite functional.
1505
		case $basic_machine in
1506
		    arm*)
1507
			os=eabi
1508
			;;
1509
		    *)
1510
			os=elf
1511
			;;
1512
		esac
1516
		;;
1513
		;;
1517
	-zvmoe)
1514
	nacl*)
1518
		os=-zvmoe
1519
		;;
1515
		;;
1520
	-dicos*)
1516
	ios)
1521
		os=-dicos
1522
		;;
1517
		;;
1523
	-nacl*)
1518
	none)
1524
		;;
1519
		;;
1525
	-none)
1520
	*-eabi)
1526
		;;
1521
		;;
1527
	*)
1522
	*)
1528
		# Get rid of the `-' at the beginning of $os.
1523
		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
1529
		os=`echo $os | sed 's/[^-]*-//'`
1530
		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1531
		exit 1
1524
		exit 1
1532
		;;
1525
		;;
1533
esac
1526
esac
Lines 1545-1720 Link Here
1545
1538
1546
case $basic_machine in
1539
case $basic_machine in
1547
	score-*)
1540
	score-*)
1548
		os=-elf
1541
		os=elf
1549
		;;
1542
		;;
1550
	spu-*)
1543
	spu-*)
1551
		os=-elf
1544
		os=elf
1552
		;;
1545
		;;
1553
	*-acorn)
1546
	*-acorn)
1554
		os=-riscix1.2
1547
		os=riscix1.2
1555
		;;
1548
		;;
1556
	arm*-rebel)
1549
	arm*-rebel)
1557
		os=-linux
1550
		os=linux
1558
		;;
1551
		;;
1559
	arm*-semi)
1552
	arm*-semi)
1560
		os=-aout
1553
		os=aout
1561
		;;
1554
		;;
1562
	c4x-* | tic4x-*)
1555
	c4x-* | tic4x-*)
1563
		os=-coff
1556
		os=coff
1564
		;;
1557
		;;
1565
	c8051-*)
1558
	c8051-*)
1566
		os=-elf
1559
		os=elf
1567
		;;
1560
		;;
1561
	clipper-intergraph)
1562
		os=clix
1563
		;;
1568
	hexagon-*)
1564
	hexagon-*)
1569
		os=-elf
1565
		os=elf
1570
		;;
1566
		;;
1571
	tic54x-*)
1567
	tic54x-*)
1572
		os=-coff
1568
		os=coff
1573
		;;
1569
		;;
1574
	tic55x-*)
1570
	tic55x-*)
1575
		os=-coff
1571
		os=coff
1576
		;;
1572
		;;
1577
	tic6x-*)
1573
	tic6x-*)
1578
		os=-coff
1574
		os=coff
1579
		;;
1575
		;;
1580
	# This must come before the *-dec entry.
1576
	# This must come before the *-dec entry.
1581
	pdp10-*)
1577
	pdp10-*)
1582
		os=-tops20
1578
		os=tops20
1583
		;;
1579
		;;
1584
	pdp11-*)
1580
	pdp11-*)
1585
		os=-none
1581
		os=none
1586
		;;
1582
		;;
1587
	*-dec | vax-*)
1583
	*-dec | vax-*)
1588
		os=-ultrix4.2
1584
		os=ultrix4.2
1589
		;;
1585
		;;
1590
	m68*-apollo)
1586
	m68*-apollo)
1591
		os=-domain
1587
		os=domain
1592
		;;
1588
		;;
1593
	i386-sun)
1589
	i386-sun)
1594
		os=-sunos4.0.2
1590
		os=sunos4.0.2
1595
		;;
1591
		;;
1596
	m68000-sun)
1592
	m68000-sun)
1597
		os=-sunos3
1593
		os=sunos3
1598
		;;
1594
		;;
1599
	m68*-cisco)
1595
	m68*-cisco)
1600
		os=-aout
1596
		os=aout
1601
		;;
1597
		;;
1602
	mep-*)
1598
	mep-*)
1603
		os=-elf
1599
		os=elf
1604
		;;
1600
		;;
1605
	mips*-cisco)
1601
	mips*-cisco)
1606
		os=-elf
1602
		os=elf
1607
		;;
1603
		;;
1608
	mips*-*)
1604
	mips*-*)
1609
		os=-elf
1605
		os=elf
1610
		;;
1606
		;;
1611
	or32-*)
1607
	or32-*)
1612
		os=-coff
1608
		os=coff
1613
		;;
1609
		;;
1614
	*-tti)	# must be before sparc entry or we get the wrong os.
1610
	*-tti)	# must be before sparc entry or we get the wrong os.
1615
		os=-sysv3
1611
		os=sysv3
1616
		;;
1612
		;;
1617
	sparc-* | *-sun)
1613
	sparc-* | *-sun)
1618
		os=-sunos4.1.1
1614
		os=sunos4.1.1
1619
		;;
1615
		;;
1616
	pru-*)
1617
		os=elf
1618
		;;
1620
	*-be)
1619
	*-be)
1621
		os=-beos
1620
		os=beos
1622
		;;
1621
		;;
1623
	*-haiku)
1624
		os=-haiku
1625
		;;
1626
	*-ibm)
1622
	*-ibm)
1627
		os=-aix
1623
		os=aix
1628
		;;
1624
		;;
1629
	*-knuth)
1625
	*-knuth)
1630
		os=-mmixware
1626
		os=mmixware
1631
		;;
1627
		;;
1632
	*-wec)
1628
	*-wec)
1633
		os=-proelf
1629
		os=proelf
1634
		;;
1630
		;;
1635
	*-winbond)
1631
	*-winbond)
1636
		os=-proelf
1632
		os=proelf
1637
		;;
1633
		;;
1638
	*-oki)
1634
	*-oki)
1639
		os=-proelf
1635
		os=proelf
1640
		;;
1636
		;;
1641
	*-hp)
1637
	*-hp)
1642
		os=-hpux
1638
		os=hpux
1643
		;;
1639
		;;
1644
	*-hitachi)
1640
	*-hitachi)
1645
		os=-hiux
1641
		os=hiux
1646
		;;
1642
		;;
1647
	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1643
	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1648
		os=-sysv
1644
		os=sysv
1649
		;;
1645
		;;
1650
	*-cbm)
1646
	*-cbm)
1651
		os=-amigaos
1647
		os=amigaos
1652
		;;
1648
		;;
1653
	*-dg)
1649
	*-dg)
1654
		os=-dgux
1650
		os=dgux
1655
		;;
1651
		;;
1656
	*-dolphin)
1652
	*-dolphin)
1657
		os=-sysv3
1653
		os=sysv3
1658
		;;
1654
		;;
1659
	m68k-ccur)
1655
	m68k-ccur)
1660
		os=-rtu
1656
		os=rtu
1661
		;;
1657
		;;
1662
	m88k-omron*)
1658
	m88k-omron*)
1663
		os=-luna
1659
		os=luna
1664
		;;
1660
		;;
1665
	*-next )
1661
	*-next)
1666
		os=-nextstep
1662
		os=nextstep
1667
		;;
1663
		;;
1668
	*-sequent)
1664
	*-sequent)
1669
		os=-ptx
1665
		os=ptx
1670
		;;
1666
		;;
1671
	*-crds)
1667
	*-crds)
1672
		os=-unos
1668
		os=unos
1673
		;;
1669
		;;
1674
	*-ns)
1670
	*-ns)
1675
		os=-genix
1671
		os=genix
1676
		;;
1672
		;;
1677
	i370-*)
1673
	i370-*)
1678
		os=-mvs
1674
		os=mvs
1679
		;;
1675
		;;
1680
	*-next)
1681
		os=-nextstep3
1682
		;;
1683
	*-gould)
1676
	*-gould)
1684
		os=-sysv
1677
		os=sysv
1685
		;;
1678
		;;
1686
	*-highlevel)
1679
	*-highlevel)
1687
		os=-bsd
1680
		os=bsd
1688
		;;
1681
		;;
1689
	*-encore)
1682
	*-encore)
1690
		os=-bsd
1683
		os=bsd
1691
		;;
1684
		;;
1692
	*-sgi)
1685
	*-sgi)
1693
		os=-irix
1686
		os=irix
1694
		;;
1687
		;;
1695
	*-siemens)
1688
	*-siemens)
1696
		os=-sysv4
1689
		os=sysv4
1697
		;;
1690
		;;
1698
	*-masscomp)
1691
	*-masscomp)
1699
		os=-rtu
1692
		os=rtu
1700
		;;
1693
		;;
1701
	f30[01]-fujitsu | f700-fujitsu)
1694
	f30[01]-fujitsu | f700-fujitsu)
1702
		os=-uxpv
1695
		os=uxpv
1703
		;;
1696
		;;
1704
	*-rom68k)
1697
	*-rom68k)
1705
		os=-coff
1698
		os=coff
1706
		;;
1699
		;;
1707
	*-*bug)
1700
	*-*bug)
1708
		os=-coff
1701
		os=coff
1709
		;;
1702
		;;
1710
	*-apple)
1703
	*-apple)
1711
		os=-macos
1704
		os=macos
1712
		;;
1705
		;;
1713
	*-atari*)
1706
	*-atari*)
1714
		os=-mint
1707
		os=mint
1715
		;;
1708
		;;
1709
	*-wrs)
1710
		os=vxworks
1711
		;;
1716
	*)
1712
	*)
1717
		os=-none
1713
		os=none
1718
		;;
1714
		;;
1719
esac
1715
esac
1720
fi
1716
fi
Lines 1725-1803 Link Here
1725
case $basic_machine in
1721
case $basic_machine in
1726
	*-unknown)
1722
	*-unknown)
1727
		case $os in
1723
		case $os in
1728
			-riscix*)
1724
			riscix*)
1729
				vendor=acorn
1725
				vendor=acorn
1730
				;;
1726
				;;
1731
			-sunos*)
1727
			sunos*)
1732
				vendor=sun
1728
				vendor=sun
1733
				;;
1729
				;;
1734
			-cnk*|-aix*)
1730
			cnk*|-aix*)
1735
				vendor=ibm
1731
				vendor=ibm
1736
				;;
1732
				;;
1737
			-beos*)
1733
			beos*)
1738
				vendor=be
1734
				vendor=be
1739
				;;
1735
				;;
1740
			-hpux*)
1736
			hpux*)
1741
				vendor=hp
1737
				vendor=hp
1742
				;;
1738
				;;
1743
			-mpeix*)
1739
			mpeix*)
1744
				vendor=hp
1740
				vendor=hp
1745
				;;
1741
				;;
1746
			-hiux*)
1742
			hiux*)
1747
				vendor=hitachi
1743
				vendor=hitachi
1748
				;;
1744
				;;
1749
			-unos*)
1745
			unos*)
1750
				vendor=crds
1746
				vendor=crds
1751
				;;
1747
				;;
1752
			-dgux*)
1748
			dgux*)
1753
				vendor=dg
1749
				vendor=dg
1754
				;;
1750
				;;
1755
			-luna*)
1751
			luna*)
1756
				vendor=omron
1752
				vendor=omron
1757
				;;
1753
				;;
1758
			-genix*)
1754
			genix*)
1759
				vendor=ns
1755
				vendor=ns
1760
				;;
1756
				;;
1761
			-mvs* | -opened*)
1757
			clix*)
1758
				vendor=intergraph
1759
				;;
1760
			mvs* | opened*)
1762
				vendor=ibm
1761
				vendor=ibm
1763
				;;
1762
				;;
1764
			-os400*)
1763
			os400*)
1765
				vendor=ibm
1764
				vendor=ibm
1766
				;;
1765
				;;
1767
			-ptx*)
1766
			ptx*)
1768
				vendor=sequent
1767
				vendor=sequent
1769
				;;
1768
				;;
1770
			-tpf*)
1769
			tpf*)
1771
				vendor=ibm
1770
				vendor=ibm
1772
				;;
1771
				;;
1773
			-vxsim* | -vxworks* | -windiss*)
1772
			vxsim* | vxworks* | windiss*)
1774
				vendor=wrs
1773
				vendor=wrs
1775
				;;
1774
				;;
1776
			-aux*)
1775
			aux*)
1777
				vendor=apple
1776
				vendor=apple
1778
				;;
1777
				;;
1779
			-hms*)
1778
			hms*)
1780
				vendor=hitachi
1779
				vendor=hitachi
1781
				;;
1780
				;;
1782
			-mpw* | -macos*)
1781
			mpw* | macos*)
1783
				vendor=apple
1782
				vendor=apple
1784
				;;
1783
				;;
1785
			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1784
			*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1786
				vendor=atari
1785
				vendor=atari
1787
				;;
1786
				;;
1788
			-vos*)
1787
			vos*)
1789
				vendor=stratus
1788
				vendor=stratus
1790
				;;
1789
				;;
1791
		esac
1790
		esac
1792
		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1791
		basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
1793
		;;
1792
		;;
1794
esac
1793
esac
1795
1794
1796
echo $basic_machine$os
1795
echo "$basic_machine-$os"
1797
exit
1796
exit
1798
1797
1799
# Local variables:
1798
# Local variables:
1800
# eval: (add-hook 'write-file-hooks 'time-stamp)
1799
# eval: (add-hook 'before-save-hook 'time-stamp)
1801
# time-stamp-start: "timestamp='"
1800
# time-stamp-start: "timestamp='"
1802
# time-stamp-format: "%:y-%02m-%02d"
1801
# time-stamp-format: "%:y-%02m-%02d"
1803
# time-stamp-end: "'"
1802
# time-stamp-end: "'"
(-)config.guess (-317 / +354 lines)
Lines 1-8 Link Here
1
#! /bin/sh
1
#! /bin/sh
2
# Attempt to guess a canonical system name.
2
# Attempt to guess a canonical system name.
3
#   Copyright 1992-2015 Free Software Foundation, Inc.
3
#   Copyright 1992-2018 Free Software Foundation, Inc.
4
4
5
timestamp='2015-03-04'
5
timestamp='2018-05-19'
6
6
7
# This file is free software; you can redistribute it and/or modify it
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
8
# under the terms of the GNU General Public License as published by
Lines 15-21 Link Here
15
# General Public License for more details.
15
# General Public License for more details.
16
#
16
#
17
# 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
18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
18
# along with this program; if not, see <https://www.gnu.org/licenses/>.
19
#
19
#
20
# 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
21
# distribute this file as part of a program that contains a
21
# distribute this file as part of a program that contains a
Lines 27-33 Link Here
27
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
27
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
28
#
28
#
29
# You can get the latest version of this script from:
29
# You can get the latest version of this script from:
30
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
30
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
31
#
31
#
32
# Please send patches to <config-patches@gnu.org>.
32
# Please send patches to <config-patches@gnu.org>.
33
33
Lines 39-45 Link Here
39
39
40
Output the configuration name of the system \`$me' is run on.
40
Output the configuration name of the system \`$me' is run on.
41
41
42
Operation modes:
42
Options:
43
  -h, --help         print this help, then exit
43
  -h, --help         print this help, then exit
44
  -t, --time-stamp   print date of last modification, then exit
44
  -t, --time-stamp   print date of last modification, then exit
45
  -v, --version      print version number, then exit
45
  -v, --version      print version number, then exit
Lines 50-56 Link Here
50
GNU config.guess ($timestamp)
50
GNU config.guess ($timestamp)
51
51
52
Originally written by Per Bothner.
52
Originally written by Per Bothner.
53
Copyright 1992-2015 Free Software Foundation, Inc.
53
Copyright 1992-2018 Free Software Foundation, Inc.
54
54
55
This is free software; see the source for copying conditions.  There is NO
55
This is free software; see the source for copying conditions.  There is NO
56
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
56
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
Lines 106-115 Link Here
106
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
107
dummy=$tmp/dummy ;
107
dummy=$tmp/dummy ;
108
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109
case $CC_FOR_BUILD,$HOST_CC,$CC in
109
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
110
 ,,)    echo "int x;" > $dummy.c ;
110
 ,,)    echo "int x;" > "$dummy.c" ;
111
	for c in cc gcc c89 c99 ; do
111
	for c in cc gcc c89 c99 ; do
112
	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
112
	  if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
113
	     CC_FOR_BUILD="$c"; break ;
113
	     CC_FOR_BUILD="$c"; break ;
114
	  fi ;
114
	  fi ;
115
	done ;
115
	done ;
Lines 132-145 Link Here
132
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
132
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
133
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
134
134
135
case "${UNAME_SYSTEM}" in
135
case "$UNAME_SYSTEM" in
136
Linux|GNU|GNU/*)
136
Linux|GNU|GNU/*)
137
	# If the system lacks a compiler, then just pick glibc.
137
	# If the system lacks a compiler, then just pick glibc.
138
	# We could probably try harder.
138
	# We could probably try harder.
139
	LIBC=gnu
139
	LIBC=gnu
140
140
141
	eval $set_cc_for_build
141
	eval "$set_cc_for_build"
142
	cat <<-EOF > $dummy.c
142
	cat <<-EOF > "$dummy.c"
143
	#include <features.h>
143
	#include <features.h>
144
	#if defined(__UCLIBC__)
144
	#if defined(__UCLIBC__)
145
	LIBC=uclibc
145
	LIBC=uclibc
Lines 149-161 Link Here
149
	LIBC=gnu
149
	LIBC=gnu
150
	#endif
150
	#endif
151
	EOF
151
	EOF
152
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
152
	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
153
154
	# If ldd exists, use it to detect musl libc.
155
	if command -v ldd >/dev/null && \
156
		ldd --version 2>&1 | grep -q ^musl
157
	then
158
	    LIBC=musl
159
	fi
153
	;;
160
	;;
154
esac
161
esac
155
162
156
# Note: order is significant - the case branches are not exclusive.
163
# Note: order is significant - the case branches are not exclusive.
157
164
158
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
165
case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
159
    *:NetBSD:*:*)
166
    *:NetBSD:*:*)
160
	# NetBSD (nbsd) targets should (where applicable) match one or
167
	# NetBSD (nbsd) targets should (where applicable) match one or
161
	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
168
	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
Lines 169-178 Link Here
169
	# portion of the name.  We always set it to "unknown".
176
	# portion of the name.  We always set it to "unknown".
170
	sysctl="sysctl -n hw.machine_arch"
177
	sysctl="sysctl -n hw.machine_arch"
171
	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
178
	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
172
	    /sbin/$sysctl 2>/dev/null || \
179
	    "/sbin/$sysctl" 2>/dev/null || \
173
	    /usr/sbin/$sysctl 2>/dev/null || \
180
	    "/usr/sbin/$sysctl" 2>/dev/null || \
174
	    echo unknown)`
181
	    echo unknown)`
175
	case "${UNAME_MACHINE_ARCH}" in
182
	case "$UNAME_MACHINE_ARCH" in
176
	    armeb) machine=armeb-unknown ;;
183
	    armeb) machine=armeb-unknown ;;
177
	    arm*) machine=arm-unknown ;;
184
	    arm*) machine=arm-unknown ;;
178
	    sh3el) machine=shl-unknown ;;
185
	    sh3el) machine=shl-unknown ;;
Lines 179-195 Link Here
179
	    sh3eb) machine=sh-unknown ;;
186
	    sh3eb) machine=sh-unknown ;;
180
	    sh5el) machine=sh5le-unknown ;;
187
	    sh5el) machine=sh5le-unknown ;;
181
	    earmv*)
188
	    earmv*)
182
		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
189
		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
183
		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
190
		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
184
		machine=${arch}${endian}-unknown
191
		machine="${arch}${endian}"-unknown
185
		;;
192
		;;
186
	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
193
	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
187
	esac
194
	esac
188
	# The Operating System including object format, if it has switched
195
	# The Operating System including object format, if it has switched
189
	# to ELF recently, or will in the future.
196
	# to ELF recently (or will in the future) and ABI.
190
	case "${UNAME_MACHINE_ARCH}" in
197
	case "$UNAME_MACHINE_ARCH" in
191
	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
198
	    earm*)
192
		eval $set_cc_for_build
199
		os=netbsdelf
200
		;;
201
	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
202
		eval "$set_cc_for_build"
193
		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
203
		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
194
			| grep -q __ELF__
204
			| grep -q __ELF__
195
		then
205
		then
Lines 205-214 Link Here
205
		;;
215
		;;
206
	esac
216
	esac
207
	# Determine ABI tags.
217
	# Determine ABI tags.
208
	case "${UNAME_MACHINE_ARCH}" in
218
	case "$UNAME_MACHINE_ARCH" in
209
	    earm*)
219
	    earm*)
210
		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
220
		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
211
		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
221
		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
212
		;;
222
		;;
213
	esac
223
	esac
214
	# The OS release
224
	# The OS release
Lines 216-254 Link Here
216
	# thus, need a distinct triplet. However, they do not need
226
	# thus, need a distinct triplet. However, they do not need
217
	# kernel version information, so it can be replaced with a
227
	# kernel version information, so it can be replaced with a
218
	# suitable tag, in the style of linux-gnu.
228
	# suitable tag, in the style of linux-gnu.
219
	case "${UNAME_VERSION}" in
229
	case "$UNAME_VERSION" in
220
	    Debian*)
230
	    Debian*)
221
		release='-gnu'
231
		release='-gnu'
222
		;;
232
		;;
223
	    *)
233
	    *)
224
		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
234
		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
225
		;;
235
		;;
226
	esac
236
	esac
227
	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
237
	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
228
	# contains redundant information, the shorter form:
238
	# contains redundant information, the shorter form:
229
	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
239
	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
230
	echo "${machine}-${os}${release}${abi}"
240
	echo "$machine-${os}${release}${abi-}"
231
	exit ;;
241
	exit ;;
232
    *:Bitrig:*:*)
242
    *:Bitrig:*:*)
233
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
243
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
234
	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
244
	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
235
	exit ;;
245
	exit ;;
236
    *:OpenBSD:*:*)
246
    *:OpenBSD:*:*)
237
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
247
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
238
	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
248
	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
239
	exit ;;
249
	exit ;;
250
    *:LibertyBSD:*:*)
251
	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
252
	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
253
	exit ;;
254
    *:MidnightBSD:*:*)
255
	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
256
	exit ;;
240
    *:ekkoBSD:*:*)
257
    *:ekkoBSD:*:*)
241
	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
258
	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
242
	exit ;;
259
	exit ;;
243
    *:SolidBSD:*:*)
260
    *:SolidBSD:*:*)
244
	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
261
	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
245
	exit ;;
262
	exit ;;
246
    macppc:MirBSD:*:*)
263
    macppc:MirBSD:*:*)
247
	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
264
	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
248
	exit ;;
265
	exit ;;
249
    *:MirBSD:*:*)
266
    *:MirBSD:*:*)
250
	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
267
	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
251
	exit ;;
268
	exit ;;
269
    *:Sortix:*:*)
270
	echo "$UNAME_MACHINE"-unknown-sortix
271
	exit ;;
272
    *:Redox:*:*)
273
	echo "$UNAME_MACHINE"-unknown-redox
274
	exit ;;
275
    mips:OSF1:*.*)
276
        echo mips-dec-osf1
277
        exit ;;
252
    alpha:OSF1:*:*)
278
    alpha:OSF1:*:*)
253
	case $UNAME_RELEASE in
279
	case $UNAME_RELEASE in
254
	*4.0)
280
	*4.0)
Lines 265-299 Link Here
265
	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
291
	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
266
	case "$ALPHA_CPU_TYPE" in
292
	case "$ALPHA_CPU_TYPE" in
267
	    "EV4 (21064)")
293
	    "EV4 (21064)")
268
		UNAME_MACHINE="alpha" ;;
294
		UNAME_MACHINE=alpha ;;
269
	    "EV4.5 (21064)")
295
	    "EV4.5 (21064)")
270
		UNAME_MACHINE="alpha" ;;
296
		UNAME_MACHINE=alpha ;;
271
	    "LCA4 (21066/21068)")
297
	    "LCA4 (21066/21068)")
272
		UNAME_MACHINE="alpha" ;;
298
		UNAME_MACHINE=alpha ;;
273
	    "EV5 (21164)")
299
	    "EV5 (21164)")
274
		UNAME_MACHINE="alphaev5" ;;
300
		UNAME_MACHINE=alphaev5 ;;
275
	    "EV5.6 (21164A)")
301
	    "EV5.6 (21164A)")
276
		UNAME_MACHINE="alphaev56" ;;
302
		UNAME_MACHINE=alphaev56 ;;
277
	    "EV5.6 (21164PC)")
303
	    "EV5.6 (21164PC)")
278
		UNAME_MACHINE="alphapca56" ;;
304
		UNAME_MACHINE=alphapca56 ;;
279
	    "EV5.7 (21164PC)")
305
	    "EV5.7 (21164PC)")
280
		UNAME_MACHINE="alphapca57" ;;
306
		UNAME_MACHINE=alphapca57 ;;
281
	    "EV6 (21264)")
307
	    "EV6 (21264)")
282
		UNAME_MACHINE="alphaev6" ;;
308
		UNAME_MACHINE=alphaev6 ;;
283
	    "EV6.7 (21264A)")
309
	    "EV6.7 (21264A)")
284
		UNAME_MACHINE="alphaev67" ;;
310
		UNAME_MACHINE=alphaev67 ;;
285
	    "EV6.8CB (21264C)")
311
	    "EV6.8CB (21264C)")
286
		UNAME_MACHINE="alphaev68" ;;
312
		UNAME_MACHINE=alphaev68 ;;
287
	    "EV6.8AL (21264B)")
313
	    "EV6.8AL (21264B)")
288
		UNAME_MACHINE="alphaev68" ;;
314
		UNAME_MACHINE=alphaev68 ;;
289
	    "EV6.8CX (21264D)")
315
	    "EV6.8CX (21264D)")
290
		UNAME_MACHINE="alphaev68" ;;
316
		UNAME_MACHINE=alphaev68 ;;
291
	    "EV6.9A (21264/EV69A)")
317
	    "EV6.9A (21264/EV69A)")
292
		UNAME_MACHINE="alphaev69" ;;
318
		UNAME_MACHINE=alphaev69 ;;
293
	    "EV7 (21364)")
319
	    "EV7 (21364)")
294
		UNAME_MACHINE="alphaev7" ;;
320
		UNAME_MACHINE=alphaev7 ;;
295
	    "EV7.9 (21364A)")
321
	    "EV7.9 (21364A)")
296
		UNAME_MACHINE="alphaev79" ;;
322
		UNAME_MACHINE=alphaev79 ;;
297
	esac
323
	esac
298
	# A Pn.n version is a patched version.
324
	# A Pn.n version is a patched version.
299
	# A Vn.n version is a released version.
325
	# A Vn.n version is a released version.
Lines 300-327 Link Here
300
	# A Tn.n version is a released field test version.
326
	# A Tn.n version is a released field test version.
301
	# A Xn.n version is an unreleased experimental baselevel.
327
	# A Xn.n version is an unreleased experimental baselevel.
302
	# 1.2 uses "1.2" for uname -r.
328
	# 1.2 uses "1.2" for uname -r.
303
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
329
	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
304
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
330
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
305
	exitcode=$?
331
	exitcode=$?
306
	trap '' 0
332
	trap '' 0
307
	exit $exitcode ;;
333
	exit $exitcode ;;
308
    Alpha\ *:Windows_NT*:*)
309
	# How do we know it's Interix rather than the generic POSIX subsystem?
310
	# Should we change UNAME_MACHINE based on the output of uname instead
311
	# of the specific Alpha model?
312
	echo alpha-pc-interix
313
	exit ;;
314
    21064:Windows_NT:50:3)
315
	echo alpha-dec-winnt3.5
316
	exit ;;
317
    Amiga*:UNIX_System_V:4.0:*)
334
    Amiga*:UNIX_System_V:4.0:*)
318
	echo m68k-unknown-sysv4
335
	echo m68k-unknown-sysv4
319
	exit ;;
336
	exit ;;
320
    *:[Aa]miga[Oo][Ss]:*:*)
337
    *:[Aa]miga[Oo][Ss]:*:*)
321
	echo ${UNAME_MACHINE}-unknown-amigaos
338
	echo "$UNAME_MACHINE"-unknown-amigaos
322
	exit ;;
339
	exit ;;
323
    *:[Mm]orph[Oo][Ss]:*:*)
340
    *:[Mm]orph[Oo][Ss]:*:*)
324
	echo ${UNAME_MACHINE}-unknown-morphos
341
	echo "$UNAME_MACHINE"-unknown-morphos
325
	exit ;;
342
	exit ;;
326
    *:OS/390:*:*)
343
    *:OS/390:*:*)
327
	echo i370-ibm-openedition
344
	echo i370-ibm-openedition
Lines 333-339 Link Here
333
	echo powerpc-ibm-os400
350
	echo powerpc-ibm-os400
334
	exit ;;
351
	exit ;;
335
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
352
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
336
	echo arm-acorn-riscix${UNAME_RELEASE}
353
	echo arm-acorn-riscix"$UNAME_RELEASE"
337
	exit ;;
354
	exit ;;
338
    arm*:riscos:*:*|arm*:RISCOS:*:*)
355
    arm*:riscos:*:*|arm*:RISCOS:*:*)
339
	echo arm-unknown-riscos
356
	echo arm-unknown-riscos
Lines 360-397 Link Here
360
	    sparc) echo sparc-icl-nx7; exit ;;
377
	    sparc) echo sparc-icl-nx7; exit ;;
361
	esac ;;
378
	esac ;;
362
    s390x:SunOS:*:*)
379
    s390x:SunOS:*:*)
363
	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
380
	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
364
	exit ;;
381
	exit ;;
365
    sun4H:SunOS:5.*:*)
382
    sun4H:SunOS:5.*:*)
366
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
383
	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
367
	exit ;;
384
	exit ;;
368
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
385
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
369
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
386
	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
370
	exit ;;
387
	exit ;;
371
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
388
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
372
	echo i386-pc-auroraux${UNAME_RELEASE}
389
	echo i386-pc-auroraux"$UNAME_RELEASE"
373
	exit ;;
390
	exit ;;
374
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
391
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
375
	eval $set_cc_for_build
392
	eval "$set_cc_for_build"
376
	SUN_ARCH="i386"
393
	SUN_ARCH=i386
377
	# If there is a compiler, see if it is configured for 64-bit objects.
394
	# If there is a compiler, see if it is configured for 64-bit objects.
378
	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
395
	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
379
	# This test works for both compilers.
396
	# This test works for both compilers.
380
	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
397
	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
381
	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
398
	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
382
		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
399
		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
383
		grep IS_64BIT_ARCH >/dev/null
400
		grep IS_64BIT_ARCH >/dev/null
384
	    then
401
	    then
385
		SUN_ARCH="x86_64"
402
		SUN_ARCH=x86_64
386
	    fi
403
	    fi
387
	fi
404
	fi
388
	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
405
	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
389
	exit ;;
406
	exit ;;
390
    sun4*:SunOS:6*:*)
407
    sun4*:SunOS:6*:*)
391
	# According to config.sub, this is the proper way to canonicalize
408
	# According to config.sub, this is the proper way to canonicalize
392
	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
409
	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
393
	# it's likely to be more like Solaris than SunOS4.
410
	# it's likely to be more like Solaris than SunOS4.
394
	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
411
	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
395
	exit ;;
412
	exit ;;
396
    sun4*:SunOS:*:*)
413
    sun4*:SunOS:*:*)
397
	case "`/usr/bin/arch -k`" in
414
	case "`/usr/bin/arch -k`" in
Lines 400-424 Link Here
400
		;;
417
		;;
401
	esac
418
	esac
402
	# Japanese Language versions have a version number like `4.1.3-JL'.
419
	# Japanese Language versions have a version number like `4.1.3-JL'.
403
	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
420
	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
404
	exit ;;
421
	exit ;;
405
    sun3*:SunOS:*:*)
422
    sun3*:SunOS:*:*)
406
	echo m68k-sun-sunos${UNAME_RELEASE}
423
	echo m68k-sun-sunos"$UNAME_RELEASE"
407
	exit ;;
424
	exit ;;
408
    sun*:*:4.2BSD:*)
425
    sun*:*:4.2BSD:*)
409
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
426
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
410
	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
427
	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
411
	case "`/bin/arch`" in
428
	case "`/bin/arch`" in
412
	    sun3)
429
	    sun3)
413
		echo m68k-sun-sunos${UNAME_RELEASE}
430
		echo m68k-sun-sunos"$UNAME_RELEASE"
414
		;;
431
		;;
415
	    sun4)
432
	    sun4)
416
		echo sparc-sun-sunos${UNAME_RELEASE}
433
		echo sparc-sun-sunos"$UNAME_RELEASE"
417
		;;
434
		;;
418
	esac
435
	esac
419
	exit ;;
436
	exit ;;
420
    aushp:SunOS:*:*)
437
    aushp:SunOS:*:*)
421
	echo sparc-auspex-sunos${UNAME_RELEASE}
438
	echo sparc-auspex-sunos"$UNAME_RELEASE"
422
	exit ;;
439
	exit ;;
423
    # The situation for MiNT is a little confusing.  The machine name
440
    # The situation for MiNT is a little confusing.  The machine name
424
    # can be virtually everything (everything which is not
441
    # can be virtually everything (everything which is not
Lines 429-472 Link Here
429
    # MiNT.  But MiNT is downward compatible to TOS, so this should
446
    # MiNT.  But MiNT is downward compatible to TOS, so this should
430
    # be no problem.
447
    # be no problem.
431
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
448
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
432
	echo m68k-atari-mint${UNAME_RELEASE}
449
	echo m68k-atari-mint"$UNAME_RELEASE"
433
	exit ;;
450
	exit ;;
434
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
451
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
435
	echo m68k-atari-mint${UNAME_RELEASE}
452
	echo m68k-atari-mint"$UNAME_RELEASE"
436
	exit ;;
453
	exit ;;
437
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
454
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
438
	echo m68k-atari-mint${UNAME_RELEASE}
455
	echo m68k-atari-mint"$UNAME_RELEASE"
439
	exit ;;
456
	exit ;;
440
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
457
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
441
	echo m68k-milan-mint${UNAME_RELEASE}
458
	echo m68k-milan-mint"$UNAME_RELEASE"
442
	exit ;;
459
	exit ;;
443
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
460
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
444
	echo m68k-hades-mint${UNAME_RELEASE}
461
	echo m68k-hades-mint"$UNAME_RELEASE"
445
	exit ;;
462
	exit ;;
446
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
463
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
447
	echo m68k-unknown-mint${UNAME_RELEASE}
464
	echo m68k-unknown-mint"$UNAME_RELEASE"
448
	exit ;;
465
	exit ;;
449
    m68k:machten:*:*)
466
    m68k:machten:*:*)
450
	echo m68k-apple-machten${UNAME_RELEASE}
467
	echo m68k-apple-machten"$UNAME_RELEASE"
451
	exit ;;
468
	exit ;;
452
    powerpc:machten:*:*)
469
    powerpc:machten:*:*)
453
	echo powerpc-apple-machten${UNAME_RELEASE}
470
	echo powerpc-apple-machten"$UNAME_RELEASE"
454
	exit ;;
471
	exit ;;
455
    RISC*:Mach:*:*)
472
    RISC*:Mach:*:*)
456
	echo mips-dec-mach_bsd4.3
473
	echo mips-dec-mach_bsd4.3
457
	exit ;;
474
	exit ;;
458
    RISC*:ULTRIX:*:*)
475
    RISC*:ULTRIX:*:*)
459
	echo mips-dec-ultrix${UNAME_RELEASE}
476
	echo mips-dec-ultrix"$UNAME_RELEASE"
460
	exit ;;
477
	exit ;;
461
    VAX*:ULTRIX*:*:*)
478
    VAX*:ULTRIX*:*:*)
462
	echo vax-dec-ultrix${UNAME_RELEASE}
479
	echo vax-dec-ultrix"$UNAME_RELEASE"
463
	exit ;;
480
	exit ;;
464
    2020:CLIX:*:* | 2430:CLIX:*:*)
481
    2020:CLIX:*:* | 2430:CLIX:*:*)
465
	echo clipper-intergraph-clix${UNAME_RELEASE}
482
	echo clipper-intergraph-clix"$UNAME_RELEASE"
466
	exit ;;
483
	exit ;;
467
    mips:*:*:UMIPS | mips:*:*:RISCos)
484
    mips:*:*:UMIPS | mips:*:*:RISCos)
468
	eval $set_cc_for_build
485
	eval "$set_cc_for_build"
469
	sed 's/^	//' << EOF >$dummy.c
486
	sed 's/^	//' << EOF > "$dummy.c"
470
#ifdef __cplusplus
487
#ifdef __cplusplus
471
#include <stdio.h>  /* for printf() prototype */
488
#include <stdio.h>  /* for printf() prototype */
472
	int main (int argc, char *argv[]) {
489
	int main (int argc, char *argv[]) {
Lines 475-497 Link Here
475
#endif
492
#endif
476
	#if defined (host_mips) && defined (MIPSEB)
493
	#if defined (host_mips) && defined (MIPSEB)
477
	#if defined (SYSTYPE_SYSV)
494
	#if defined (SYSTYPE_SYSV)
478
	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
495
	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
479
	#endif
496
	#endif
480
	#if defined (SYSTYPE_SVR4)
497
	#if defined (SYSTYPE_SVR4)
481
	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
498
	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
482
	#endif
499
	#endif
483
	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
500
	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
484
	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
501
	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
485
	#endif
502
	#endif
486
	#endif
503
	#endif
487
	  exit (-1);
504
	  exit (-1);
488
	}
505
	}
489
EOF
506
EOF
490
	$CC_FOR_BUILD -o $dummy $dummy.c &&
507
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
491
	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
508
	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
492
	  SYSTEM_NAME=`$dummy $dummyarg` &&
509
	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
493
	    { echo "$SYSTEM_NAME"; exit; }
510
	    { echo "$SYSTEM_NAME"; exit; }
494
	echo mips-mips-riscos${UNAME_RELEASE}
511
	echo mips-mips-riscos"$UNAME_RELEASE"
495
	exit ;;
512
	exit ;;
496
    Motorola:PowerMAX_OS:*:*)
513
    Motorola:PowerMAX_OS:*:*)
497
	echo powerpc-motorola-powermax
514
	echo powerpc-motorola-powermax
Lines 517-533 Link Here
517
    AViiON:dgux:*:*)
534
    AViiON:dgux:*:*)
518
	# DG/UX returns AViiON for all architectures
535
	# DG/UX returns AViiON for all architectures
519
	UNAME_PROCESSOR=`/usr/bin/uname -p`
536
	UNAME_PROCESSOR=`/usr/bin/uname -p`
520
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
537
	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
521
	then
538
	then
522
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
539
	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
523
	       [ ${TARGET_BINARY_INTERFACE}x = x ]
540
	       [ "$TARGET_BINARY_INTERFACE"x = x ]
524
	    then
541
	    then
525
		echo m88k-dg-dgux${UNAME_RELEASE}
542
		echo m88k-dg-dgux"$UNAME_RELEASE"
526
	    else
543
	    else
527
		echo m88k-dg-dguxbcs${UNAME_RELEASE}
544
		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
528
	    fi
545
	    fi
529
	else
546
	else
530
	    echo i586-dg-dgux${UNAME_RELEASE}
547
	    echo i586-dg-dgux"$UNAME_RELEASE"
531
	fi
548
	fi
532
	exit ;;
549
	exit ;;
533
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
550
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
Lines 544-550 Link Here
544
	echo m68k-tektronix-bsd
561
	echo m68k-tektronix-bsd
545
	exit ;;
562
	exit ;;
546
    *:IRIX*:*:*)
563
    *:IRIX*:*:*)
547
	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
564
	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
548
	exit ;;
565
	exit ;;
549
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
566
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
550
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
567
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
Lines 556-569 Link Here
556
	if [ -x /usr/bin/oslevel ] ; then
573
	if [ -x /usr/bin/oslevel ] ; then
557
		IBM_REV=`/usr/bin/oslevel`
574
		IBM_REV=`/usr/bin/oslevel`
558
	else
575
	else
559
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
576
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
560
	fi
577
	fi
561
	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
578
	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
562
	exit ;;
579
	exit ;;
563
    *:AIX:2:3)
580
    *:AIX:2:3)
564
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
581
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
565
		eval $set_cc_for_build
582
		eval "$set_cc_for_build"
566
		sed 's/^		//' << EOF >$dummy.c
583
		sed 's/^		//' << EOF > "$dummy.c"
567
		#include <sys/systemcfg.h>
584
		#include <sys/systemcfg.h>
568
585
569
		main()
586
		main()
Lines 574-580 Link Here
574
			exit(0);
591
			exit(0);
575
			}
592
			}
576
EOF
593
EOF
577
		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
594
		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
578
		then
595
		then
579
			echo "$SYSTEM_NAME"
596
			echo "$SYSTEM_NAME"
580
		else
597
		else
Lines 588-594 Link Here
588
	exit ;;
605
	exit ;;
589
    *:AIX:*:[4567])
606
    *:AIX:*:[4567])
590
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
607
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
591
	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
608
	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
592
		IBM_ARCH=rs6000
609
		IBM_ARCH=rs6000
593
	else
610
	else
594
		IBM_ARCH=powerpc
611
		IBM_ARCH=powerpc
Lines 597-614 Link Here
597
		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
614
		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
598
			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
615
			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
599
	else
616
	else
600
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
617
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
601
	fi
618
	fi
602
	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
619
	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
603
	exit ;;
620
	exit ;;
604
    *:AIX:*:*)
621
    *:AIX:*:*)
605
	echo rs6000-ibm-aix
622
	echo rs6000-ibm-aix
606
	exit ;;
623
	exit ;;
607
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
624
    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
608
	echo romp-ibm-bsd4.4
625
	echo romp-ibm-bsd4.4
609
	exit ;;
626
	exit ;;
610
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
627
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
611
	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
628
	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
612
	exit ;;                             # report: romp-ibm BSD 4.3
629
	exit ;;                             # report: romp-ibm BSD 4.3
613
    *:BOSX:*:*)
630
    *:BOSX:*:*)
614
	echo rs6000-bull-bosx
631
	echo rs6000-bull-bosx
Lines 623-650 Link Here
623
	echo m68k-hp-bsd4.4
640
	echo m68k-hp-bsd4.4
624
	exit ;;
641
	exit ;;
625
    9000/[34678]??:HP-UX:*:*)
642
    9000/[34678]??:HP-UX:*:*)
626
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
643
	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
627
	case "${UNAME_MACHINE}" in
644
	case "$UNAME_MACHINE" in
628
	    9000/31? )            HP_ARCH=m68000 ;;
645
	    9000/31?)            HP_ARCH=m68000 ;;
629
	    9000/[34]?? )         HP_ARCH=m68k ;;
646
	    9000/[34]??)         HP_ARCH=m68k ;;
630
	    9000/[678][0-9][0-9])
647
	    9000/[678][0-9][0-9])
631
		if [ -x /usr/bin/getconf ]; then
648
		if [ -x /usr/bin/getconf ]; then
632
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
649
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
633
		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
650
		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
634
		    case "${sc_cpu_version}" in
651
		    case "$sc_cpu_version" in
635
		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
652
		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
636
		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
653
		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
637
		      532)                      # CPU_PA_RISC2_0
654
		      532)                      # CPU_PA_RISC2_0
638
			case "${sc_kernel_bits}" in
655
			case "$sc_kernel_bits" in
639
			  32) HP_ARCH="hppa2.0n" ;;
656
			  32) HP_ARCH=hppa2.0n ;;
640
			  64) HP_ARCH="hppa2.0w" ;;
657
			  64) HP_ARCH=hppa2.0w ;;
641
			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
658
			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
642
			esac ;;
659
			esac ;;
643
		    esac
660
		    esac
644
		fi
661
		fi
645
		if [ "${HP_ARCH}" = "" ]; then
662
		if [ "$HP_ARCH" = "" ]; then
646
		    eval $set_cc_for_build
663
		    eval "$set_cc_for_build"
647
		    sed 's/^		//' << EOF >$dummy.c
664
		    sed 's/^		//' << EOF > "$dummy.c"
648
665
649
		#define _HPUX_SOURCE
666
		#define _HPUX_SOURCE
650
		#include <stdlib.h>
667
		#include <stdlib.h>
Lines 677-689 Link Here
677
		    exit (0);
694
		    exit (0);
678
		}
695
		}
679
EOF
696
EOF
680
		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
697
		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
681
		    test -z "$HP_ARCH" && HP_ARCH=hppa
698
		    test -z "$HP_ARCH" && HP_ARCH=hppa
682
		fi ;;
699
		fi ;;
683
	esac
700
	esac
684
	if [ ${HP_ARCH} = "hppa2.0w" ]
701
	if [ "$HP_ARCH" = hppa2.0w ]
685
	then
702
	then
686
	    eval $set_cc_for_build
703
	    eval "$set_cc_for_build"
687
704
688
	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
705
	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
689
	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
706
	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
Lines 694-716 Link Here
694
	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
711
	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
695
	    # => hppa64-hp-hpux11.23
712
	    # => hppa64-hp-hpux11.23
696
713
697
	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
714
	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
698
		grep -q __LP64__
715
		grep -q __LP64__
699
	    then
716
	    then
700
		HP_ARCH="hppa2.0w"
717
		HP_ARCH=hppa2.0w
701
	    else
718
	    else
702
		HP_ARCH="hppa64"
719
		HP_ARCH=hppa64
703
	    fi
720
	    fi
704
	fi
721
	fi
705
	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
722
	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
706
	exit ;;
723
	exit ;;
707
    ia64:HP-UX:*:*)
724
    ia64:HP-UX:*:*)
708
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
725
	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
709
	echo ia64-hp-hpux${HPUX_REV}
726
	echo ia64-hp-hpux"$HPUX_REV"
710
	exit ;;
727
	exit ;;
711
    3050*:HI-UX:*:*)
728
    3050*:HI-UX:*:*)
712
	eval $set_cc_for_build
729
	eval "$set_cc_for_build"
713
	sed 's/^	//' << EOF >$dummy.c
730
	sed 's/^	//' << EOF > "$dummy.c"
714
	#include <unistd.h>
731
	#include <unistd.h>
715
	int
732
	int
716
	main ()
733
	main ()
Lines 735-745 Link Here
735
	  exit (0);
752
	  exit (0);
736
	}
753
	}
737
EOF
754
EOF
738
	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
755
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
739
		{ echo "$SYSTEM_NAME"; exit; }
756
		{ echo "$SYSTEM_NAME"; exit; }
740
	echo unknown-hitachi-hiuxwe2
757
	echo unknown-hitachi-hiuxwe2
741
	exit ;;
758
	exit ;;
742
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
759
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
743
	echo hppa1.1-hp-bsd
760
	echo hppa1.1-hp-bsd
744
	exit ;;
761
	exit ;;
745
    9000/8??:4.3bsd:*:*)
762
    9000/8??:4.3bsd:*:*)
Lines 748-754 Link Here
748
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
765
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
749
	echo hppa1.0-hp-mpeix
766
	echo hppa1.0-hp-mpeix
750
	exit ;;
767
	exit ;;
751
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
768
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
752
	echo hppa1.1-hp-osf
769
	echo hppa1.1-hp-osf
753
	exit ;;
770
	exit ;;
754
    hp8??:OSF1:*:*)
771
    hp8??:OSF1:*:*)
Lines 756-764 Link Here
756
	exit ;;
773
	exit ;;
757
    i*86:OSF1:*:*)
774
    i*86:OSF1:*:*)
758
	if [ -x /usr/sbin/sysversion ] ; then
775
	if [ -x /usr/sbin/sysversion ] ; then
759
	    echo ${UNAME_MACHINE}-unknown-osf1mk
776
	    echo "$UNAME_MACHINE"-unknown-osf1mk
760
	else
777
	else
761
	    echo ${UNAME_MACHINE}-unknown-osf1
778
	    echo "$UNAME_MACHINE"-unknown-osf1
762
	fi
779
	fi
763
	exit ;;
780
	exit ;;
764
    parisc*:Lites*:*:*)
781
    parisc*:Lites*:*:*)
Lines 783-904 Link Here
783
	echo c4-convex-bsd
800
	echo c4-convex-bsd
784
	exit ;;
801
	exit ;;
785
    CRAY*Y-MP:*:*:*)
802
    CRAY*Y-MP:*:*:*)
786
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
803
	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
787
	exit ;;
804
	exit ;;
788
    CRAY*[A-Z]90:*:*:*)
805
    CRAY*[A-Z]90:*:*:*)
789
	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
806
	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
790
	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
807
	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
791
	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
808
	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
792
	      -e 's/\.[^.]*$/.X/'
809
	      -e 's/\.[^.]*$/.X/'
793
	exit ;;
810
	exit ;;
794
    CRAY*TS:*:*:*)
811
    CRAY*TS:*:*:*)
795
	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
812
	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
796
	exit ;;
813
	exit ;;
797
    CRAY*T3E:*:*:*)
814
    CRAY*T3E:*:*:*)
798
	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
815
	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
799
	exit ;;
816
	exit ;;
800
    CRAY*SV1:*:*:*)
817
    CRAY*SV1:*:*:*)
801
	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
818
	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
802
	exit ;;
819
	exit ;;
803
    *:UNICOS/mp:*:*)
820
    *:UNICOS/mp:*:*)
804
	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
821
	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
805
	exit ;;
822
	exit ;;
806
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
823
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
807
	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
824
	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
808
	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
825
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
809
	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
826
	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
810
	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
827
	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
811
	exit ;;
828
	exit ;;
812
    5000:UNIX_System_V:4.*:*)
829
    5000:UNIX_System_V:4.*:*)
813
	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
830
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
814
	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
831
	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
815
	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
832
	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
816
	exit ;;
833
	exit ;;
817
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
834
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
818
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
835
	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
819
	exit ;;
836
	exit ;;
820
    sparc*:BSD/OS:*:*)
837
    sparc*:BSD/OS:*:*)
821
	echo sparc-unknown-bsdi${UNAME_RELEASE}
838
	echo sparc-unknown-bsdi"$UNAME_RELEASE"
822
	exit ;;
839
	exit ;;
823
    *:BSD/OS:*:*)
840
    *:BSD/OS:*:*)
824
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
841
	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
825
	exit ;;
842
	exit ;;
826
    *:FreeBSD:*:*)
843
    *:FreeBSD:*:*)
827
	UNAME_PROCESSOR=`/usr/bin/uname -p`
844
	UNAME_PROCESSOR=`/usr/bin/uname -p`
828
	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
845
	echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
829
	exit ;;
846
	exit ;;
830
    i*:CYGWIN*:*)
847
    i*:CYGWIN*:*)
831
	echo ${UNAME_MACHINE}-pc-cygwin
848
	echo "$UNAME_MACHINE"-pc-cygwin
832
	exit ;;
849
	exit ;;
833
    *:MINGW64*:*)
850
    *:MINGW64*:*)
834
	echo ${UNAME_MACHINE}-pc-mingw64
851
	echo "$UNAME_MACHINE"-pc-mingw64
835
	exit ;;
852
	exit ;;
836
    *:MINGW*:*)
853
    *:MINGW*:*)
837
	echo ${UNAME_MACHINE}-pc-mingw32
854
	echo "$UNAME_MACHINE"-pc-mingw32
838
	exit ;;
855
	exit ;;
839
    *:MSYS*:*)
856
    *:MSYS*:*)
840
	echo ${UNAME_MACHINE}-pc-msys
857
	echo "$UNAME_MACHINE"-pc-msys
841
	exit ;;
858
	exit ;;
842
    i*:windows32*:*)
843
	# uname -m includes "-pc" on this system.
844
	echo ${UNAME_MACHINE}-mingw32
845
	exit ;;
846
    i*:PW*:*)
859
    i*:PW*:*)
847
	echo ${UNAME_MACHINE}-pc-pw32
860
	echo "$UNAME_MACHINE"-pc-pw32
848
	exit ;;
861
	exit ;;
849
    *:Interix*:*)
862
    *:Interix*:*)
850
	case ${UNAME_MACHINE} in
863
	case "$UNAME_MACHINE" in
851
	    x86)
864
	    x86)
852
		echo i586-pc-interix${UNAME_RELEASE}
865
		echo i586-pc-interix"$UNAME_RELEASE"
853
		exit ;;
866
		exit ;;
854
	    authenticamd | genuineintel | EM64T)
867
	    authenticamd | genuineintel | EM64T)
855
		echo x86_64-unknown-interix${UNAME_RELEASE}
868
		echo x86_64-unknown-interix"$UNAME_RELEASE"
856
		exit ;;
869
		exit ;;
857
	    IA64)
870
	    IA64)
858
		echo ia64-unknown-interix${UNAME_RELEASE}
871
		echo ia64-unknown-interix"$UNAME_RELEASE"
859
		exit ;;
872
		exit ;;
860
	esac ;;
873
	esac ;;
861
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
862
	echo i${UNAME_MACHINE}-pc-mks
863
	exit ;;
864
    8664:Windows_NT:*)
865
	echo x86_64-pc-mks
866
	exit ;;
867
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
868
	# How do we know it's Interix rather than the generic POSIX subsystem?
869
	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
870
	# UNAME_MACHINE based on the output of uname instead of i386?
871
	echo i586-pc-interix
872
	exit ;;
873
    i*:UWIN*:*)
874
    i*:UWIN*:*)
874
	echo ${UNAME_MACHINE}-pc-uwin
875
	echo "$UNAME_MACHINE"-pc-uwin
875
	exit ;;
876
	exit ;;
876
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
877
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
877
	echo x86_64-unknown-cygwin
878
	echo x86_64-unknown-cygwin
878
	exit ;;
879
	exit ;;
879
    p*:CYGWIN*:*)
880
	echo powerpcle-unknown-cygwin
881
	exit ;;
882
    prep*:SunOS:5.*:*)
880
    prep*:SunOS:5.*:*)
883
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
881
	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
884
	exit ;;
882
	exit ;;
885
    *:GNU:*:*)
883
    *:GNU:*:*)
886
	# the GNU system
884
	# the GNU system
887
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
885
	echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
888
	exit ;;
886
	exit ;;
889
    *:GNU/*:*:*)
887
    *:GNU/*:*:*)
890
	# other systems with GNU libc and userland
888
	# other systems with GNU libc and userland
891
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
889
	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
892
	exit ;;
890
	exit ;;
893
    i*86:Minix:*:*)
891
    i*86:Minix:*:*)
894
	echo ${UNAME_MACHINE}-pc-minix
892
	echo "$UNAME_MACHINE"-pc-minix
895
	exit ;;
893
	exit ;;
896
    aarch64:Linux:*:*)
894
    aarch64:Linux:*:*)
897
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
895
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
898
	exit ;;
896
	exit ;;
899
    aarch64_be:Linux:*:*)
897
    aarch64_be:Linux:*:*)
900
	UNAME_MACHINE=aarch64_be
898
	UNAME_MACHINE=aarch64_be
901
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
899
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
902
	exit ;;
900
	exit ;;
903
    alpha:Linux:*:*)
901
    alpha:Linux:*:*)
904
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
902
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
Lines 911-971 Link Here
911
	  EV68*) UNAME_MACHINE=alphaev68 ;;
909
	  EV68*) UNAME_MACHINE=alphaev68 ;;
912
	esac
910
	esac
913
	objdump --private-headers /bin/sh | grep -q ld.so.1
911
	objdump --private-headers /bin/sh | grep -q ld.so.1
914
	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
912
	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
915
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
913
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
916
	exit ;;
914
	exit ;;
917
    arc:Linux:*:* | arceb:Linux:*:*)
915
    arc:Linux:*:* | arceb:Linux:*:*)
918
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
916
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
919
	exit ;;
917
	exit ;;
920
    arm*:Linux:*:*)
918
    arm*:Linux:*:*)
921
	eval $set_cc_for_build
919
	eval "$set_cc_for_build"
922
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
920
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
923
	    | grep -q __ARM_EABI__
921
	    | grep -q __ARM_EABI__
924
	then
922
	then
925
	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
923
	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
926
	else
924
	else
927
	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
925
	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
928
		| grep -q __ARM_PCS_VFP
926
		| grep -q __ARM_PCS_VFP
929
	    then
927
	    then
930
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
928
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
931
	    else
929
	    else
932
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
930
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
933
	    fi
931
	    fi
934
	fi
932
	fi
935
	exit ;;
933
	exit ;;
936
    avr32*:Linux:*:*)
934
    avr32*:Linux:*:*)
937
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
935
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
938
	exit ;;
936
	exit ;;
939
    cris:Linux:*:*)
937
    cris:Linux:*:*)
940
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
938
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
941
	exit ;;
939
	exit ;;
942
    crisv32:Linux:*:*)
940
    crisv32:Linux:*:*)
943
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
941
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
944
	exit ;;
942
	exit ;;
945
    e2k:Linux:*:*)
943
    e2k:Linux:*:*)
946
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
944
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
947
	exit ;;
945
	exit ;;
948
    frv:Linux:*:*)
946
    frv:Linux:*:*)
949
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
947
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
950
	exit ;;
948
	exit ;;
951
    hexagon:Linux:*:*)
949
    hexagon:Linux:*:*)
952
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
950
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
953
	exit ;;
951
	exit ;;
954
    i*86:Linux:*:*)
952
    i*86:Linux:*:*)
955
	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
953
	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
956
	exit ;;
954
	exit ;;
957
    ia64:Linux:*:*)
955
    ia64:Linux:*:*)
958
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
956
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
959
	exit ;;
957
	exit ;;
958
    k1om:Linux:*:*)
959
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
960
	exit ;;
960
    m32r*:Linux:*:*)
961
    m32r*:Linux:*:*)
961
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
962
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
962
	exit ;;
963
	exit ;;
963
    m68*:Linux:*:*)
964
    m68*:Linux:*:*)
964
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
965
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
965
	exit ;;
966
	exit ;;
966
    mips:Linux:*:* | mips64:Linux:*:*)
967
    mips:Linux:*:* | mips64:Linux:*:*)
967
	eval $set_cc_for_build
968
	eval "$set_cc_for_build"
968
	sed 's/^	//' << EOF >$dummy.c
969
	sed 's/^	//' << EOF > "$dummy.c"
969
	#undef CPU
970
	#undef CPU
970
	#undef ${UNAME_MACHINE}
971
	#undef ${UNAME_MACHINE}
971
	#undef ${UNAME_MACHINE}el
972
	#undef ${UNAME_MACHINE}el
Lines 979-1042 Link Here
979
	#endif
980
	#endif
980
	#endif
981
	#endif
981
EOF
982
EOF
982
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
983
	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
983
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
984
	test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
984
	;;
985
	;;
986
    mips64el:Linux:*:*)
987
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
988
	exit ;;
985
    openrisc*:Linux:*:*)
989
    openrisc*:Linux:*:*)
986
	echo or1k-unknown-linux-${LIBC}
990
	echo or1k-unknown-linux-"$LIBC"
987
	exit ;;
991
	exit ;;
988
    or32:Linux:*:* | or1k*:Linux:*:*)
992
    or32:Linux:*:* | or1k*:Linux:*:*)
989
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
993
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
990
	exit ;;
994
	exit ;;
991
    padre:Linux:*:*)
995
    padre:Linux:*:*)
992
	echo sparc-unknown-linux-${LIBC}
996
	echo sparc-unknown-linux-"$LIBC"
993
	exit ;;
997
	exit ;;
994
    parisc64:Linux:*:* | hppa64:Linux:*:*)
998
    parisc64:Linux:*:* | hppa64:Linux:*:*)
995
	echo hppa64-unknown-linux-${LIBC}
999
	echo hppa64-unknown-linux-"$LIBC"
996
	exit ;;
1000
	exit ;;
997
    parisc:Linux:*:* | hppa:Linux:*:*)
1001
    parisc:Linux:*:* | hppa:Linux:*:*)
998
	# Look for CPU level
1002
	# Look for CPU level
999
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1003
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1000
	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1004
	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1001
	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1005
	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1002
	  *)    echo hppa-unknown-linux-${LIBC} ;;
1006
	  *)    echo hppa-unknown-linux-"$LIBC" ;;
1003
	esac
1007
	esac
1004
	exit ;;
1008
	exit ;;
1005
    ppc64:Linux:*:*)
1009
    ppc64:Linux:*:*)
1006
	echo powerpc64-unknown-linux-${LIBC}
1010
	echo powerpc64-unknown-linux-"$LIBC"
1007
	exit ;;
1011
	exit ;;
1008
    ppc:Linux:*:*)
1012
    ppc:Linux:*:*)
1009
	echo powerpc-unknown-linux-${LIBC}
1013
	echo powerpc-unknown-linux-"$LIBC"
1010
	exit ;;
1014
	exit ;;
1011
    ppc64le:Linux:*:*)
1015
    ppc64le:Linux:*:*)
1012
	echo powerpc64le-unknown-linux-${LIBC}
1016
	echo powerpc64le-unknown-linux-"$LIBC"
1013
	exit ;;
1017
	exit ;;
1014
    ppcle:Linux:*:*)
1018
    ppcle:Linux:*:*)
1015
	echo powerpcle-unknown-linux-${LIBC}
1019
	echo powerpcle-unknown-linux-"$LIBC"
1016
	exit ;;
1020
	exit ;;
1021
    riscv32:Linux:*:* | riscv64:Linux:*:*)
1022
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1023
	exit ;;
1017
    s390:Linux:*:* | s390x:Linux:*:*)
1024
    s390:Linux:*:* | s390x:Linux:*:*)
1018
	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1025
	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
1019
	exit ;;
1026
	exit ;;
1020
    sh64*:Linux:*:*)
1027
    sh64*:Linux:*:*)
1021
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1028
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1022
	exit ;;
1029
	exit ;;
1023
    sh*:Linux:*:*)
1030
    sh*:Linux:*:*)
1024
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1031
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1025
	exit ;;
1032
	exit ;;
1026
    sparc:Linux:*:* | sparc64:Linux:*:*)
1033
    sparc:Linux:*:* | sparc64:Linux:*:*)
1027
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1034
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1028
	exit ;;
1035
	exit ;;
1029
    tile*:Linux:*:*)
1036
    tile*:Linux:*:*)
1030
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1037
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1031
	exit ;;
1038
	exit ;;
1032
    vax:Linux:*:*)
1039
    vax:Linux:*:*)
1033
	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1040
	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
1034
	exit ;;
1041
	exit ;;
1035
    x86_64:Linux:*:*)
1042
    x86_64:Linux:*:*)
1036
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1043
	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
1037
	exit ;;
1044
	exit ;;
1038
    xtensa*:Linux:*:*)
1045
    xtensa*:Linux:*:*)
1039
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1046
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1040
	exit ;;
1047
	exit ;;
1041
    i*86:DYNIX/ptx:4*:*)
1048
    i*86:DYNIX/ptx:4*:*)
1042
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1049
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
Lines 1050-1083 Link Here
1050
	# I am not positive that other SVR4 systems won't match this,
1057
	# I am not positive that other SVR4 systems won't match this,
1051
	# I just have to hope.  -- rms.
1058
	# I just have to hope.  -- rms.
1052
	# Use sysv4.2uw... so that sysv4* matches it.
1059
	# Use sysv4.2uw... so that sysv4* matches it.
1053
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1060
	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
1054
	exit ;;
1061
	exit ;;
1055
    i*86:OS/2:*:*)
1062
    i*86:OS/2:*:*)
1056
	# If we were able to find `uname', then EMX Unix compatibility
1063
	# If we were able to find `uname', then EMX Unix compatibility
1057
	# is probably installed.
1064
	# is probably installed.
1058
	echo ${UNAME_MACHINE}-pc-os2-emx
1065
	echo "$UNAME_MACHINE"-pc-os2-emx
1059
	exit ;;
1066
	exit ;;
1060
    i*86:XTS-300:*:STOP)
1067
    i*86:XTS-300:*:STOP)
1061
	echo ${UNAME_MACHINE}-unknown-stop
1068
	echo "$UNAME_MACHINE"-unknown-stop
1062
	exit ;;
1069
	exit ;;
1063
    i*86:atheos:*:*)
1070
    i*86:atheos:*:*)
1064
	echo ${UNAME_MACHINE}-unknown-atheos
1071
	echo "$UNAME_MACHINE"-unknown-atheos
1065
	exit ;;
1072
	exit ;;
1066
    i*86:syllable:*:*)
1073
    i*86:syllable:*:*)
1067
	echo ${UNAME_MACHINE}-pc-syllable
1074
	echo "$UNAME_MACHINE"-pc-syllable
1068
	exit ;;
1075
	exit ;;
1069
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1076
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1070
	echo i386-unknown-lynxos${UNAME_RELEASE}
1077
	echo i386-unknown-lynxos"$UNAME_RELEASE"
1071
	exit ;;
1078
	exit ;;
1072
    i*86:*DOS:*:*)
1079
    i*86:*DOS:*:*)
1073
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
1080
	echo "$UNAME_MACHINE"-pc-msdosdjgpp
1074
	exit ;;
1081
	exit ;;
1075
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1082
    i*86:*:4.*:*)
1076
	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1083
	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
1077
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1084
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1078
		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1085
		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
1079
	else
1086
	else
1080
		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1087
		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1081
	fi
1088
	fi
1082
	exit ;;
1089
	exit ;;
1083
    i*86:*:5:[678]*)
1090
    i*86:*:5:[678]*)
Lines 1087-1098 Link Here
1087
	    *Pentium)	     UNAME_MACHINE=i586 ;;
1094
	    *Pentium)	     UNAME_MACHINE=i586 ;;
1088
	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1095
	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1089
	esac
1096
	esac
1090
	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1097
	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1091
	exit ;;
1098
	exit ;;
1092
    i*86:*:3.2:*)
1099
    i*86:*:3.2:*)
1093
	if test -f /usr/options/cb.name; then
1100
	if test -f /usr/options/cb.name; then
1094
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1101
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1095
		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1102
		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
1096
	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1103
	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1097
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1104
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1098
		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1105
		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
Lines 1102-1110 Link Here
1102
			&& UNAME_MACHINE=i686
1109
			&& UNAME_MACHINE=i686
1103
		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1110
		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1104
			&& UNAME_MACHINE=i686
1111
			&& UNAME_MACHINE=i686
1105
		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1112
		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
1106
	else
1113
	else
1107
		echo ${UNAME_MACHINE}-pc-sysv32
1114
		echo "$UNAME_MACHINE"-pc-sysv32
1108
	fi
1115
	fi
1109
	exit ;;
1116
	exit ;;
1110
    pc:*:*:*)
1117
    pc:*:*:*)
Lines 1112-1118 Link Here
1112
	# uname -m prints for DJGPP always 'pc', but it prints nothing about
1119
	# uname -m prints for DJGPP always 'pc', but it prints nothing about
1113
	# the processor, so we play safe by assuming i586.
1120
	# the processor, so we play safe by assuming i586.
1114
	# Note: whatever this is, it MUST be the same as what config.sub
1121
	# Note: whatever this is, it MUST be the same as what config.sub
1115
	# prints for the "djgpp" host, or else GDB configury will decide that
1122
	# prints for the "djgpp" host, or else GDB configure will decide that
1116
	# this is a cross-build.
1123
	# this is a cross-build.
1117
	echo i586-pc-msdosdjgpp
1124
	echo i586-pc-msdosdjgpp
1118
	exit ;;
1125
	exit ;;
Lines 1124-1132 Link Here
1124
	exit ;;
1131
	exit ;;
1125
    i860:*:4.*:*) # i860-SVR4
1132
    i860:*:4.*:*) # i860-SVR4
1126
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1133
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1127
	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1134
	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
1128
	else # Add other i860-SVR4 vendors below as they are discovered.
1135
	else # Add other i860-SVR4 vendors below as they are discovered.
1129
	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1136
	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
1130
	fi
1137
	fi
1131
	exit ;;
1138
	exit ;;
1132
    mini*:CTIX:SYS*5:*)
1139
    mini*:CTIX:SYS*5:*)
Lines 1146-1154 Link Here
1146
	test -r /etc/.relid \
1153
	test -r /etc/.relid \
1147
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1154
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1148
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1155
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1149
	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1156
	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1150
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1157
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1151
	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1158
	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1152
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1159
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1153
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1160
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1154
	  && { echo i486-ncr-sysv4; exit; } ;;
1161
	  && { echo i486-ncr-sysv4; exit; } ;;
Lines 1157-1184 Link Here
1157
	test -r /etc/.relid \
1164
	test -r /etc/.relid \
1158
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1165
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1159
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1166
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1160
	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1167
	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1161
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1168
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1162
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1169
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
1163
	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1170
	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1164
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1171
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1165
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1172
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1166
	echo m68k-unknown-lynxos${UNAME_RELEASE}
1173
	echo m68k-unknown-lynxos"$UNAME_RELEASE"
1167
	exit ;;
1174
	exit ;;
1168
    mc68030:UNIX_System_V:4.*:*)
1175
    mc68030:UNIX_System_V:4.*:*)
1169
	echo m68k-atari-sysv4
1176
	echo m68k-atari-sysv4
1170
	exit ;;
1177
	exit ;;
1171
    TSUNAMI:LynxOS:2.*:*)
1178
    TSUNAMI:LynxOS:2.*:*)
1172
	echo sparc-unknown-lynxos${UNAME_RELEASE}
1179
	echo sparc-unknown-lynxos"$UNAME_RELEASE"
1173
	exit ;;
1180
	exit ;;
1174
    rs6000:LynxOS:2.*:*)
1181
    rs6000:LynxOS:2.*:*)
1175
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
1182
	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
1176
	exit ;;
1183
	exit ;;
1177
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1184
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1178
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
1185
	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
1179
	exit ;;
1186
	exit ;;
1180
    SM[BE]S:UNIX_SV:*:*)
1187
    SM[BE]S:UNIX_SV:*:*)
1181
	echo mips-dde-sysv${UNAME_RELEASE}
1188
	echo mips-dde-sysv"$UNAME_RELEASE"
1182
	exit ;;
1189
	exit ;;
1183
    RM*:ReliantUNIX-*:*:*)
1190
    RM*:ReliantUNIX-*:*:*)
1184
	echo mips-sni-sysv4
1191
	echo mips-sni-sysv4
Lines 1189-1195 Link Here
1189
    *:SINIX-*:*:*)
1196
    *:SINIX-*:*:*)
1190
	if uname -p 2>/dev/null >/dev/null ; then
1197
	if uname -p 2>/dev/null >/dev/null ; then
1191
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1198
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1192
		echo ${UNAME_MACHINE}-sni-sysv4
1199
		echo "$UNAME_MACHINE"-sni-sysv4
1193
	else
1200
	else
1194
		echo ns32k-sni-sysv
1201
		echo ns32k-sni-sysv
1195
	fi
1202
	fi
Lines 1209-1215 Link Here
1209
	exit ;;
1216
	exit ;;
1210
    i*86:VOS:*:*)
1217
    i*86:VOS:*:*)
1211
	# From Paul.Green@stratus.com.
1218
	# From Paul.Green@stratus.com.
1212
	echo ${UNAME_MACHINE}-stratus-vos
1219
	echo "$UNAME_MACHINE"-stratus-vos
1213
	exit ;;
1220
	exit ;;
1214
    *:VOS:*:*)
1221
    *:VOS:*:*)
1215
	# From Paul.Green@stratus.com.
1222
	# From Paul.Green@stratus.com.
Lines 1216-1222 Link Here
1216
	echo hppa1.1-stratus-vos
1223
	echo hppa1.1-stratus-vos
1217
	exit ;;
1224
	exit ;;
1218
    mc68*:A/UX:*:*)
1225
    mc68*:A/UX:*:*)
1219
	echo m68k-apple-aux${UNAME_RELEASE}
1226
	echo m68k-apple-aux"$UNAME_RELEASE"
1220
	exit ;;
1227
	exit ;;
1221
    news*:NEWS-OS:6*:*)
1228
    news*:NEWS-OS:6*:*)
1222
	echo mips-sony-newsos6
1229
	echo mips-sony-newsos6
Lines 1223-1231 Link Here
1223
	exit ;;
1230
	exit ;;
1224
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1231
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1225
	if [ -d /usr/nec ]; then
1232
	if [ -d /usr/nec ]; then
1226
		echo mips-nec-sysv${UNAME_RELEASE}
1233
		echo mips-nec-sysv"$UNAME_RELEASE"
1227
	else
1234
	else
1228
		echo mips-unknown-sysv${UNAME_RELEASE}
1235
		echo mips-unknown-sysv"$UNAME_RELEASE"
1229
	fi
1236
	fi
1230
	exit ;;
1237
	exit ;;
1231
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1238
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
Lines 1244-1283 Link Here
1244
	echo x86_64-unknown-haiku
1251
	echo x86_64-unknown-haiku
1245
	exit ;;
1252
	exit ;;
1246
    SX-4:SUPER-UX:*:*)
1253
    SX-4:SUPER-UX:*:*)
1247
	echo sx4-nec-superux${UNAME_RELEASE}
1254
	echo sx4-nec-superux"$UNAME_RELEASE"
1248
	exit ;;
1255
	exit ;;
1249
    SX-5:SUPER-UX:*:*)
1256
    SX-5:SUPER-UX:*:*)
1250
	echo sx5-nec-superux${UNAME_RELEASE}
1257
	echo sx5-nec-superux"$UNAME_RELEASE"
1251
	exit ;;
1258
	exit ;;
1252
    SX-6:SUPER-UX:*:*)
1259
    SX-6:SUPER-UX:*:*)
1253
	echo sx6-nec-superux${UNAME_RELEASE}
1260
	echo sx6-nec-superux"$UNAME_RELEASE"
1254
	exit ;;
1261
	exit ;;
1255
    SX-7:SUPER-UX:*:*)
1262
    SX-7:SUPER-UX:*:*)
1256
	echo sx7-nec-superux${UNAME_RELEASE}
1263
	echo sx7-nec-superux"$UNAME_RELEASE"
1257
	exit ;;
1264
	exit ;;
1258
    SX-8:SUPER-UX:*:*)
1265
    SX-8:SUPER-UX:*:*)
1259
	echo sx8-nec-superux${UNAME_RELEASE}
1266
	echo sx8-nec-superux"$UNAME_RELEASE"
1260
	exit ;;
1267
	exit ;;
1261
    SX-8R:SUPER-UX:*:*)
1268
    SX-8R:SUPER-UX:*:*)
1262
	echo sx8r-nec-superux${UNAME_RELEASE}
1269
	echo sx8r-nec-superux"$UNAME_RELEASE"
1263
	exit ;;
1270
	exit ;;
1271
    SX-ACE:SUPER-UX:*:*)
1272
	echo sxace-nec-superux"$UNAME_RELEASE"
1273
	exit ;;
1264
    Power*:Rhapsody:*:*)
1274
    Power*:Rhapsody:*:*)
1265
	echo powerpc-apple-rhapsody${UNAME_RELEASE}
1275
	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
1266
	exit ;;
1276
	exit ;;
1267
    *:Rhapsody:*:*)
1277
    *:Rhapsody:*:*)
1268
	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1278
	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1269
	exit ;;
1279
	exit ;;
1270
    *:Darwin:*:*)
1280
    *:Darwin:*:*)
1271
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1281
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1272
	eval $set_cc_for_build
1282
	eval "$set_cc_for_build"
1273
	if test "$UNAME_PROCESSOR" = unknown ; then
1283
	if test "$UNAME_PROCESSOR" = unknown ; then
1274
	    UNAME_PROCESSOR=powerpc
1284
	    UNAME_PROCESSOR=powerpc
1275
	fi
1285
	fi
1276
	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1286
	if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1277
	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1287
	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1278
		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1288
		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1279
		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1289
		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1280
		    grep IS_64BIT_ARCH >/dev/null
1290
		       grep IS_64BIT_ARCH >/dev/null
1281
		then
1291
		then
1282
		    case $UNAME_PROCESSOR in
1292
		    case $UNAME_PROCESSOR in
1283
			i386) UNAME_PROCESSOR=x86_64 ;;
1293
			i386) UNAME_PROCESSOR=x86_64 ;;
Lines 1284-1289 Link Here
1284
			powerpc) UNAME_PROCESSOR=powerpc64 ;;
1294
			powerpc) UNAME_PROCESSOR=powerpc64 ;;
1285
		    esac
1295
		    esac
1286
		fi
1296
		fi
1297
		# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1298
		if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1299
		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1300
		       grep IS_PPC >/dev/null
1301
		then
1302
		    UNAME_PROCESSOR=powerpc
1303
		fi
1287
	    fi
1304
	    fi
1288
	elif test "$UNAME_PROCESSOR" = i386 ; then
1305
	elif test "$UNAME_PROCESSOR" = i386 ; then
1289
	    # Avoid executing cc on OS X 10.9, as it ships with a stub
1306
	    # Avoid executing cc on OS X 10.9, as it ships with a stub
Lines 1294-1321 Link Here
1294
	    # that Apple uses in portable devices.
1311
	    # that Apple uses in portable devices.
1295
	    UNAME_PROCESSOR=x86_64
1312
	    UNAME_PROCESSOR=x86_64
1296
	fi
1313
	fi
1297
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1314
	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1298
	exit ;;
1315
	exit ;;
1299
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1316
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1300
	UNAME_PROCESSOR=`uname -p`
1317
	UNAME_PROCESSOR=`uname -p`
1301
	if test "$UNAME_PROCESSOR" = "x86"; then
1318
	if test "$UNAME_PROCESSOR" = x86; then
1302
		UNAME_PROCESSOR=i386
1319
		UNAME_PROCESSOR=i386
1303
		UNAME_MACHINE=pc
1320
		UNAME_MACHINE=pc
1304
	fi
1321
	fi
1305
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1322
	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
1306
	exit ;;
1323
	exit ;;
1307
    *:QNX:*:4*)
1324
    *:QNX:*:4*)
1308
	echo i386-pc-qnx
1325
	echo i386-pc-qnx
1309
	exit ;;
1326
	exit ;;
1310
    NEO-?:NONSTOP_KERNEL:*:*)
1327
    NEO-*:NONSTOP_KERNEL:*:*)
1311
	echo neo-tandem-nsk${UNAME_RELEASE}
1328
	echo neo-tandem-nsk"$UNAME_RELEASE"
1312
	exit ;;
1329
	exit ;;
1313
    NSE-*:NONSTOP_KERNEL:*:*)
1330
    NSE-*:NONSTOP_KERNEL:*:*)
1314
	echo nse-tandem-nsk${UNAME_RELEASE}
1331
	echo nse-tandem-nsk"$UNAME_RELEASE"
1315
	exit ;;
1332
	exit ;;
1316
    NSR-?:NONSTOP_KERNEL:*:*)
1333
    NSR-*:NONSTOP_KERNEL:*:*)
1317
	echo nsr-tandem-nsk${UNAME_RELEASE}
1334
	echo nsr-tandem-nsk"$UNAME_RELEASE"
1318
	exit ;;
1335
	exit ;;
1336
    NSV-*:NONSTOP_KERNEL:*:*)
1337
	echo nsv-tandem-nsk"$UNAME_RELEASE"
1338
	exit ;;
1339
    NSX-*:NONSTOP_KERNEL:*:*)
1340
	echo nsx-tandem-nsk"$UNAME_RELEASE"
1341
	exit ;;
1319
    *:NonStop-UX:*:*)
1342
    *:NonStop-UX:*:*)
1320
	echo mips-compaq-nonstopux
1343
	echo mips-compaq-nonstopux
1321
	exit ;;
1344
	exit ;;
Lines 1323-1340 Link Here
1323
	echo bs2000-siemens-sysv
1346
	echo bs2000-siemens-sysv
1324
	exit ;;
1347
	exit ;;
1325
    DS/*:UNIX_System_V:*:*)
1348
    DS/*:UNIX_System_V:*:*)
1326
	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1349
	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
1327
	exit ;;
1350
	exit ;;
1328
    *:Plan9:*:*)
1351
    *:Plan9:*:*)
1329
	# "uname -m" is not consistent, so use $cputype instead. 386
1352
	# "uname -m" is not consistent, so use $cputype instead. 386
1330
	# is converted to i386 for consistency with other x86
1353
	# is converted to i386 for consistency with other x86
1331
	# operating systems.
1354
	# operating systems.
1332
	if test "$cputype" = "386"; then
1355
	if test "$cputype" = 386; then
1333
	    UNAME_MACHINE=i386
1356
	    UNAME_MACHINE=i386
1334
	else
1357
	else
1335
	    UNAME_MACHINE="$cputype"
1358
	    UNAME_MACHINE="$cputype"
1336
	fi
1359
	fi
1337
	echo ${UNAME_MACHINE}-unknown-plan9
1360
	echo "$UNAME_MACHINE"-unknown-plan9
1338
	exit ;;
1361
	exit ;;
1339
    *:TOPS-10:*:*)
1362
    *:TOPS-10:*:*)
1340
	echo pdp10-unknown-tops10
1363
	echo pdp10-unknown-tops10
Lines 1355-1368 Link Here
1355
	echo pdp10-unknown-its
1378
	echo pdp10-unknown-its
1356
	exit ;;
1379
	exit ;;
1357
    SEI:*:*:SEIUX)
1380
    SEI:*:*:SEIUX)
1358
	echo mips-sei-seiux${UNAME_RELEASE}
1381
	echo mips-sei-seiux"$UNAME_RELEASE"
1359
	exit ;;
1382
	exit ;;
1360
    *:DragonFly:*:*)
1383
    *:DragonFly:*:*)
1361
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1384
	echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
1362
	exit ;;
1385
	exit ;;
1363
    *:*VMS:*:*)
1386
    *:*VMS:*:*)
1364
	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1387
	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1365
	case "${UNAME_MACHINE}" in
1388
	case "$UNAME_MACHINE" in
1366
	    A*) echo alpha-dec-vms ; exit ;;
1389
	    A*) echo alpha-dec-vms ; exit ;;
1367
	    I*) echo ia64-dec-vms ; exit ;;
1390
	    I*) echo ia64-dec-vms ; exit ;;
1368
	    V*) echo vax-dec-vms ; exit ;;
1391
	    V*) echo vax-dec-vms ; exit ;;
Lines 1371-1404 Link Here
1371
	echo i386-pc-xenix
1394
	echo i386-pc-xenix
1372
	exit ;;
1395
	exit ;;
1373
    i*86:skyos:*:*)
1396
    i*86:skyos:*:*)
1374
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1397
	echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
1375
	exit ;;
1398
	exit ;;
1376
    i*86:rdos:*:*)
1399
    i*86:rdos:*:*)
1377
	echo ${UNAME_MACHINE}-pc-rdos
1400
	echo "$UNAME_MACHINE"-pc-rdos
1378
	exit ;;
1401
	exit ;;
1379
    i*86:AROS:*:*)
1402
    i*86:AROS:*:*)
1380
	echo ${UNAME_MACHINE}-pc-aros
1403
	echo "$UNAME_MACHINE"-pc-aros
1381
	exit ;;
1404
	exit ;;
1382
    x86_64:VMkernel:*:*)
1405
    x86_64:VMkernel:*:*)
1383
	echo ${UNAME_MACHINE}-unknown-esx
1406
	echo "$UNAME_MACHINE"-unknown-esx
1384
	exit ;;
1407
	exit ;;
1408
    amd64:Isilon\ OneFS:*:*)
1409
	echo x86_64-unknown-onefs
1410
	exit ;;
1385
esac
1411
esac
1386
1412
1413
echo "$0: unable to guess system type" >&2
1414
1415
case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1416
    mips:Linux | mips64:Linux)
1417
	# If we got here on MIPS GNU/Linux, output extra information.
1418
	cat >&2 <<EOF
1419
1420
NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1421
the system type. Please install a C compiler and try again.
1422
EOF
1423
	;;
1424
esac
1425
1387
cat >&2 <<EOF
1426
cat >&2 <<EOF
1388
$0: unable to guess system type
1389
1427
1390
This script, last modified $timestamp, has failed to recognize
1428
This script (version $timestamp), has failed to recognize the
1391
the operating system you are using. It is advised that you
1429
operating system you are using. If your script is old, overwrite *all*
1392
download the most up to date version of the config scripts from
1430
copies of config.guess and config.sub with the latest versions from:
1393
1431
1394
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1432
  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1395
and
1433
and
1396
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1434
  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1397
1435
1398
If the version you run ($0) is already up to date, please
1436
If $0 has already been updated, send the following data and any
1399
send the following data and any information you think might be
1437
information you think might be pertinent to config-patches@gnu.org to
1400
pertinent to <config-patches@gnu.org> in order to provide the needed
1438
provide the necessary information to handle your system.
1401
information to handle your system.
1402
1439
1403
config.guess timestamp = $timestamp
1440
config.guess timestamp = $timestamp
1404
1441
Lines 1417-1432 Link Here
1417
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1454
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1418
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1455
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1419
1456
1420
UNAME_MACHINE = ${UNAME_MACHINE}
1457
UNAME_MACHINE = "$UNAME_MACHINE"
1421
UNAME_RELEASE = ${UNAME_RELEASE}
1458
UNAME_RELEASE = "$UNAME_RELEASE"
1422
UNAME_SYSTEM  = ${UNAME_SYSTEM}
1459
UNAME_SYSTEM  = "$UNAME_SYSTEM"
1423
UNAME_VERSION = ${UNAME_VERSION}
1460
UNAME_VERSION = "$UNAME_VERSION"
1424
EOF
1461
EOF
1425
1462
1426
exit 1
1463
exit 1
1427
1464
1428
# Local variables:
1465
# Local variables:
1429
# eval: (add-hook 'write-file-hooks 'time-stamp)
1466
# eval: (add-hook 'before-save-hook 'time-stamp)
1430
# time-stamp-start: "timestamp='"
1467
# time-stamp-start: "timestamp='"
1431
# time-stamp-format: "%:y-%02m-%02d"
1468
# time-stamp-format: "%:y-%02m-%02d"
1432
# time-stamp-end: "'"
1469
# time-stamp-end: "'"

Return to bug 229176