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

Subversion Repositories or1k

[/] [or1k/] [tags/] [newlib-1-8-2/] [newlib/] [config.sub] - Blame information for rev 1778

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 56 joel
#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
4 39 lampret
# 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 56 joel
        -sim | -cisco | -oki | -wec | -winbond)
114 39 lampret
                os=
115
                basic_machine=$1
116
                ;;
117 56 joel
        -scout)
118 39 lampret
                ;;
119 56 joel
        -wrs)
120
                os=-vxworks
121 39 lampret
                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 56 joel
        -udk*)
147
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
148
                ;;
149 39 lampret
        -isc)
150
                os=-isc2.2
151
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
152
                ;;
153
        -clix*)
154
                basic_machine=clipper-intergraph
155
                ;;
156
        -isc*)
157
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
158
                ;;
159
        -lynx*)
160
                os=-lynxos
161
                ;;
162
        -ptx*)
163
                basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
164
                ;;
165
        -windowsnt*)
166
                os=`echo $os | sed -e 's/windowsnt/winnt/'`
167
                ;;
168
        -psos*)
169
                os=-psos
170
                ;;
171
esac
172
 
173
# Decode aliases for certain CPU-COMPANY combinations.
174
case $basic_machine in
175
        # Recognize the basic CPU types without company name.
176
        # Some are omitted here because they have special meanings below.
177
        tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
178 56 joel
                | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
179
                | 580 | i960 | h8300 \
180
                | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
181
                | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
182 39 lampret
                | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
183 56 joel
                | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
184
                | mips64orion | mips64orionel | mipstx39 | mipstx39el \
185
                | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
186
                | mips64vr5000 | miprs64vr5000el \
187
                | m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
188
                | sparc | sparclet | sparclite | sparc64 | sparc86x | sparcv9 \
189
                | thumb | v850 | c4x | d10v | h8500 | w65 | fr30)
190 39 lampret
                basic_machine=$basic_machine-unknown
191
                ;;
192 56 joel
        # CYGNUS LOCAL config names
193
        d30v | mcore | strongarm | tic80 | tic30 | v850e | v850ea)
194 39 lampret
                basic_machine=$basic_machine-unknown
195
                ;;
196 56 joel
        c30)
197
                basic_machine=tic30-unknown
198 39 lampret
                ;;
199 56 joel
        c54x | tic54x)
200
                basic_machine=tic54x-unknown
201
                os=-coff
202 39 lampret
                ;;
203 56 joel
        # END CYGNUS LOCAL
204
        mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300
205 39 lampret
                basic_machine=$basic_machine-unknown
206
                ;;
207 56 joel
        mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100
208 39 lampret
                basic_machine=$basic_machine-unknown
209
                ;;
210 56 joel
        mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000
211 39 lampret
                basic_machine=$basic_machine-unknown
212
                ;;
213
        # We use `pc' rather than `unknown'
214
        # because (1) that's what they normally are, and
215
        # (2) the word "unknown" tends to confuse beginning users.
216 56 joel
        i[34567]86)
217 39 lampret
          basic_machine=$basic_machine-pc
218
          ;;
219
        # Object if more than one company name word.
220
        *-*-*)
221
                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
222
                exit 1
223
                ;;
224
        # Recognize the basic CPU types with company name.
225 56 joel
        vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
226 39 lampret
              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
227
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
228 56 joel
              | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
229
              | xmp-* | ymp-* \
230
              | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
231
              | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
232
              | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
233
              | clipper-* | orion-* \
234 39 lampret
              | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
235 56 joel
              | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
236 39 lampret
              | mips64el-* | mips64orion-* | mips64orionel-* \
237 56 joel
              | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
238 39 lampret
              | mipstx39-* | mipstx39el-* \
239 56 joel
              | f301-* | arm*-* | t3e-* \
240
              | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
241
              | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
242 39 lampret
                ;;
243 56 joel
        # CYGNUS LOCAL config names
