Make it compile for cross-debugging.
[deliverable/binutils-gdb.git] / config.sub
1 #!/bin/sh
2
3 # Configuration subroutine to validate and canonicalize a configuration type.
4 # Supply the specified configuration type as an argument.
5 # If it is invalid, we print an error message on stderr and exit with code 1.
6 # Otherwise, we print the canonical config type on stdout and succeed.
7
8 # This file is supposed to be the same for all GNU packages
9 # and recognize all the CPU types, system types and aliases
10 # that are meaningful with *any* GNU software.
11 # Each package is responsible for reporting which valid configurations
12 # it does not support. The user should be able to distinguish
13 # a failure to support a valid configuration from a meaningless
14 # configuration (e.g. a typo).
15
16 # Please email any bugs, comments, and/or additions to this file to:
17 # configure@cygnus.com
18
19 # decode aliases into canonical names
20 # Note that aliases MUST fit into 12 characters or less otherwise the
21 # install targets and subdir builds all die on machines that support
22 # only 14 char file names. They die miserably on machines that rudely
23 # enforce the 14 character limit.
24
25 case "$1" in
26 # cpu alone is a valid alias for cpu-none-none.
27 vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
28 | alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
29 | romp | i960 | h8300)
30 cpu=$1
31 vendor=none
32 os=none
33 ;;
34 altos | altos3068)
35 cpu=m68k
36 vendor=altos
37 os=sysv # maybe?
38 ;;
39 altosgas)
40 cpu=m68k
41 vendor=altos
42 os=gas
43 ;;
44 am29k)
45 cpu=a29k
46 vendor=none
47 os=bsd
48 ;;
49 amdahl)
50 cpu=580
51 vendor=amdahl
52 os=uts
53 ;;
54 amigados)
55 cpu=m68k
56 vendor=cbm
57 os=amigados # Native Amiga operating system
58 ;;
59 amigaunix | amix)
60 cpu=m68k
61 vendor=cbm
62 os=svr4
63 ;;
64 apollo68)
65 cpu=m68k
66 vendor=apollo
67 os=sysv # maybe?
68 ;;
69 balance)
70 cpu=ns32k
71 vendor=sequent
72 os=dynix
73 ;;
74 convex-c1)
75 cpu=c1
76 vendor=convex
77 os=sysv # maybe?
78 ;;
79 convex-c2)
80 cpu=c2
81 vendor=convex
82 os=sysv # maybe?
83 ;;
84 cray | ymp)
85 cpu=ymp
86 vendor=cray
87 os=unicos
88 ;;
89 cray2)
90 cpu=cray2
91 vendor=cray
92 os=unicos
93 ;;
94 dec3100 | decstatn | decstation | decstation-3100 | pmax | pmin)
95 cpu=mips
96 vendor=dec
97 os=ultrix
98 ;;
99 delta | 3300 | motorola-3300 | motorola-delta \
100 | 3300-motorola | delta-motorola)
101 cpu=m68k
102 vendor=motorola
103 os=sysv # maybe?
104 ;;
105
106 delta88)
107 cpu=m88k
108 vendor=motorola
109 os=m88kbcs
110 ;;
111
112 ebmon29k)
113 cpu=a29k
114 vendor=amd
115 os=ebmon
116 ;;
117 gmicro)
118 cpu=tron
119 vendor=gmicro
120 os=sysv # maybe?
121 ;;
122
123 harris)
124 cpu=m88k
125 vendor=harris
126 os=m88kbcs
127 ;;
128
129 h8300hds)
130 cpu=h8300
131 vendor=hitachi
132 os=hds
133 ;;
134
135 # start-sanitize-life
136 life)
137 cpu=life
138 vendor=philips
139 os=none
140 ;;
141 # end-sanitize-life
142
143 # start-sanitize-v9
144 hal-32 | hal32)
145 cpu=sparc64
146 vendor=hal
147 os=hal32
148 ;;
149 hal-64 | hal64)
150 cpu=sparc64
151 vendor=hal
152 os=hal64
153 ;;
154 sparc64)
155 cpu=sparc64
156 vendor=sun
157 os=v9
158 ;;
159 sparc64-v7 | sparc64v7)
160 cpu=sparc64
161 vendor=sun
162 os=v7
163 ;;
164 # end-sanitize-v9
165 hp300bsd)
166 cpu=m68k
167 vendor=hp
168 os=bsd
169 ;;
170 hp300hpux | hpux | hp9k3[2-9][0-9])
171 cpu=m68k
172 vendor=hp
173 os=hpux
174 ;;
175 hp9k31[0-9] | hp9k2[0-9][0-9])
176 cpu=m68000
177 vendor=hp
178 os=hpux
179 ;;
180 i386sco)
181 cpu=i386
182 vendor=sco
183 os=sysv # maybe?
184 ;;
185 i386v)
186 cpu=i386
187 vendor=none
188 os=sysv
189 ;;
190 i386v32)
191 cpu=i386
192 vendor=none
193 os=sysv32
194 ;;
195 iris | iris4d)
196 cpu=mips
197 vendor=sgi
198 os=irix # maybe?
199 ;;
200
201 dpx2)
202 vendor=bull
203 cpu=m68k
204 os=sysv
205 ;;
206 isi | isi68)
207 cpu=m68k
208 vendor=isi
209 os=sysv # maybe?
210 ;;
211 littlemips)
212 cpu=mips
213 vendor=little
214 os=bsd
215 ;;
216 magnum | m3230)
217 cpu=mips
218 vendor=mips
219 os=sysv # maybe?
220 ;;
221 merlin)
222 cpu=ns32k
223 vendor=utek
224 os=sysv # maybe?
225 ;;
226 miniframe)
227 cpu=m68000
228 vendor=convergent
229 os=sysv # maybe?
230 ;;
231 mmax)
232 cpu=ns32k
233 vendor=encore
234 os=sysv # maybe?
235 ;;
236 ncr3000)
237 cpu=i386
238 vendor=ncr
239 os=svr4
240 ;;
241 news | news700 | news800 | news900)
242 cpu=m68k
243 vendor=sony
244 os=newsos # newsos3c or newsos4c, c stands for cisc. Based on bsd-4.3.
245 ;;
246 news1000)
247 cpu=m68030
248 vendor=sony
249 os=newsos
250 ;;
251 news-3600 | bigmips | risc-news)
252 cpu=mips
253 vendor=sony
254 os=newsos # Presumably newsos4r, r stands for risc. Based on bsd-4.3.
255 ;;
256 next)
257 cpu=m68k
258 vendor=next
259 os=sysv # maybe?
260 ;;
261 nindy960)
262 cpu=i960
263 vendor=intel
264 os=nindy
265 ;;
266 none)
267 cpu=none
268 vendor=none
269 os=none
270 ;;
271 np1)
272 cpu=np1
273 vendor=gould
274 os=sysv # maybe?
275 ;;
276 rtpc)
277 cpu=romp
278 vendor=ibm
279 os=aix # maybe?
280 ;;
281 pbd)
282 cpu=sparc
283 vendor=unicom
284 os=sysv
285 ;;
286 pn)
287 cpu=pn
288 vendor=gould
289 os=sysv # maybe?
290 ;;
291 powersys | rs6000)
292 cpu=rs6000
293 vendor=ibm
294 os=aix
295 ;;
296 ps2)
297 cpu=i386
298 vendor=ibm
299 os=sysv # maybe?
300 ;;
301 sun2)
302 cpu=m68000
303 vendor=sun
304 os=sunos4
305 ;;
306 sun2os3)
307 cpu=m68000
308 vendor=sun
309 os=sunos3
310 ;;
311 sun2os4)
312 cpu=m68000
313 vendor=sun
314 os=sunos4
315 ;;
316 sun3)
317 cpu=m68k
318 vendor=sun
319 os=sunos4
320 ;;
321 sun3os3)
322 cpu=m68k
323 vendor=sun
324 os=sunos3
325 ;;
326 sun3os4)
327 cpu=m68k
328 vendor=sun
329 os=sunos4
330 ;;
331 sun386 | roadrunner | sun386i)
332 cpu=i386
333 vendor=sun
334 os=sunos
335 ;;
336 sun4)
337 cpu=sparc
338 vendor=sun
339 os=sunos4
340 ;;
341 sun4os3)
342 cpu=sparc
343 vendor=sun
344 os=sunos3
345 ;;
346 sun4os4)
347 cpu=sparc
348 vendor=sun
349 os=sunos4
350 ;;
351 symmetry)
352 cpu=i386
353 vendor=sequent
354 os=dynix
355 ;;
356 tower | tower-32)
357 cpu=m68k
358 vendor=ncr
359 os=sysv # maybe?
360 ;;
361 ultra3)
362 cpu=a29k
363 vendor=nyu
364 os=sym1
365 ;;
366 umax)
367 cpu=ns32k
368 vendor=encore
369 os=sysv # maybe?
370 ;;
371 unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
372 cpu=m68k
373 vendor=att
374 os=sysv # maybe?
375 ;;
376 vax-dec)
377 cpu=vax
378 vendor=dec
379 os=ultrix # maybe?
380 ;;
381 vxworks68)
382 cpu=m68k
383 vendor=wrs
384 os=vxworks
385 ;;
386 vxworks960)
387 cpu=i960
388 vendor=wrs
389 os=vxworks
390 ;;
391 xmp)
392 cpu=xmp
393 vendor=cray
394 os=unicos
395 ;;
396 # not an alias. parse what we expect to be a canonical name.
397 *)
398 cpu=`echo $1 | sed 's/-.*$//'`
399
400 if [ "${cpu}" = "$1" ] ; then
401 # no vendor so this is an invalid name.
402 echo '***' Configuration \"$1\" not recognized 1>&2
403 exit 1
404 else
405 # parse out vendor
406 rest=`echo $1 | sed "s/${cpu}-//"`
407 vendor=`echo ${rest} | sed 's/-.*$//'`
408
409 if [ "${vendor}" = "${rest}" ] ; then
410 # a missing os is acceptable
411 os=none
412 else
413 os=`echo ${rest} | sed "s/${vendor}-//"`
414 fi
415 fi
416 ;;
417 esac
418
419 # At this point we should have three parts of a canonical name in cpu,
420 # vendor, and os.
421
422 # verify that the cpu is known.
423
424 case "${cpu}" in
425 none | vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc \
426 | ns32k | alliant | arm | c1 | c2 | mips | pyramid | tron \
427 | a29k | romp | rs6000 | i960 | xmp | ymp | cray2 | 580 | h8300)
428 ;;
429
430 # start-sanitize-life
431 life) ;;
432 # end-sanitize-life
433
434 # start-sanitize-v9
435 sparc64) ;;
436 # end-sanitize-v9
437
438 *)
439 echo '***' Invalid cpu \`${cpu}\': configuration \`$1\' not recognized 1>&2
440 exit 1
441 ;;
442 esac
443
444 # verify that the vendor is known.
445
446 case "${vendor}" in
447 altos | amd | amdahl | aout | apollo | att | bcs | bout |\
448 cbm | convergent | convex | coff | cray | dec | encore |\
449 gould | harris | hitachi | intel | isi | hp | ibm | little | mips | motorola | \
450 ncr | next | none | nyu | sco | sequent | sgi | sony | sun |\
451 unicom | utek | wrs | bull ) ;;
452
453 # start-sanitize-life
454 philips) ;;
455 # end-sanitize-life
456
457 # start-sanitize-v9
458 hal) ;;
459 # end-sanitize-v9
460
461 *)
462 echo '***' Invalid vendor \`${vendor}\': configuration \`$1\' not recognized 1>&2
463 exit 1
464 ;;
465 esac
466
467 # verify that the os is known, if it exists.
468
469 case "${os}" in
470 aix* | aout | bout | bsd* | coff | ctix* | dgux* | dynix* | esix* \
471 | ebmon | hpux* \
472 | hds | irix* | isc* | kern | mach* | msdos* | newsos* | nindy* | none \
473 | osf* | sco* | sunos* | sysv* | ultrix* | unos* | v88r* \
474 | vms* | vxworks* | sym[1-9]* | unicos* | uts | svr4 | m88kbcs \
475 | amigados)
476 ;;
477
478 # start-sanitize-v9
479 hal32 | hal64 | v7 | v9) ;;
480 # end-sanitize-v9
481
482 *)
483 echo '***' Invalid os \`${os}\': configuration \`$1\' not recognized 1>&2
484 exit 1
485 ;;
486 esac
487
488 echo ${cpu}-${vendor}-${os}
This page took 0.048221 seconds and 4 git commands to generate.