Add NYU vendor, sym1 and sym2 os's. Alphabetize vendors.
[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.
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
21 case "$1" in
22 # cpu alone is a valid alias for cpu-none-none.
23 vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
24 | alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
25 | rtpc | rs6000 | i960)
26 cpu=$1
27 vendor=none
28 os=none
29 ;;
30 altos | altos3068)
31 cpu=m68k
32 vendor=altos
33 os=sysv # maybe?
34 ;;
35 altosgas)
36 cpu=m68k
37 vendor=altos
38 os=gas
39 ;;
40 am29k)
41 cpu=a29k
42 vendor=none
43 os=bsd
44 ;;
45 amdahl)
46 cpu=580
47 vendor=amdahl
48 os=uts
49 ;;
50 amigados)
51 cpu=m68k
52 vendor=cbm
53 os=amigados # Native AmigaDOS
54 ;;
55 amigaunix | amix)
56 cpu=m68k
57 vendor=cbm
58 os=svr4 # System V Release 4 (svr4 is an industry recognized acronym)
59 ;;
60 apollo68)
61 cpu=m68k
62 vendor=apollo
63 os=sysv # maybe?
64 ;;
65 balance)
66 cpu=ns32k
67 vendor=sequent
68 os=dynix
69 ;;
70 convex-c1)
71 cpu=c1
72 vendor=convex
73 os=sysv # maybe?
74 ;;
75 convex-c2)
76 cpu=c2
77 vendor=convex
78 os=sysv # maybe?
79 ;;
80 cray | ymp)
81 cpu=ymp
82 vendor=cray
83 os=unicos
84 ;;
85 cray2)
86 cpu=cray2
87 vendor=cray
88 os=unicos
89 ;;
90 dec3100 | decstatn | decstation | decstation-3100 | pmax | pmin)
91 cpu=mips
92 vendor=dec
93 os=ultrix
94 ;;
95 delta | 3300 | motorola-3300 | motorola-delta \
96 | 3300-motorola | delta-motorola)
97 cpu=m68k
98 vendor=motorola
99 os=sysv # maybe?
100 ;;
101
102 delta88)
103 cpu=m88k
104 vendor=motorola
105 os=m88kbcs
106 ;;
107
108 gmicro)
109 cpu=tron
110 vendor=gmicro
111 os=sysv # maybe?
112 ;;
113 # start-sanitize-v9
114 hal-32 | hal32)
115 cpu=sparc64
116 vendor=hal
117 os=hal32
118 ;;
119 hal-64 | hal64)
120 cpu=sparc64
121 vendor=hal
122 os=hal64
123 ;;
124 sparc64)
125 cpu=sparc64
126 vendor=sun
127 os=v9
128 ;;
129 sparc64-v7 | sparc64v7)
130 cpu=sparc64
131 vendor=sun
132 os=v7
133 ;;
134 # end-sanitize-v9
135 hp300bsd)
136 cpu=m68k
137 vendor=hp
138 os=bsd
139 ;;
140 hp300hpux | hpux | hp9k3[2-9][0-9])
141 cpu=m68k
142 vendor=hp
143 os=hpux
144 ;;
145 hp9k31[0-9] | hp9k2[0-9][0-9])
146 cpu=m68000
147 vendor=hp
148 os=hpux
149 ;;
150 i386sco)
151 cpu=i386
152 vendor=sco
153 os=sysv # maybe?
154 ;;
155 i386v)
156 cpu=i386
157 vendor=none
158 os=sysv
159 ;;
160 i386v32)
161 cpu=i386
162 vendor=none
163 os=sysv32
164 ;;
165 iris | iris4d)
166 cpu=mips
167 vendor=sgi
168 os=irix # maybe?
169 ;;
170 isi | isi68)
171 cpu=m68k
172 vendor=isi
173 os=sysv # maybe?
174 ;;
175 littlemips)
176 cpu=mips
177 vendor=little
178 os=bsd
179 ;;
180 magnum | m3230)
181 cpu=mips
182 vendor=mips
183 os=sysv # maybe?
184 ;;
185 merlin)
186 cpu=ns32k
187 vendor=utek
188 os=sysv # maybe?
189 ;;
190 miniframe)
191 cpu=m68000
192 vendor=convergent
193 os=sysv # maybe?
194 ;;
195 mmax)
196 cpu=ns32k
197 vendor=encore
198 os=sysv # maybe?
199 ;;
200 news | news700 | news800 | news900)
201 cpu=m68k
202 vendor=sony
203 os=sysv # maybe?
204 ;;
205 news1000)
206 cpu=m68030
207 vendor=sony
208 os=sysv # maybe?
209 ;;
210 news-3600 | bigmips | risc-news)
211 cpu=mips
212 vendor=sony
213 os=newsos # maybe?
214 ;;
215 next)
216 cpu=m68k
217 vendor=next
218 os=sysv # maybe?
219 ;;
220 nindy960)
221 cpu=i960
222 vendor=intel
223 os=nindy
224 ;;
225 none)
226 cpu=none
227 vendor=none
228 os=none
229 ;;
230 np1)
231 cpu=np1
232 vendor=gould
233 os=sysv # maybe?
234 ;;
235 pbd)
236 cpu=sparc
237 vendor=unicom
238 os=sysv
239 ;;
240 pn)
241 cpu=pn
242 vendor=gould
243 os=sysv # maybe?
244 ;;
245 ps2)
246 cpu=i386
247 vendor=ibm
248 os=sysv # maybe?
249 ;;
250 sun2)
251 cpu=m68000
252 vendor=sun
253 os=sunos4
254 ;;
255 sun2os3)
256 cpu=m68000
257 vendor=sun
258 os=sunos3
259 ;;
260 sun2os4)
261 cpu=m68000
262 vendor=sun
263 os=sunos4
264 ;;
265 sun3)
266 cpu=m68k
267 vendor=sun
268 os=sunos4
269 ;;
270 sun3os3)
271 cpu=m68k
272 vendor=sun
273 os=sunos3
274 ;;
275 sun3os4)
276 cpu=m68k
277 vendor=sun
278 os=sunos4
279 ;;
280 sun386 | roadrunner | sun386i)
281 cpu=i386
282 vendor=sun
283 os=sunos
284 ;;
285 sun4)
286 cpu=sparc
287 vendor=sun
288 os=sunos4
289 ;;
290 sun4os3)
291 cpu=sparc
292 vendor=sun
293 os=sunos3
294 ;;
295 sun4os4)
296 cpu=sparc
297 vendor=sun
298 os=sunos4
299 ;;
300 symmetry)
301 cpu=i386
302 vendor=sequent
303 os=dynix
304 ;;
305 tower | tower-32)
306 cpu=m68k
307 vendor=ncr
308 os=sysv # maybe?
309 ;;
310 umax)
311 cpu=ns32k
312 vendor=encore
313 os=sysv # maybe?
314 ;;
315 unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
316 cpu=m68k
317 vendor=att
318 os=sysv # maybe?
319 ;;
320 vax-dec)
321 cpu=vax
322 vendor=dec
323 os=ultrix # maybe?
324 ;;
325 vxworks68)
326 cpu=m68k
327 vendor=wrs
328 os=vxworks
329 ;;
330 vxworks960)
331 cpu=i960
332 vendor=wrs
333 os=vxworks
334 ;;
335 xmp)
336 cpu=xmp
337 vendor=cray
338 os=unicos
339 ;;
340 # not an alias. parse what we expect to be a canonical name.
341 *)
342 cpu=`echo $1 | sed 's/-.*$//'`
343
344 if [ "${cpu}" = "$1" ] ; then
345 # no vendor so this is an invalid name.
346 echo '***' No vendor: configuration \`$1\' not recognized 1>&2
347 exit 1
348 else
349 # parse out vendor
350 rest=`echo $1 | sed "s/${cpu}-//"`
351 vendor=`echo ${rest} | sed 's/-.*$//'`
352
353 if [ "${vendor}" = "${rest}" ] ; then
354 # a missing os is acceptable
355 os=none
356 else
357 os=`echo ${rest} | sed "s/${vendor}-//"`
358 fi
359 fi
360 ;;
361 esac
362
363 # At this point we should have three parts of a canonical name in cpu,
364 # vendor, and os.
365
366 # verify that the cpu is known.
367
368 case "${cpu}" in
369 none | vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc \
370 | ns32k | alliant | arm | c1 | c2 | mips | pyramid | tron \
371 | a29k | rtpc | rs6000 | i960 | xmp | ymp | cray2 | 580)
372 ;;
373
374 # start-sanitize-v9
375 sparc64) ;;
376 # end-sanitize-v9
377
378 *)
379 echo '***' Invalid cpu \`${cpu}\': configuration \`$1\' not recognized 1>&2
380 exit 1
381 ;;
382 esac
383
384 # verify that the vendor is known.
385
386 case "${vendor}" in
387 altos | amdahl | aout | apollo | att | bcs | bout |\
388 cbm | convergent | convex | coff | cray | dec | encore |\
389 gould | intel | isi | hp | ibm | little | mips | motorola |\
390 ncr | next | none | nyu | sco | sequent | sgi | sony | sun |\
391 unicom | utek | wrs ) ;;
392
393 # start-sanitize-v9
394 hal) ;;
395 # end-sanitize-v9
396
397 *)
398 echo '***' Invalid vendor \`${vendor}\': configuration \`$1\' not recognized 1>&2
399 exit 1
400 ;;
401 esac
402
403 # verify that the os is known, if it exists.
404
405 case "${os}" in
406 aix* | aout | bout | bsd* | coff | ctix* | dynix* | esix* | hpux* | irix* \
407 | isc* | mach* | newsos* | nindy* | none | osf* | osf* | sco* \
408 | sunos* | sysv* | ultrix* | unos* | v88r* | vms* | vxworks* \
409 | sym[1-9]* | unicos* | uts | svr4 | amigados)
410 ;;
411
412 # start-sanitize-v9
413 hal32 | hal64 | v7 | v9) ;;
414 # end-sanitize-v9
415
416 *)
417 echo '***' Invalid os \`${os}\': configuration \`$1\' not recognized 1>&2
418 exit 1
419 ;;
420 esac
421
422 echo ${cpu}-${vendor}-${os}