244
        d30v-* | tic80-* | mcore-* | strongarm-* | v850e-* | v850ea-* \
245
              | mips64vr4111-* | mips64vr4111el-* | tic54x-* | c54x-*)
246 39 lampret
                ;;
247 56 joel
        # END CYGNUS LOCAL
248
        mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300
249 39 lampret
                ;;
250 56 joel
        mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100
251 39 lampret
                ;;
252
        # Recognize the various machine names and aliases which stand
253
        # for a CPU type and a company and sometimes even an OS.
254 56 joel
        386bsd)
255 39 lampret
                basic_machine=i386-unknown
256
                os=-bsd
257
                ;;
258
        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
259
                basic_machine=m68000-att
260
                ;;
261
        3b*)
262
                basic_machine=we32k-att
263
                ;;
264 56 joel
        a29khif)
265 39 lampret
                basic_machine=a29k-amd
266
                os=-udi
267
                ;;
268 56 joel
        adobe68k)
269 39 lampret
                basic_machine=m68010-adobe
270
                os=-scout
271
                ;;
272
        alliant | fx80)
273
                basic_machine=fx80-alliant
274
                ;;
275
        altos | altos3068)
276
                basic_machine=m68k-altos
277
                ;;
278
        am29k)
279
                basic_machine=a29k-none
280
                os=-bsd
281
                ;;
282
        amdahl)
283
                basic_machine=580-amdahl
284
                os=-sysv
285
                ;;
286
        amiga | amiga-*)
287
                basic_machine=m68k-cbm
288
                ;;
289 56 joel
        amigaos | amigados)
290 39 lampret
                basic_machine=m68k-cbm
291 56 joel
                os=-amigaos
292 39 lampret
                ;;
293
        amigaunix | amix)
294
                basic_machine=m68k-cbm
295
                os=-sysv4
296
                ;;
297
        apollo68)
298
                basic_machine=m68k-apollo
299
                os=-sysv
300
                ;;
301 56 joel
        apollo68bsd)
302 39 lampret
                basic_machine=m68k-apollo
303
                os=-bsd
304
                ;;
305
        aux)
306
                basic_machine=m68k-apple
307
                os=-aux
308
                ;;
309
        balance)
310
                basic_machine=ns32k-sequent
311
                os=-dynix
312
                ;;
313
        convex-c1)
314
                basic_machine=c1-convex
315
                os=-bsd
316
                ;;
317
        convex-c2)
318
                basic_machine=c2-convex
319
                os=-bsd
320
                ;;
321
        convex-c32)
322
                basic_machine=c32-convex
323
                os=-bsd
324
                ;;
325
        convex-c34)
326
                basic_machine=c34-convex
327
                os=-bsd
328
                ;;
329
        convex-c38)
330
                basic_machine=c38-convex
331
                os=-bsd
332
                ;;
333
        cray | ymp)
334
                basic_machine=ymp-cray
335
                os=-unicos
336
                ;;
337
        cray2)
338
                basic_machine=cray2-cray
339
                os=-unicos
340
                ;;
341
        [ctj]90-cray)
342
                basic_machine=c90-cray
343
                os=-unicos
344
                ;;
345
        crds | unos)
346
                basic_machine=m68k-crds
347
                ;;
348
        da30 | da30-*)
349
                basic_machine=m68k-da30
350
                ;;
351
        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
352
                basic_machine=mips-dec
353
                ;;
354
        delta | 3300 | motorola-3300 | motorola-delta \
355
              | 3300-motorola | delta-motorola)
356
                basic_machine=m68k-motorola
357
                ;;
358
        delta88)
359
                basic_machine=m88k-motorola
360
                os=-sysv3
361
                ;;
362
        dpx20 | dpx20-*)
363
                basic_machine=rs6000-bull
364
                os=-bosx
365
                ;;
366
        dpx2* | dpx2*-bull)
367
                basic_machine=m68k-bull
