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
5
# Free Software Foundation, Inc.
9
# This file is (in principle) common to ALL GNU software.
10
# The presence of a machine in this file suggests that SOME GNU software
11
# can handle that machine. It does not imply ALL GNU software can.
13
# This file is free software; you can redistribute it and/or modify
14
# it under the terms of the GNU General Public License as published by
15
# the Free Software Foundation; either version 2 of the License, or
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
# 2011, 2012, 2013 Free Software Foundation, Inc.
9
# This file is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 3 of the License, or
16
12
# (at your option) any later version.
18
# This program is distributed in the hope that it will be useful,
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
# GNU General Public License for more details.
14
# This program is distributed in the hope that it will be useful, but
15
# WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
# General Public License for more details.
23
19
# You should have received a copy of the GNU General Public License
24
# along with this program; if not, write to the Free Software
25
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
20
# along with this program; if not, see <http://www.gnu.org/licenses/>.
28
22
# As a special exception to the GNU General Public License, if you
29
23
# distribute this file as part of a program that contains a
30
24
# configuration script generated by Autoconf, you may include it under
31
# the same distribution terms that you use for the rest of that program.
34
# Please send patches to <config-patches@gnu.org>. Submit a context
35
# diff and a properly formatted GNU ChangeLog entry.
25
# the same distribution terms that you use for the rest of that
26
# program. This Exception is an additional permission under section 7
27
# of the GNU General Public License, version 3 ("GPLv3").
30
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
37
32
# Configuration subroutine to validate and canonicalize a configuration type.
38
33
# Supply the specified configuration type as an argument.
76
71
GNU config.sub ($timestamp)
78
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
79
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
73
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
74
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
75
2012, 2013 Free Software Foundation, Inc.
81
77
This is free software; see the source for copying conditions. There is NO
82
78
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
123
119
# Here we must recognize all the valid KERNEL-OS combinations.
124
120
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
125
121
case $maybe_os in
126
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
127
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
122
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
123
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
124
knetbsd*-gnu* | netbsd*-gnu* | \
128
125
kopensolaris*-gnu* | \
129
126
storm-chaos* | os2-emx* | rtmk-nova*)
131
128
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
132
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
134
135
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
135
136
if [ $basic_machine != $1 ]
245
252
# Some are omitted here because they have special meanings below.
255
| aarch64 | aarch64_be \
248
256
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
249
257
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
251
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
260
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
253
264
| c4x | clipper \
254
265
| d10v | d30v | dlx | dsp16xx \
255
267
| fido | fr30 | frv \
256
268
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
257
270
| i370 | i860 | i960 | ia64 \
258
271
| ip2k | iq2000 \
260
274
| m32c | m32r | m32rle | m68000 | m68k | m88k \
261
| maxq | mb | microblaze | mcore | mep | metag \
275
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
262
276
| mips | mipsbe | mipseb | mipsel | mipsle \
264
278
| mips64 | mips64el \
298
| nds32 | nds32le | nds32be \
285
300
| ns16k | ns32k \
287
303
| pdp10 | pdp11 | pj | pjl \
288
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
304
| powerpc | powerpc64 | powerpc64le | powerpcle \
292
308
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
293
309
| sh64 | sh64le \
294
310
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
295
311
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
297
| tahoe | thumb | tic4x | tic80 | tron \
313
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
315
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
301
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
317
| x86 | xc16x | xstormy16 | xtensa \
303
319
basic_machine=$basic_machine-unknown
305
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
306
# Motorola 68HC11/12.
322
basic_machine=tic54x-unknown
325
basic_machine=tic55x-unknown
328
basic_machine=tic6x-unknown
330
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
307
331
basic_machine=$basic_machine-unknown
327
366
# Recognize the basic CPU types with company name.
369
| aarch64-* | aarch64_be-* \
330
370
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
331
371
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
332
372
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
333
373
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
334
374
| avr-* | avr32-* \
335
376
| bfin-* | bs2000-* \
336
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
377
| c[123]* | c30-* | [cjt]90-* | c4x-* \
337
378
| clipper-* | craynv-* | cydra-* \
338
379
| d10v-* | d30v-* | dlx-* \
340
381
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
341
382
| h8300-* | h8500-* \
342
383
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
343
385
| i*86-* | i860-* | i960-* | ia64-* \
344
386
| ip2k-* | iq2000-* \
346
389
| m32c-* | m32r-* | m32rle-* \
347
390
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
348
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
391
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
392
| microblaze-* | microblazeel-* \
349
393
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
351
395
| mips64-* | mips64el-* \
414
| nds32-* | nds32le-* | nds32be-* \
370
415
| nios-* | nios2-* \
371
416
| none-* | np1-* | ns16k-* | ns32k-* \
373
419
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
374
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
420
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
376
| romp-* | rs6000-* | rx-* \
422
| rl78-* | romp-* | rs6000-* | rx-* \
377
423
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
378
424
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
379
425
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
381
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
382
| tahoe-* | thumb-* \
383
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
427
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
429
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
386
| v850-* | v850e-* | vax-* \
433
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
388
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
436
| x86-* | x86_64-* | xc16x-* | xps100-* \
389
437
| xstormy16-* | xtensa*-* \
1287
1360
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1288
1361
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1289
1362
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1290
| -openbsd* | -solidbsd* \
1363
| -bitrig* | -openbsd* | -solidbsd* \
1291
1364
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1292
1365
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1293
1366
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1294
1367
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1295
1368
| -chorusos* | -chorusrdb* | -cegcc* \
1296
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1297
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1369
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1370
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1371
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
1298
1372
| -uxpv* | -beos* | -mpeix* | -udk* \
1299
1373
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1300
1374
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \