summaryrefslogtreecommitdiffstats
path: root/config.sub
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-11-15 09:52:26 +0000
committerIain Sandoe <iain@sandoe.co.uk>2020-11-23 19:30:01 +0000
commit53a90650663e59948f86505660604b5769cf808c (patch)
tree822e05899034a3058110d1fe55429aaf06ea4fd5 /config.sub
parenttestsuite: Adjust pruning (diff)
downloadgcc-53a90650663e59948f86505660604b5769cf808c.tar.gz
gcc-53a90650663e59948f86505660604b5769cf808c.tar.bz2
gcc-53a90650663e59948f86505660604b5769cf808c.tar.xz
config.sub, config.guess : Import upstream 2020-11-07.
This imports from: sha1 77632d92f25e26b95c64afd3700d51bd03587613 Date: 2020-11-07 04:46:23 +0000 ChangeLog: * config.guess: Import latest upstream. * config.sub: Import latest upstream.
Diffstat (limited to 'config.sub')
-rwxr-xr-xconfig.sub632
1 files changed, 346 insertions, 286 deletions
diff --git a/config.sub b/config.sub
index a318a468685..c874b7a9df8 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
1#! /bin/sh 1#! /bin/sh
2# Configuration validation subroutine script. 2# Configuration validation subroutine script.
3# Copyright 1992-2019 Free Software Foundation, Inc. 3# Copyright 1992-2020 Free Software Foundation, Inc.
4 4
5timestamp='2019-06-30' 5timestamp='2020-11-07'
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
@@ -50,7 +50,7 @@ timestamp='2019-06-30'
50# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 50# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
51# It is wrong to echo any other type of specification. 51# It is wrong to echo any other type of specification.
52 52
53me=`echo "$0" | sed -e 's,.*/,,'` 53me=$(echo "$0" | sed -e 's,.*/,,')
54 54
55usage="\ 55usage="\
56Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS 56Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
67version="\ 67version="\
68GNU config.sub ($timestamp) 68GNU config.sub ($timestamp)
69 69
70Copyright 1992-2019 Free Software Foundation, Inc. 70Copyright 1992-2020 Free Software Foundation, Inc.
71 71
72This is free software; see the source for copying conditions. There is NO 72This is free software; see the source for copying conditions. There is NO
73warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 73warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -124,28 +124,27 @@ case $1 in
124 ;; 124 ;;
125 *-*-*-*) 125 *-*-*-*)
126 basic_machine=$field1-$field2 126 basic_machine=$field1-$field2
127 os=$field3-$field4 127 basic_os=$field3-$field4
128 ;; 128 ;;
129 *-*-*) 129 *-*-*)
130 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two 130 # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
131 # parts 131 # parts
132 maybe_os=$field2-$field3 132 maybe_os=$field2-$field3
133 case $maybe_os in 133 case $maybe_os in
134 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ 134 nto-qnx* | linux-* | uclinux-uclibc* \
135 | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
136 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ 135 | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
137 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ 136 | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
138 | storm-chaos* | os2-emx* | rtmk-nova*) 137 | storm-chaos* | os2-emx* | rtmk-nova*)
139 basic_machine=$field1 138 basic_machine=$field1
140 os=$maybe_os 139 basic_os=$maybe_os
141 ;; 140 ;;
142 android-linux) 141 android-linux)
143 basic_machine=$field1-unknown 142 basic_machine=$field1-unknown
144 os=linux-android 143 basic_os=linux-android
145 ;; 144 ;;
146 *) 145 *)
147 basic_machine=$field1-$field2 146 basic_machine=$field1-$field2
148 os=$field3 147 basic_os=$field3
149 ;; 148 ;;
150 esac 149 esac
151 ;; 150 ;;
@@ -154,7 +153,7 @@ case $1 in
154 case $field1-$field2 in 153 case $field1-$field2 in
155 decstation-3100) 154 decstation-3100)
156 basic_machine=mips-dec 155 basic_machine=mips-dec
157 os= 156 basic_os=
158 ;; 157 ;;
159 *-*) 158 *-*)
160 # Second component is usually, but not always the OS 159 # Second component is usually, but not always the OS
@@ -162,7 +161,7 @@ case $1 in
162 # Prevent following clause from handling this valid os 161 # Prevent following clause from handling this valid os
163 sun*os*) 162 sun*os*)
164 basic_machine=$field1 163 basic_machine=$field1
165 os=$field2 164 basic_os=$field2
166 ;; 165 ;;
167 # Manufacturers 166 # Manufacturers
168 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ 167 dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
@@ -175,11 +174,11 @@ case $1 in
175 | microblaze* | sim | cisco \ 174 | microblaze* | sim | cisco \
176 | oki | wec | wrs | winbond) 175 | oki | wec | wrs | winbond)
177 basic_machine=$field1-$field2 176 basic_machine=$field1-$field2
178 os= 177 basic_os=
179 ;; 178 ;;
180 *) 179 *)
181 basic_machine=$field1 180 basic_machine=$field1
182 os=$field2 181 basic_os=$field2
183 ;; 182 ;;
184 esac 183 esac
185 ;; 184 ;;
@@ -191,447 +190,451 @@ case $1 in
191 case $field1 in 190 case $field1 in
192 386bsd) 191 386bsd)
193 basic_machine=i386-pc 192 basic_machine=i386-pc
194 os=bsd 193 basic_os=bsd
195 ;; 194 ;;
196 a29khif) 195 a29khif)
197 basic_machine=a29k-amd 196 basic_machine=a29k-amd
198 os=udi 197 basic_os=udi
199 ;; 198 ;;
200 adobe68k) 199 adobe68k)
201 basic_machine=m68010-adobe 200 basic_machine=m68010-adobe
202 os=scout 201 basic_os=scout
203 ;; 202 ;;
204 alliant) 203 alliant)
205 basic_machine=fx80-alliant 204 basic_machine=fx80-alliant
206 os= 205 basic_os=
207 ;; 206 ;;
208 altos | altos3068) 207 altos | altos3068)
209 basic_machine=m68k-altos 208 basic_machine=m68k-altos
210 os= 209 basic_os=
211 ;; 210 ;;
212 am29k) 211 am29k)
213 basic_machine=a29k-none 212 basic_machine=a29k-none
214 os=bsd 213 basic_os=bsd
215 ;; 214 ;;
216 amdahl) 215 amdahl)
217 basic_machine=580-amdahl 216 basic_machine=580-amdahl
218 os=sysv 217 basic_os=sysv
219 ;; 218 ;;
220 amiga) 219 amiga)
221 basic_machine=m68k-unknown 220 basic_machine=m68k-unknown
222 os= 221 basic_os=
223 ;; 222 ;;
224 amigaos | amigados) 223 amigaos | amigados)
225 basic_machine=m68k-unknown 224 basic_machine=m68k-unknown
226 os=amigaos 225 basic_os=amigaos
227 ;; 226 ;;
228 amigaunix | amix) 227 amigaunix | amix)
229 basic_machine=m68k-unknown 228 basic_machine=m68k-unknown
230 os=sysv4 229 basic_os=sysv4
231 ;; 230 ;;
232 apollo68) 231 apollo68)
233 basic_machine=m68k-apollo 232 basic_machine=m68k-apollo
234 os=sysv 233 basic_os=sysv
235 ;; 234 ;;
236 apollo68bsd) 235 apollo68bsd)
237 basic_machine=m68k-apollo 236 basic_machine=m68k-apollo
238 os=bsd 237 basic_os=bsd
239 ;; 238 ;;
240 aros) 239 aros)
241 basic_machine=i386-pc 240 basic_machine=i386-pc
242 os=aros 241 basic_os=aros
243 ;; 242 ;;
244 aux) 243 aux)
245 basic_machine=m68k-apple 244 basic_machine=m68k-apple
246 os=aux 245 basic_os=aux
247 ;; 246 ;;
248 balance) 247 balance)
249 basic_machine=ns32k-sequent 248 basic_machine=ns32k-sequent
250 os=dynix 249 basic_os=dynix
251 ;; 250 ;;
252 blackfin) 251 blackfin)
253 basic_machine=bfin-unknown 252 basic_machine=bfin-unknown
254 os=linux 253 basic_os=linux
255 ;; 254 ;;
256 cegcc) 255 cegcc)
257 basic_machine=arm-unknown 256 basic_machine=arm-unknown
258 os=cegcc 257 basic_os=cegcc
259 ;; 258 ;;
260 convex-c1) 259 convex-c1)
261 basic_machine=c1-convex 260 basic_machine=c1-convex
262 os=bsd 261 basic_os=bsd
263 ;; 262 ;;
264 convex-c2) 263 convex-c2)
265 basic_machine=c2-convex 264 basic_machine=c2-convex
266 os=bsd 265 basic_os=bsd
267 ;; 266 ;;
268 convex-c32) 267 convex-c32)
269 basic_machine=c32-convex 268 basic_machine=c32-convex
270 os=bsd 269 basic_os=bsd
271 ;; 270 ;;
272 convex-c34) 271 convex-c34)
273 basic_machine=c34-convex 272 basic_machine=c34-convex
274 os=bsd 273 basic_os=bsd
275 ;; 274 ;;
276 convex-c38) 275 convex-c38)
277 basic_machine=c38-convex 276 basic_machine=c38-convex
278 os=bsd 277 basic_os=bsd
279 ;; 278 ;;
280 cray) 279 cray)
281 basic_machine=j90-cray 280 basic_machine=j90-cray
282 os=unicos 281 basic_os=unicos
283 ;; 282 ;;
284 crds | unos) 283 crds | unos)
285 basic_machine=m68k-crds 284 basic_machine=m68k-crds
286 os= 285 basic_os=
287 ;; 286 ;;
288 da30) 287 da30)
289 basic_machine=m68k-da30 288 basic_machine=m68k-da30
290 os= 289 basic_os=
291 ;; 290 ;;
292 decstation | pmax | pmin | dec3100 | decstatn) 291 decstation | pmax | pmin | dec3100 | decstatn)
293 basic_machine=mips-dec 292 basic_machine=mips-dec
294 os= 293 basic_os=
295 ;; 294 ;;
296 delta88) 295 delta88)
297 basic_machine=m88k-motorola 296 basic_machine=m88k-motorola
298 os=sysv3 297 basic_os=sysv3
299 ;; 298 ;;
300 dicos) 299 dicos)
301 basic_machine=i686-pc 300 basic_machine=i686-pc
302 os=dicos 301 basic_os=dicos
303 ;; 302 ;;
304 djgpp) 303 djgpp)
305 basic_machine=i586-pc 304 basic_machine=i586-pc
306 os=msdosdjgpp 305 basic_os=msdosdjgpp
307 ;; 306 ;;
308 ebmon29k) 307 ebmon29k)
309 basic_machine=a29k-amd 308 basic_machine=a29k-amd
310 os=ebmon 309 basic_os=ebmon
311 ;; 310 ;;
312 es1800 | OSE68k | ose68k | ose | OSE) 311 es1800 | OSE68k | ose68k | ose | OSE)
313 basic_machine=m68k-ericsson 312 basic_machine=m68k-ericsson
314 os=ose 313 basic_os=ose
315 ;; 314 ;;
316 gmicro) 315 gmicro)
317 basic_machine=tron-gmicro 316 basic_machine=tron-gmicro
318 os=sysv 317 basic_os=sysv
319 ;; 318 ;;
320 go32) 319 go32)
321 basic_machine=i386-pc 320 basic_machine=i386-pc
322 os=go32 321 basic_os=go32
323 ;; 322 ;;
324 h8300hms) 323 h8300hms)
325 basic_machine=h8300-hitachi 324 basic_machine=h8300-hitachi
326 os=hms 325 basic_os=hms
327 ;; 326 ;;
328 h8300xray) 327 h8300xray)
329 basic_machine=h8300-hitachi 328 basic_machine=h8300-hitachi
330 os=xray 329 basic_os=xray
331 ;; 330 ;;
332 h8500hms) 331 h8500hms)
333 basic_machine=h8500-hitachi 332 basic_machine=h8500-hitachi
334 os=hms 333 basic_os=hms
335 ;; 334 ;;
336 harris) 335 harris)
337 basic_machine=m88k-harris 336 basic_machine=m88k-harris
338 os=sysv3 337 basic_os=sysv3
339 ;; 338 ;;
340 hp300 | hp300hpux) 339 hp300 | hp300hpux)
341 basic_machine=m68k-hp 340 basic_machine=m68k-hp
342 os=hpux 341 basic_os=hpux
343 ;; 342 ;;
344 hp300bsd) 343 hp300bsd)
345 basic_machine=m68k-hp 344 basic_machine=m68k-hp
346 os=bsd 345 basic_os=bsd
347 ;; 346 ;;
348 hppaosf) 347 hppaosf)
349 basic_machine=hppa1.1-hp 348 basic_machine=hppa1.1-hp
350 os=osf 349 basic_os=osf
351 ;; 350 ;;
352 hppro) 351 hppro)
353 basic_machine=hppa1.1-hp 352 basic_machine=hppa1.1-hp
354 os=proelf 353 basic_os=proelf
355 ;; 354 ;;
356 i386mach) 355 i386mach)
357 basic_machine=i386-mach 356 basic_machine=i386-mach
358 os=mach 357 basic_os=mach
359 ;; 358 ;;
360 isi68 | isi) 359 isi68 | isi)
361 basic_machine=m68k-isi 360 basic_machine=m68k-isi
362 os=sysv 361 basic_os=sysv
363 ;; 362 ;;
364 m68knommu) 363 m68knommu)
365 basic_machine=m68k-unknown 364 basic_machine=m68k-unknown
366 os=linux 365 basic_os=linux
367 ;; 366 ;;
368 magnum | m3230) 367 magnum | m3230)
369 basic_machine=mips-mips 368 basic_machine=mips-mips
370 os=sysv 369 basic_os=sysv
371 ;; 370 ;;
372 merlin) 371 merlin)
373 basic_machine=ns32k-utek 372 basic_machine=ns32k-utek
374 os=sysv 373 basic_os=sysv
375 ;; 374 ;;
376 mingw64) 375 mingw64)
377 basic_machine=x86_64-pc 376 basic_machine=x86_64-pc
378 os=mingw64 377 basic_os=mingw64
379 ;; 378 ;;
380 mingw32) 379 mingw32)
381 basic_machine=i686-pc 380 basic_machine=i686-pc
382 os=mingw32 381 basic_os=mingw32
383 ;; 382 ;;
384 mingw32ce) 383 mingw32ce)
385 basic_machine=arm-unknown 384 basic_machine=arm-unknown
386 os=mingw32ce 385 basic_os=mingw32ce
387 ;; 386 ;;
388 monitor) 387 monitor)
389 basic_machine=m68k-rom68k 388 basic_machine=m68k-rom68k
390 os=coff 389 basic_os=coff
391 ;; 390 ;;
392 morphos) 391 morphos)
393 basic_machine=powerpc-unknown 392 basic_machine=powerpc-unknown
394 os=morphos 393 basic_os=morphos
395 ;; 394 ;;
396 moxiebox) 395 moxiebox)
397 basic_machine=moxie-unknown 396 basic_machine=moxie-unknown
398 os=moxiebox 397 basic_os=moxiebox
399 ;; 398 ;;
400 msdos) 399 msdos)
401 basic_machine=i386-pc 400 basic_machine=i386-pc
402 os=msdos 401 basic_os=msdos
403 ;; 402 ;;
404 msys) 403 msys)
405 basic_machine=i686-pc 404 basic_machine=i686-pc
406 os=msys 405 basic_os=msys
407 ;; 406 ;;
408 mvs) 407 mvs)
409 basic_machine=i370-ibm 408 basic_machine=i370-ibm
410 os=mvs 409 basic_os=mvs
411 ;; 410 ;;
412 nacl) 411 nacl)
413 basic_machine=le32-unknown 412 basic_machine=le32-unknown
414 os=nacl 413 basic_os=nacl
415 ;; 414 ;;
416 ncr3000) 415 ncr3000)
417 basic_machine=i486-ncr 416 basic_machine=i486-ncr
418 os=sysv4 417 basic_os=sysv4
419 ;; 418 ;;
420 netbsd386) 419 netbsd386)
421 basic_machine=i386-pc 420 basic_machine=i386-pc
422 os=netbsd 421 basic_os=netbsd
423 ;; 422 ;;
424 netwinder) 423 netwinder)
425 basic_machine=armv4l-rebel 424 basic_machine=armv4l-rebel
426 os=linux 425 basic_os=linux
427 ;; 426 ;;
428 news | news700 | news800 | news900) 427 news | news700 | news800 | news900)
429 basic_machine=m68k-sony 428 basic_machine=m68k-sony
430 os=newsos 429 basic_os=newsos
431 ;; 430 ;;
432 news1000) 431 news1000)
433 basic_machine=m68030-sony 432 basic_machine=m68030-sony
434 os=newsos 433 basic_os=newsos
435 ;; 434 ;;
436 necv70) 435 necv70)
437 basic_machine=v70-nec 436 basic_machine=v70-nec
438 os=sysv 437 basic_os=sysv
439 ;; 438 ;;
440 nh3000) 439 nh3000)
441 basic_machine=m68k-harris 440 basic_machine=m68k-harris
442 os=cxux 441 basic_os=cxux
443 ;; 442 ;;
444 nh[45]000) 443 nh[45]000)
445 basic_machine=m88k-harris 444 basic_machine=m88k-harris
446 os=cxux 445 basic_os=cxux
447 ;; 446 ;;
448 nindy960) 447 nindy960)
449 basic_machine=i960-intel 448 basic_machine=i960-intel
450 os=nindy 449 basic_os=nindy
451 ;; 450 ;;
452 mon960) 451 mon960)
453 basic_machine=i960-intel 452 basic_machine=i960-intel
454 os=mon960 453 basic_os=mon960
455 ;; 454 ;;
456 nonstopux) 455 nonstopux)
457 basic_machine=mips-compaq 456 basic_machine=mips-compaq
458 os=nonstopux 457 basic_os=nonstopux
459 ;; 458 ;;
460 os400) 459 os400)
461 basic_machine=powerpc-ibm 460 basic_machine=powerpc-ibm
462 os=os400 461 basic_os=os400
463 ;; 462 ;;
464 OSE68000 | ose68000) 463 OSE68000 | ose68000)
465 basic_machine=m68000-ericsson 464 basic_machine=m68000-ericsson
466 os=ose 465 basic_os=ose
467 ;; 466 ;;
468 os68k) 467 os68k)
469 basic_machine=m68k-none 468 basic_machine=m68k-none
470 os=os68k 469 basic_os=os68k
471 ;; 470 ;;
472 paragon) 471 paragon)
473 basic_machine=i860-intel 472 basic_machine=i860-intel
474 os=osf 473 basic_os=osf
475 ;; 474 ;;
476 parisc) 475 parisc)
477 basic_machine=hppa-unknown 476 basic_machine=hppa-unknown
478 os=linux 477 basic_os=linux
478 ;;
479 psp)
480 basic_machine=mipsallegrexel-sony
481 basic_os=psp
479 ;; 482 ;;
480 pw32) 483 pw32)
481 basic_machine=i586-unknown 484 basic_machine=i586-unknown
482 os=pw32 485 basic_os=pw32
483 ;; 486 ;;
484 rdos | rdos64) 487 rdos | rdos64)
485 basic_machine=x86_64-pc 488 basic_machine=x86_64-pc
486 os=rdos 489 basic_os=rdos
487 ;; 490 ;;
488 rdos32) 491 rdos32)
489 basic_machine=i386-pc 492 basic_machine=i386-pc
490 os=rdos 493 basic_os=rdos
491 ;; 494 ;;
492 rom68k) 495 rom68k)
493 basic_machine=m68k-rom68k 496 basic_machine=m68k-rom68k
494 os=coff 497 basic_os=coff
495 ;; 498 ;;
496 sa29200) 499 sa29200)
497 basic_machine=a29k-amd 500 basic_machine=a29k-amd
498 os=udi 501 basic_os=udi
499 ;; 502 ;;
500 sei) 503 sei)
501 basic_machine=mips-sei 504 basic_machine=mips-sei
502 os=seiux 505 basic_os=seiux
503 ;; 506 ;;
504 sequent) 507 sequent)
505 basic_machine=i386-sequent 508 basic_machine=i386-sequent
506 os= 509 basic_os=
507 ;; 510 ;;
508 sps7) 511 sps7)
509 basic_machine=m68k-bull 512 basic_machine=m68k-bull
510 os=sysv2 513 basic_os=sysv2
511 ;; 514 ;;
512 st2000) 515 st2000)
513 basic_machine=m68k-tandem 516 basic_machine=m68k-tandem
514 os= 517 basic_os=
515 ;; 518 ;;
516 stratus) 519 stratus)
517 basic_machine=i860-stratus 520 basic_machine=i860-stratus
518 os=sysv4 521 basic_os=sysv4
519 ;; 522 ;;
520 sun2) 523 sun2)
521 basic_machine=m68000-sun 524 basic_machine=m68000-sun
522 os= 525 basic_os=
523 ;; 526 ;;
524 sun2os3) 527 sun2os3)
525 basic_machine=m68000-sun 528 basic_machine=m68000-sun
526 os=sunos3 529 basic_os=sunos3
527 ;; 530 ;;
528 sun2os4) 531 sun2os4)
529 basic_machine=m68000-sun 532 basic_machine=m68000-sun
530 os=sunos4 533 basic_os=sunos4
531 ;; 534 ;;
532 sun3) 535 sun3)
533 basic_machine=m68k-sun 536 basic_machine=m68k-sun
534 os= 537 basic_os=
535 ;; 538 ;;
536 sun3os3) 539 sun3os3)
537 basic_machine=m68k-sun 540 basic_machine=m68k-sun
538 os=sunos3 541 basic_os=sunos3
539 ;; 542 ;;
540 sun3os4) 543 sun3os4)
541 basic_machine=m68k-sun 544 basic_machine=m68k-sun
542 os=sunos4 545 basic_os=sunos4
543 ;; 546 ;;
544 sun4) 547 sun4)
545 basic_machine=sparc-sun 548 basic_machine=sparc-sun
546 os= 549 basic_os=
547 ;; 550 ;;
548 sun4os3) 551 sun4os3)
549 basic_machine=sparc-sun 552 basic_machine=sparc-sun
550 os=sunos3 553 basic_os=sunos3
551 ;; 554 ;;
552 sun4os4) 555 sun4os4)
553 basic_machine=sparc-sun 556 basic_machine=sparc-sun
554 os=sunos4 557 basic_os=sunos4
555 ;; 558 ;;
556 sun4sol2) 559 sun4sol2)
557 basic_machine=sparc-sun 560 basic_machine=sparc-sun
558 os=solaris2 561 basic_os=solaris2
559 ;; 562 ;;
560 sun386 | sun386i | roadrunner) 563 sun386 | sun386i | roadrunner)
561 basic_machine=i386-sun 564 basic_machine=i386-sun
562 os= 565 basic_os=
563 ;; 566 ;;
564 sv1) 567 sv1)
565 basic_machine=sv1-cray 568 basic_machine=sv1-cray
566 os=unicos 569 basic_os=unicos
567 ;; 570 ;;
568 symmetry) 571 symmetry)
569 basic_machine=i386-sequent 572 basic_machine=i386-sequent
570 os=dynix 573 basic_os=dynix
571 ;; 574 ;;
572 t3e) 575 t3e)
573 basic_machine=alphaev5-cray 576 basic_machine=alphaev5-cray
574 os=unicos 577 basic_os=unicos
575 ;; 578 ;;
576 t90) 579 t90)
577 basic_machine=t90-cray 580 basic_machine=t90-cray
578 os=unicos 581 basic_os=unicos
579 ;; 582 ;;
580 toad1) 583 toad1)
581 basic_machine=pdp10-xkl 584 basic_machine=pdp10-xkl
582 os=tops20 585 basic_os=tops20
583 ;; 586 ;;
584 tpf) 587 tpf)
585 basic_machine=s390x-ibm 588 basic_machine=s390x-ibm
586 os=tpf 589 basic_os=tpf
587 ;; 590 ;;
588 udi29k) 591 udi29k)
589 basic_machine=a29k-amd 592 basic_machine=a29k-amd
590 os=udi 593 basic_os=udi
591 ;; 594 ;;
592 ultra3) 595 ultra3)
593 basic_machine=a29k-nyu 596 basic_machine=a29k-nyu
594 os=sym1 597 basic_os=sym1
595 ;; 598 ;;
596 v810 | necv810) 599 v810 | necv810)
597 basic_machine=v810-nec 600 basic_machine=v810-nec
598 os=none 601 basic_os=none
599 ;; 602 ;;
600 vaxv) 603 vaxv)
601 basic_machine=vax-dec 604 basic_machine=vax-dec
602 os=sysv 605 basic_os=sysv
603 ;; 606 ;;
604 vms) 607 vms)
605 basic_machine=vax-dec 608 basic_machine=vax-dec
606 os=vms 609 basic_os=vms
607 ;; 610 ;;
608 vsta) 611 vsta)
609 basic_machine=i386-pc 612 basic_machine=i386-pc
610 os=vsta 613 basic_os=vsta
611 ;; 614 ;;
612 vxworks960) 615 vxworks960)
613 basic_machine=i960-wrs 616 basic_machine=i960-wrs
614 os=vxworks 617 basic_os=vxworks
615 ;; 618 ;;
616 vxworks68) 619 vxworks68)
617 basic_machine=m68k-wrs 620 basic_machine=m68k-wrs
618 os=vxworks 621 basic_os=vxworks
619 ;; 622 ;;
620 vxworks29k) 623 vxworks29k)
621 basic_machine=a29k-wrs 624 basic_machine=a29k-wrs
622 os=vxworks 625 basic_os=vxworks
623 ;; 626 ;;
624 xbox) 627 xbox)
625 basic_machine=i686-pc 628 basic_machine=i686-pc
626 os=mingw32 629 basic_os=mingw32
627 ;; 630 ;;
628 ymp) 631 ymp)
629 basic_machine=ymp-cray 632 basic_machine=ymp-cray
630 os=unicos 633 basic_os=unicos
631 ;; 634 ;;
632 *) 635 *)
633 basic_machine=$1 636 basic_machine=$1
634 os= 637 basic_os=
635 ;; 638 ;;
636 esac 639 esac
637 ;; 640 ;;
@@ -683,17 +686,17 @@ case $basic_machine in
683 bluegene*) 686 bluegene*)
684 cpu=powerpc 687 cpu=powerpc
685 vendor=ibm 688 vendor=ibm
686 os=cnk 689 basic_os=cnk
687 ;; 690 ;;
688 decsystem10* | dec10*) 691 decsystem10* | dec10*)
689 cpu=pdp10 692 cpu=pdp10
690 vendor=dec 693 vendor=dec
691 os=tops10 694 basic_os=tops10
692 ;; 695 ;;
693 decsystem20* | dec20*) 696 decsystem20* | dec20*)
694 cpu=pdp10 697 cpu=pdp10
695 vendor=dec 698 vendor=dec
696 os=tops20 699 basic_os=tops20
697 ;; 700 ;;
698 delta | 3300 | motorola-3300 | motorola-delta \ 701 delta | 3300 | motorola-3300 | motorola-delta \
699 | 3300-motorola | delta-motorola) 702 | 3300-motorola | delta-motorola)
@@ -703,7 +706,7 @@ case $basic_machine in
703 dpx2*) 706 dpx2*)
704 cpu=m68k 707 cpu=m68k
705 vendor=bull 708 vendor=bull
706 os=sysv3 709 basic_os=sysv3
707 ;; 710 ;;
708 encore | umax | mmax) 711 encore | umax | mmax)
709 cpu=ns32k 712 cpu=ns32k
@@ -712,7 +715,7 @@ case $basic_machine in
712 elxsi) 715 elxsi)
713 cpu=elxsi 716 cpu=elxsi
714 vendor=elxsi 717 vendor=elxsi
715 os=${os:-bsd} 718 basic_os=${basic_os:-bsd}
716 ;; 719 ;;
717 fx2800) 720 fx2800)
718 cpu=i860 721 cpu=i860
@@ -725,7 +728,7 @@ case $basic_machine in
725 h3050r* | hiux*) 728 h3050r* | hiux*)
726 cpu=hppa1.1 729 cpu=hppa1.1
727 vendor=hitachi 730 vendor=hitachi
728 os=hiuxwe2 731 basic_os=hiuxwe2
729 ;; 732 ;;
730 hp3k9[0-9][0-9] | hp9[0-9][0-9]) 733 hp3k9[0-9][0-9] | hp9[0-9][0-9])
731 cpu=hppa1.0 734 cpu=hppa1.0
@@ -766,38 +769,38 @@ case $basic_machine in
766 vendor=hp 769 vendor=hp
767 ;; 770 ;;
768 i*86v32) 771 i*86v32)
769 cpu=`echo "$1" | sed -e 's/86.*/86/'` 772 cpu=$(echo "$1" | sed -e 's/86.*/86/')
770 vendor=pc 773 vendor=pc
771 os=sysv32 774 basic_os=sysv32
772 ;; 775 ;;
773 i*86v4*) 776 i*86v4*)
774 cpu=`echo "$1" | sed -e 's/86.*/86/'` 777 cpu=$(echo "$1" | sed -e 's/86.*/86/')
775 vendor=pc 778 vendor=pc
776 os=sysv4 779 basic_os=sysv4
777 ;; 780 ;;
778 i*86v) 781 i*86v)
779 cpu=`echo "$1" | sed -e 's/86.*/86/'` 782 cpu=$(echo "$1" | sed -e 's/86.*/86/')
780 vendor=pc 783 vendor=pc
781 os=sysv 784 basic_os=sysv
782 ;; 785 ;;
783 i*86sol2) 786 i*86sol2)
784 cpu=`echo "$1" | sed -e 's/86.*/86/'` 787 cpu=$(echo "$1" | sed -e 's/86.*/86/')
785 vendor=pc 788 vendor=pc
786 os=solaris2 789 basic_os=solaris2
787 ;; 790 ;;
788 j90 | j90-cray) 791 j90 | j90-cray)
789 cpu=j90 792 cpu=j90
790 vendor=cray 793 vendor=cray
791 os=${os:-unicos} 794 basic_os=${basic_os:-unicos}
792 ;; 795 ;;
793 iris | iris4d) 796 iris | iris4d)
794 cpu=mips 797 cpu=mips
795 vendor=sgi 798 vendor=sgi
796 case $os in 799 case $basic_os in
797 irix*) 800 irix*)
798 ;; 801 ;;
799 *) 802 *)
800 os=irix4 803 basic_os=irix4
801 ;; 804 ;;
802 esac 805 esac
803 ;; 806 ;;
@@ -808,26 +811,26 @@ case $basic_machine in
808 *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) 811 *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
809 cpu=m68k 812 cpu=m68k
810 vendor=atari 813 vendor=atari
811 os=mint 814 basic_os=mint
812 ;; 815 ;;
813 news-3600 | risc-news) 816 news-3600 | risc-news)
814 cpu=mips 817 cpu=mips
815 vendor=sony 818 vendor=sony
816 os=newsos 819 basic_os=newsos
817 ;; 820 ;;
818 next | m*-next) 821 next | m*-next)
819 cpu=m68k 822 cpu=m68k
820 vendor=next 823 vendor=next
821 case $os in 824 case $basic_os in
822 openstep*) 825 openstep*)
823 ;; 826 ;;
824 nextstep*) 827 nextstep*)
825 ;; 828 ;;
826 ns2*) 829 ns2*)
827 os=nextstep2 830 basic_os=nextstep2
828 ;; 831 ;;
829 *) 832 *)
830 os=nextstep3 833 basic_os=nextstep3
831 ;; 834 ;;
832 esac 835 esac
833 ;; 836 ;;
@@ -838,12 +841,12 @@ case $basic_machine in
838 op50n-* | op60c-*) 841 op50n-* | op60c-*)
839 cpu=hppa1.1 842 cpu=hppa1.1
840 vendor=oki 843 vendor=oki
841 os=proelf 844 basic_os=proelf
842 ;; 845 ;;
843 pa-hitachi) 846 pa-hitachi)
844 cpu=hppa1.1 847 cpu=hppa1.1
845 vendor=hitachi 848 vendor=hitachi
846 os=hiuxwe2 849 basic_os=hiuxwe2
847 ;; 850 ;;
848 pbd) 851 pbd)
849 cpu=sparc 852 cpu=sparc
@@ -880,12 +883,12 @@ case $basic_machine in
880 sde) 883 sde)
881 cpu=mipsisa32 884 cpu=mipsisa32
882 vendor=sde 885 vendor=sde
883 os=${os:-elf} 886 basic_os=${basic_os:-elf}
884 ;; 887 ;;
885 simso-wrs) 888 simso-wrs)
886 cpu=sparclite 889 cpu=sparclite
887 vendor=wrs 890 vendor=wrs
888 os=vxworks 891 basic_os=vxworks
889 ;; 892 ;;
890 tower | tower-32) 893 tower | tower-32)
891 cpu=m68k 894 cpu=m68k
@@ -902,7 +905,7 @@ case $basic_machine in
902 w89k-*) 905 w89k-*)
903 cpu=hppa1.1 906 cpu=hppa1.1
904 vendor=winbond 907 vendor=winbond
905 os=proelf 908 basic_os=proelf
906 ;; 909 ;;
907 none) 910 none)
908 cpu=none 911 cpu=none
@@ -914,7 +917,7 @@ case $basic_machine in
914 ;; 917 ;;
915 leon-*|leon[3-9]-*) 918 leon-*|leon[3-9]-*)
916 cpu=sparc 919 cpu=sparc
917 vendor=`echo "$basic_machine" | sed 's/-.*//'` 920 vendor=$(echo "$basic_machine" | sed 's/-.*//')
918 ;; 921 ;;
919 922
920 *-*) 923 *-*)
@@ -955,11 +958,11 @@ case $cpu-$vendor in
955 # some cases the only manufacturer, in others, it is the most popular. 958 # some cases the only manufacturer, in others, it is the most popular.
956 craynv-unknown) 959 craynv-unknown)
957 vendor=cray 960 vendor=cray
958 os=${os:-unicosmp} 961 basic_os=${basic_os:-unicosmp}
959 ;; 962 ;;
960 c90-unknown | c90-cray) 963 c90-unknown | c90-cray)
961 vendor=cray 964 vendor=cray
962 os=${os:-unicos} 965 basic_os=${Basic_os:-unicos}
963 ;; 966 ;;
964 fx80-unknown) 967 fx80-unknown)
965 vendor=alliant 968 vendor=alliant
@@ -1003,7 +1006,7 @@ case $cpu-$vendor in
1003 dpx20-unknown | dpx20-bull) 1006 dpx20-unknown | dpx20-bull)
1004 cpu=rs6000 1007 cpu=rs6000
1005 vendor=bull 1008 vendor=bull
1006 os=${os:-bosx} 1009 basic_os=${basic_os:-bosx}
1007 ;; 1010 ;;
1008 1011
1009 # Here we normalize CPU types irrespective of the vendor 1012 # Here we normalize CPU types irrespective of the vendor
@@ -1012,7 +1015,7 @@ case $cpu-$vendor in
1012 ;; 1015 ;;
1013 blackfin-*) 1016 blackfin-*)
1014 cpu=bfin 1017 cpu=bfin
1015 os=linux 1018 basic_os=linux
1016 ;; 1019 ;;
1017 c54x-*) 1020 c54x-*)
1018 cpu=tic54x 1021 cpu=tic54x
@@ -1025,7 +1028,7 @@ case $cpu-$vendor in
1025 ;; 1028 ;;
1026 e500v[12]-*) 1029 e500v[12]-*)
1027 cpu=powerpc 1030 cpu=powerpc
1028 os=$os"spe" 1031 basic_os=${basic_os}"spe"
1029 ;; 1032 ;;
1030 mips3*-*) 1033 mips3*-*)
1031 cpu=mips64 1034 cpu=mips64
@@ -1035,7 +1038,7 @@ case $cpu-$vendor in
1035 ;; 1038 ;;
1036 m68knommu-*) 1039 m68knommu-*)
1037 cpu=m68k 1040 cpu=m68k
1038 os=linux 1041 basic_os=linux
1039 ;; 1042 ;;
1040 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) 1043 m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
1041 cpu=s12z 1044 cpu=s12z
@@ -1045,7 +1048,7 @@ case $cpu-$vendor in
1045 ;; 1048 ;;
1046 parisc-*) 1049 parisc-*)
1047 cpu=hppa 1050 cpu=hppa
1048 os=linux 1051 basic_os=linux
1049 ;; 1052 ;;
1050 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 1053 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1051 cpu=i586 1054 cpu=i586
@@ -1081,7 +1084,7 @@ case $cpu-$vendor in
1081 cpu=mipsisa64sb1el 1084 cpu=mipsisa64sb1el
1082 ;; 1085 ;;
1083 sh5e[lb]-*) 1086 sh5e[lb]-*)
1084 cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` 1087 cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/')
1085 ;; 1088 ;;
1086 spur-*) 1089 spur-*)
1087 cpu=spur 1090 cpu=spur
@@ -1099,13 +1102,16 @@ case $cpu-$vendor in
1099 cpu=x86_64 1102 cpu=x86_64
1100 ;; 1103 ;;
1101 xscale-* | xscalee[bl]-*) 1104 xscale-* | xscalee[bl]-*)
1102 cpu=`echo "$cpu" | sed 's/^xscale/arm/'` 1105 cpu=$(echo "$cpu" | sed 's/^xscale/arm/')
1106 ;;
1107 arm64-*)
1108 cpu=aarch64
1103 ;; 1109 ;;
1104 1110
1105 # Recognize the canonical CPU Types that limit and/or modify the 1111 # Recognize the canonical CPU Types that limit and/or modify the
1106 # company names they are paired with. 1112 # company names they are paired with.
1107 cr16-*) 1113 cr16-*)
1108 os=${os:-elf} 1114 basic_os=${basic_os:-elf}
1109 ;; 1115 ;;
1110 crisv32-* | etraxfs*-*) 1116 crisv32-* | etraxfs*-*)
1111 cpu=crisv32 1117 cpu=crisv32
@@ -1116,7 +1122,7 @@ case $cpu-$vendor in
1116 vendor=axis 1122 vendor=axis
1117 ;; 1123 ;;
1118 crx-*) 1124 crx-*)
1119 os=${os:-elf} 1125 basic_os=${basic_os:-elf}
1120 ;; 1126 ;;
1121 neo-tandem) 1127 neo-tandem)
1122 cpu=neo 1128 cpu=neo
@@ -1138,16 +1144,12 @@ case $cpu-$vendor in
1138 cpu=nsx 1144 cpu=nsx
1139 vendor=tandem 1145 vendor=tandem
1140 ;; 1146 ;;
1141 s390-*) 1147 mipsallegrexel-sony)
1142 cpu=s390 1148 cpu=mipsallegrexel
1143 vendor=ibm 1149 vendor=sony
1144 ;;
1145 s390x-*)
1146 cpu=s390x
1147 vendor=ibm
1148 ;; 1150 ;;
1149 tile*-*) 1151 tile*-*)
1150 os=${os:-linux-gnu} 1152 basic_os=${basic_os:-linux-gnu}
1151 ;; 1153 ;;
1152 1154
1153 *) 1155 *)
@@ -1164,7 +1166,7 @@ case $cpu-$vendor in
1164 | am33_2.0 \ 1166 | am33_2.0 \
1165 | amdgcn \ 1167 | amdgcn \
1166 | arc | arceb \ 1168 | arc | arceb \
1167 | arm | arm[lb]e | arme[lb] | armv* \ 1169 | arm | arm[lb]e | arme[lb] | armv* \
1168 | avr | avr32 \ 1170 | avr | avr32 \
1169 | asmjs \ 1171 | asmjs \
1170 | ba \ 1172 | ba \
@@ -1229,6 +1231,7 @@ case $cpu-$vendor in
1229 | pyramid \ 1231 | pyramid \
1230 | riscv | riscv32 | riscv64 \ 1232 | riscv | riscv32 | riscv64 \
1231 | rl78 | romp | rs6000 | rx \ 1233 | rl78 | romp | rs6000 | rx \
1234 | s390 | s390x \
1232 | score \ 1235 | score \
1233 | sh | shl \ 1236 | sh | shl \
1234 | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ 1237 | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
@@ -1275,8 +1278,47 @@ esac
1275 1278
1276# Decode manufacturer-specific aliases for certain operating systems. 1279# Decode manufacturer-specific aliases for certain operating systems.
1277 1280
1278if [ x$os != x ] 1281if test x$basic_os != x
1279then 1282then
1283
1284# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
1285# set os.
1286case $basic_os in
1287 gnu/linux*)
1288 kernel=linux
1289 os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|')
1290 ;;
1291 os2-emx)
1292 kernel=os2
1293 os=$(echo $basic_os | sed -e 's|os2-emx|emx|')
1294 ;;
1295 nto-qnx*)
1296 kernel=nto
1297 os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|')
1298 ;;
1299 *-*)
1300 # shellcheck disable=SC2162
1301 IFS="-" read kernel os <<EOF
1302$basic_os
1303EOF
1304 ;;
1305 # Default OS when just kernel was specified
1306 nto*)
1307 kernel=nto
1308 os=$(echo $basic_os | sed -e 's|nto|qnx|')
1309 ;;
1310 linux*)
1311 kernel=linux
1312 os=$(echo $basic_os | sed -e 's|linux|gnu|')
1313 ;;
1314 *)
1315 kernel=
1316 os=$basic_os
1317 ;;
1318esac
1319
1320# Now, normalize the OS (knowing we just have one component, it's not a kernel,
1321# etc.)
1280case $os in 1322case $os in
1281 # First match some system type aliases that might get confused 1323 # First match some system type aliases that might get confused
1282 # with valid system types. 1324 # with valid system types.
@@ -1288,7 +1330,7 @@ case $os in
1288 os=cnk 1330 os=cnk
1289 ;; 1331 ;;
1290 solaris1 | solaris1.*) 1332 solaris1 | solaris1.*)
1291 os=`echo $os | sed -e 's|solaris1|sunos4|'` 1333 os=$(echo $os | sed -e 's|solaris1|sunos4|')
1292 ;; 1334 ;;
1293 solaris) 1335 solaris)
1294 os=solaris2 1336 os=solaris2
@@ -1296,9 +1338,6 @@ case $os in
1296 unixware*) 1338 unixware*)
1297 os=sysv4.2uw 1339 os=sysv4.2uw
1298 ;; 1340 ;;
1299 gnu/linux*)
1300 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1301 ;;
1302 # es1800 is here to avoid being matched by es* (a different OS) 1341 # es1800 is here to avoid being matched by es* (a different OS)
1303 es1800*) 1342 es1800*)
1304 os=ose 1343 os=ose
@@ -1320,12 +1359,9 @@ case $os in
1320 os=sco3.2v4 1359 os=sco3.2v4
1321 ;; 1360 ;;
1322 sco3.2.[4-9]*) 1361 sco3.2.[4-9]*)
1323 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 1362 os=$(echo $os | sed -e 's/sco3.2./sco3.2v/')
1324 ;; 1363 ;;
1325 sco3.2v[4-9]* | sco5v6*) 1364 sco*v* | scout)
1326 # Don't forget version if it is 3.2v4 or newer.
1327 ;;
1328 scout)
1329 # Don't match below 1365 # Don't match below
1330 ;; 1366 ;;
1331 sco*) 1367 sco*)
@@ -1334,79 +1370,26 @@ case $os in
1334 psos*) 1370 psos*)
1335 os=psos 1371 os=psos
1336 ;; 1372 ;;
1337 # Now accept the basic system types.
1338 # The portable systems comes first.
1339 # Each alternative MUST end in a * to match a version number.
1340 # sysv* is not here because it comes later, after sysvr4.
1341 gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1342 | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
1343 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1344 | sym* | kopensolaris* | plan9* \
1345 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1346 | aos* | aros* | cloudabi* | sortix* \
1347 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1348 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1349 | knetbsd* | mirbsd* | netbsd* \
1350 | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
1351 | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
1352 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1353 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1354 | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
1355 | chorusrdb* | cegcc* | glidix* \
1356 | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1357 | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
1358 | linux-newlib* | linux-musl* | linux-uclibc* \
1359 | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1360 | interix* | uwin* | mks* | rhapsody* | darwin* \
1361 | openstep* | oskit* | conix* | pw32* | nonstopux* \
1362 | storm-chaos* | tops10* | tenex* | tops20* | its* \
1363 | os2* | vos* | palmos* | uclinux* | nucleus* \
1364 | morphos* | superux* | rtmk* | windiss* \
1365 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1366 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1367 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1368 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1369 | nsk* | powerunix)
1370 # Remember, each alternative MUST END IN *, to match a version number.
1371 ;;
1372 qnx*) 1373 qnx*)
1373 case $cpu in 1374 os=qnx
1374 x86 | i*86)
1375 ;;
1376 *)
1377 os=nto-$os
1378 ;;
1379 esac
1380 ;; 1375 ;;
1381 hiux*) 1376 hiux*)
1382 os=hiuxwe2 1377 os=hiuxwe2
1383 ;; 1378 ;;
1384 nto-qnx*)
1385 ;;
1386 nto*)
1387 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1388 ;;
1389 sim | xray | os68k* | v88r* \
1390 | windows* | osx | abug | netware* | os9* \
1391 | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
1392 ;;
1393 linux-dietlibc)
1394 os=linux-dietlibc
1395 ;;
1396 linux*)
1397 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1398 ;;
1399 lynx*178) 1379 lynx*178)
1400 os=lynxos178 1380 os=lynxos178
1401 ;; 1381 ;;
1402 lynx*5) 1382 lynx*5)
1403 os=lynxos5 1383 os=lynxos5
1404 ;; 1384 ;;
1385 lynxos*)
1386 # don't get caught up in next wildcard
1387 ;;
1405 lynx*) 1388 lynx*)
1406 os=lynxos 1389 os=lynxos
1407 ;; 1390 ;;
1408 mac*) 1391 mac[0-9]*)
1409 os=`echo "$os" | sed -e 's|mac|macos|'` 1392 os=$(echo "$os" | sed -e 's|mac|macos|')
1410 ;; 1393 ;;
1411 opened*) 1394 opened*)
1412 os=openedition 1395 os=openedition
@@ -1415,10 +1398,10 @@ case $os in
1415 os=os400 1398 os=os400
1416 ;; 1399 ;;
1417 sunos5*) 1400 sunos5*)
1418 os=`echo "$os" | sed -e 's|sunos5|solaris2|'` 1401 os=$(echo "$os" | sed -e 's|sunos5|solaris2|')
1419 ;; 1402 ;;
1420 sunos6*) 1403 sunos6*)
1421 os=`echo "$os" | sed -e 's|sunos6|solaris3|'` 1404 os=$(echo "$os" | sed -e 's|sunos6|solaris3|')
1422 ;; 1405 ;;
1423 wince*) 1406 wince*)
1424 os=wince 1407 os=wince
@@ -1452,7 +1435,7 @@ case $os in
1452 ;; 1435 ;;
1453 # Preserve the version number of sinix5. 1436 # Preserve the version number of sinix5.
1454 sinix5.*) 1437 sinix5.*)
1455 os=`echo $os | sed -e 's|sinix|sysv|'` 1438 os=$(echo $os | sed -e 's|sinix|sysv|')
1456 ;; 1439 ;;
1457 sinix*) 1440 sinix*)
1458 os=sysv4 1441 os=sysv4
@@ -1475,18 +1458,12 @@ case $os in
1475 sysvr4) 1458 sysvr4)
1476 os=sysv4 1459 os=sysv4
1477 ;; 1460 ;;
1478 # This must come after sysvr4.
1479 sysv*)
1480 ;;
1481 ose*) 1461 ose*)
1482 os=ose 1462 os=ose
1483 ;; 1463 ;;
1484 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) 1464 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
1485 os=mint 1465 os=mint
1486 ;; 1466 ;;
1487 zvmoe)
1488 os=zvmoe
1489 ;;
1490 dicos*) 1467 dicos*)
1491 os=dicos 1468 os=dicos
1492 ;; 1469 ;;
@@ -1503,19 +1480,11 @@ case $os in
1503 ;; 1480 ;;
1504 esac 1481 esac
1505 ;; 1482 ;;
1506 nacl*)
1507 ;;
1508 ios)
1509 ;;
1510 none)
1511 ;;
1512 *-eabi)
1513 ;;
1514 *) 1483 *)
1515 echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 1484 # No normalization, but not necessarily accepted, that comes below.
1516 exit 1
1517 ;; 1485 ;;
1518esac 1486esac
1487
1519else 1488else
1520 1489
1521# Here we handle the default operating systems that come with various machines. 1490# Here we handle the default operating systems that come with various machines.
@@ -1528,6 +1497,7 @@ else
1528# will signal an error saying that MANUFACTURER isn't an operating 1497# will signal an error saying that MANUFACTURER isn't an operating
1529# system, and we'll never get to this point. 1498# system, and we'll never get to this point.
1530 1499
1500kernel=
1531case $cpu-$vendor in 1501case $cpu-$vendor in
1532 score-*) 1502 score-*)
1533 os=elf 1503 os=elf
@@ -1539,7 +1509,8 @@ case $cpu-$vendor in
1539 os=riscix1.2 1509 os=riscix1.2
1540 ;; 1510 ;;
1541 arm*-rebel) 1511 arm*-rebel)
1542 os=linux 1512 kernel=linux
1513 os=gnu
1543 ;; 1514 ;;
1544 arm*-semi) 1515 arm*-semi)
1545 os=aout 1516 os=aout
@@ -1705,84 +1676,173 @@ case $cpu-$vendor in
1705 os=none 1676 os=none
1706 ;; 1677 ;;
1707esac 1678esac
1679
1708fi 1680fi
1709 1681
1682# Now, validate our (potentially fixed-up) OS.
1683case $os in
1684 # Sometimes we do "kernel-abi", so those need to count as OSes.
1685 musl* | newlib* | uclibc*)
1686 ;;
1687 # Likewise for "kernel-libc"
1688 eabi | eabihf | gnueabi | gnueabihf)
1689 ;;
1690 # Now accept the basic system types.
1691 # The portable systems comes first.
1692 # Each alternative MUST end in a * to match a version number.
1693 gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
1694 | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
1695 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
1696 | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
1697 | hiux* | abug | nacl* | netware* | windows* \
1698 | os9* | macos* | osx* | ios* \
1699 | mpw* | magic* | mmixware* | mon960* | lnews* \
1700 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1701 | aos* | aros* | cloudabi* | sortix* | twizzler* \
1702 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
1703 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
1704 | mirbsd* | netbsd* | dicos* | openedition* | ose* \
1705 | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
1706 | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
1707 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
1708 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
1709 | udi* | lites* | ieee* | go32* | aux* | hcos* \
1710 | chorusrdb* | cegcc* | glidix* \
1711 | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
1712 | midipix* | mingw32* | mingw64* | mint* \
1713 | uxpv* | beos* | mpeix* | udk* | moxiebox* \
1714 | interix* | uwin* | mks* | rhapsody* | darwin* \
1715 | openstep* | oskit* | conix* | pw32* | nonstopux* \
1716 | storm-chaos* | tops10* | tenex* | tops20* | its* \
1717 | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
1718 | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
1719 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
1720 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
1721 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1722 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1723 | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
1724 ;;
1725 # This one is extra strict with allowed versions
1726 sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
1727 # Don't forget version if it is 3.2v4 or newer.
1728 ;;
1729 none)
1730 ;;
1731 *)
1732 echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
1733 exit 1
1734 ;;
1735esac
1736
1737# As a final step for OS-related things, validate the OS-kernel combination
1738# (given a valid OS), if there is a kernel.
1739case $kernel-$os in
1740 linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
1741 ;;
1742 uclinux-uclibc* )
1743 ;;
1744 -dietlibc* | -newlib* | -musl* | -uclibc* )
1745 # These are just libc implementations, not actual OSes, and thus
1746 # require a kernel.
1747 echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
1748 exit 1
1749 ;;
1750 kfreebsd*-gnu* | kopensolaris*-gnu*)
1751 ;;
1752 nto-qnx*)
1753 ;;
1754 os2-emx)
1755 ;;
1756 *-eabi* | *-gnueabi*)
1757 ;;
1758 -*)
1759 # Blank kernel with real OS is always fine.
1760 ;;
1761 *-*)
1762 echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
1763 exit 1
1764 ;;
1765esac
1766
1710# Here we handle the case where we know the os, and the CPU type, but not the 1767# Here we handle the case where we know the os, and the CPU type, but not the
1711# manufacturer. We pick the logical manufacturer. 1768# manufacturer. We pick the logical manufacturer.
1712case $vendor in 1769case $vendor in
1713 unknown) 1770 unknown)
1714 case $os in 1771 case $cpu-$os in
1715 riscix*) 1772 *-riscix*)
1716 vendor=acorn 1773 vendor=acorn
1717 ;; 1774 ;;
1718 sunos*) 1775 *-sunos*)
1719 vendor=sun 1776 vendor=sun
1720 ;; 1777 ;;
1721 cnk*|-aix*) 1778 *-cnk* | *-aix*)
1722 vendor=ibm 1779 vendor=ibm
1723 ;; 1780 ;;
1724 beos*) 1781 *-beos*)
1725 vendor=be 1782 vendor=be
1726 ;; 1783 ;;
1727 hpux*) 1784 *-hpux*)
1728 vendor=hp 1785 vendor=hp
1729 ;; 1786 ;;
1730 mpeix*) 1787 *-mpeix*)
1731 vendor=hp 1788 vendor=hp
1732 ;; 1789 ;;
1733 hiux*) 1790 *-hiux*)
1734 vendor=hitachi 1791 vendor=hitachi
1735 ;; 1792 ;;
1736 unos*) 1793 *-unos*)
1737 vendor=crds 1794 vendor=crds
1738 ;; 1795 ;;
1739 dgux*) 1796 *-dgux*)
1740 vendor=dg 1797 vendor=dg
1741 ;; 1798 ;;
1742 luna*) 1799 *-luna*)
1743 vendor=omron 1800 vendor=omron
1744 ;; 1801 ;;
1745 genix*) 1802 *-genix*)
1746 vendor=ns 1803 vendor=ns
1747 ;; 1804 ;;
1748 clix*) 1805 *-clix*)
1749 vendor=intergraph 1806 vendor=intergraph
1750 ;; 1807 ;;
1751 mvs* | opened*) 1808 *-mvs* | *-opened*)
1809 vendor=ibm
1810 ;;
1811 *-os400*)
1752 vendor=ibm 1812 vendor=ibm
1753 ;; 1813 ;;
1754 os400*) 1814 s390-* | s390x-*)
1755 vendor=ibm 1815 vendor=ibm
1756 ;; 1816 ;;
1757 ptx*) 1817 *-ptx*)
1758 vendor=sequent 1818 vendor=sequent
1759 ;; 1819 ;;
1760 tpf*) 1820 *-tpf*)
1761 vendor=ibm 1821 vendor=ibm
1762 ;; 1822 ;;
1763 vxsim* | vxworks* | windiss*) 1823 *-vxsim* | *-vxworks* | *-windiss*)
1764 vendor=wrs 1824 vendor=wrs
1765 ;; 1825 ;;
1766 aux*) 1826 *-aux*)
1767 vendor=apple 1827 vendor=apple
1768 ;; 1828 ;;
1769 hms*) 1829 *-hms*)
1770 vendor=hitachi 1830 vendor=hitachi
1771 ;; 1831 ;;
1772 mpw* | macos*) 1832 *-mpw* | *-macos*)
1773 vendor=apple 1833 vendor=apple
1774 ;; 1834 ;;
1775 *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) 1835 *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
1776 vendor=atari 1836 vendor=atari
1777 ;; 1837 ;;
1778 vos*) 1838 *-vos*)
1779 vendor=stratus 1839 vendor=stratus
1780 ;; 1840 ;;
1781 esac 1841 esac
1782 ;; 1842 ;;
1783esac 1843esac
1784 1844
1785echo "$cpu-$vendor-$os" 1845echo "$cpu-$vendor-${kernel:+$kernel-}$os"
1786exit 1846exit
1787 1847
1788# Local variables: 1848# Local variables: