2
2
# Configuration validation subroutine script.
3
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
# 2011, 2012 Free Software Foundation, Inc.
8
9
# This file is (in principle) common to ALL GNU software.
9
10
# The presence of a machine in this file suggests that SOME GNU software
20
21
# GNU General Public License for more details.
22
23
# You should have received a copy of the GNU General Public License
23
# along with this program; if not, write to the Free Software
24
# Foundation, Inc., 59 Temple Place - Suite 330,
25
# Boston, MA 02111-1307, USA.
24
# along with this program; if not, see <http://www.gnu.org/licenses/>.
27
26
# As a special exception to the GNU General Public License, if you
28
27
# distribute this file as part of a program that contains a
29
28
# configuration script generated by Autoconf, you may include it under
30
29
# the same distribution terms that you use for the rest of that program.
32
32
# Please send patches to <config-patches@gnu.org>. Submit a context
33
# diff and a properly formatted ChangeLog entry.
33
# diff and a properly formatted GNU ChangeLog entry.
35
35
# Configuration subroutine to validate and canonicalize a configuration type.
36
36
# Supply the specified configuration type as an argument.
37
37
# If it is invalid, we print an error message on stderr and exit with code 1.
38
38
# Otherwise, we print the canonical config type on stdout and succeed.
40
# You can get the latest version of this script from:
41
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
40
43
# This file is supposed to be the same for all GNU packages
41
44
# and recognize all the CPU types, system types and aliases
42
45
# that are meaningful with *any* GNU software.
71
74
GNU config.sub ($timestamp)
73
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
76
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
77
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
74
78
Free Software Foundation, Inc.
76
80
This is free software; see the source for copying conditions. There is NO
118
122
# Here we must recognize all the valid KERNEL-OS combinations.
119
123
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
120
124
case $maybe_os in
121
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
125
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
126
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
127
knetbsd*-gnu* | netbsd*-gnu* | \
128
kopensolaris*-gnu* | \
129
storm-chaos* | os2-emx* | rtmk-nova*)
123
131
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
135
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
126
138
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
127
139
if [ $basic_machine != $1 ]
226
249
# Some are omitted here because they have special meanings below.
252
| aarch64 | aarch64_be \
229
253
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
230
254
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
231
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
256
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
232
259
| c4x | clipper \
233
260
| d10v | d30v | dlx | dsp16xx \
262
| fido | fr30 | frv \
235
263
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
236
265
| i370 | i860 | i960 | ia64 \
238
| m32r | m68000 | m68k | m88k | mcore \
269
| m32c | m32r | m32rle | m68000 | m68k | m88k \
270
| maxq | mb | microblaze | mcore | mep | metag \
239
271
| mips | mipsbe | mipseb | mipsel | mipsle \
241
273
| mips64 | mips64el \
274
| mips64octeon | mips64octeonel \
275
| mips64orion | mips64orionel \
276
| mips64r5900 | mips64r5900el \
242
277
| mips64vr | mips64vrel \
243
| mips64orion | mips64orionel \
244
278
| mips64vr4100 | mips64vr4100el \
245
279
| mips64vr4300 | mips64vr4300el \
246
280
| mips64vr5000 | mips64vr5000el \
281
| mips64vr5900 | mips64vr5900el \
247
282
| mipsisa32 | mipsisa32el \
248
283
| mipsisa32r2 | mipsisa32r2el \
249
284
| mipsisa64 | mipsisa64el \
285
| mipsisa64r2 | mipsisa64r2el \
250
286
| mipsisa64sb1 | mipsisa64sb1el \
251
287
| mipsisa64sr71k | mipsisa64sr71kel \
252
288
| mipstx39 | mipstx39el \
253
289
| mn10200 | mn10300 \
293
| nds32 | nds32le | nds32be \
255
295
| ns16k | ns32k \
257
298
| pdp10 | pdp11 | pj | pjl \
258
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
299
| powerpc | powerpc64 | powerpc64le | powerpcle \
261
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
303
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
262
304
| sh64 | sh64le \
263
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
265
| tahoe | thumb | tic4x | tic80 | tron \
305
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
306
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
308
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
310
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
268
| x86 | xscale | xstormy16 | xtensa \
312
| x86 | xc16x | xstormy16 | xtensa \
270
314
basic_machine=$basic_machine-unknown
272
m6811 | m68hc11 | m6812 | m68hc12)
273
# Motorola 68HC11/12.
317
basic_machine=tic54x-unknown
320
basic_machine=tic55x-unknown
323
basic_machine=tic6x-unknown
325
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
274
326
basic_machine=$basic_machine-unknown
277
329
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
332
basic_machine=mt-unknown
335
strongarm | thumb | xscale)
336
basic_machine=arm-unknown
339
basic_machine=$basic_machine-unknown
343
basic_machine=armeb-unknown
347
basic_machine=armel-unknown
280
350
# We use `pc' rather than `unknown'
281
351
# because (1) that's what they normally are, and
291
361
# Recognize the basic CPU types with company name.
364
| aarch64-* | aarch64_be-* \
294
365
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
295
366
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
296
367
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
297
368
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
300
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
301
| clipper-* | cydra-* \
371
| bfin-* | bs2000-* \
372
| c[123]* | c30-* | [cjt]90-* | c4x-* \
373
| clipper-* | craynv-* | cydra-* \
302
374
| d10v-* | d30v-* | dlx-* \
304
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
376
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
305
377
| h8300-* | h8500-* \
306
378
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
307
380
| i*86-* | i860-* | i960-* | ia64-* \
381
| ip2k-* | iq2000-* \
384
| m32c-* | m32r-* | m32rle-* \
310
385
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
311
| m88110-* | m88k-* | mcore-* \
386
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
312
387
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
314
389
| mips64-* | mips64el-* \
390
| mips64octeon-* | mips64octeonel-* \
391
| mips64orion-* | mips64orionel-* \
392
| mips64r5900-* | mips64r5900el-* \
315
393
| mips64vr-* | mips64vrel-* \
316
| mips64orion-* | mips64orionel-* \
317
394
| mips64vr4100-* | mips64vr4100el-* \
318
395
| mips64vr4300-* | mips64vr4300el-* \
319
396
| mips64vr5000-* | mips64vr5000el-* \
397
| mips64vr5900-* | mips64vr5900el-* \
320
398
| mipsisa32-* | mipsisa32el-* \
321
399
| mipsisa32r2-* | mipsisa32r2el-* \
322
400
| mipsisa64-* | mipsisa64el-* \
401
| mipsisa64r2-* | mipsisa64r2el-* \
323
402
| mipsisa64sb1-* | mipsisa64sb1el-* \
324
403
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
325
404
| mipstx39-* | mipstx39el-* \
327
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
408
| nds32-* | nds32le-* | nds32be-* \
410
| none-* | np1-* | ns16k-* | ns32k-* \
329
413
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
330
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
414
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
332
| romp-* | rs6000-* \
334
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
416
| rl78-* | romp-* | rs6000-* | rx-* \
417
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
335
418
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
336
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
337
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
338
| tahoe-* | thumb-* \
419
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
421
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
339
423
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
341
| v850-* | v850e-* | vax-* \
427
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
343
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
430
| x86-* | x86_64-* | xc16x-* | xps100-* \
431
| xstormy16-* | xtensa*-* \
435
# Recognize the basic CPU types without company name, with glob match.
437
basic_machine=$basic_machine-unknown
348
439
# Recognize the various machine names and aliases which stand
349
440
# for a CPU type and a company and sometimes even an OS.
1118
1338
# Each alternative MUST END IN A *, to match a version number.
1119
1339
# -sysv* is not here because it comes later, after sysvr4.
1120
1340
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1121
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1122
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1341
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1342
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1343
| -sym* | -kopensolaris* \
1123
1344
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1125
1346
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1126
1347
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1127
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
1128
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1348
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1349
| -openbsd* | -solidbsd* \
1350
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1351
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1129
1352
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1130
1353
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1131
| -chorusos* | -chorusrdb* \
1132
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1133
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
1354
| -chorusos* | -chorusrdb* | -cegcc* \
1355
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1356
| -mingw32* | -linux-gnu* | -linux-android* \
1357
| -linux-newlib* | -linux-uclibc* \
1358
| -uxpv* | -beos* | -mpeix* | -udk* \
1134
1359
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1135
1360
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1136
1361
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1137
1362
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1138
1363
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1139
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
1364
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1365
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1140
1366
# Remember, each alternative MUST END IN *, to match a version number.