Output hex with local_hex_string for Modula-2 support.
[deliverable/binutils-gdb.git] / gdb / config.sub
CommitLineData
6c815bbe
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
12bf2032 14# configuration (e.g. a typo).
6c815bbe 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
6c815bbe 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 ;;
12bf2032
JG
30altos | altos3068)
31 cpu=m68k
32 vendor=altos
33 os=sysv # maybe?
69e87de2 34 ;;
12bf2032 35altosgas)
69e87de2 36 cpu=m68k
12bf2032
JG
37 vendor=altos
38 os=gas
69e87de2 39 ;;
12bf2032
JG
40amdahl)
41 cpu=580
42 vendor=amdahl
43 os=uts
69e87de2 44 ;;
12bf2032
JG
45amigados)
46 cpu=m68k
47 vendor=cbm
48 os=amigados # Native AmigaDOS
69e87de2 49 ;;
12bf2032
JG
50amigaunix | amix)
51 cpu=m68k
52 vendor=cbm
53 os=svr4 # System V Release 4 (svr4 is an industry recognized acronym)
54 ;;
55apollo68)
56 cpu=m68k
57 vendor=apollo
58 os=sysv # maybe?
59 ;;
60balance)
69e87de2 61 cpu=ns32k
12bf2032
JG
62 vendor=sequent
63 os=dynix
64 ;;
65convex-c1)
66 cpu=c1
67 vendor=convex
69e87de2
RP
68 os=sysv # maybe?
69 ;;
12bf2032
JG
70convex-c2)
71 cpu=c2
72 vendor=convex
69e87de2
RP
73 os=sysv # maybe?
74 ;;
12bf2032
JG
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 ;;
12bf2032
JG
96
97delta88)
98 cpu=m88k
99 vendor=motorola
100 os=m88kbcs
101 ;;
102
103gmicro)
104 cpu=tron
105 vendor=gmicro
69e87de2
RP
106 os=sysv # maybe?
107 ;;
12bf2032
JG
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
bceb2dde 163 os=irix # maybe?
69e87de2 164 ;;
12bf2032
JG
165isi | isi68)
166 cpu=m68k
167 vendor=isi
168 os=sysv # maybe?
169 ;;
170littlemips)
171 cpu=mips
172 vendor=little
173 os=bsd
174 ;;
175magnum | m3230)
176 cpu=mips
177 vendor=mips
178 os=sysv # maybe?
179 ;;
180merlin)
181 cpu=ns32k
182 vendor=utek
183 os=sysv # maybe?
184 ;;
185miniframe)
186 cpu=m68000
187 vendor=convergent
188 os=sysv # maybe?
189 ;;
190mmax)
191 cpu=ns32k
192 vendor=encore
69e87de2
RP
193 os=sysv # maybe?
194 ;;
195news | news700 | news800 | news900)
196 cpu=m68k
197 vendor=sony
198 os=sysv # maybe?
199 ;;
12bf2032
JG
200news1000)
201 cpu=m68030
202 vendor=sony
69e87de2
RP
203 os=sysv # maybe?
204 ;;
12bf2032
JG
205news-3600 | bigmips | risc-news)
206 cpu=mips
207 vendor=sony
208 os=newsos # maybe?
209 ;;
210next)
69e87de2 211 cpu=m68k
12bf2032 212 vendor=next
69e87de2
RP
213 os=sysv # maybe?
214 ;;
12bf2032
JG
215nindy960)
216 cpu=i960
217 vendor=intel
218 os=nindy
69e87de2 219 ;;
12bf2032
JG
220none)
221 cpu=none
222 vendor=none
223 os=none
69e87de2 224 ;;
12bf2032
JG
225np1)
226 cpu=np1
227 vendor=gould
69e87de2
RP
228 os=sysv # maybe?
229 ;;
12bf2032
JG
230pbd)
231 cpu=sparc
232 vendor=unicom
233 os=sysv
234 ;;
235pn)
236 cpu=pn
237 vendor=gould
238 os=sysv # maybe?
239 ;;
240ps2)
69e87de2 241 cpu=i386
12bf2032
JG
242 vendor=ibm
243 os=sysv # maybe?
69e87de2
RP
244 ;;
245sun2)
246 cpu=m68000
247 vendor=sun
248 os=sunos4
249 ;;
250sun2os3)
251 cpu=m68000
252 vendor=sun
253 os=sunos3
254 ;;
255sun2os4)
256 cpu=m68000
257 vendor=sun
258 os=sunos4
259 ;;
260sun3)
261 cpu=m68k
262 vendor=sun
263 os=sunos4
264 ;;
265sun3os3)
266 cpu=m68k
267 vendor=sun
268 os=sunos3
269 ;;
270sun3os4)
271 cpu=m68k
272 vendor=sun
273 os=sunos4
274 ;;
12bf2032
JG
275sun386 | roadrunner | sun386i)
276 cpu=i386
277 vendor=sun
278 os=sunos
279 ;;
69e87de2
RP
280sun4)
281 cpu=sparc
282 vendor=sun
283 os=sunos4
284 ;;
285sun4os3)
286 cpu=sparc
287 vendor=sun
288 os=sunos3
289 ;;
290sun4os4)
291 cpu=sparc
292 vendor=sun
293 os=sunos4
294 ;;
12bf2032 295symmetry)
69e87de2 296 cpu=i386
12bf2032
JG
297 vendor=sequent
298 os=dynix
69e87de2 299 ;;
12bf2032 300tower | tower-32)
69e87de2 301 cpu=m68k
12bf2032 302 vendor=ncr
69e87de2
RP
303 os=sysv # maybe?
304 ;;
12bf2032
JG
305ultra3)
306 cpu=a29k
307 vendor=nyu
308 os=sym1
69e87de2 309 ;;
12bf2032
JG
310umax)
311 cpu=ns32k
312 vendor=encore
69e87de2
RP
313 os=sysv # maybe?
314 ;;
12bf2032 315unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
69e87de2 316 cpu=m68k
12bf2032 317 vendor=att
69e87de2
RP
318 os=sysv # maybe?
319 ;;
12bf2032
JG
320vax-dec)
321 cpu=vax
69e87de2 322 vendor=dec
12bf2032 323 os=ultrix # maybe?
69e87de2 324 ;;
12bf2032
JG
325vxworks68)
326 cpu=m68k
327 vendor=wrs
328 os=vxworks
69e87de2 329 ;;
12bf2032
JG
330vxworks960)
331 cpu=i960
332 vendor=wrs
333 os=vxworks
69e87de2 334 ;;
12bf2032
JG
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
6c815bbe 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 ;;
6c815bbe
RP
361esac
362
69e87de2
RP
363# At this point we should have three parts of a canonical name in cpu,
364# vendor, and os.
6c815bbe 365
69e87de2
RP
366# verify that the cpu is known.
367
368case "${cpu}" in
12bf2032
JG
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 ;;
12bf2032
JG
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
12bf2032
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 ) ;;
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
bceb2dde 406aix* | aout | bout | bsd* | coff | ctix* | dynix* | esix* | hpux* | irix* \
69e87de2 407 | isc* | mach* | newsos* | nindy* | none | osf* | osf* | sco* \
12bf2032
JG
408 | sunos* | sysv* | ultrix* | unos* | v88r* | vms* | vxworks* \
409 | sym[1-9]* | unicos* | uts | svr4 | amigados)
69e87de2 410 ;;
12bf2032
JG
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 ;;
6c815bbe
RP
420esac
421
69e87de2 422echo ${cpu}-${vendor}-${os}
This page took 0.045562 seconds and 4 git commands to generate.