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

Subversion Repositories or1k

[/] [or1k/] [branches/] [newlib/] [newlib/] [config.sub] - Blame information for rev 39

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

Line No. Rev Author Line
1 39 lampret
#! /bin/sh
2
# Configuration validation subroutine script, version 1.1.
3
#   Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
4
# This file is (in principle) common to ALL GNU software.
5
# The presence of a machine in this file suggests that SOME GNU software
6
# can handle that machine.  It does not imply ALL GNU software can.
7
#
8
# This file is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 2 of the License, or
11
# (at your option) any later version.
12
#
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 59 Temple Place - Suite 330,
21
# Boston, MA 02111-1307, USA.
22
 
23
# As a special exception to the GNU General Public License, if you
24
# distribute this file as part of a program that contains a
25
# configuration script generated by Autoconf, you may include it under
26
# the same distribution terms that you use for the rest of that program.
27
 
28
# Configuration subroutine to validate and canonicalize a configuration type.
29
# Supply the specified configuration type as an argument.
30
# If it is invalid, we print an error message on stderr and exit with code 1.
31
# Otherwise, we print the canonical config type on stdout and succeed.
32
 
33
# This file is supposed to be the same for all GNU packages
34
# and recognize all the CPU types, system types and aliases
35
# that are meaningful with *any* GNU software.
36
# Each package is responsible for reporting which valid configurations
37
# it does not support.  The user should be able to distinguish
38
# a failure to support a valid configuration from a meaningless
39
# configuration.
40
 
41
# The goal of this file is to map all the various variations of a given
42
# machine specification into a single specification in the form:
43
#       CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
44
# or in some cases, the newer four-part form:
45
#       CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
46
# It is wrong to echo any other type of specification.
47
 
48
if [ x$1 = x ]
49
then
50
        echo Configuration name missing. 1>&2
51
        echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
52
        echo "or     $0 ALIAS" 1>&2
53
        echo where ALIAS is a recognized configuration type. 1>&2
54
        exit 1
55
fi
56
 
57
# First pass through any local machine types.
58
case $1 in
59
        *local*)
60
                echo $1
61
                exit 0
62
                ;;
63
        *)
64
        ;;
65
esac
66
 
67
# CYGNUS LOCAL marketing-names
68
# Here we handle any "marketing" names - translating them to
69
#  standard triplets
70
case $1 in
71
        mips-tx39-elf)
72
                set mipstx39-unknown-elf
73
                ;;
74
        *)
75
                ;;
76
esac
77
# END CYGNUS LOCAL marketing-names
78
 
79
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
80
# Here we must recognize all the valid KERNEL-OS combinations.
81
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
82
case $maybe_os in
83
  linux-gnu*)
84
    os=-$maybe_os
85
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
86
    ;;
87
  *)
88
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
89
    if [ $basic_machine != $1 ]
90
    then os=`echo $1 | sed 's/.*-/-/'`
91
    else os=; fi
92
    ;;
93
esac
94
 
95
### Let's recognize common machines as not being operating systems so
96
### that things like config.sub decstation-3100 work.  We also
97
### recognize some manufacturers as not being operating systems, so we
98
### can provide default operating systems below.
99
case $os in
100
        -sun*os*)
101
                # Prevent following clause from handling this invalid input.
102
                ;;
103
        -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
104
        -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
105
        -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
106
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
107
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
108
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
109
        -apple)
110
                os=
111
                basic_machine=$1
112
                ;;
113
        -sim | -cisco | -oki | -wec | -winbond )        # CYGNUS LOCAL
114
                os=
115
                basic_machine=$1
116
                ;;
117
        -scout)                                         # CYGNUS LOCAL
118
                ;;
119
        -wrs)                                           # CYGNUS LOCAL
120
                os=vxworks
121
                basic_machine=$1
122
                ;;
123
        -hiux*)
124
                os=-hiuxwe2
125
                ;;
126
        -sco5)
127
                os=-sco3.2v5
128
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
129
                ;;
130
        -sco4)
131
                os=-sco3.2v4
132
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
133
                ;;
134
        -sco3.2.[4-9]*)
135
                os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
136
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
137
                ;;
138
        -sco3.2v[4-9]*)
139
                # Don't forget version if it is 3.2v4 or newer.
140
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
141
                ;;
142
        -sco*)
143
                os=-sco3.2v2
144
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
145
                ;;
146
        -isc)
147
                os=-isc2.2
148
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
149
                ;;
150
        -clix*)
151
                basic_machine=clipper-intergraph
152
                ;;
153
        -isc*)
154
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
155
                ;;
156
        -lynx*)
157
                os=-lynxos
158
                ;;
159
        -ptx*)
160
                basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
