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