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