OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-newlib/] [newlib-1.17.0/] [config.sub] - Blame information for rev 14

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.