368
                os=-sysv3
369
                ;;
370
        ebmon29k)
371
                basic_machine=a29k-amd
372
                os=-ebmon
373
                ;;
374
        elxsi)
375
                basic_machine=elxsi-elxsi
376
                os=-bsd
377
                ;;
378
        encore | umax | mmax)
379
                basic_machine=ns32k-encore
380
                ;;
381 56 joel
        es1800 | OSE68k | ose68k | ose | OSE)
382 39 lampret
                basic_machine=m68k-ericsson
383
                os=-ose
384
                ;;
385
        fx2800)
386
                basic_machine=i860-alliant
387
                ;;
388
        genix)
389
                basic_machine=ns32k-ns
390
                ;;
391
        gmicro)
392
                basic_machine=tron-gmicro
393
                os=-sysv
394
                ;;
395
        h3050r* | hiux*)
396
                basic_machine=hppa1.1-hitachi
397
                os=-hiuxwe2
398
                ;;
399
        h8300hms)
400
                basic_machine=h8300-hitachi
401
                os=-hms
402
                ;;
403 56 joel
        h8300xray)
404 39 lampret
                basic_machine=h8300-hitachi
405
                os=-xray
406
                ;;
407 56 joel
        h8500hms)
408 39 lampret
                basic_machine=h8500-hitachi
409
                os=-hms
410
                ;;
411
        harris)
412
                basic_machine=m88k-harris
413
                os=-sysv3
414
                ;;
415
        hp300-*)
416
                basic_machine=m68k-hp
417
                ;;
418
        hp300bsd)
419
                basic_machine=m68k-hp
420
                os=-bsd
421
                ;;
422
        hp300hpux)
423
                basic_machine=m68k-hp
424
                os=-hpux
425
                ;;
426 56 joel
        hp3k9[0-9][0-9] | hp9[0-9][0-9])
427
                basic_machine=hppa1.0-hp
428
                ;;
429 39 lampret
        hp9k2[0-9][0-9] | hp9k31[0-9])
430
                basic_machine=m68000-hp
431
                ;;
432
        hp9k3[2-9][0-9])
433
                basic_machine=m68k-hp
434
                ;;
435 56 joel
        hp9k6[0-9][0-9] | hp6[0-9][0-9])
436 39 lampret
                basic_machine=hppa1.0-hp
437
                ;;
438 56 joel
        hp9k7[0-79][0-9] | hp7[0-79][0-9])
439 39 lampret
                basic_machine=hppa1.1-hp
440
                ;;
441 56 joel
        hp9k78[0-9] | hp78[0-9])
442 39 lampret
                # FIXME: really hppa2.0-hp
443
                basic_machine=hppa1.1-hp
444
                ;;
445 56 joel
        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
446 39 lampret
                # FIXME: really hppa2.0-hp
447
                basic_machine=hppa1.1-hp
448
                ;;
449 56 joel
        hp9k8[0-9][13679] | hp8[0-9][13679])
450 39 lampret
                basic_machine=hppa1.1-hp
451
                ;;
452
        hp9k8[0-9][0-9] | hp8[0-9][0-9])
453
                basic_machine=hppa1.0-hp
454
                ;;
455
        hppa-next)
456
                os=-nextstep3
457
                ;;
458 56 joel
        hppaosf)
459 39 lampret
                basic_machine=hppa1.1-hp
460
                os=-osf
461
                ;;
462 56 joel
        hppro)
463
                basic_machine=hppa1.1-hp
464
                os=-proelf
465
                ;;
466 39 lampret
        i370-ibm* | ibm*)
467
                basic_machine=i370-ibm
468
                ;;
469
# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
470 56 joel
        i[34567]86v32)
471 39 lampret
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
472
                os=-sysv32
473
                ;;
474 56 joel
        i[34567]86v4*)
475 39 lampret
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
476
                os=-sysv4
477
                ;;
