2 7633e2f8 2002-03-12 alex # Configuration validation subroutine script.
3 a335e480 2016-11-05 alex # Copyright 1992-2016 Free Software Foundation, Inc.
5 7071476d 2017-01-20 alex timestamp='2016-11-04'
7 4c2acd55 2014-03-18 alex # This file is free software; you can redistribute it and/or modify it
8 4c2acd55 2014-03-18 alex # under the terms of the GNU General Public License as published by
9 4c2acd55 2014-03-18 alex # the Free Software Foundation; either version 3 of the License, or
10 7633e2f8 2002-03-12 alex # (at your option) any later version.
12 4c2acd55 2014-03-18 alex # This program is distributed in the hope that it will be useful, but
13 4c2acd55 2014-03-18 alex # WITHOUT ANY WARRANTY; without even the implied warranty of
14 4c2acd55 2014-03-18 alex # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 4c2acd55 2014-03-18 alex # General Public License for more details.
17 7633e2f8 2002-03-12 alex # You should have received a copy of the GNU General Public License
18 ef392e7d 2012-02-27 alex # along with this program; if not, see <http://www.gnu.org/licenses/>.
20 7633e2f8 2002-03-12 alex # As a special exception to the GNU General Public License, if you
21 7633e2f8 2002-03-12 alex # distribute this file as part of a program that contains a
22 7633e2f8 2002-03-12 alex # configuration script generated by Autoconf, you may include it under
23 4c2acd55 2014-03-18 alex # the same distribution terms that you use for the rest of that
24 4c2acd55 2014-03-18 alex # program. This Exception is an additional permission under section 7
25 4c2acd55 2014-03-18 alex # of the GNU General Public License, version 3 ("GPLv3").
28 a335e480 2016-11-05 alex # Please send patches to <config-patches@gnu.org>.
30 7633e2f8 2002-03-12 alex # Configuration subroutine to validate and canonicalize a configuration type.
31 7633e2f8 2002-03-12 alex # Supply the specified configuration type as an argument.
32 7633e2f8 2002-03-12 alex # If it is invalid, we print an error message on stderr and exit with code 1.
33 7633e2f8 2002-03-12 alex # Otherwise, we print the canonical config type on stdout and succeed.
35 ef392e7d 2012-02-27 alex # You can get the latest version of this script from:
36 a335e480 2016-11-05 alex # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
38 7633e2f8 2002-03-12 alex # This file is supposed to be the same for all GNU packages
39 7633e2f8 2002-03-12 alex # and recognize all the CPU types, system types and aliases
40 7633e2f8 2002-03-12 alex # that are meaningful with *any* GNU software.
41 7633e2f8 2002-03-12 alex # Each package is responsible for reporting which valid configurations
42 7633e2f8 2002-03-12 alex # it does not support. The user should be able to distinguish
43 7633e2f8 2002-03-12 alex # a failure to support a valid configuration from a meaningless
44 7633e2f8 2002-03-12 alex # configuration.
46 7633e2f8 2002-03-12 alex # The goal of this file is to map all the various variations of a given
47 7633e2f8 2002-03-12 alex # machine specification into a single specification in the form:
48 7633e2f8 2002-03-12 alex # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
49 7633e2f8 2002-03-12 alex # or in some cases, the newer four-part form:
50 7633e2f8 2002-03-12 alex # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
51 7633e2f8 2002-03-12 alex # It is wrong to echo any other type of specification.
53 7633e2f8 2002-03-12 alex me=`echo "$0" | sed -e 's,.*/,,'`
56 a335e480 2016-11-05 alex Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
58 7633e2f8 2002-03-12 alex Canonicalize a configuration name.
60 7633e2f8 2002-03-12 alex Operation modes:
61 7633e2f8 2002-03-12 alex -h, --help print this help, then exit
62 7633e2f8 2002-03-12 alex -t, --time-stamp print date of last modification, then exit
63 7633e2f8 2002-03-12 alex -v, --version print version number, then exit
65 7633e2f8 2002-03-12 alex Report bugs and patches to <config-patches@gnu.org>."
68 7633e2f8 2002-03-12 alex GNU config.sub ($timestamp)
70 a335e480 2016-11-05 alex Copyright 1992-2016 Free Software Foundation, Inc.
72 7633e2f8 2002-03-12 alex This is free software; see the source for copying conditions. There is NO
73 7633e2f8 2002-03-12 alex warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
76 7633e2f8 2002-03-12 alex Try \`$me --help' for more information."
78 7633e2f8 2002-03-12 alex # Parse command line
79 7633e2f8 2002-03-12 alex while test $# -gt 0 ; do
81 7633e2f8 2002-03-12 alex --time-stamp | --time* | -t )
82 ac55a80d 2005-10-15 alex echo "$timestamp" ; exit ;;
83 7633e2f8 2002-03-12 alex --version | -v )
84 ac55a80d 2005-10-15 alex echo "$version" ; exit ;;
85 7633e2f8 2002-03-12 alex --help | --h* | -h )
86 ac55a80d 2005-10-15 alex echo "$usage"; exit ;;
87 7633e2f8 2002-03-12 alex -- ) # Stop option processing
88 7633e2f8 2002-03-12 alex shift; break ;;
89 7633e2f8 2002-03-12 alex - ) # Use stdin as input.
92 7633e2f8 2002-03-12 alex echo "$me: invalid option $1$help"
96 7633e2f8 2002-03-12 alex # First pass through any local machine types.
106 7633e2f8 2002-03-12 alex 0) echo "$me: missing argument$help" >&2
109 7633e2f8 2002-03-12 alex *) echo "$me: too many arguments$help" >&2
113 7633e2f8 2002-03-12 alex # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
114 7633e2f8 2002-03-12 alex # Here we must recognize all the valid KERNEL-OS combinations.
115 7633e2f8 2002-03-12 alex maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
116 7633e2f8 2002-03-12 alex case $maybe_os in
117 ef392e7d 2012-02-27 alex nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
118 107bfdc8 2012-09-16 alex linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119 a335e480 2016-11-05 alex knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
120 7071476d 2017-01-20 alex kopensolaris*-gnu* | cloudabi*-eabi* | \
121 65573d7a 2006-07-23 alex storm-chaos* | os2-emx* | rtmk-nova*)
122 7633e2f8 2002-03-12 alex os=-$maybe_os
123 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
125 ef392e7d 2012-02-27 alex android-linux)
126 ef392e7d 2012-02-27 alex os=-linux-android
127 ef392e7d 2012-02-27 alex basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
130 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 7633e2f8 2002-03-12 alex if [ $basic_machine != $1 ]
132 7633e2f8 2002-03-12 alex then os=`echo $1 | sed 's/.*-/-/'`
133 7633e2f8 2002-03-12 alex else os=; fi
137 7633e2f8 2002-03-12 alex ### Let's recognize common machines as not being operating systems so
138 7633e2f8 2002-03-12 alex ### that things like config.sub decstation-3100 work. We also
139 7633e2f8 2002-03-12 alex ### recognize some manufacturers as not being operating systems, so we
140 7633e2f8 2002-03-12 alex ### can provide default operating systems below.
141 7633e2f8 2002-03-12 alex case $os in
143 7633e2f8 2002-03-12 alex # Prevent following clause from handling this invalid input.
145 7633e2f8 2002-03-12 alex -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146 7633e2f8 2002-03-12 alex -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147 7633e2f8 2002-03-12 alex -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148 7633e2f8 2002-03-12 alex -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 7633e2f8 2002-03-12 alex -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 7633e2f8 2002-03-12 alex -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 4c2acd55 2014-03-18 alex -apple | -axis | -knuth | -cray | -microblaze*)
153 7633e2f8 2002-03-12 alex basic_machine=$1
155 ef392e7d 2012-02-27 alex -bluegene*)
158 7633e2f8 2002-03-12 alex -sim | -cisco | -oki | -wec | -winbond)
160 7633e2f8 2002-03-12 alex basic_machine=$1
165 7633e2f8 2002-03-12 alex os=-vxworks
166 7633e2f8 2002-03-12 alex basic_machine=$1
168 7633e2f8 2002-03-12 alex -chorusos*)
169 7633e2f8 2002-03-12 alex os=-chorusos
170 7633e2f8 2002-03-12 alex basic_machine=$1
172 ef392e7d 2012-02-27 alex -chorusrdb)
173 ef392e7d 2012-02-27 alex os=-chorusrdb
174 7633e2f8 2002-03-12 alex basic_machine=$1
177 7633e2f8 2002-03-12 alex os=-hiuxwe2
181 65573d7a 2006-07-23 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
184 7633e2f8 2002-03-12 alex os=-sco3.2v5
185 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
188 7633e2f8 2002-03-12 alex os=-sco3.2v4
189 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 7633e2f8 2002-03-12 alex -sco3.2.[4-9]*)
192 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 7633e2f8 2002-03-12 alex -sco3.2v[4-9]*)
196 7633e2f8 2002-03-12 alex # Don't forget version if it is 3.2v4 or newer.
197 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
200 65573d7a 2006-07-23 alex # Don't forget version if it is 3.2v4 or newer.
201 65573d7a 2006-07-23 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
204 7633e2f8 2002-03-12 alex os=-sco3.2v2
205 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
208 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
212 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
215 7633e2f8 2002-03-12 alex basic_machine=clipper-intergraph
218 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
221 107bfdc8 2012-09-16 alex os=-lynxos178
224 107bfdc8 2012-09-16 alex os=-lynxos5
230 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
232 7633e2f8 2002-03-12 alex -windowsnt*)
233 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's/windowsnt/winnt/'`
238 7633e2f8 2002-03-12 alex -mint | -mint[0-9]*)
239 7633e2f8 2002-03-12 alex basic_machine=m68k-atari
244 7633e2f8 2002-03-12 alex # Decode aliases for certain CPU-COMPANY combinations.
245 7633e2f8 2002-03-12 alex case $basic_machine in
246 7633e2f8 2002-03-12 alex # Recognize the basic CPU types without company name.
247 7633e2f8 2002-03-12 alex # Some are omitted here because they have special meanings below.
248 7633e2f8 2002-03-12 alex 1750a | 580 \
250 ef392e7d 2012-02-27 alex | aarch64 | aarch64_be \
251 7633e2f8 2002-03-12 alex | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
252 7633e2f8 2002-03-12 alex | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
253 a5695e7e 2003-11-28 alex | am33_2.0 \
254 4c2acd55 2014-03-18 alex | arc | arceb \
255 4c2acd55 2014-03-18 alex | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
256 4c2acd55 2014-03-18 alex | avr | avr32 \
258 4c2acd55 2014-03-18 alex | be32 | be64 \
260 4c2acd55 2014-03-18 alex | c4x | c8051 | clipper \
261 ac9390f0 2003-07-09 alex | d10v | d30v | dlx | dsp16xx \
262 a335e480 2016-11-05 alex | e2k | epiphany \
263 a335e480 2016-11-05 alex | fido | fr30 | frv | ft32 \
264 7633e2f8 2002-03-12 alex | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
265 ef392e7d 2012-02-27 alex | hexagon \
266 7633e2f8 2002-03-12 alex | i370 | i860 | i960 | ia64 \
267 a5695e7e 2003-11-28 alex | ip2k | iq2000 \
269 ef392e7d 2012-02-27 alex | le32 | le64 \
271 b9661ae6 2006-09-11 alex | m32c | m32r | m32rle | m68000 | m68k | m88k \
272 4c2acd55 2014-03-18 alex | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
273 ac9390f0 2003-07-09 alex | mips | mipsbe | mipseb | mipsel | mipsle \
275 ac9390f0 2003-07-09 alex | mips64 | mips64el \
276 ef392e7d 2012-02-27 alex | mips64octeon | mips64octeonel \
277 ac9390f0 2003-07-09 alex | mips64orion | mips64orionel \
278 ef392e7d 2012-02-27 alex | mips64r5900 | mips64r5900el \
279 ef392e7d 2012-02-27 alex | mips64vr | mips64vrel \
280 ac9390f0 2003-07-09 alex | mips64vr4100 | mips64vr4100el \
281 ac9390f0 2003-07-09 alex | mips64vr4300 | mips64vr4300el \
282 ac9390f0 2003-07-09 alex | mips64vr5000 | mips64vr5000el \
283 ac55a80d 2005-10-15 alex | mips64vr5900 | mips64vr5900el \
284 ac9390f0 2003-07-09 alex | mipsisa32 | mipsisa32el \
285 ac9390f0 2003-07-09 alex | mipsisa32r2 | mipsisa32r2el \
286 e864b1f3 2014-07-14 alex | mipsisa32r6 | mipsisa32r6el \
287 ac9390f0 2003-07-09 alex | mipsisa64 | mipsisa64el \
288 a5695e7e 2003-11-28 alex | mipsisa64r2 | mipsisa64r2el \
289 e864b1f3 2014-07-14 alex | mipsisa64r6 | mipsisa64r6el \
290 ac9390f0 2003-07-09 alex | mipsisa64sb1 | mipsisa64sb1el \
291 ac9390f0 2003-07-09 alex | mipsisa64sr71k | mipsisa64sr71kel \
292 4c2acd55 2014-03-18 alex | mipsr5900 | mipsr5900el \
293 ac9390f0 2003-07-09 alex | mipstx39 | mipstx39el \
294 7633e2f8 2002-03-12 alex | mn10200 | mn10300 \
298 ef392e7d 2012-02-27 alex | nds32 | nds32le | nds32be \
299 4c2acd55 2014-03-18 alex | nios | nios2 | nios2eb | nios2el \
300 7633e2f8 2002-03-12 alex | ns16k | ns32k \
301 e864b1f3 2014-07-14 alex | open8 | or1k | or1knd | or32 \
302 7633e2f8 2002-03-12 alex | pdp10 | pdp11 | pj | pjl \
303 ef392e7d 2012-02-27 alex | powerpc | powerpc64 | powerpc64le | powerpcle \
305 7633e2f8 2002-03-12 alex | pyramid \
306 c283b52a 2016-09-18 alex | riscv32 | riscv64 \
307 ef392e7d 2012-02-27 alex | rl78 | rx \
309 a335e480 2016-11-05 alex | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
310 ac9390f0 2003-07-09 alex | sh64 | sh64le \
311 b9661ae6 2006-09-11 alex | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
312 b9661ae6 2006-09-11 alex | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
314 ef392e7d 2012-02-27 alex | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
315 ef392e7d 2012-02-27 alex | ubicom32 \
316 ef392e7d 2012-02-27 alex | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
319 ef392e7d 2012-02-27 alex | x86 | xc16x | xstormy16 | xtensa \
320 ef392e7d 2012-02-27 alex | z8k | z80)
321 7633e2f8 2002-03-12 alex basic_machine=$basic_machine-unknown
324 ef392e7d 2012-02-27 alex basic_machine=tic54x-unknown
327 ef392e7d 2012-02-27 alex basic_machine=tic55x-unknown
330 ef392e7d 2012-02-27 alex basic_machine=tic6x-unknown
332 a335e480 2016-11-05 alex leon|leon[3-9])
333 a335e480 2016-11-05 alex basic_machine=sparc-$basic_machine
335 4c2acd55 2014-03-18 alex m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
336 7633e2f8 2002-03-12 alex basic_machine=$basic_machine-unknown
339 7633e2f8 2002-03-12 alex m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
342 65573d7a 2006-07-23 alex basic_machine=mt-unknown
345 ef392e7d 2012-02-27 alex strongarm | thumb | xscale)
346 ef392e7d 2012-02-27 alex basic_machine=arm-unknown
349 ef392e7d 2012-02-27 alex basic_machine=$basic_machine-unknown
353 ef392e7d 2012-02-27 alex basic_machine=armeb-unknown
357 ef392e7d 2012-02-27 alex basic_machine=armel-unknown
360 7633e2f8 2002-03-12 alex # We use `pc' rather than `unknown'
361 7633e2f8 2002-03-12 alex # because (1) that's what they normally are, and
362 7633e2f8 2002-03-12 alex # (2) the word "unknown" tends to confuse beginning users.
363 7633e2f8 2002-03-12 alex i*86 | x86_64)
364 7633e2f8 2002-03-12 alex basic_machine=$basic_machine-pc
366 7633e2f8 2002-03-12 alex # Object if more than one company name word.
368 7633e2f8 2002-03-12 alex echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
371 7633e2f8 2002-03-12 alex # Recognize the basic CPU types with company name.
374 ef392e7d 2012-02-27 alex | aarch64-* | aarch64_be-* \
375 7633e2f8 2002-03-12 alex | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
376 7633e2f8 2002-03-12 alex | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
377 4c2acd55 2014-03-18 alex | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
378 ac9390f0 2003-07-09 alex | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
379 b9661ae6 2006-09-11 alex | avr-* | avr32-* \
381 ef392e7d 2012-02-27 alex | be32-* | be64-* \
382 1e9e16fa 2005-07-24 alex | bfin-* | bs2000-* \
383 ef392e7d 2012-02-27 alex | c[123]* | c30-* | [cjt]90-* | c4x-* \
384 4c2acd55 2014-03-18 alex | c8051-* | clipper-* | craynv-* | cydra-* \
385 ac9390f0 2003-07-09 alex | d10v-* | d30v-* | dlx-* \
386 a335e480 2016-11-05 alex | e2k-* | elxsi-* \
387 f1486e6a 2007-05-26 alex | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
388 7633e2f8 2002-03-12 alex | h8300-* | h8500-* \
389 7633e2f8 2002-03-12 alex | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
390 ef392e7d 2012-02-27 alex | hexagon-* \
391 7633e2f8 2002-03-12 alex | i*86-* | i860-* | i960-* | ia64-* \
392 a5695e7e 2003-11-28 alex | ip2k-* | iq2000-* \
394 ef392e7d 2012-02-27 alex | le32-* | le64-* \
396 b9661ae6 2006-09-11 alex | m32c-* | m32r-* | m32rle-* \
397 7633e2f8 2002-03-12 alex | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
398 4c2acd55 2014-03-18 alex | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
399 4c2acd55 2014-03-18 alex | microblaze-* | microblazeel-* \
400 ac9390f0 2003-07-09 alex | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
401 ac9390f0 2003-07-09 alex | mips16-* \
402 ac9390f0 2003-07-09 alex | mips64-* | mips64el-* \
403 ef392e7d 2012-02-27 alex | mips64octeon-* | mips64octeonel-* \
404 ac9390f0 2003-07-09 alex | mips64orion-* | mips64orionel-* \
405 ef392e7d 2012-02-27 alex | mips64r5900-* | mips64r5900el-* \
406 ef392e7d 2012-02-27 alex | mips64vr-* | mips64vrel-* \
407 ac9390f0 2003-07-09 alex | mips64vr4100-* | mips64vr4100el-* \
408 ac9390f0 2003-07-09 alex | mips64vr4300-* | mips64vr4300el-* \
409 ac9390f0 2003-07-09 alex | mips64vr5000-* | mips64vr5000el-* \
410 ac55a80d 2005-10-15 alex | mips64vr5900-* | mips64vr5900el-* \
411 ac9390f0 2003-07-09 alex | mipsisa32-* | mipsisa32el-* \
412 ac9390f0 2003-07-09 alex | mipsisa32r2-* | mipsisa32r2el-* \
413 e864b1f3 2014-07-14 alex | mipsisa32r6-* | mipsisa32r6el-* \
414 ac9390f0 2003-07-09 alex | mipsisa64-* | mipsisa64el-* \
415 a5695e7e 2003-11-28 alex | mipsisa64r2-* | mipsisa64r2el-* \
416 e864b1f3 2014-07-14 alex | mipsisa64r6-* | mipsisa64r6el-* \
417 ac9390f0 2003-07-09 alex | mipsisa64sb1-* | mipsisa64sb1el-* \
418 ac9390f0 2003-07-09 alex | mipsisa64sr71k-* | mipsisa64sr71kel-* \
419 4c2acd55 2014-03-18 alex | mipsr5900-* | mipsr5900el-* \
420 ac9390f0 2003-07-09 alex | mipstx39-* | mipstx39el-* \
423 ac9390f0 2003-07-09 alex | msp430-* \
424 ef392e7d 2012-02-27 alex | nds32-* | nds32le-* | nds32be-* \
425 4c2acd55 2014-03-18 alex | nios-* | nios2-* | nios2eb-* | nios2el-* \
426 0d10c60b 2004-12-25 alex | none-* | np1-* | ns16k-* | ns32k-* \
427 ef392e7d 2012-02-27 alex | open8-* \
428 e864b1f3 2014-07-14 alex | or1k*-* \
429 7633e2f8 2002-03-12 alex | orion-* \
430 7633e2f8 2002-03-12 alex | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
431 ef392e7d 2012-02-27 alex | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
433 7633e2f8 2002-03-12 alex | pyramid-* \
434 a335e480 2016-11-05 alex | riscv32-* | riscv64-* \
435 ef392e7d 2012-02-27 alex | rl78-* | romp-* | rs6000-* | rx-* \
436 ef392e7d 2012-02-27 alex | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
437 ac9390f0 2003-07-09 alex | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
438 b9661ae6 2006-09-11 alex | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
439 1e9e16fa 2005-07-24 alex | sparclite-* \
440 a335e480 2016-11-05 alex | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
441 ef392e7d 2012-02-27 alex | tahoe-* \
442 ac9390f0 2003-07-09 alex | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
443 ef392e7d 2012-02-27 alex | tile*-* \
445 ef392e7d 2012-02-27 alex | ubicom32-* \
446 ef392e7d 2012-02-27 alex | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
448 a335e480 2016-11-05 alex | visium-* \
449 7633e2f8 2002-03-12 alex | we32k-* \
450 ef392e7d 2012-02-27 alex | x86-* | x86_64-* | xc16x-* | xps100-* \
451 afd65bc7 2008-10-03 alex | xstormy16-* | xtensa*-* \
453 ef392e7d 2012-02-27 alex | z8k-* | z80-*)
455 afd65bc7 2008-10-03 alex # Recognize the basic CPU types without company name, with glob match.
457 afd65bc7 2008-10-03 alex basic_machine=$basic_machine-unknown
459 7633e2f8 2002-03-12 alex # Recognize the various machine names and aliases which stand
460 7633e2f8 2002-03-12 alex # for a CPU type and a company and sometimes even an OS.
462 7633e2f8 2002-03-12 alex basic_machine=i386-unknown
465 7633e2f8 2002-03-12 alex 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
466 7633e2f8 2002-03-12 alex basic_machine=m68000-att
469 7633e2f8 2002-03-12 alex basic_machine=we32k-att
472 7633e2f8 2002-03-12 alex basic_machine=a29k-amd
476 0d10c60b 2004-12-25 alex basic_machine=abacus-unknown
479 7633e2f8 2002-03-12 alex basic_machine=m68010-adobe
482 7633e2f8 2002-03-12 alex alliant | fx80)
483 7633e2f8 2002-03-12 alex basic_machine=fx80-alliant
485 7633e2f8 2002-03-12 alex altos | altos3068)
486 7633e2f8 2002-03-12 alex basic_machine=m68k-altos
489 7633e2f8 2002-03-12 alex basic_machine=a29k-none
493 ac9390f0 2003-07-09 alex basic_machine=x86_64-pc
496 77944629 2004-03-11 alex basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
499 7633e2f8 2002-03-12 alex basic_machine=580-amdahl
502 7633e2f8 2002-03-12 alex amiga | amiga-*)
503 7633e2f8 2002-03-12 alex basic_machine=m68k-unknown
505 7633e2f8 2002-03-12 alex amigaos | amigados)
506 7633e2f8 2002-03-12 alex basic_machine=m68k-unknown
507 7633e2f8 2002-03-12 alex os=-amigaos
509 7633e2f8 2002-03-12 alex amigaunix | amix)
510 7633e2f8 2002-03-12 alex basic_machine=m68k-unknown
514 7633e2f8 2002-03-12 alex basic_machine=m68k-apollo
517 7633e2f8 2002-03-12 alex apollo68bsd)
518 7633e2f8 2002-03-12 alex basic_machine=m68k-apollo
522 ef392e7d 2012-02-27 alex basic_machine=i386-pc
526 a335e480 2016-11-05 alex basic_machine=asmjs-unknown
529 7633e2f8 2002-03-12 alex basic_machine=m68k-apple
533 7633e2f8 2002-03-12 alex basic_machine=ns32k-sequent
537 afd65bc7 2008-10-03 alex basic_machine=bfin-unknown
540 afd65bc7 2008-10-03 alex blackfin-*)
541 afd65bc7 2008-10-03 alex basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
545 ef392e7d 2012-02-27 alex basic_machine=powerpc-ibm
549 ef392e7d 2012-02-27 alex basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
552 ef392e7d 2012-02-27 alex basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
555 ef392e7d 2012-02-27 alex basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
558 7633e2f8 2002-03-12 alex basic_machine=c90-cray
562 ef392e7d 2012-02-27 alex basic_machine=arm-unknown
566 7633e2f8 2002-03-12 alex basic_machine=c1-convex
570 7633e2f8 2002-03-12 alex basic_machine=c2-convex
573 7633e2f8 2002-03-12 alex convex-c32)
574 7633e2f8 2002-03-12 alex basic_machine=c32-convex
577 7633e2f8 2002-03-12 alex convex-c34)
578 7633e2f8 2002-03-12 alex basic_machine=c34-convex
581 7633e2f8 2002-03-12 alex convex-c38)
582 7633e2f8 2002-03-12 alex basic_machine=c38-convex
585 7633e2f8 2002-03-12 alex cray | j90)
586 7633e2f8 2002-03-12 alex basic_machine=j90-cray
590 0d10c60b 2004-12-25 alex basic_machine=craynv-cray
591 0d10c60b 2004-12-25 alex os=-unicosmp
593 ef392e7d 2012-02-27 alex cr16 | cr16-*)
594 afd65bc7 2008-10-03 alex basic_machine=cr16-unknown
597 7633e2f8 2002-03-12 alex crds | unos)
598 7633e2f8 2002-03-12 alex basic_machine=m68k-crds
600 0c293ae9 2005-01-27 alex crisv32 | crisv32-* | etraxfs*)
601 0c293ae9 2005-01-27 alex basic_machine=crisv32-axis
603 7633e2f8 2002-03-12 alex cris | cris-* | etrax*)
604 7633e2f8 2002-03-12 alex basic_machine=cris-axis
607 0d10c60b 2004-12-25 alex basic_machine=crx-unknown
610 7633e2f8 2002-03-12 alex da30 | da30-*)
611 7633e2f8 2002-03-12 alex basic_machine=m68k-da30
613 7633e2f8 2002-03-12 alex decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
614 7633e2f8 2002-03-12 alex basic_machine=mips-dec
616 7633e2f8 2002-03-12 alex decsystem10* | dec10*)
617 7633e2f8 2002-03-12 alex basic_machine=pdp10-dec
620 7633e2f8 2002-03-12 alex decsystem20* | dec20*)
621 7633e2f8 2002-03-12 alex basic_machine=pdp10-dec
624 7633e2f8 2002-03-12 alex delta | 3300 | motorola-3300 | motorola-delta \
625 7633e2f8 2002-03-12 alex | 3300-motorola | delta-motorola)
626 7633e2f8 2002-03-12 alex basic_machine=m68k-motorola
629 7633e2f8 2002-03-12 alex basic_machine=m88k-motorola
633 ef392e7d 2012-02-27 alex basic_machine=i686-pc
637 0c293ae9 2005-01-27 alex basic_machine=i586-pc
638 0c293ae9 2005-01-27 alex os=-msdosdjgpp
640 7633e2f8 2002-03-12 alex dpx20 | dpx20-*)
641 7633e2f8 2002-03-12 alex basic_machine=rs6000-bull
644 7633e2f8 2002-03-12 alex dpx2* | dpx2*-bull)
645 7633e2f8 2002-03-12 alex basic_machine=m68k-bull
649 7071476d 2017-01-20 alex basic_machine=powerpc-unknown
650 7071476d 2017-01-20 alex os=$os"spe"
652 7071476d 2017-01-20 alex e500v[12]-*)
653 7071476d 2017-01-20 alex basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
654 7071476d 2017-01-20 alex os=$os"spe"
657 7633e2f8 2002-03-12 alex basic_machine=a29k-amd
661 7633e2f8 2002-03-12 alex basic_machine=elxsi-elxsi
664 7633e2f8 2002-03-12 alex encore | umax | mmax)
665 7633e2f8 2002-03-12 alex basic_machine=ns32k-encore
667 7633e2f8 2002-03-12 alex es1800 | OSE68k | ose68k | ose | OSE)
668 7633e2f8 2002-03-12 alex basic_machine=m68k-ericsson
672 7633e2f8 2002-03-12 alex basic_machine=i860-alliant
675 7633e2f8 2002-03-12 alex basic_machine=ns32k-ns
678 7633e2f8 2002-03-12 alex basic_machine=tron-gmicro
682 7633e2f8 2002-03-12 alex basic_machine=i386-pc
685 7633e2f8 2002-03-12 alex h3050r* | hiux*)
686 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hitachi
687 7633e2f8 2002-03-12 alex os=-hiuxwe2
690 7633e2f8 2002-03-12 alex basic_machine=h8300-hitachi
694 7633e2f8 2002-03-12 alex basic_machine=h8300-hitachi
698 7633e2f8 2002-03-12 alex basic_machine=h8500-hitachi
702 7633e2f8 2002-03-12 alex basic_machine=m88k-harris
706 7633e2f8 2002-03-12 alex basic_machine=m68k-hp
709 7633e2f8 2002-03-12 alex basic_machine=m68k-hp
713 7633e2f8 2002-03-12 alex basic_machine=m68k-hp
716 7633e2f8 2002-03-12 alex hp3k9[0-9][0-9] | hp9[0-9][0-9])
717 7633e2f8 2002-03-12 alex basic_machine=hppa1.0-hp
719 7633e2f8 2002-03-12 alex hp9k2[0-9][0-9] | hp9k31[0-9])
720 7633e2f8 2002-03-12 alex basic_machine=m68000-hp
722 7633e2f8 2002-03-12 alex hp9k3[2-9][0-9])
723 7633e2f8 2002-03-12 alex basic_machine=m68k-hp
725 7633e2f8 2002-03-12 alex hp9k6[0-9][0-9] | hp6[0-9][0-9])
726 7633e2f8 2002-03-12 alex basic_machine=hppa1.0-hp
728 7633e2f8 2002-03-12 alex hp9k7[0-79][0-9] | hp7[0-79][0-9])
729 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
731 7633e2f8 2002-03-12 alex hp9k78[0-9] | hp78[0-9])
732 7633e2f8 2002-03-12 alex # FIXME: really hppa2.0-hp
733 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
735 7633e2f8 2002-03-12 alex hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
736 7633e2f8 2002-03-12 alex # FIXME: really hppa2.0-hp
737 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
739 7633e2f8 2002-03-12 alex hp9k8[0-9][13679] | hp8[0-9][13679])
740 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
742 7633e2f8 2002-03-12 alex hp9k8[0-9][0-9] | hp8[0-9][0-9])
743 7633e2f8 2002-03-12 alex basic_machine=hppa1.0-hp
746 7633e2f8 2002-03-12 alex os=-nextstep3
749 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
753 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
756 7633e2f8 2002-03-12 alex i370-ibm* | ibm*)
757 7633e2f8 2002-03-12 alex basic_machine=i370-ibm
760 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
764 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
768 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
772 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
773 7633e2f8 2002-03-12 alex os=-solaris2
776 7633e2f8 2002-03-12 alex basic_machine=i386-mach
779 7633e2f8 2002-03-12 alex i386-vsta | vsta)
780 7633e2f8 2002-03-12 alex basic_machine=i386-unknown
783 7633e2f8 2002-03-12 alex iris | iris4d)
784 7633e2f8 2002-03-12 alex basic_machine=mips-sgi
785 7633e2f8 2002-03-12 alex case $os in
793 7633e2f8 2002-03-12 alex isi68 | isi)
794 7633e2f8 2002-03-12 alex basic_machine=m68k-isi
797 a335e480 2016-11-05 alex leon-*|leon[3-9]-*)
798 a335e480 2016-11-05 alex basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
801 afd65bc7 2008-10-03 alex basic_machine=m68k-unknown
804 afd65bc7 2008-10-03 alex m68knommu-*)
805 afd65bc7 2008-10-03 alex basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
808 7633e2f8 2002-03-12 alex m88k-omron*)
809 7633e2f8 2002-03-12 alex basic_machine=m88k-omron
811 7633e2f8 2002-03-12 alex magnum | m3230)
812 7633e2f8 2002-03-12 alex basic_machine=mips-mips
816 7633e2f8 2002-03-12 alex basic_machine=ns32k-utek
819 4c2acd55 2014-03-18 alex microblaze*)
820 ef392e7d 2012-02-27 alex basic_machine=microblaze-xilinx
823 107bfdc8 2012-09-16 alex basic_machine=x86_64-pc
824 107bfdc8 2012-09-16 alex os=-mingw64
827 4c2acd55 2014-03-18 alex basic_machine=i686-pc
828 7633e2f8 2002-03-12 alex os=-mingw32
831 afd65bc7 2008-10-03 alex basic_machine=arm-unknown
832 afd65bc7 2008-10-03 alex os=-mingw32ce
835 7633e2f8 2002-03-12 alex basic_machine=m68000-convergent
837 7633e2f8 2002-03-12 alex *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
838 7633e2f8 2002-03-12 alex basic_machine=m68k-atari
842 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
845 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
848 7633e2f8 2002-03-12 alex basic_machine=m68k-rom68k
852 7633e2f8 2002-03-12 alex basic_machine=powerpc-unknown
853 7633e2f8 2002-03-12 alex os=-morphos
856 c283b52a 2016-09-18 alex basic_machine=moxie-unknown
857 c283b52a 2016-09-18 alex os=-moxiebox
860 7633e2f8 2002-03-12 alex basic_machine=i386-pc
864 65573d7a 2006-07-23 alex basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
867 4c2acd55 2014-03-18 alex basic_machine=i686-pc
871 7633e2f8 2002-03-12 alex basic_machine=i370-ibm
875 ef392e7d 2012-02-27 alex basic_machine=le32-unknown
879 7633e2f8 2002-03-12 alex basic_machine=i486-ncr
883 7633e2f8 2002-03-12 alex basic_machine=i386-unknown
887 7633e2f8 2002-03-12 alex basic_machine=armv4l-rebel
890 7633e2f8 2002-03-12 alex news | news700 | news800 | news900)
891 7633e2f8 2002-03-12 alex basic_machine=m68k-sony
895 7633e2f8 2002-03-12 alex basic_machine=m68030-sony
898 7633e2f8 2002-03-12 alex news-3600 | risc-news)
899 7633e2f8 2002-03-12 alex basic_machine=mips-sony
903 7633e2f8 2002-03-12 alex basic_machine=v70-nec
906 7633e2f8 2002-03-12 alex next | m*-next )
907 7633e2f8 2002-03-12 alex basic_machine=m68k-next
908 7633e2f8 2002-03-12 alex case $os in
909 7633e2f8 2002-03-12 alex -nextstep* )
912 7633e2f8 2002-03-12 alex os=-nextstep2
915 7633e2f8 2002-03-12 alex os=-nextstep3
920 7633e2f8 2002-03-12 alex basic_machine=m68k-harris
924 7633e2f8 2002-03-12 alex basic_machine=m88k-harris
928 7633e2f8 2002-03-12 alex basic_machine=i960-intel
932 7633e2f8 2002-03-12 alex basic_machine=i960-intel
936 7633e2f8 2002-03-12 alex basic_machine=mips-compaq
937 7633e2f8 2002-03-12 alex os=-nonstopux
940 7633e2f8 2002-03-12 alex basic_machine=np1-gould
942 ef392e7d 2012-02-27 alex neo-tandem)
943 ef392e7d 2012-02-27 alex basic_machine=neo-tandem
945 ef392e7d 2012-02-27 alex nse-tandem)
946 ef392e7d 2012-02-27 alex basic_machine=nse-tandem
948 7633e2f8 2002-03-12 alex nsr-tandem)
949 7633e2f8 2002-03-12 alex basic_machine=nsr-tandem
951 7633e2f8 2002-03-12 alex op50n-* | op60c-*)
952 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-oki
955 ac55a80d 2005-10-15 alex openrisc | openrisc-*)
956 7633e2f8 2002-03-12 alex basic_machine=or32-unknown
959 77944629 2004-03-11 alex basic_machine=powerpc-ibm
962 7633e2f8 2002-03-12 alex OSE68000 | ose68000)
963 7633e2f8 2002-03-12 alex basic_machine=m68000-ericsson
967 7633e2f8 2002-03-12 alex basic_machine=m68k-none
970 7633e2f8 2002-03-12 alex pa-hitachi)
971 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hitachi
972 7633e2f8 2002-03-12 alex os=-hiuxwe2
975 7633e2f8 2002-03-12 alex basic_machine=i860-intel
979 afd65bc7 2008-10-03 alex basic_machine=hppa-unknown
983 afd65bc7 2008-10-03 alex basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
987 7633e2f8 2002-03-12 alex basic_machine=sparc-tti
990 7633e2f8 2002-03-12 alex basic_machine=m68k-tti
992 ac9390f0 2003-07-09 alex pc532 | pc532-*)
993 7633e2f8 2002-03-12 alex basic_machine=ns32k-pc532
996 65573d7a 2006-07-23 alex basic_machine=i386-pc
999 65573d7a 2006-07-23 alex basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
1001 7633e2f8 2002-03-12 alex pentium | p5 | k5 | k6 | nexgen | viac3)
1002 7633e2f8 2002-03-12 alex basic_machine=i586-pc
1004 ac9390f0 2003-07-09 alex pentiumpro | p6 | 6x86 | athlon | athlon_*)
1005 7633e2f8 2002-03-12 alex basic_machine=i686-pc
1007 a5695e7e 2003-11-28 alex pentiumii | pentium2 | pentiumiii | pentium3)
1008 7633e2f8 2002-03-12 alex basic_machine=i686-pc
1011 a5695e7e 2003-11-28 alex basic_machine=i786-pc
1013 7633e2f8 2002-03-12 alex pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1014 7633e2f8 2002-03-12 alex basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1016 7633e2f8 2002-03-12 alex pentiumpro-* | p6-* | 6x86-* | athlon-*)
1017 7633e2f8 2002-03-12 alex basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1019 a5695e7e 2003-11-28 alex pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1020 7633e2f8 2002-03-12 alex basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1022 a5695e7e 2003-11-28 alex pentium4-*)
1023 a5695e7e 2003-11-28 alex basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1026 7633e2f8 2002-03-12 alex basic_machine=pn-gould
1028 7633e2f8 2002-03-12 alex power) basic_machine=power-ibm
1030 ef392e7d 2012-02-27 alex ppc | ppcbe) basic_machine=powerpc-unknown
1032 ef392e7d 2012-02-27 alex ppc-* | ppcbe-*)
1033 ef392e7d 2012-02-27 alex basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1035 7071476d 2017-01-20 alex ppcle | powerpclittle)
1036 7633e2f8 2002-03-12 alex basic_machine=powerpcle-unknown
1038 7633e2f8 2002-03-12 alex ppcle-* | powerpclittle-*)
1039 7633e2f8 2002-03-12 alex basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1041 7633e2f8 2002-03-12 alex ppc64) basic_machine=powerpc64-unknown
1043 7633e2f8 2002-03-12 alex ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1045 7071476d 2017-01-20 alex ppc64le | powerpc64little)
1046 7633e2f8 2002-03-12 alex basic_machine=powerpc64le-unknown
1048 7633e2f8 2002-03-12 alex ppc64le-* | powerpc64little-*)
1049 7633e2f8 2002-03-12 alex basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1052 7633e2f8 2002-03-12 alex basic_machine=i386-ibm
1055 7633e2f8 2002-03-12 alex basic_machine=i586-unknown
1058 4c2acd55 2014-03-18 alex rdos | rdos64)
1059 4c2acd55 2014-03-18 alex basic_machine=x86_64-pc
1063 65573d7a 2006-07-23 alex basic_machine=i386-pc
1067 7633e2f8 2002-03-12 alex basic_machine=m68k-rom68k
1071 7633e2f8 2002-03-12 alex basic_machine=mips-siemens
1073 7633e2f8 2002-03-12 alex rtpc | rtpc-*)
1074 7633e2f8 2002-03-12 alex basic_machine=romp-ibm
1076 7633e2f8 2002-03-12 alex s390 | s390-*)
1077 7633e2f8 2002-03-12 alex basic_machine=s390-ibm
1079 7633e2f8 2002-03-12 alex s390x | s390x-*)
1080 7633e2f8 2002-03-12 alex basic_machine=s390x-ibm
1083 7633e2f8 2002-03-12 alex basic_machine=a29k-amd
1087 ac9390f0 2003-07-09 alex basic_machine=mipsisa64sb1-unknown
1090 ac9390f0 2003-07-09 alex basic_machine=mipsisa64sb1el-unknown
1093 f1486e6a 2007-05-26 alex basic_machine=mipsisa32-sde
1097 a5695e7e 2003-11-28 alex basic_machine=mips-sei
1101 7633e2f8 2002-03-12 alex basic_machine=i386-sequent
1104 7633e2f8 2002-03-12 alex basic_machine=sh-hitachi
1108 f1486e6a 2007-05-26 alex basic_machine=sh5le-unknown
1111 a5695e7e 2003-11-28 alex basic_machine=sh64-unknown
1113 7633e2f8 2002-03-12 alex sparclite-wrs | simso-wrs)
1114 7633e2f8 2002-03-12 alex basic_machine=sparclite-wrs
1115 7633e2f8 2002-03-12 alex os=-vxworks
1118 7633e2f8 2002-03-12 alex basic_machine=m68k-bull
1122 7633e2f8 2002-03-12 alex basic_machine=spur-unknown
1125 7633e2f8 2002-03-12 alex basic_machine=m68k-tandem
1128 7633e2f8 2002-03-12 alex basic_machine=i860-stratus
1131 ef392e7d 2012-02-27 alex strongarm-* | thumb-*)
1132 ef392e7d 2012-02-27 alex basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1135 7633e2f8 2002-03-12 alex basic_machine=m68000-sun
1138 7633e2f8 2002-03-12 alex basic_machine=m68000-sun
1139 7633e2f8 2002-03-12 alex os=-sunos3
1142 7633e2f8 2002-03-12 alex basic_machine=m68000-sun
1143 7633e2f8 2002-03-12 alex os=-sunos4
1146 7633e2f8 2002-03-12 alex basic_machine=m68k-sun
1147 7633e2f8 2002-03-12 alex os=-sunos3
1150 7633e2f8 2002-03-12 alex basic_machine=m68k-sun
1151 7633e2f8 2002-03-12 alex os=-sunos4
1154 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1155 7633e2f8 2002-03-12 alex os=-sunos3
1158 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1159 7633e2f8 2002-03-12 alex os=-sunos4
1162 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1163 7633e2f8 2002-03-12 alex os=-solaris2
1165 7633e2f8 2002-03-12 alex sun3 | sun3-*)
1166 7633e2f8 2002-03-12 alex basic_machine=m68k-sun
1169 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1171 7633e2f8 2002-03-12 alex sun386 | sun386i | roadrunner)
1172 7633e2f8 2002-03-12 alex basic_machine=i386-sun
1175 7633e2f8 2002-03-12 alex basic_machine=sv1-cray
1176 7633e2f8 2002-03-12 alex os=-unicos
1179 7633e2f8 2002-03-12 alex basic_machine=i386-sequent
1183 7633e2f8 2002-03-12 alex basic_machine=alphaev5-cray
1184 7633e2f8 2002-03-12 alex os=-unicos
1187 7633e2f8 2002-03-12 alex basic_machine=t90-cray
1188 7633e2f8 2002-03-12 alex os=-unicos
1191 ef392e7d 2012-02-27 alex basic_machine=$basic_machine-unknown
1192 afd65bc7 2008-10-03 alex os=-linux-gnu
1195 7633e2f8 2002-03-12 alex basic_machine=mipstx39-unknown
1198 7633e2f8 2002-03-12 alex basic_machine=mipstx39el-unknown
1201 7633e2f8 2002-03-12 alex basic_machine=pdp10-xkl
1202 7633e2f8 2002-03-12 alex os=-tops20
1204 7633e2f8 2002-03-12 alex tower | tower-32)
1205 7633e2f8 2002-03-12 alex basic_machine=m68k-ncr
1208 77944629 2004-03-11 alex basic_machine=s390x-ibm
1212 7633e2f8 2002-03-12 alex basic_machine=a29k-amd
1216 7633e2f8 2002-03-12 alex basic_machine=a29k-nyu
1219 7633e2f8 2002-03-12 alex v810 | necv810)
1220 7633e2f8 2002-03-12 alex basic_machine=v810-nec
1224 7633e2f8 2002-03-12 alex basic_machine=vax-dec
1228 7633e2f8 2002-03-12 alex basic_machine=vax-dec
1231 7633e2f8 2002-03-12 alex vpp*|vx|vx-*)
1232 ac9390f0 2003-07-09 alex basic_machine=f301-fujitsu
1234 7633e2f8 2002-03-12 alex vxworks960)
1235 7633e2f8 2002-03-12 alex basic_machine=i960-wrs
1236 7633e2f8 2002-03-12 alex os=-vxworks
1238 7633e2f8 2002-03-12 alex vxworks68)
1239 7633e2f8 2002-03-12 alex basic_machine=m68k-wrs
1240 7633e2f8 2002-03-12 alex os=-vxworks
1242 7633e2f8 2002-03-12 alex vxworks29k)
1243 7633e2f8 2002-03-12 alex basic_machine=a29k-wrs
1244 7633e2f8 2002-03-12 alex os=-vxworks
1247 7633e2f8 2002-03-12 alex basic_machine=w65-wdc
1251 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-winbond
1252 7633e2f8 2002-03-12 alex os=-proelf
1255 0c293ae9 2005-01-27 alex basic_machine=i686-pc
1256 0c293ae9 2005-01-27 alex os=-mingw32
1258 ac9390f0 2003-07-09 alex xps | xps100)
1259 7633e2f8 2002-03-12 alex basic_machine=xps100-honeywell
1261 ef392e7d 2012-02-27 alex xscale-* | xscalee[bl]-*)
1262 ef392e7d 2012-02-27 alex basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1265 7633e2f8 2002-03-12 alex basic_machine=ymp-cray
1266 7633e2f8 2002-03-12 alex os=-unicos
1268 7633e2f8 2002-03-12 alex z8k-*-coff)
1269 7633e2f8 2002-03-12 alex basic_machine=z8k-unknown
1272 ef392e7d 2012-02-27 alex z80-*-coff)
1273 ef392e7d 2012-02-27 alex basic_machine=z80-unknown
1277 7633e2f8 2002-03-12 alex basic_machine=none-none
1281 7633e2f8 2002-03-12 alex # Here we handle the default manufacturer of certain CPU types. It is in
1282 7633e2f8 2002-03-12 alex # some cases the only manufacturer, in others, it is the most popular.
1284 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-winbond
1287 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-oki
1290 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-oki
1293 7633e2f8 2002-03-12 alex basic_machine=romp-ibm
1296 0d10c60b 2004-12-25 alex basic_machine=mmix-knuth
1299 7633e2f8 2002-03-12 alex basic_machine=rs6000-ibm
1302 7633e2f8 2002-03-12 alex basic_machine=vax-dec
1305 7633e2f8 2002-03-12 alex # there are many clones, so DEC is not a safe bet
1306 7633e2f8 2002-03-12 alex basic_machine=pdp10-unknown
1309 7633e2f8 2002-03-12 alex basic_machine=pdp11-dec
1312 7633e2f8 2002-03-12 alex basic_machine=we32k-att
1314 ef392e7d 2012-02-27 alex sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1315 7633e2f8 2002-03-12 alex basic_machine=sh-unknown
1317 b9661ae6 2006-09-11 alex sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1318 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1321 7633e2f8 2002-03-12 alex basic_machine=cydra-cydrome
1324 7633e2f8 2002-03-12 alex basic_machine=orion-highlevel
1327 7633e2f8 2002-03-12 alex basic_machine=clipper-highlevel
1329 7633e2f8 2002-03-12 alex mac | mpw | mac-mpw)
1330 7633e2f8 2002-03-12 alex basic_machine=m68k-apple
1332 7633e2f8 2002-03-12 alex pmac | pmac-mpw)
1333 7633e2f8 2002-03-12 alex basic_machine=powerpc-apple
1335 7633e2f8 2002-03-12 alex *-unknown)
1336 7633e2f8 2002-03-12 alex # Make sure to match an already-canonicalized machine name.
1339 7633e2f8 2002-03-12 alex echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1344 7633e2f8 2002-03-12 alex # Here we canonicalize certain aliases for manufacturers.
1345 7633e2f8 2002-03-12 alex case $basic_machine in
1346 7633e2f8 2002-03-12 alex *-digital*)
1347 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1349 7633e2f8 2002-03-12 alex *-commodore*)
1350 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1356 7633e2f8 2002-03-12 alex # Decode manufacturer-specific aliases for certain operating systems.
1358 7633e2f8 2002-03-12 alex if [ x"$os" != x"" ]
1360 7633e2f8 2002-03-12 alex case $os in
1361 ef392e7d 2012-02-27 alex # First match some system type aliases
1362 ef392e7d 2012-02-27 alex # that might get confused with valid system types.
1363 7633e2f8 2002-03-12 alex # -solaris* is a basic system type, with this one exception.
1364 ef392e7d 2012-02-27 alex -auroraux)
1365 ef392e7d 2012-02-27 alex os=-auroraux
1367 7633e2f8 2002-03-12 alex -solaris1 | -solaris1.*)
1368 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|solaris1|sunos4|'`
1371 7633e2f8 2002-03-12 alex os=-solaris2
1376 7633e2f8 2002-03-12 alex -unixware*)
1377 7633e2f8 2002-03-12 alex os=-sysv4.2uw
1379 7633e2f8 2002-03-12 alex -gnu/linux*)
1380 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1382 7633e2f8 2002-03-12 alex # First accept the basic system types.
1383 7633e2f8 2002-03-12 alex # The portable systems comes first.
1384 7633e2f8 2002-03-12 alex # Each alternative MUST END IN A *, to match a version number.
1385 7633e2f8 2002-03-12 alex # -sysv* is not here because it comes later, after sysvr4.
1386 7633e2f8 2002-03-12 alex -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1387 ef392e7d 2012-02-27 alex | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1388 ef392e7d 2012-02-27 alex | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1389 4c2acd55 2014-03-18 alex | -sym* | -kopensolaris* | -plan9* \
1390 7633e2f8 2002-03-12 alex | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1391 a335e480 2016-11-05 alex | -aos* | -aros* | -cloudabi* | -sortix* \
1392 7633e2f8 2002-03-12 alex | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1393 7633e2f8 2002-03-12 alex | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1394 65573d7a 2006-07-23 alex | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1395 a335e480 2016-11-05 alex | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1396 0d10c60b 2004-12-25 alex | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1397 0d10c60b 2004-12-25 alex | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1398 7633e2f8 2002-03-12 alex | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1399 7633e2f8 2002-03-12 alex | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1400 ef392e7d 2012-02-27 alex | -chorusos* | -chorusrdb* | -cegcc* \
1401 ef392e7d 2012-02-27 alex | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1402 7071476d 2017-01-20 alex | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1403 107bfdc8 2012-09-16 alex | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1404 c283b52a 2016-09-18 alex | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1405 ac9390f0 2003-07-09 alex | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1406 7633e2f8 2002-03-12 alex | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1407 7633e2f8 2002-03-12 alex | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1408 7633e2f8 2002-03-12 alex | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1409 ac9390f0 2003-07-09 alex | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1410 ac55a80d 2005-10-15 alex | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1411 a335e480 2016-11-05 alex | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1412 7071476d 2017-01-20 alex | -onefs* | -tirtos* | -phoenix* | -fuchsia*)
1413 7633e2f8 2002-03-12 alex # Remember, each alternative MUST END IN *, to match a version number.
1416 7633e2f8 2002-03-12 alex case $basic_machine in
1417 7633e2f8 2002-03-12 alex x86-* | i*86-*)
1420 7633e2f8 2002-03-12 alex os=-nto$os
1424 ac9390f0 2003-07-09 alex -nto-qnx*)
1427 ac9390f0 2003-07-09 alex os=`echo $os | sed -e 's|nto|nto-qnx|'`
1429 7633e2f8 2002-03-12 alex -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1430 ac55a80d 2005-10-15 alex | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1431 7633e2f8 2002-03-12 alex | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1434 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|mac|macos|'`
1436 a5695e7e 2003-11-28 alex -linux-dietlibc)
1437 a5695e7e 2003-11-28 alex os=-linux-dietlibc
1440 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|linux|linux-gnu|'`
1443 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|sunos5|solaris2|'`
1446 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|sunos6|solaris3|'`
1449 7633e2f8 2002-03-12 alex os=-openedition
1457 7633e2f8 2002-03-12 alex -osfrose*)
1458 7633e2f8 2002-03-12 alex os=-osfrose
1473 7633e2f8 2002-03-12 alex os=-atheos
1475 77944629 2004-03-11 alex -syllable*)
1476 77944629 2004-03-11 alex os=-syllable
1481 7633e2f8 2002-03-12 alex -ctix* | -uts*)
1485 7633e2f8 2002-03-12 alex os=-rtmk-nova
1488 ac9390f0 2003-07-09 alex os=-nextstep2
1493 7633e2f8 2002-03-12 alex # Preserve the version number of sinix5.
1494 7633e2f8 2002-03-12 alex -sinix5.*)
1495 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|sinix|sysv|'`
1518 7633e2f8 2002-03-12 alex # This must come after -sysvr4.
1530 ac9390f0 2003-07-09 alex -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1549 7633e2f8 2002-03-12 alex # Get rid of the `-' at the beginning of $os.
1550 7633e2f8 2002-03-12 alex os=`echo $os | sed 's/[^-]*-//'`
1551 7633e2f8 2002-03-12 alex echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1557 7633e2f8 2002-03-12 alex # Here we handle the default operating systems that come with various machines.
1558 7633e2f8 2002-03-12 alex # The value should be what the vendor currently ships out the door with their
1559 7633e2f8 2002-03-12 alex # machine or put another way, the most popular os provided with the machine.
1561 7633e2f8 2002-03-12 alex # Note that if you're going to try to match "-MANUFACTURER" here (say,
1562 7633e2f8 2002-03-12 alex # "-sun"), then you have to tell the case statement up towards the top
1563 7633e2f8 2002-03-12 alex # that MANUFACTURER isn't an operating system. Otherwise, code above
1564 7633e2f8 2002-03-12 alex # will signal an error saying that MANUFACTURER isn't an operating
1565 7633e2f8 2002-03-12 alex # system, and we'll never get to this point.
1567 7633e2f8 2002-03-12 alex case $basic_machine in
1575 7633e2f8 2002-03-12 alex os=-riscix1.2
1577 7633e2f8 2002-03-12 alex arm*-rebel)
1580 7633e2f8 2002-03-12 alex arm*-semi)
1583 ef392e7d 2012-02-27 alex c4x-* | tic4x-*)
1589 107bfdc8 2012-09-16 alex hexagon-*)
1601 7633e2f8 2002-03-12 alex # This must come before the *-dec entry.
1603 7633e2f8 2002-03-12 alex os=-tops20
1608 7633e2f8 2002-03-12 alex *-dec | vax-*)
1609 7633e2f8 2002-03-12 alex os=-ultrix4.2
1611 7633e2f8 2002-03-12 alex m68*-apollo)
1612 7633e2f8 2002-03-12 alex os=-domain
1615 7633e2f8 2002-03-12 alex os=-sunos4.0.2
1617 7633e2f8 2002-03-12 alex m68000-sun)
1618 7633e2f8 2002-03-12 alex os=-sunos3
1620 7633e2f8 2002-03-12 alex m68*-cisco)
1626 7633e2f8 2002-03-12 alex mips*-cisco)
1635 7633e2f8 2002-03-12 alex *-tti) # must be before sparc entry or we get the wrong os.
1638 7633e2f8 2002-03-12 alex sparc-* | *-sun)
1639 7633e2f8 2002-03-12 alex os=-sunos4.1.1
1651 0d10c60b 2004-12-25 alex os=-mmixware
1654 7633e2f8 2002-03-12 alex os=-proelf
1656 7633e2f8 2002-03-12 alex *-winbond)
1657 7633e2f8 2002-03-12 alex os=-proelf
1660 7633e2f8 2002-03-12 alex os=-proelf
1665 7633e2f8 2002-03-12 alex *-hitachi)
1668 7633e2f8 2002-03-12 alex i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1672 7633e2f8 2002-03-12 alex os=-amigaos
1677 7633e2f8 2002-03-12 alex *-dolphin)
1680 7633e2f8 2002-03-12 alex m68k-ccur)
1683 7633e2f8 2002-03-12 alex m88k-omron*)
1687 7633e2f8 2002-03-12 alex os=-nextstep
1689 7633e2f8 2002-03-12 alex *-sequent)
1702 7633e2f8 2002-03-12 alex os=-nextstep3
1707 ac9390f0 2003-07-09 alex *-highlevel)
1716 ac9390f0 2003-07-09 alex *-siemens)
1719 7633e2f8 2002-03-12 alex *-masscomp)
1722 7633e2f8 2002-03-12 alex f30[01]-fujitsu | f700-fujitsu)
1743 7633e2f8 2002-03-12 alex # Here we handle the case where we know the os, and the CPU type, but not the
1744 7633e2f8 2002-03-12 alex # manufacturer. We pick the logical manufacturer.
1745 7633e2f8 2002-03-12 alex vendor=unknown
1746 7633e2f8 2002-03-12 alex case $basic_machine in
1747 7633e2f8 2002-03-12 alex *-unknown)
1748 7633e2f8 2002-03-12 alex case $os in
1750 7633e2f8 2002-03-12 alex vendor=acorn
1753 7633e2f8 2002-03-12 alex vendor=sun
1755 ef392e7d 2012-02-27 alex -cnk*|-aix*)
1756 7633e2f8 2002-03-12 alex vendor=ibm
1768 7633e2f8 2002-03-12 alex vendor=hitachi
1771 7633e2f8 2002-03-12 alex vendor=crds
1777 7633e2f8 2002-03-12 alex vendor=omron
1782 7633e2f8 2002-03-12 alex -mvs* | -opened*)
1783 7633e2f8 2002-03-12 alex vendor=ibm
1786 77944629 2004-03-11 alex vendor=ibm
1789 7633e2f8 2002-03-12 alex vendor=sequent
1792 77944629 2004-03-11 alex vendor=ibm
1794 ac9390f0 2003-07-09 alex -vxsim* | -vxworks* | -windiss*)
1795 7633e2f8 2002-03-12 alex vendor=wrs
1798 7633e2f8 2002-03-12 alex vendor=apple
1801 7633e2f8 2002-03-12 alex vendor=hitachi
1803 7633e2f8 2002-03-12 alex -mpw* | -macos*)
1804 7633e2f8 2002-03-12 alex vendor=apple
1806 7633e2f8 2002-03-12 alex -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1807 7633e2f8 2002-03-12 alex vendor=atari
1810 7633e2f8 2002-03-12 alex vendor=stratus
1813 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1817 7633e2f8 2002-03-12 alex echo $basic_machine$os
1820 7633e2f8 2002-03-12 alex # Local variables:
1821 7633e2f8 2002-03-12 alex # eval: (add-hook 'write-file-hooks 'time-stamp)
1822 7633e2f8 2002-03-12 alex # time-stamp-start: "timestamp='"
1823 7633e2f8 2002-03-12 alex # time-stamp-format: "%:y-%02m-%02d"
1824 7633e2f8 2002-03-12 alex # time-stamp-end: "'"