161
                ;;
162
        -windowsnt*)
163
                os=`echo $os | sed -e 's/windowsnt/winnt/'`
164
                ;;
165
        -psos*)
166
                os=-psos
167
                ;;
168
esac
169
 
170
# Decode aliases for certain CPU-COMPANY combinations.
171
case $basic_machine in
172
        # Recognize the basic CPU types without company name.
173
        # Some are omitted here because they have special meanings below.
174
        tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
175
                | arme[lb] | pyramid | mn10200 | mn10300 \
176
                | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
177
                | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
178
                | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
179
                | 1750a | dsp16xx | pdp11 \
180
                | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
181
                | mipstx39 | mipstx39el | or32 \
182
                | sparc | sparclet | sparclite | sparc64 | sparc86x | v850)
183
                basic_machine=$basic_machine-unknown
184
                ;;
185
        m88110 | m680[01234]0 | m683?2 | m68360 | z8k | v70 | h8500 | w65) # CYGNUS LOCAL
186
                basic_machine=$basic_machine-unknown
187
                ;;
188
        thumb)
189
                basic_machine=$basic_machine-unknown
190
                ;;
191
        mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
192
                basic_machine=$basic_machine-unknown
193
                ;;
194
        mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
195
                basic_machine=$basic_machine-unknown
196
                ;;
197
        mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
198
                basic_machine=$basic_machine-unknown
199
                ;;
200
        mips16) # CYGNUS LOCAL krk/mips16
201
                basic_machine=$basic_machine-unknown
202
                ;;
203
        tic30) # CYGNUS LOCAL ian/tic30
204
                basic_machine=$basic_machine-unknown
205
                ;;
206
        c30) # CYGNUS LOCAL ian/tic30
207
                basic_machine=tic30-unknown
208
                ;;
209
        d10v)                           # CYGNUS LOCAL meissner/d10v
210
                basic_machine=$basic_machine-unknown
211
                ;;
212
        # We use `pc' rather than `unknown'
213
        # because (1) that's what they normally are, and
214
        # (2) the word "unknown" tends to confuse beginning users.
215
        i[3456]86)
216
          basic_machine=$basic_machine-pc
217
          ;;
218
        # Object if more than one company name word.
219
        *-*-*)
220
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
221
                exit 1
222
                ;;
223
        # Recognize the basic CPU types with company name.
224
        vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
225
              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
226
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
227
              | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
228
              | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
229
              | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
230
              | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
231
              | xps100-* | clipper-* | or32-* | orion-* \
232
              | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
233
              | sparc64-* | sparc86x-* | mips64-* | mipsel-* \
234
              | mips64el-* | mips64orion-* | mips64orionel-* \
235
              | mipstx39-* | mipstx39el-* \
236
              | f301-*)
237
                ;;
238
        m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # CYGNUS LOCAL
239
                ;;
240
        thumb-*) # CYGNUS LOCAL angela/thumb
241
                ;;
242
        v850-*) # CYGNUS LOCAL
243
                ;;
244
        mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
245
                ;;
246
        mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
247
                ;;
248
        mips16-*) # CYGNUS LOCAL krk/mips16
249
                ;;
250
        tic30-*) # CYGNUS LOCAL ian/tic30
251
                ;;
252
        c30-*) # CYGNUS LOCAL ian/tic30
253
                basic_machine=tic30-unknown
254
                ;;
255
        # Recognize the various machine names and aliases which stand
256
        # for a CPU type and a company and sometimes even an OS.
257
        386bsd)                                         # CYGNUS LOCAL
258
                basic_machine=i386-unknown
259
                os=-bsd
260
                ;;
261
        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
262
                basic_machine=m68000-att
263
                ;;
264
        3b*)
265
                basic_machine=we32k-att
266
                ;;
267
        a29khif)                                        # CYGNUS LOCAL
268
                basic_machine=a29k-amd
269
                os=-udi
270
                ;;
271
        adobe68k)                                       # CYGNUS LOCAL
272
                basic_machine=m68010-adobe
273
                os=-scout
274
                ;;
275
        alliant | fx80)
276
                basic_machine=fx80-alliant
277
                ;;
278
        altos | altos3068)
279
                basic_machine=m68k-altos
280
                ;;
281
        am29k)
282
                basic_machine=a29k-none
283
                os=-bsd
284
                ;;
285
        amdahl)
286
                basic_machine=580-amdahl
287
                os=-sysv
288
                ;;
289
        amiga | amiga-*)
290
                basic_machine=m68k-cbm
291
                ;;
292
        amigados)
293
                basic_machine=m68k-cbm
294
                os=-amigados
295
                ;;
296
        amigaunix | amix)