478 56 joel
        i[34567]86v)
479 39 lampret
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
480
                os=-sysv
481
                ;;
482 56 joel
        i[34567]86sol2)
483 39 lampret
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
484
                os=-solaris2
485
                ;;
486 56 joel
        i386mach)
487 39 lampret
                basic_machine=i386-mach
488
                os=-mach
489
                ;;
490 56 joel
        i386-vsta | vsta)
491 39 lampret
                basic_machine=i386-unknown
492
                os=-vsta
493
                ;;
494 56 joel
        i386-go32 | go32)
495 39 lampret
                basic_machine=i386-unknown
496
                os=-go32
497
                ;;
498
        i386-mingw32 | mingw32)
499
                basic_machine=i386-unknown
500
                os=-mingw32
501
                ;;
502
        iris | iris4d)
503
                basic_machine=mips-sgi
504
                case $os in
505
                    -irix*)
506
                        ;;
507
                    *)
508
                        os=-irix4
509
                        ;;
510
                esac
511
                ;;
512
        isi68 | isi)
513
                basic_machine=m68k-isi
514
                os=-sysv
515
                ;;
516
        m88k-omron*)
517
                basic_machine=m88k-omron
518
                ;;
519
        magnum | m3230)
520
                basic_machine=mips-mips
521
                os=-sysv
522
                ;;
523
        merlin)
524
                basic_machine=ns32k-utek
525
                os=-sysv
526
                ;;
527
        miniframe)
528
                basic_machine=m68000-convergent
529
                ;;
530 56 joel
        *mint | *MiNT)
531
                basic_machine=m68k-atari
532
                os=-mint
533
                ;;
534 39 lampret
        mipsel*-linux*)
535
                basic_machine=mipsel-unknown
536
                os=-linux-gnu
537
                ;;
538
        mips*-linux*)
539
                basic_machine=mips-unknown
540
                os=-linux-gnu
541
                ;;
542
        mips3*-*)
543
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
544
                ;;
545
        mips3*)
546
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
547
                ;;
548 56 joel
        monitor)
549 39 lampret
                basic_machine=m68k-rom68k
550
                os=-coff
551
                ;;
552 56 joel
        msdos)
553
                basic_machine=i386-unknown
554 39 lampret
                os=-msdos
555
                ;;
556 56 joel
        mvs)
557
                basic_machine=i370-ibm
558
                os=-mvs
559
                ;;
560 39 lampret
        ncr3000)
561
                basic_machine=i486-ncr
562
                os=-sysv4
563
                ;;
564
        netbsd386)
565 56 joel
                basic_machine=i386-unknown
566 39 lampret
                os=-netbsd
567
                ;;
568 56 joel
        netwinder)
569
                basic_machine=armv4l-corel
570
                os=-linux
571
                ;;
572 39 lampret
        news | news700 | news800 | news900)
573
                basic_machine=m68k-sony
574
                os=-newsos
575
                ;;
576
        news1000)
577
                basic_machine=m68030-sony
578
                os=-newsos
579
                ;;
580
        news-3600 | risc-news)
581
                basic_machine=mips-sony
582
                os=-newsos
583
                ;;
584 56 joel
        necv70)
585 39 lampret
                basic_machine=v70-nec
586
                os=-sysv
587
                ;;
588
        next | m*-next )
589
                basic_machine=m68k-next
590
                case $os in
591
                    -nextstep* )
592
                        ;;
593
                    -ns2*)
594
                      os=-nextstep2
595
                        ;;
596
                    *)
597
                      os=-nextstep3
598
                        ;;
599
                esac
600
                ;;
601
        nh3000)
602
                basic_machine=m68k-harris
603
                os=-cxux
604
                ;;
605
        nh[45]000)
606
                basic_machine=m88k-harris
607
                os=-cxux
608
                ;;
609
        nindy960)
610
                basic_machine=i960-intel
611
                os=-nindy
612
                ;;
