Add powersys alias
[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 | rs6000 | 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 AmigaDOS
58 ;;
59 amigaunix | amix)
60 cpu=m68k
61 vendor=cbm
62 os=svr4 # System V Release 4 (svr4 is an industry recognized acronym)
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 h8300hds)
124 cpu=h8300
125 vendor=hitachi
126 os=hds
127 ;;
128
129 # start-sanitize-life
130 life)
131 cpu=life
132 vendor=philips
133 os=none
134 ;;
135 # end-sanitize-life
136
137 # start-sanitize-v9
138 hal-32 | hal32)
139 cpu=sparc64
140 vendor=hal
141 os=hal32
142 ;;
143 hal-64 | hal64)
144 cpu=sparc64
145 vendor=hal
146 os=hal64
147 ;;
148 sparc64)
149 cpu=sparc64
150 vendor=sun
151 os=v9
152 ;;
153 sparc64-v7 | sparc64v7)
154 cpu=sparc64
155 vendor=sun
156 os=v7
157 ;;
158 # end-sanitize-v9
159 hp300bsd)
160 cpu=m68k
161 vendor=hp
162 os=bsd
163 ;;
164 hp300hpux | hpux | hp9k3[2-9][0-9])
165 cpu=m68k
166 vendor=hp
167 os=hpux
168 ;;
169 hp9k31[0-9] | hp9k2[0-9][0-9])
170 cpu=m68000
171 vendor=hp
172 os=hpux
173 ;;
174 i386sco)
175 cpu=i386
176 vendor=sco
177 os=sysv # maybe?
178 ;;
179 i386v)
180 cpu=i386
181 vendor=none
182 os=sysv
183 ;;
184 i386v32)
185 cpu=i386
186 vendor=none
187 os=sysv32
188 ;;
189 iris | iris4d)
190 cpu=mips
191 vendor=sgi
192 os=irix # maybe?
193 ;;
194
195 dpx2)
196 vendor=bull
197 cpu=m68k
198 os=sysv
199 ;;
200 isi | isi68)
201 cpu=m68k
202 vendor=isi
203 os=sysv # maybe?
204 ;;
205 littlemips)
206 cpu=mips
207 vendor=little
208 os=bsd
209 ;;
210 magnum | m3230)
211 cpu=mips
212 vendor=mips
213 os=sysv # maybe?
214 ;;
215 merlin)
216 cpu=ns32k
217 vendor=utek
218 os=sysv # maybe?
219 ;;
220 miniframe)
221 cpu=m68000
222 vendor=convergent
223 os=sysv # maybe?
224 ;;
225 mmax)
226 cpu=ns32k
227 vendor=encore
228 os=sysv # maybe?
229 ;;
230 news | news700 | news800 | news900)
231 cpu=m68k
232 vendor=sony
233 os=newsos # newsos3c or newsos4c, c stands for cisc. Based on bsd-4.3.
234 ;;
235 news1000)
236 cpu=m68030
237 vendor=sony
238 os=newsos
239 ;;
240 news-3600 | bigmips | risc-news)
241 cpu=mips
242 vendor=sony
243 os=newsos # Presumably newsos4r, r stands for risc. Based on bsd-4.3.
244 ;;
245 next)
246 cpu=m68k
247 vendor=next
248 os=sysv # maybe?
249 ;;
250 nindy960)
251 cpu=i960
252 vendor=intel
253 os=nindy
254 ;;
255 none)
256 cpu=none
257 vendor=none
258 os=none
259 ;;
260 np1)
261 cpu=np1
262 vendor=gould
263 os=sysv # maybe?
264 ;;
265 rtpc)
266 cpu=romp
267 vendor=ibm
268 os=aix # maybe?
269 ;;
270 pbd)
271 cpu=sparc
272 vendor=unicom
273 os=sysv
274 ;;
275 pn)
276 cpu=pn
277 vendor=gould
278 os=sysv # maybe?
279 ;;
280 powersys)
281 cpu=rs6000
282 vendor=ibm
283 os=aix
284 ;;
285 ps2)
286 cpu=i386
287 vendor=ibm
288 os=sysv # maybe?
289 ;;
290 sun2)
291 cpu=m68000
292 vendor=sun
293 os=sunos4
294 ;;
295 sun2os3)
296 cpu=m68000
297 vendor=sun
298 os=sunos3
299 ;;
300 sun2os4)
301 cpu=m68000
302 vendor=sun
303 os=sunos4
304 ;;
305 sun3)
306 cpu=m68k
307 vendor=sun
308 os=sunos4
309 ;;
310 sun3os3)
311 cpu=m68k
312 vendor=sun
313 os=sunos3
314 ;;
315 sun3os4)
316 cpu=m68k
317 vendor=sun
318 os=sunos4
319 ;;
320 sun386 | roadrunner | sun386i)
321 cpu=i386
322 vendor=sun
323 os=sunos
324 ;;
325 sun4)
326 cpu=sparc
327 vendor=sun
328 os=sunos4
329 ;;
330 sun4os3)
331 cpu=sparc
332 vendor=sun
333 os=sunos3
334 ;;
335 sun4os4)
336 cpu=sparc
337 vendor=sun
338 os=sunos4
339 ;;
340 symmetry)
341 cpu=i386
342 vendor=sequent
343 os=dynix
344 ;;
345 tower | tower-32)
346 cpu=m68k
347 vendor=ncr
348 os=sysv # maybe?
349 ;;
350 ultra3)
351 cpu=a29k
352 vendor=nyu
353 os=sym1
354 ;;
355 umax)
356 cpu=ns32k
357 vendor=encore
358 os=sysv # maybe?
359 ;;
360 unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
361 cpu=m68k
362 vendor=att
363 os=sysv # maybe?
364 ;;
365 vax-dec)
366 cpu=vax
367 vendor=dec
368 os=ultrix # maybe?
369 ;;
370 vxworks68)
371 cpu=m68k
372 vendor=wrs
373 os=vxworks
374 ;;
375 vxworks960)
376 cpu=i960
377 vendor=wrs
378 os=vxworks
379 ;;
380 xmp)
381 cpu=xmp
382 vendor=cray
383 os=unicos
384 ;;
385 # not an alias. parse what we expect to be a canonical name.
386 *)
387 cpu=`echo $1 | sed 's/-.*$//'`
388
389 if [ "${cpu}" = "$1" ] ; then
390 # no vendor so this is an invalid name.
391 echo '***' Configuration \"$1\" not recognized 1>&2
392 exit 1
393 else
394 # parse out vendor
395 rest=`echo $1 | sed "s/${cpu}-//"`
396 vendor=`echo ${rest} | sed 's/-.*$//'`
397
398 if [ "${vendor}" = "${rest}" ] ; then
399 # a missing os is acceptable
400 os=none
401 else
402 os=`echo ${rest} | sed "s/${vendor}-//"`
403 fi
404 fi
405 ;;
406 esac
407
408 # At this point we should have three parts of a canonical name in cpu,
409 # vendor, and os.
410
411 # verify that the cpu is known.
412
413 case "${cpu}" in
414 none | vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc \
415 | ns32k | alliant | arm | c1 | c2 | mips | pyramid | tron \
416 | a29k | romp | rs6000 | i960 | xmp | ymp | cray2 | 580 | h8300)
417 ;;
418
419 # start-sanitize-life
420 life) ;;
421 # end-sanitize-life
422
423 # start-sanitize-v9
424 sparc64) ;;
425 # end-sanitize-v9
426
427 *)
428 echo '***' Invalid cpu \`${cpu}\': configuration \`$1\' not recognized 1>&2
429 exit 1
430 ;;
431 esac
432
433 # verify that the vendor is known.
434
435 case "${vendor}" in
436 altos | amd | amdahl | aout | apollo | att | bcs | bout |\
437 cbm | convergent | convex | coff | cray | dec | encore |\
438 gould | hitachi | intel | isi | hp | ibm | little | mips | motorola |\
439 ncr | next | none | nyu | sco | sequent | sgi | sony | sun |\
440 unicom | utek | wrs | bull ) ;;
441
442 # start-sanitize-life
443 philips) ;;
444 # end-sanitize-life
445
446 # start-sanitize-v9
447 hal) ;;
448 # end-sanitize-v9
449
450 *)
451 echo '***' Invalid vendor \`${vendor}\': configuration \`$1\' not recognized 1>&2
452 exit 1
453 ;;
454 esac
455
456 # verify that the os is known, if it exists.
457
458 case "${os}" in
459 aix* | aout | bout | bsd* | coff | ctix* | dgux* | dynix* | esix* \
460 | ebmon | hpux* \
461 | hds | irix* | isc* | kern | mach* | msdos* | newsos* | nindy* | none \
462 | osf* | sco* | sunos* | sysv* | ultrix* | unos* | v88r* \
463 | vms* | vxworks* | sym[1-9]* | unicos* | uts | svr4 \
464 | amigados)
465 ;;
466
467 # start-sanitize-v9
468 hal32 | hal64 | v7 | v9) ;;
469 # end-sanitize-v9
470
471 *)
472 echo '***' Invalid os \`${os}\': configuration \`$1\' not recognized 1>&2
473 exit 1
474 ;;
475 esac
476
477 echo ${cpu}-${vendor}-${os}
This page took 0.040783 seconds and 5 git commands to generate.