297
                basic_machine=m68k-cbm
298
                os=-sysv4
299
                ;;
300
        apollo68)
301
                basic_machine=m68k-apollo
302
                os=-sysv
303
                ;;
304
        apollo68bsd)                                    # CYGNUS LOCAL
305
                basic_machine=m68k-apollo
306
                os=-bsd
307
                ;;
308
        aux)
309
                basic_machine=m68k-apple
310
                os=-aux
311
                ;;
312
        balance)
313
                basic_machine=ns32k-sequent
314
                os=-dynix
315
                ;;
316
        convex-c1)
317
                basic_machine=c1-convex
318
                os=-bsd
319
                ;;
320
        convex-c2)
321
                basic_machine=c2-convex
322
                os=-bsd
323
                ;;
324
        convex-c32)
325
                basic_machine=c32-convex
326
                os=-bsd
327
                ;;
328
        convex-c34)
329
                basic_machine=c34-convex
330
                os=-bsd
331
                ;;
332
        convex-c38)
333
                basic_machine=c38-convex
334
                os=-bsd
335
                ;;
336
        cray | ymp)
337
                basic_machine=ymp-cray
338
                os=-unicos
339
                ;;
340
        cray2)
341
                basic_machine=cray2-cray
342
                os=-unicos
343
                ;;
344
        [ctj]90-cray)
345
                basic_machine=c90-cray
346
                os=-unicos
347
                ;;
348
        crds | unos)
349
                basic_machine=m68k-crds
350
                ;;
351
        da30 | da30-*)
352
                basic_machine=m68k-da30
353
                ;;
354
        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
355
                basic_machine=mips-dec
356
                ;;
357
        delta | 3300 | motorola-3300 | motorola-delta \
358
              | 3300-motorola | delta-motorola)
359
                basic_machine=m68k-motorola
360
                ;;
361
        delta88)
362
                basic_machine=m88k-motorola
363
                os=-sysv3
364
                ;;
365
        dpx20 | dpx20-*)
366
                basic_machine=rs6000-bull
367
                os=-bosx
368
                ;;
369
        dpx2* | dpx2*-bull)
370
                basic_machine=m68k-bull
371
                os=-sysv3
372
                ;;
373
        ebmon29k)
374
                basic_machine=a29k-amd
375
                os=-ebmon
376
                ;;
377
        elxsi)
378
                basic_machine=elxsi-elxsi
379
                os=-bsd
380
                ;;
381
        encore | umax | mmax)
382
                basic_machine=ns32k-encore
383
                ;;
384
        es1800 | OSE68k | ose68k | ose | OSE)           # CYGNUS LOCAL
385
                basic_machine=m68k-ericsson
386
                os=-ose
387
                ;;
388
        fx2800)
389
                basic_machine=i860-alliant
390
                ;;
391
        genix)
392
                basic_machine=ns32k-ns
393
                ;;
394
        gmicro)
395
                basic_machine=tron-gmicro
396
                os=-sysv
397
                ;;
398
        h3050r* | hiux*)
399
                basic_machine=hppa1.1-hitachi
400
                os=-hiuxwe2
401
                ;;
402
        h8300hms)
403
                basic_machine=h8300-hitachi
404
                os=-hms
405
                ;;
406
        h8300xray)                                      # CYGNUS LOCAL
407
                basic_machine=h8300-hitachi
408
                os=-xray
409
                ;;
410
        h8500hms)                                       # CYGNUS LOCAL
411
                basic_machine=h8500-hitachi
412
                os=-hms
413
                ;;
414
        harris)
415
                basic_machine=m88k-harris
416
                os=-sysv3
417
                ;;
418
        hp300-*)
419
                basic_machine=m68k-hp
420
                ;;
421
        hp300bsd)
422
                basic_machine=m68k-hp
423
                os=-bsd
424
                ;;
425
        hp300hpux)
426
                basic_machine=m68k-hp
427
                os=-hpux
428
                ;;
429
        w89k-*)                                         # CYGNUS LOCAL
430
                basic_machine=hppa1.1-winbond
431
                os=-proelf
432
                ;;
433
        op50n-*)                                        # CYGNUS LOCAL
434
                basic_machine=hppa1.1-oki
435
                os=-proelf
436
                ;;
437
        op60c-*)                                        # CYGNUS LOCAL
438
                basic_machine=hppa1.1-oki
439
                os=-proelf
440
                ;;
441
        hppro)                                          # CYGNUS LOCAL
442
                basic_machine=hppa1.1-hp
443
                os=-proelf
444
                ;;
445
        hp9k2[0-9][0-9] | hp9k31[0-9])
446
                basic_machine=m68000-hp
447
                ;;
