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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [config.sub] - Blame information for rev 839

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

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

powered by: WebSVN 2.1.0

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