exploit the new executable config.status
[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
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 | romp | rs6000 | i960 | h8300)
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
171 dpx2)
172 vendor=bull
173 cpu=m68k
174 os=sysv
175 ;;
176 isi | isi68)
177 cpu=m68k
178 vendor=isi
179 os=sysv # maybe?
180 ;;
181 littlemips)
182 cpu=mips
183 vendor=little
184 os=bsd
185 ;;
186 magnum | m3230)
187 cpu=mips
188 vendor=mips
189 os=sysv # maybe?
190 ;;
191 merlin)
192 cpu=ns32k
193 vendor=utek
194 os=sysv # maybe?
195 ;;
196 miniframe)
197 cpu=m68000
198 vendor=convergent
199 os=sysv # maybe?
200 ;;
201 mmax)
202 cpu=ns32k
203 vendor=encore
204 os=sysv # maybe?
205 ;;
206 news | news700 | news800 | news900)
207 cpu=m68k
208 vendor=sony
209 os=newsos3 # Based on bsd-4.3
210 ;;
211 news1000)
212 cpu=m68030
213 vendor=sony
214 os=newsos3 # ?
215 ;;
216 news-3600 | bigmips | risc-news)
217 cpu=mips
218 vendor=sony
219 os=newsos4 # Presumably?
220 ;;
221 next)
222 cpu=m68k
223 vendor=next
224 os=sysv # maybe?
225 ;;
226 nindy960)
227 cpu=i960
228 vendor=intel
229 os=nindy
230 ;;
231 none)
232 cpu=none
233 vendor=none
234 os=none
235 ;;
236 np1)
237 cpu=np1
238 vendor=gould
239 os=sysv # maybe?
240 ;;
241 rtpc)
242 cpu=romp
243 vendor=ibm
244 os=aix # maybe?
245 ;;
246 pbd)
247 cpu=sparc
248 vendor=unicom
249 os=sysv
250 ;;
251 pn)
252 cpu=pn
253 vendor=gould
254 os=sysv # maybe?
255 ;;
256 ps2)
257 cpu=i386
258 vendor=ibm
259 os=sysv # maybe?
260 ;;
261 sun2)
262 cpu=m68000
263 vendor=sun
264 os=sunos4
265 ;;
266 sun2os3)
267 cpu=m68000
268 vendor=sun
269 os=sunos3
270 ;;
271 sun2os4)
272 cpu=m68000
273 vendor=sun
274 os=sunos4
275 ;;
276 sun3)
277 cpu=m68k
278 vendor=sun
279 os=sunos4
280 ;;
281 sun3os3)
282 cpu=m68k
283 vendor=sun
284 os=sunos3
285 ;;
286 sun3os4)
287 cpu=m68k
288 vendor=sun
289 os=sunos4
290 ;;
291 sun386 | roadrunner | sun386i)
292 cpu=i386
293 vendor=sun
294 os=sunos
295 ;;
296 sun4)
297 cpu=sparc
298 vendor=sun
299 os=sunos4
300 ;;
301 sun4os3)
302 cpu=sparc
303 vendor=sun
304 os=sunos3
305 ;;
306 sun4os4)
307 cpu=sparc
308 vendor=sun
309 os=sunos4
310 ;;
311 symmetry)
312 cpu=i386
313 vendor=sequent
314 os=dynix
315 ;;
316 tower | tower-32)
317 cpu=m68k
318 vendor=ncr
319 os=sysv # maybe?
320 ;;
321 ultra3)
322 cpu=a29k
323 vendor=nyu
324 os=sym1
325 ;;
326 umax)
327 cpu=ns32k
328 vendor=encore
329 os=sysv # maybe?
330 ;;
331 unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
332 cpu=m68k
333 vendor=att
334 os=sysv # maybe?
335 ;;
336 vax-dec)
337 cpu=vax
338 vendor=dec
339 os=ultrix # maybe?
340 ;;
341 vxworks68)
342 cpu=m68k
343 vendor=wrs
344 os=vxworks
345 ;;
346 vxworks960)
347 cpu=i960
348 vendor=wrs
349 os=vxworks
350 ;;
351 xmp)
352 cpu=xmp
353 vendor=cray
354 os=unicos
355 ;;
356 # not an alias. parse what we expect to be a canonical name.
357 *)
358 cpu=`echo $1 | sed 's/-.*$//'`
359
360 if [ "${cpu}" = "$1" ] ; then
361 # no vendor so this is an invalid name.
362 echo '***' No vendor: configuration \`$1\' not recognized 1>&2
363 exit 1
364 else
365 # parse out vendor
366 rest=`echo $1 | sed "s/${cpu}-//"`
367 vendor=`echo ${rest} | sed 's/-.*$//'`
368
369 if [ "${vendor}" = "${rest}" ] ; then
370 # a missing os is acceptable
371 os=none
372 else
373 os=`echo ${rest} | sed "s/${vendor}-//"`
374 fi
375 fi
376 ;;
377 esac
378
379 # At this point we should have three parts of a canonical name in cpu,
380 # vendor, and os.
381
382 # verify that the cpu is known.
383
384 case "${cpu}" in
385 none | vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc \
386 | ns32k | alliant | arm | c1 | c2 | mips | pyramid | tron \
387 | a29k | romp | rs6000 | i960 | xmp | ymp | cray2 | 580 | h8300)
388 ;;
389
390 # start-sanitize-v9
391 sparc64) ;;
392 # end-sanitize-v9
393
394 *)
395 echo '***' Invalid cpu \`${cpu}\': configuration \`$1\' not recognized 1>&2
396 exit 1
397 ;;
398 esac
399
400 # verify that the vendor is known.
401
402 case "${vendor}" in
403 altos | amdahl | aout | apollo | att | bcs | bout |\
404 cbm | convergent | convex | coff | cray | dec | encore |\
405 gould | intel | isi | hp | ibm | little | mips | motorola |\
406 ncr | next | none | nyu | sco | sequent | sgi | sony | sun |\
407 unicom | utek | wrs | bull ) ;;
408
409 # start-sanitize-v9
410 hal) ;;
411 # end-sanitize-v9
412
413 *)
414 echo '***' Invalid vendor \`${vendor}\': configuration \`$1\' not recognized 1>&2
415 exit 1
416 ;;
417 esac
418
419 # verify that the os is known, if it exists.
420
421 case "${os}" in
422 aix* | aout | bout | bsd* | coff | ctix* | dynix* | esix* | hpux* | irix* \
423 | isc* | kern | mach* | newsos* | nindy* | none | osf* | sco* \
424 | sunos* | sysv* | ultrix* | unos* | v88r* | vms* | vxworks* \
425 | sym[1-9]* | unicos* | uts | svr4 | amigados)
426 ;;
427
428 # start-sanitize-v9
429 hal32 | hal64 | v7 | v9) ;;
430 # end-sanitize-v9
431
432 *)
433 echo '***' Invalid os \`${os}\': configuration \`$1\' not recognized 1>&2
434 exit 1
435 ;;
436 esac
437
438 echo ${cpu}-${vendor}-${os}
This page took 0.039467 seconds and 4 git commands to generate.