448
        hp9k3[2-9][0-9])
449
                basic_machine=m68k-hp
450
                ;;
451
        hp9k6[0-9][0-9] | hp6[0-9][0-9] )
452
                basic_machine=hppa1.0-hp
453
                ;;
454
        hp9k7[0-79][0-9] | hp7[0-79][0-9] )
455
                basic_machine=hppa1.1-hp
456
                ;;
457
        hp9k78[0-9] | hp78[0-9] )
458
                # FIXME: really hppa2.0-hp
459
                basic_machine=hppa1.1-hp
460
                ;;
461
        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
462
        hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
463
                # FIXME: really hppa2.0-hp
464
                basic_machine=hppa1.1-hp
465
                ;;
466
        hp9k8[0-9][13679] | hp8[0-9][13679] )
467
                basic_machine=hppa1.1-hp
468
                ;;
469
        hp9k8[0-9][0-9] | hp8[0-9][0-9])
470
                basic_machine=hppa1.0-hp
471
                ;;
472
        hppa-next)
473
                os=-nextstep3
474
                ;;
475
        hppaosf)                                        # CYGNUS LOCAL
476
                basic_machine=hppa1.1-hp
477
                os=-osf
478
                ;;
479
        i370-ibm* | ibm*)
480
                basic_machine=i370-ibm
481
                os=-mvs
482
                ;;
483
# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
484
        i[3456]86v32)
485
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
486
                os=-sysv32
487
                ;;
488
        i[3456]86v4*)
489
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
490
                os=-sysv4
491
                ;;
492
        i[3456]86v)
493
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
494
                os=-sysv
495
                ;;
496
        i[3456]86sol2)
497
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
498
                os=-solaris2
499
                ;;
500
        i386mach)                                       # CYGNUS LOCAL
501
                basic_machine=i386-mach
502
                os=-mach
503
                ;;
504
        i386-vsta | vsta)                               # CYGNUS LOCAL
505
                basic_machine=i386-unknown
506
                os=-vsta
507
                ;;
508
        i386-go32 | go32)                               # CYGNUS LOCAL
509
                basic_machine=i386-unknown
510
                os=-go32
511
                ;;
512
        i386-mingw32 | mingw32)
513
                basic_machine=i386-unknown
514
                os=-mingw32
515
                ;;
516
        iris | iris4d)
517
                basic_machine=mips-sgi
518
                case $os in
519
                    -irix*)
520
                        ;;
521
                    *)
522
                        os=-irix4
523
                        ;;
524
                esac
525
                ;;
526
        isi68 | isi)
527
                basic_machine=m68k-isi
528
                os=-sysv
529
                ;;
530
        m88k-omron*)
531
                basic_machine=m88k-omron
532
                ;;
533
        magnum | m3230)
534
                basic_machine=mips-mips
535
                os=-sysv
536
                ;;
537
        merlin)
538
                basic_machine=ns32k-utek
539
                os=-sysv
540
                ;;
541
        miniframe)
542
                basic_machine=m68000-convergent
543
                ;;
544
        mipsel*-linux*)
545
                basic_machine=mipsel-unknown
546
                os=-linux-gnu
547
                ;;
548
        mips*-linux*)
549
                basic_machine=mips-unknown
550
                os=-linux-gnu
551
                ;;
552
        mips3*-*)
553
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
554
                ;;
555
        mips3*)
556
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
557
                ;;
558
        monitor)                                        # CYGNUS LOCAL
559
                basic_machine=m68k-rom68k
560
                os=-coff
561
                ;;
562
        msdos)                                          # CYGNUS LOCAL
563
                basic_machine=i386-unknown
564
                os=-msdos
565
                ;;
566
        ncr3000)
567
                basic_machine=i486-ncr
568
                os=-sysv4
569
                ;;
570
        netbsd386)
571
                basic_machine=i386-unknown              # CYGNUS LOCAL
572
                os=-netbsd
573
                ;;
574
        news | news700 | news800 | news900)
575
                basic_machine=m68k-sony
576
                os=-newsos
577
                ;;
578
        news1000)
579
                basic_machine=m68030-sony
580
                os=-newsos
581
                ;;
582
        news-3600 | risc-news)
583
                basic_machine=mips-sony
584
                os=-newsos
585
                ;;
586
        necv70)                                         # CYGNUS LOCAL
587
                basic_machine=v70-nec
588
                os=-sysv
589
                ;;
590
        next | m*-next )
591
                basic_machine=m68k-next
592
                case $os in
593
                    -nextstep* )
594
                        ;;
595
                    -ns2*)
596
                      os=-nextstep2
597
                        ;;
598
                    *)
599
                      os=-nextstep3
600
                        ;;
601
                esac