613 56 joel
        mon960)
614 39 lampret
                basic_machine=i960-intel
615
                os=-mon960
616
                ;;
617
        np1)
618
                basic_machine=np1-gould
619
                ;;
620 56 joel
        op50n-* | op60c-*)
621
                basic_machine=hppa1.1-oki
622
                os=-proelf
623 39 lampret
                ;;
624 56 joel
        OSE68000 | ose68000)
625 39 lampret
                basic_machine=m68000-ericsson
626
                os=-ose
627
                ;;
628 56 joel
        os68k)
629 39 lampret
                basic_machine=m68k-none
630
                os=-os68k
631
                ;;
632
        pa-hitachi)
633
                basic_machine=hppa1.1-hitachi
634
                os=-hiuxwe2
635
                ;;
636
        paragon)
637
                basic_machine=i860-intel
638
                os=-osf
639
                ;;
640
        pbd)
641
                basic_machine=sparc-tti
642
                ;;
643
        pbb)
644
                basic_machine=m68k-tti
645
                ;;
646
        pc532 | pc532-*)
647
                basic_machine=ns32k-pc532
648
                ;;
649 56 joel
        pentium | p5 | k5 | k6 | nexen)
650
                basic_machine=i586-pc
651 39 lampret
                ;;
652 56 joel
        pentiumpro | p6 | 6x86)
653
                basic_machine=i686-pc
654 39 lampret
                ;;
655 56 joel
        pentiumii | pentium2)
656
                basic_machine=i786-pc
657
                ;;
658
        pentium-* | p5-* | k5-* | k6-* | nexen-*)
659 39 lampret
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
660
                ;;
661 56 joel
        pentiumpro-* | p6-* | 6x86-*)
662 39 lampret
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
663
                ;;
664 56 joel
        pentiumii-* | pentium2-*)
665
                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
666 39 lampret
                ;;
667
        pn)
668
                basic_machine=pn-gould
669
                ;;
670
        power)  basic_machine=rs6000-ibm
671
                ;;
672
        ppc)    basic_machine=powerpc-unknown
673
                ;;
674
        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
675
                ;;
676
        ppcle | powerpclittle | ppc-le | powerpc-little)
677
                basic_machine=powerpcle-unknown
678
                ;;
679
        ppcle-* | powerpclittle-*)
680
                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
681
                ;;
682
        ps2)
683
                basic_machine=i386-ibm
684
                ;;
685 56 joel
        rom68k)
686 39 lampret
                basic_machine=m68k-rom68k
687
                os=-coff
688
                ;;
689
        rm[46]00)
690
                basic_machine=mips-siemens
691
                ;;
692
        rtpc | rtpc-*)
693
                basic_machine=romp-ibm
694
                ;;
695 56 joel
        sa29200)
696 39 lampret
                basic_machine=a29k-amd
697
                os=-udi
698
                ;;
699
        sequent)
700
                basic_machine=i386-sequent
701
                ;;
702
        sh)
703
                basic_machine=sh-hitachi
704
                os=-hms
705
                ;;
706 56 joel
        sparclite-wrs)
707 39 lampret
                basic_machine=sparclite-wrs
708
                os=-vxworks
709
                ;;
710
        sps7)
711
                basic_machine=m68k-bull
712
                os=-sysv2
713
                ;;
714
        spur)
715
                basic_machine=spur-unknown
716
                ;;
717 56 joel
        st2000)
718 39 lampret
                basic_machine=m68k-tandem
719
                ;;
720 56 joel
        stratus)
721 39 lampret
                basic_machine=i860-stratus
722
                os=-sysv4
723
                ;;
724
        sun2)
725
                basic_machine=m68000-sun
726
                ;;
727
        sun2os3)
728
                basic_machine=m68000-sun
729
                os=-sunos3
730
                ;;
731
        sun2os4)
732
                basic_machine=m68000-sun
733
                os=-sunos4
734
                ;;
