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