602
                ;;
603
        nh3000)
604
                basic_machine=m68k-harris
605
                os=-cxux
606
                ;;
607
        nh[45]000)
608
                basic_machine=m88k-harris
609
                os=-cxux
610
                ;;
611
        nindy960)
612
                basic_machine=i960-intel
613
                os=-nindy
614
                ;;
615
        mon960)                                         # CYGNUS LOCAL
616
                basic_machine=i960-intel
617
                os=-mon960
618
                ;;
619
        np1)
620
                basic_machine=np1-gould
621
                ;;
622
        or32)
623
                basic_machine=or32-none
624
                ;;
625
        OSE68000 | ose68000)                            # CYGNUS LOCAL
626
                basic_machine=m68000-ericsson
627
                os=-ose
628
                ;;
629
        os68k)                                          # CYGNUS LOCAL
630
                basic_machine=m68k-none
631
                os=-os68k
632
                ;;
633
        pa-hitachi)
634
                basic_machine=hppa1.1-hitachi
635
                os=-hiuxwe2
636
                ;;
637
        paragon)
638
                basic_machine=i860-intel
639
                os=-osf
640
                ;;
641
        pbd)
642
                basic_machine=sparc-tti
643
                ;;
644
        pbb)
645
                basic_machine=m68k-tti
646
                ;;
647
        pc532 | pc532-*)
648
                basic_machine=ns32k-pc532
649
                ;;
650
        pentium | p5)
651
                basic_machine=i586-intel
652
                ;;
653
        pentiumpro | p6)
654
                basic_machine=i686-intel
655
                ;;
656
        pentium-* | p5-*)
657
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
658
                ;;
659
        pentiumpro-* | p6-*)
660
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
661
                ;;
662
        k5)
663
                # We don't have specific support for AMD's K5 yet, so just call it a Pentium
664
                basic_machine=i586-amd
665
                ;;
666
        nexen)
667
                # We don't have specific support for Nexgen yet, so just call it a Pentium
668
                basic_machine=i586-nexgen
669
                ;;
670
        pn)
671
                basic_machine=pn-gould
672
                ;;
673
        power)  basic_machine=rs6000-ibm
674
                ;;
675
        ppc)    basic_machine=powerpc-unknown
676
                ;;
677
        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
678
                ;;
679
        ppcle | powerpclittle | ppc-le | powerpc-little)
680
                basic_machine=powerpcle-unknown
681
                ;;
682
        ppcle-* | powerpclittle-*)
683
                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
684
                ;;
685
        ps2)
686
                basic_machine=i386-ibm
687
                ;;
688
        rom68k)                                         # CYGNUS LOCAL
689
                basic_machine=m68k-rom68k
690
                os=-coff
691
                ;;
692
        rm[46]00)
693
                basic_machine=mips-siemens
694
                ;;
695
        rtpc | rtpc-*)
696
                basic_machine=romp-ibm
697
                ;;
698
        sa29200)                                        # CYGNUS LOCAL
699
                basic_machine=a29k-amd
700
                os=-udi
701
                ;;
702
        sequent)
703
                basic_machine=i386-sequent
704
                ;;
705
        sh)
706
                basic_machine=sh-hitachi
707
                os=-hms
708
                ;;
709
        sparclite-wrs)                                  # CYGNUS LOCAL
710
                basic_machine=sparclite-wrs
711
                os=-vxworks
712
                ;;
713
        sps7)
714
                basic_machine=m68k-bull
715
                os=-sysv2
716
                ;;
717
        spur)
718
                basic_machine=spur-unknown
719
                ;;
720
        st2000)                                         # CYGNUS LOCAL
721
                basic_machine=m68k-tandem
722
                ;;
723
        stratus)                                        # CYGNUS LOCAL
724
                basic_machine=i860-stratus
725
                os=-sysv4
726
                ;;
727
        sun2)
728
                basic_machine=m68000-sun
729
                ;;
730
        sun2os3)
731
                basic_machine=m68000-sun
732
                os=-sunos3
733
                ;;
734
        sun2os4)
735
                basic_machine=m68000-sun
736
                os=-sunos4
737
                ;;
738
        sun3os3)
739
                basic_machine=m68k-sun
740
                os=-sunos3
741
                ;;
742
        sun3os4)
743
                basic_machine=m68k-sun
744
                os=-sunos4
745
                ;;
746
        sun4os3)
747
                basic_machine=sparc-sun
748
                os=-sunos3
749
                ;;
750
        sun4os4)
751
                basic_machine=sparc-sun
752
                os=-sunos4
753
                ;;
754
        sun4sol2)
755
                basic_machine=sparc-sun
756
                os=-solaris2
757
                ;;
