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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [config.sub] - Blame information for rev 27

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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