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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-binutils/] [binutils-2.19.1/] [config.sub] - Blame information for rev 6

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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