758
        sun3 | sun3-*)
759
                basic_machine=m68k-sun
760
                ;;
761
        sun4)
762
                basic_machine=sparc-sun
763
                ;;
764
        sun386 | sun386i | roadrunner)
765
                basic_machine=i386-sun
766
                ;;
767
        symmetry)
768
                basic_machine=i386-sequent
769
                os=-dynix
770
                ;;
771
        tx39)
772
                basic_machine=mipstx39-unknown
773
                ;;
774
        tx39el)
775
                basic_machine=mipstx39el-unknown
776
                ;;
777
        tower | tower-32)
778
                basic_machine=m68k-ncr
779
                ;;
780
        udi29k)
781
                basic_machine=a29k-amd
782
                os=-udi
783
                ;;
784
        ultra3)
785
                basic_machine=a29k-nyu
786
                os=-sym1
787
                ;;
788
        v810 | necv810)                                 # CYGNUS LOCAL
789
                basic_machine=v810-nec
790
                os=-none
791
                ;;
792
        vaxv)
793
                basic_machine=vax-dec
794
                os=-sysv
795
                ;;
796
        vms)
797
                basic_machine=vax-dec
798
                os=-vms
799
                ;;
800
        vpp*|vx|vx-*)
801
               basic_machine=f301-fujitsu
802
               ;;
803
        vxworks960)
804
                basic_machine=i960-wrs
805
                os=-vxworks
806
                ;;
807
        vxworks68)
808
                basic_machine=m68k-wrs
809
                os=-vxworks
810
                ;;
811
        vxworks29k)
812
                basic_machine=a29k-wrs
813
                os=-vxworks
814
                ;;
815
        w65*)                                           # CYGNUS LOCAL
816
                basic_machine=w65-wdc
817
                os=-none
818
                ;;
819
        xmp)
820
                basic_machine=xmp-cray
821
                os=-unicos
822
                ;;
823
        xps | xps100)
824
                basic_machine=xps100-honeywell
825
                ;;
826
        z8k-*-coff)                                     # CYGNUS LOCAL
827
                basic_machine=z8k-unknown
828
                os=-sim
829
                ;;
830
        none)
831
                basic_machine=none-none
832
                os=-none
833
                ;;
834
 
835
# Here we handle the default manufacturer of certain CPU types.  It is in
836
# some cases the only manufacturer, in others, it is the most popular.
837
        w89k)                                           # CYGNUS LOCAL
838
                basic_machine=hppa1.1-winbond
839
                ;;
840
        op50n)                                          # CYGNUS LOCAL
841
                basic_machine=hppa1.1-oki
842
                ;;
843
        op60c)                                          # CYGNUS LOCAL
844
                basic_machine=hppa1.1-oki
845
                ;;
846
        mips)
847
                if [ x$os = x-linux-gnu ]; then
848
                        basic_machine=mips-unknown
849
                else
850
                        basic_machine=mips-mips
851
                fi
852
                ;;
853
        romp)
854
                basic_machine=romp-ibm
855
                ;;
856
        rs6000)
857
                basic_machine=rs6000-ibm
858
                ;;
859
        vax)
860
                basic_machine=vax-dec
861
                ;;
862
        pdp11)
863
                basic_machine=pdp11-dec
864
                ;;
865
        we32k)
866
                basic_machine=we32k-att
867
                ;;
868
        sparc)
869
                basic_machine=sparc-sun
870
                ;;
871
        cydra)
872
                basic_machine=cydra-cydrome
873
                ;;
874
        orion)
875
                basic_machine=orion-highlevel
876
                ;;
877
        orion105)
878
                basic_machine=clipper-highlevel
879
                ;;
880
        mac | mpw | mac-mpw)                            # CYGNUS LOCAL
881
                basic_machine=m68k-apple
882
                ;;
883
        pmac | pmac-mpw)                                # CYGNUS LOCAL
884
                basic_machine=powerpc-apple
885
                ;;
886
        *)
887
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
888
                exit 1
889
                ;;
890
esac
891
 
892
# Here we canonicalize certain aliases for manufacturers.
893
case $basic_machine in
894
        *-digital*)
895
                basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
896
                ;;
897
        *-commodore*)
898
                basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
899
                ;;
900
        *)
901
                ;;
902
esac
903
 
904
# Decode manufacturer-specific aliases for certain operating systems.
905
 
906
if [ x"$os" != x"" ]
907
then
908
case $os in
909
        # First match some system type aliases
910
        # that might get confused with valid system types.
911
        # -solaris* is a basic system type, with this one exception.
912
        -solaris1 | -solaris1.*)
913
                os=`echo $os | sed -e 's|solaris1|sunos4|'`
914
                ;;