735
        sun3os3)
736
                basic_machine=m68k-sun
737
                os=-sunos3
738
                ;;
739
        sun3os4)
740
                basic_machine=m68k-sun
741
                os=-sunos4
742
                ;;
743
        sun4os3)
744
                basic_machine=sparc-sun
745
                os=-sunos3
746
                ;;
747
        sun4os4)
748
                basic_machine=sparc-sun
749
                os=-sunos4
750
                ;;
751
        sun4sol2)
752
                basic_machine=sparc-sun
753
                os=-solaris2
754
                ;;
755
        sun3 | sun3-*)
756
                basic_machine=m68k-sun
757
                ;;
758
        sun4)
759
                basic_machine=sparc-sun
760
                ;;
761
        sun386 | sun386i | roadrunner)
762
                basic_machine=i386-sun
763
                ;;
764
        symmetry)
765
                basic_machine=i386-sequent
766
                os=-dynix
767
                ;;
768 56 joel
        t3e)
769
                basic_machine=t3e-cray
770
                os=-unicos
771
                ;;
772 39 lampret
        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 56 joel
        v810 | necv810)
790 39 lampret
                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 56 joel
        w65*)
817
                basic_machine=w65-wdc
818
                os=-none
819 39 lampret
                ;;
820 56 joel
        w89k-*)
821
                basic_machine=hppa1.1-winbond
822
                os=-proelf
823
                ;;
824 39 lampret
        xmp)
825
                basic_machine=xmp-cray
826
                os=-unicos
827
                ;;
828
        xps | xps100)
829
                basic_machine=xps100-honeywell
830
                ;;
831 56 joel
        z8k-*-coff)
832 39 lampret
                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 56 joel
        w89k)
843 39 lampret
                basic_machine=hppa1.1-winbond
844
                ;;
845 56 joel
        op50n)
846 39 lampret
                basic_machine=hppa1.1-oki
847
                ;;
848 56 joel
        op60c)
849 39 lampret
                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 56 joel
        sparc | sparcv9)
874 39 lampret
                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 56 joel
        mac | mpw | mac-mpw)
886 39 lampret
                basic_machine=m68k-apple
887
                ;;
888 56 joel
        pmac | pmac-mpw)
889 39 lampret
                basic_machine=powerpc-apple
890
                ;;
891 56 joel
        c4x*)
892
                basic_machine=c4x-none
893
                os=-coff
894
                ;;
895 39 lampret
        *)
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 56 joel
        -svr4*)
928 39 lampret
                os=-sysv4
929
                ;;
930 56 joel
        -unixware*)
931
                os=-sysv4.2uw
932
                ;;
933 39 lampret
        -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 56 joel
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
944
              | -aos* | -opened* \
945 39 lampret
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
946
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
947
              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
948 56 joel
              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
949 39 lampret
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
950
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
951 56 joel
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
952
              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
953
              | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
954 39 lampret
        # Remember, each alternative MUST END IN *, to match a version number.
955
                ;;
956
        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
957 56 joel
              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
958
              | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
959 39 lampret
                ;;
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 56 joel
        -opened*)
973
                os=-openedition
974
                ;;
975 39 lampret
        -osfrose*)
976
                os=-osfrose
977
                ;;
978
        -osf*)
979
                os=-osf
980
                ;;
981
        -utek*)
982
                os=-bsd
983
                ;;
984
        -dynix*)
985
                os=-bsd
986
                ;;
987
        -acis*)
988
                os=-aos
989
                ;;
990 56 joel
        -386bsd)
991 39 lampret
                os=-bsd
992
                ;;
993
        -ctix* | -uts*)
994
                os=-sysv
995
                ;;
996
        -ns2 )
997
                os=-nextstep2
998
                ;;
999
        # Preserve the version number of sinix5.
1000
        -sinix5.*)
1001
                os=`echo $os | sed -e 's|sinix|sysv|'`
1002
                ;;
