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