915
        -solaris)
916
                os=-solaris2
917
                ;;
918
        -unixware* | svr4*)
919
                os=-sysv4
920
                ;;
921
        -gnu/linux*)
922
                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
923
                ;;
924
        # First accept the basic system types.
925
        # The portable systems comes first.
926
        # Each alternative MUST END IN A *, to match a version number.
927
        # -sysv* is not here because it comes later, after sysvr4.
928
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
929
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
930
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
931
              | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
932
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
933
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
934
              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
935
              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
936
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
937
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
938
              | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
939
              | -mingw32* | -linux-gnu* | -uxpv*)
940
        # Remember, each alternative MUST END IN *, to match a version number.
941
                ;;
942
        # CYGNUS LOCAL
943
        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
944
              | -windows* | -osx | -abug |  -netware* | -os9* | -beos* \
945
              | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
946
                ;;
947
        -mac*)
948
                os=`echo $os | sed -e 's|mac|macos|'`
949
                ;;
950
        # END CYGNUS LOCAL
951
        -linux*)
952
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
953
                ;;
954
        -sunos5*)
955
                os=`echo $os | sed -e 's|sunos5|solaris2|'`
956
                ;;
957
        -sunos6*)
958
                os=`echo $os | sed -e 's|sunos6|solaris3|'`
959
                ;;
960
        -osfrose*)
961
                os=-osfrose
962
                ;;
963
        -osf*)
964
                os=-osf
965
                ;;
966
        -utek*)
967
                os=-bsd
968
                ;;
969
        -dynix*)
970
                os=-bsd
971
                ;;
972
        -acis*)
973
                os=-aos
974
                ;;
975
        -386bsd)                                        # CYGNUS LOCAL
976
                os=-bsd
977
                ;;
978
        -ctix* | -uts*)
979
                os=-sysv
980
                ;;
981
        -ns2 )
982
                os=-nextstep2
983
                ;;
984
        # Preserve the version number of sinix5.
985
        -sinix5.*)
986
                os=`echo $os | sed -e 's|sinix|sysv|'`
987
                ;;
988
        -sinix*)
989
                os=-sysv4
990
                ;;
991
        -triton*)
992
                os=-sysv3
993
                ;;
994
        -oss*)
995
                os=-sysv3
996
                ;;
997
        -svr4)
998
                os=-sysv4
999
                ;;
1000
        -svr3)
1001
                os=-sysv3
1002
                ;;
1003
        -sysvr4)
1004
                os=-sysv4
1005
                ;;
1006
        # This must come after -sysvr4.
1007
        -sysv*)
1008
                ;;
1009
        -ose*)                                          # CYGNUS LOCAL
1010
                os=-ose
1011
                ;;
1012
        -es1800*)                                       # CYGNUS LOCAL
1013
                os=-ose
1014
                ;;
1015
        -xenix)
1016
                os=-xenix
1017
                ;;
1018
        -none)
1019
                ;;
1020
        *)
1021
                # Get rid of the `-' at the beginning of $os.
1022
                os=`echo $os | sed 's/[^-]*-//'`
1023
                echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1024
                exit 1
1025
                ;;
1026
esac
1027
else
1028
 
1029
# Here we handle the default operating systems that come with various machines.
1030
# The value should be what the vendor currently ships out the door with their
1031
# machine or put another way, the most popular os provided with the machine.
1032
 
1033
# Note that if you're going to try to match "-MANUFACTURER" here (say,
1034
# "-sun"), then you have to tell the case statement up towards the top
1035
# that MANUFACTURER isn't an operating system.  Otherwise, code above
1036
# will signal an error saying that MANUFACTURER isn't an operating
1037
# system, and we'll never get to this point.
1038
 
1039
case $basic_machine in
1040
        *-acorn)
1041
                os=-riscix1.2
1042
                ;;
1043
        arm*-semi)
1044
                os=-aout
1045
                ;;
1046
        pdp11-*)
1047
                os=-none
1048
                ;;
1049
        *-dec | vax-*)
1050
                os=-ultrix4.2
1051
                ;;
1052
        m68*-apollo)
1053
                os=-domain
1054
                ;;
1055
        i386-sun)
1056
                os=-sunos4.0.2
1057
                ;;
1058
        m68000-sun)
1059
                os=-sunos3
1060
                # This also exists in the configure program, but was not the
1061
                # default.
1062
                # os=-sunos4
1063
                ;;
1064
        m68*-cisco)                                     # CYGNUS LOCAL
1065
                os=-aout
1066
                ;;
1067
        mips*-cisco)                                    # CYGNUS LOCAL
1068
                os=-elf
1069
                ;;
1070
        mips*-*)                                        # CYGNUS LOCAL
