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