2
2
# Configuration validation subroutine script.
3
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5
# Free Software Foundation, Inc.
4
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
9
8
# This file is (in principle) common to ALL GNU software.
10
9
# The presence of a machine in this file suggests that SOME GNU software
34
33
# Please send patches to <config-patches@gnu.org>. Submit a context
35
# diff and a properly formatted GNU ChangeLog entry.
34
# diff and a properly formatted ChangeLog entry.
37
36
# Configuration subroutine to validate and canonicalize a configuration type.
38
37
# Supply the specified configuration type as an argument.
39
38
# If it is invalid, we print an error message on stderr and exit with code 1.
40
39
# Otherwise, we print the canonical config type on stdout and succeed.
42
# You can get the latest version of this script from:
43
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
45
41
# This file is supposed to be the same for all GNU packages
46
42
# and recognize all the CPU types, system types and aliases
47
43
# that are meaningful with *any* GNU software.
76
72
GNU config.sub ($timestamp)
78
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
79
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
80
Software Foundation, Inc.
74
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
75
Free Software Foundation, Inc.
82
77
This is free software; see the source for copying conditions. There is NO
83
78
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
124
119
# Here we must recognize all the valid KERNEL-OS combinations.
125
120
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
126
121
case $maybe_os in
127
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
128
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
129
kopensolaris*-gnu* | \
130
storm-chaos* | os2-emx* | rtmk-nova*)
122
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
123
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
132
125
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
153
146
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
154
147
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
155
148
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
156
-apple | -axis | -knuth | -cray | -microblaze)
149
-apple | -axis | -knuth | -cray)
163
153
-sim | -cisco | -oki | -wec | -winbond)
201
187
# Don't forget version if it is 3.2v4 or newer.
202
188
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205
# Don't forget version if it is 3.2v4 or newer.
206
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210
192
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
249
231
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
250
232
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
252
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
234
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
254
236
| c4x | clipper \
255
237
| d10v | d30v | dlx | dsp16xx \
256
| fido | fr30 | frv \
257
239
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
258
240
| i370 | i860 | i960 | ia64 \
259
241
| ip2k | iq2000 \
261
| m32c | m32r | m32rle | m68000 | m68k | m88k \
262
| maxq | mb | microblaze | mcore | mep | metag \
242
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
263
243
| mips | mipsbe | mipseb | mipsel | mipsle \
265
245
| mips64 | mips64el \
266
| mips64octeon | mips64octeonel \
246
| mips64vr | mips64vrel \
267
247
| mips64orion | mips64orionel \
268
| mips64r5900 | mips64r5900el \
269
| mips64vr | mips64vrel \
270
248
| mips64vr4100 | mips64vr4100el \
271
249
| mips64vr4300 | mips64vr4300el \
272
250
| mips64vr5000 | mips64vr5000el \
279
257
| mipsisa64sr71k | mipsisa64sr71kel \
280
258
| mipstx39 | mipstx39el \
281
259
| mn10200 | mn10300 \
286
262
| ns16k | ns32k \
288
264
| pdp10 | pdp11 | pj | pjl \
289
265
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
293
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
267
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
294
268
| sh64 | sh64le \
295
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
296
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
269
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
270
| sparcv8 | sparcv9 | sparcv9b \
298
272
| tahoe | thumb | tic4x | tic80 | tron \
302
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
304
basic_machine=$basic_machine-unknown
306
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
275
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
277
basic_machine=$basic_machine-unknown
280
basic_machine=$basic_machine-unknown
282
m6811 | m68hc11 | m6812 | m68hc12)
307
283
# Motorola 68HC11/12.
308
284
basic_machine=$basic_machine-unknown
311
287
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
314
basic_machine=mt-unknown
317
290
# We use `pc' rather than `unknown'
318
291
# because (1) that's what they normally are, and
332
305
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
333
306
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
334
307
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
336
309
| bfin-* | bs2000-* \
337
310
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
338
311
| clipper-* | craynv-* | cydra-* \
339
312
| d10v-* | d30v-* | dlx-* \
341
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
314
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
342
315
| h8300-* | h8500-* \
343
316
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
344
317
| i*86-* | i860-* | i960-* | ia64-* \
345
318
| ip2k-* | iq2000-* \
347
| m32c-* | m32r-* | m32rle-* \
319
| m32r-* | m32rle-* \
348
320
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
349
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
321
| m88110-* | m88k-* | maxq-* | mcore-* \
350
322
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
352
324
| mips64-* | mips64el-* \
353
| mips64octeon-* | mips64octeonel-* \
325
| mips64vr-* | mips64vrel-* \
354
326
| mips64orion-* | mips64orionel-* \
355
| mips64r5900-* | mips64r5900el-* \
356
| mips64vr-* | mips64vrel-* \
357
327
| mips64vr4100-* | mips64vr4100el-* \
358
328
| mips64vr4300-* | mips64vr4300el-* \
359
329
| mips64vr5000-* | mips64vr5000el-* \
366
336
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
367
337
| mipstx39-* | mipstx39el-* \
372
341
| none-* | np1-* | ns16k-* | ns32k-* \
374
343
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
375
344
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
377
| romp-* | rs6000-* | rx-* \
378
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
346
| romp-* | rs6000-* \
347
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
379
348
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
380
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
349
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
382
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
351
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
383
352
| tahoe-* | thumb-* \
384
353
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
385
| tile-* | tilegx-* \
388
355
| v850-* | v850e-* | vax-* \
390
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
391
| xstormy16-* | xtensa*-* \
357
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
358
| xstormy16-* | xtensa-* \
395
# Recognize the basic CPU types without company name, with glob match.
397
basic_machine=$basic_machine-unknown
399
364
# Recognize the various machine names and aliases which stand
400
365
# for a CPU type and a company and sometimes even an OS.
470
431
basic_machine=ns32k-sequent
474
basic_machine=bfin-unknown
478
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
482
basic_machine=powerpc-ibm
486
435
basic_machine=c90-cray
490
basic_machine=arm-unknown
494
439
basic_machine=c1-convex
1087
985
basic_machine=tic6x-unknown
1090
# This must be matched before tile*.
1092
basic_machine=tilegx-unknown
1096
basic_machine=tile-unknown
1100
989
basic_machine=mipstx39-unknown
1214
1099
basic_machine=we32k-att
1216
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1101
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1217
1102
basic_machine=sh-unknown
1219
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1104
sparc | sparcv8 | sparcv9 | sparcv9b)
1220
1105
basic_machine=sparc-sun
1263
1148
# First match some system type aliases
1264
1149
# that might get confused with valid system types.
1265
1150
# -solaris* is a basic system type, with this one exception.
1269
1151
-solaris1 | -solaris1.*)
1270
1152
os=`echo $os | sed -e 's|solaris1|sunos4|'`
1286
1168
# Each alternative MUST END IN A *, to match a version number.
1287
1169
# -sysv* is not here because it comes later, after sysvr4.
1288
1170
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1289
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1290
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1291
| -sym* | -kopensolaris* \
1171
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1172
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1292
1173
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1294
1175
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1295
1176
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1296
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1297
| -openbsd* | -solidbsd* \
1177
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1298
1178
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1299
1179
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1300
1180
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1301
1181
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1302
| -chorusos* | -chorusrdb* | -cegcc* \
1182
| -chorusos* | -chorusrdb* \
1303
1183
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1304
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1305
| -uxpv* | -beos* | -mpeix* | -udk* \
1184
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1306
1185
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1307
1186
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1308
1187
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1309
1188
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1310
1189
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1311
1190
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1312
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1191
| -skyos* | -haiku*)
1313
1192
# Remember, each alternative MUST END IN *, to match a version number.