1071
                os=-elf
1072
                ;;
1073
        *-tti)  # must be before sparc entry or we get the wrong os.
1074
                os=-sysv3
1075
                ;;
1076
        sparc-* | *-sun)
1077
                os=-sunos4.1.1
1078
                ;;
1079
        *-be)                                           # CYGNUS LOCAL
1080
                os=-beos
1081
                ;;
1082
        *-ibm)
1083
                os=-aix
1084
                ;;
1085
        *-wec)                                          # CYGNUS LOCAL
1086
                os=-proelf
1087
                ;;
1088
        *-winbond)                                      # CYGNUS LOCAL
1089
                os=-proelf
1090
                ;;
1091
        *-oki)                                          # CYGNUS LOCAL
1092
                os=-proelf
1093
                ;;
1094
        *-hp)
1095
                os=-hpux
1096
                ;;
1097
        *-hitachi)
1098
                os=-hiux
1099
                ;;
1100
        i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1101
                os=-sysv
1102
                ;;
1103
        *-cbm)
1104
                os=-amigados
1105
                ;;
1106
        *-dg)
1107
                os=-dgux
1108
                ;;
1109
        *-dolphin)
1110
                os=-sysv3
1111
                ;;
1112
        m68k-ccur)
1113
                os=-rtu
1114
                ;;
1115
        m88k-omron*)
1116
                os=-luna
1117
                ;;
1118
        *-next )
1119
                os=-nextstep
1120
                ;;
1121
        *-sequent)
1122
                os=-ptx
1123
                ;;
1124
        *-crds)
1125
                os=-unos
1126
                ;;
1127
        *-ns)
1128
                os=-genix
1129
                ;;
1130
        i370-*)
1131
                os=-mvs
1132
                ;;
1133
        *-next)
1134
                os=-nextstep3
1135
                ;;
1136
        *-gould)
1137
                os=-sysv
1138
                ;;
1139
        *-highlevel)
1140
                os=-bsd
1141
                ;;
1142
        *-encore)
1143
                os=-bsd
1144
                ;;
1145
        *-sgi)
1146
                os=-irix
1147
                ;;
1148
        *-siemens)
1149
                os=-sysv4
1150
                ;;
1151
        *-masscomp)
1152
                os=-rtu
1153
                ;;
1154
        f301-fujitsu)
1155
                os=-uxpv
1156
                ;;
1157
        *-rom68k)                                       # CYGNUS LOCAL
1158
                os=-coff
1159
                ;;
1160
        *-*bug)                                         # CYGNUS LOCAL
1161
                os=-coff
1162
                ;;
1163
        *-apple)                                        # CYGNUS LOCAL
1164
                os=-macos
1165
                ;;
1166
        *)
1167
                os=-none
1168
                ;;
1169
esac
1170
fi
1171
 
1172
# Here we handle the case where we know the os, and the CPU type, but not the
1173
# manufacturer.  We pick the logical manufacturer.
1174
vendor=unknown
1175
case $basic_machine in
1176
        *-unknown)
1177
                case $os in
1178
                        -riscix*)
1179
                                vendor=acorn
1180
                                ;;
1181
                        -sunos*)
1182
                                vendor=sun
1183
                                ;;
1184
                        -aix*)
1185
                                vendor=ibm
1186
                                ;;
1187
                        -beos*)                                         # CYGNUS LOCAL
1188
                                vendor=be
1189
                                ;;
1190
                        -hpux*)
1191
                                vendor=hp
1192
                                ;;
1193
                        -hiux*)
1194
                                vendor=hitachi
1195
                                ;;
1196
                        -unos*)
1197
                                vendor=crds
1198
                                ;;
1199
                        -dgux*)
1200
                                vendor=dg
1201
                                ;;
1202
                        -luna*)
1203
                                vendor=omron
1204
                                ;;
1205
                        -genix*)
1206
                                vendor=ns
1207
                                ;;
1208
                        -mvs*)
1209
                                vendor=ibm
1210
                                ;;
1211
                        -ptx*)
1212
                                vendor=sequent
1213
                                ;;
1214
                        -vxsim* | -vxworks*)
1215
                                vendor=wrs
1216
                                ;;
1217
                        -aux*)
1218
                                vendor=apple
1219
                                ;;
1220
                        -hms*)                          # CYGNUS LOCAL
1221
                                vendor=hitachi
1222
                                ;;
1223
                        -mpw* | -macos*)                # CYGNUS LOCAL
1224
                                vendor=apple
1225
                                ;;
1226
                esac
1227
                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1228
                ;;
1229
esac
1230
 
1231
echo $basic_machine$os

powered by: WebSVN 2.1.0

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