1003
        -sinix*)
1004
                os=-sysv4
1005
                ;;
1006
        -triton*)
1007
                os=-sysv3
1008
                ;;
1009
        -oss*)
1010
                os=-sysv3
1011
                ;;
1012
        -svr4)
1013
                os=-sysv4
1014
                ;;
1015
        -svr3)
1016
                os=-sysv3
1017
                ;;
1018
        -sysvr4)
1019
                os=-sysv4
1020
                ;;
1021
        # This must come after -sysvr4.
1022
        -sysv*)
1023
                ;;
1024 56 joel
        -ose*)
1025 39 lampret
                os=-ose
1026
                ;;
1027 56 joel
        -es1800*)
1028 39 lampret
                os=-ose
1029
                ;;
1030
        -xenix)
1031
                os=-xenix
1032
                ;;
1033 56 joel
        -*mint | -*MiNT)
1034
                os=-mint
1035
                ;;
1036 39 lampret
        -none)
1037
                ;;
1038
        *)
1039
                # Get rid of the `-' at the beginning of $os.
1040
                os=`echo $os | sed 's/[^-]*-//'`
1041
                echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1042
                exit 1
1043
                ;;
1044
esac
1045
else
1046
 
1047
# Here we handle the default operating systems that come with various machines.
1048
# The value should be what the vendor currently ships out the door with their
1049
# machine or put another way, the most popular os provided with the machine.
1050
 
1051
# Note that if you're going to try to match "-MANUFACTURER" here (say,
1052
# "-sun"), then you have to tell the case statement up towards the top
1053
# that MANUFACTURER isn't an operating system.  Otherwise, code above
1054
# will signal an error saying that MANUFACTURER isn't an operating
1055
# system, and we'll never get to this point.
1056
 
1057
case $basic_machine in
1058
        *-acorn)
1059
                os=-riscix1.2
1060
                ;;
1061 56 joel
        arm*-corel)
1062
                os=-linux
1063
                ;;
1064 39 lampret
        arm*-semi)
1065
                os=-aout
1066
                ;;
1067
        pdp11-*)
1068
                os=-none
1069
                ;;
1070
        *-dec | vax-*)
1071
                os=-ultrix4.2
1072
                ;;
1073
        m68*-apollo)
1074
                os=-domain
1075
                ;;
1076
        i386-sun)
1077
                os=-sunos4.0.2
1078
                ;;
1079
        m68000-sun)
1080
                os=-sunos3
1081
                # This also exists in the configure program, but was not the
1082
                # default.
1083
                # os=-sunos4
1084
                ;;
1085 56 joel
        m68*-cisco)
1086 39 lampret
                os=-aout
1087
                ;;
1088 56 joel
        mips*-cisco)
1089 39 lampret
                os=-elf
1090
                ;;
1091 56 joel
        mips*-*)
1092
                os=-elf
1093
                ;;
1094 39 lampret
        *-tti)  # must be before sparc entry or we get the wrong os.
1095
                os=-sysv3
1096
                ;;
1097
        sparc-* | *-sun)
1098
                os=-sunos4.1.1
1099
                ;;
1100 56 joel
        *-be)
1101 39 lampret
                os=-beos
1102
                ;;
1103
        *-ibm)
1104
                os=-aix
1105
                ;;
1106 56 joel
        *-wec)
1107 39 lampret
                os=-proelf
1108
                ;;
1109 56 joel
        *-winbond)
1110 39 lampret
                os=-proelf
1111
                ;;
1112 56 joel
        *-oki)
1113 39 lampret
                os=-proelf
1114
                ;;
1115
        *-hp)
1116
                os=-hpux
1117
                ;;
1118
        *-hitachi)
1119
                os=-hiux
1120
                ;;
1121
        i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1122
                os=-sysv
1123
                ;;
1124
        *-cbm)
1125 56 joel
                os=-amigaos
1126 39 lampret
                ;;
