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