1127
        *-dg)
1128
                os=-dgux
1129
                ;;
1130
        *-dolphin)
1131
                os=-sysv3
1132
                ;;
1133
        m68k-ccur)
1134
                os=-rtu
1135
                ;;
1136
        m88k-omron*)
1137
                os=-luna
1138
                ;;
1139
        *-next )
1140
                os=-nextstep
1141
                ;;
1142
        *-sequent)
1143
                os=-ptx
1144
                ;;
1145
        *-crds)
1146
                os=-unos
1147
                ;;
1148
        *-ns)
1149
                os=-genix
1150
                ;;
1151
        i370-*)
1152
                os=-mvs
1153
                ;;
1154
        *-next)
1155
                os=-nextstep3
1156
                ;;
1157
        *-gould)
1158
                os=-sysv
1159
                ;;
1160
        *-highlevel)
1161
                os=-bsd
1162
                ;;
1163
        *-encore)
1164
                os=-bsd
1165
                ;;
1166
        *-sgi)
1167
                os=-irix
1168
                ;;
1169
        *-siemens)
1170
                os=-sysv4
1171
                ;;
1172
        *-masscomp)
1173
                os=-rtu
1174
                ;;
1175
        f301-fujitsu)
1176
                os=-uxpv
1177
                ;;
1178 56 joel
        *-rom68k)
1179 39 lampret
                os=-coff
1180
                ;;
1181 56 joel
        *-*bug)
1182 39 lampret
                os=-coff
1183
                ;;
1184 56 joel
        *-apple)
1185 39 lampret
                os=-macos
1186
                ;;
1187 56 joel
        *-atari*)
1188
                os=-mint
1189
                ;;
1190 39 lampret
        *)
1191
                os=-none
1192
                ;;
1193
esac
1194
fi
1195
 
1196
# Here we handle the case where we know the os, and the CPU type, but not the
1197
# manufacturer.  We pick the logical manufacturer.
1198
vendor=unknown
1199
case $basic_machine in
1200
        *-unknown)
1201
                case $os in
1202
                        -riscix*)
1203
                                vendor=acorn
1204
                                ;;
1205
                        -sunos*)
1206
                                vendor=sun
1207
                                ;;
1208
                        -aix*)
1209
                                vendor=ibm
1210
                                ;;
1211 56 joel
                        -beos*)
1212 39 lampret
                                vendor=be
1213
                                ;;
1214
                        -hpux*)
1215
                                vendor=hp
1216
                                ;;
1217 56 joel
                        -mpeix*)
1218
                                vendor=hp
1219
                                ;;
1220 39 lampret
                        -hiux*)
1221
                                vendor=hitachi
1222
                                ;;
1223
                        -unos*)
1224
                                vendor=crds
1225
                                ;;
1226
                        -dgux*)
1227
                                vendor=dg
1228
                                ;;
1229
                        -luna*)
1230
                                vendor=omron
1231
                                ;;
1232
                        -genix*)
1233
                                vendor=ns
1234
                                ;;
1235 56 joel
                        -mvs* | -opened*)
1236 39 lampret
                                vendor=ibm
1237
                                ;;
1238
                        -ptx*)
1239
                                vendor=sequent
1240
                                ;;
1241
                        -vxsim* | -vxworks*)
1242
                                vendor=wrs
1243
                                ;;
1244
                        -aux*)
1245
                                vendor=apple
1246
                                ;;
1247 56 joel
                        -hms*)
1248 39 lampret
                                vendor=hitachi
1249
                                ;;
1250 56 joel
                        -mpw* | -macos*)
1251 39 lampret
                                vendor=apple
1252
                                ;;
1253 56 joel
                        -*mint | -*MiNT)
1254
                                vendor=atari
1255
                                ;;
1256 39 lampret
                esac
1257
                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1258
                ;;
1259
esac
1260
 
1261
echo $basic_machine$os

powered by: WebSVN 2.1.0

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