2 7633e2f8 2002-03-12 alex # Configuration validation subroutine script.
3 4c2acd55 2014-03-18 alex # Copyright 1992-2014 Free Software Foundation, Inc.
5 e864b1f3 2014-07-14 alex timestamp='2014-05-01'
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 4c2acd55 2014-03-18 alex # Please send patches with a ChangeLog entry 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 ef392e7d 2012-02-27 alex # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
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 7633e2f8 2002-03-12 alex Usage: $0 [OPTION] CPU-MFR-OPSYS
57 7633e2f8 2002-03-12 alex $0 [OPTION] ALIAS
59 7633e2f8 2002-03-12 alex Canonicalize a configuration name.
61 7633e2f8 2002-03-12 alex Operation modes:
62 7633e2f8 2002-03-12 alex -h, --help print this help, then exit
63 7633e2f8 2002-03-12 alex -t, --time-stamp print date of last modification, then exit
64 7633e2f8 2002-03-12 alex -v, --version print version number, then exit
66 7633e2f8 2002-03-12 alex Report bugs and patches to <config-patches@gnu.org>."
69 7633e2f8 2002-03-12 alex GNU config.sub ($timestamp)
71 4c2acd55 2014-03-18 alex Copyright 1992-2014 Free Software Foundation, Inc.
73 7633e2f8 2002-03-12 alex This is free software; see the source for copying conditions. There is NO
74 7633e2f8 2002-03-12 alex warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
77 7633e2f8 2002-03-12 alex Try \`$me --help' for more information."
79 7633e2f8 2002-03-12 alex # Parse command line
80 7633e2f8 2002-03-12 alex while test $# -gt 0 ; do
82 7633e2f8 2002-03-12 alex --time-stamp | --time* | -t )
83 ac55a80d 2005-10-15 alex echo "$timestamp" ; exit ;;
84 7633e2f8 2002-03-12 alex --version | -v )
85 ac55a80d 2005-10-15 alex echo "$version" ; exit ;;
86 7633e2f8 2002-03-12 alex --help | --h* | -h )
87 ac55a80d 2005-10-15 alex echo "$usage"; exit ;;
88 7633e2f8 2002-03-12 alex -- ) # Stop option processing
89 7633e2f8 2002-03-12 alex shift; break ;;
90 7633e2f8 2002-03-12 alex - ) # Use stdin as input.
93 7633e2f8 2002-03-12 alex echo "$me: invalid option $1$help"
97 7633e2f8 2002-03-12 alex # First pass through any local machine types.
107 7633e2f8 2002-03-12 alex 0) echo "$me: missing argument$help" >&2
110 7633e2f8 2002-03-12 alex *) echo "$me: too many arguments$help" >&2
114 7633e2f8 2002-03-12 alex # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
115 7633e2f8 2002-03-12 alex # Here we must recognize all the valid KERNEL-OS combinations.
116 7633e2f8 2002-03-12 alex maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
117 7633e2f8 2002-03-12 alex case $maybe_os in
118 ef392e7d 2012-02-27 alex nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
119 107bfdc8 2012-09-16 alex linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
120 ef392e7d 2012-02-27 alex knetbsd*-gnu* | netbsd*-gnu* | \
121 ef392e7d 2012-02-27 alex kopensolaris*-gnu* | \
122 65573d7a 2006-07-23 alex storm-chaos* | os2-emx* | rtmk-nova*)
123 7633e2f8 2002-03-12 alex os=-$maybe_os
124 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
126 ef392e7d 2012-02-27 alex android-linux)
127 ef392e7d 2012-02-27 alex os=-linux-android
128 ef392e7d 2012-02-27 alex basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
131 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed 's/-[^-]*$//'`
132 7633e2f8 2002-03-12 alex if [ $basic_machine != $1 ]
133 7633e2f8 2002-03-12 alex then os=`echo $1 | sed 's/.*-/-/'`
134 7633e2f8 2002-03-12 alex else os=; fi
138 7633e2f8 2002-03-12 alex ### Let's recognize common machines as not being operating systems so
139 7633e2f8 2002-03-12 alex ### that things like config.sub decstation-3100 work. We also
140 7633e2f8 2002-03-12 alex ### recognize some manufacturers as not being operating systems, so we
141 7633e2f8 2002-03-12 alex ### can provide default operating systems below.
142 7633e2f8 2002-03-12 alex case $os in
144 7633e2f8 2002-03-12 alex # Prevent following clause from handling this invalid input.
146 7633e2f8 2002-03-12 alex -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
147 7633e2f8 2002-03-12 alex -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
148 7633e2f8 2002-03-12 alex -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
149 7633e2f8 2002-03-12 alex -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
150 7633e2f8 2002-03-12 alex -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
151 7633e2f8 2002-03-12 alex -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
152 4c2acd55 2014-03-18 alex -apple | -axis | -knuth | -cray | -microblaze*)
154 7633e2f8 2002-03-12 alex basic_machine=$1
156 ef392e7d 2012-02-27 alex -bluegene*)
159 7633e2f8 2002-03-12 alex -sim | -cisco | -oki | -wec | -winbond)
161 7633e2f8 2002-03-12 alex basic_machine=$1
166 7633e2f8 2002-03-12 alex os=-vxworks
167 7633e2f8 2002-03-12 alex basic_machine=$1
169 7633e2f8 2002-03-12 alex -chorusos*)
170 7633e2f8 2002-03-12 alex os=-chorusos
171 7633e2f8 2002-03-12 alex basic_machine=$1
173 ef392e7d 2012-02-27 alex -chorusrdb)
174 ef392e7d 2012-02-27 alex os=-chorusrdb
175 7633e2f8 2002-03-12 alex basic_machine=$1
178 7633e2f8 2002-03-12 alex os=-hiuxwe2
182 65573d7a 2006-07-23 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
185 7633e2f8 2002-03-12 alex os=-sco3.2v5
186 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
189 7633e2f8 2002-03-12 alex os=-sco3.2v4
190 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
192 7633e2f8 2002-03-12 alex -sco3.2.[4-9]*)
193 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
194 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
196 7633e2f8 2002-03-12 alex -sco3.2v[4-9]*)
197 7633e2f8 2002-03-12 alex # Don't forget version if it is 3.2v4 or newer.
198 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
201 65573d7a 2006-07-23 alex # Don't forget version if it is 3.2v4 or newer.
202 65573d7a 2006-07-23 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205 7633e2f8 2002-03-12 alex os=-sco3.2v2
206 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
213 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
216 7633e2f8 2002-03-12 alex basic_machine=clipper-intergraph
219 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
222 107bfdc8 2012-09-16 alex os=-lynxos178
225 107bfdc8 2012-09-16 alex os=-lynxos5
231 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
233 7633e2f8 2002-03-12 alex -windowsnt*)
234 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's/windowsnt/winnt/'`
239 7633e2f8 2002-03-12 alex -mint | -mint[0-9]*)
240 7633e2f8 2002-03-12 alex basic_machine=m68k-atari
245 7633e2f8 2002-03-12 alex # Decode aliases for certain CPU-COMPANY combinations.
246 7633e2f8 2002-03-12 alex case $basic_machine in
247 7633e2f8 2002-03-12 alex # Recognize the basic CPU types without company name.
248 7633e2f8 2002-03-12 alex # Some are omitted here because they have special meanings below.
249 7633e2f8 2002-03-12 alex 1750a | 580 \
251 ef392e7d 2012-02-27 alex | aarch64 | aarch64_be \
252 7633e2f8 2002-03-12 alex | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
253 7633e2f8 2002-03-12 alex | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
254 a5695e7e 2003-11-28 alex | am33_2.0 \
255 4c2acd55 2014-03-18 alex | arc | arceb \
256 4c2acd55 2014-03-18 alex | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
257 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 ef392e7d 2012-02-27 alex | epiphany \
263 f1486e6a 2007-05-26 alex | fido | fr30 | frv \
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 \
304 7633e2f8 2002-03-12 alex | pyramid \
305 ef392e7d 2012-02-27 alex | rl78 | rx \
307 ef392e7d 2012-02-27 alex | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
308 ac9390f0 2003-07-09 alex | sh64 | sh64le \
309 b9661ae6 2006-09-11 alex | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
310 b9661ae6 2006-09-11 alex | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
312 ef392e7d 2012-02-27 alex | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
313 ef392e7d 2012-02-27 alex | ubicom32 \
314 ef392e7d 2012-02-27 alex | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
316 ef392e7d 2012-02-27 alex | x86 | xc16x | xstormy16 | xtensa \
317 ef392e7d 2012-02-27 alex | z8k | z80)
318 7633e2f8 2002-03-12 alex basic_machine=$basic_machine-unknown
321 ef392e7d 2012-02-27 alex basic_machine=tic54x-unknown
324 ef392e7d 2012-02-27 alex basic_machine=tic55x-unknown
327 ef392e7d 2012-02-27 alex basic_machine=tic6x-unknown
329 4c2acd55 2014-03-18 alex m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
330 7633e2f8 2002-03-12 alex basic_machine=$basic_machine-unknown
333 7633e2f8 2002-03-12 alex m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
336 65573d7a 2006-07-23 alex basic_machine=mt-unknown
339 ef392e7d 2012-02-27 alex strongarm | thumb | xscale)
340 ef392e7d 2012-02-27 alex basic_machine=arm-unknown
343 ef392e7d 2012-02-27 alex basic_machine=$basic_machine-unknown
347 ef392e7d 2012-02-27 alex basic_machine=armeb-unknown
351 ef392e7d 2012-02-27 alex basic_machine=armel-unknown
354 7633e2f8 2002-03-12 alex # We use `pc' rather than `unknown'
355 7633e2f8 2002-03-12 alex # because (1) that's what they normally are, and
356 7633e2f8 2002-03-12 alex # (2) the word "unknown" tends to confuse beginning users.
357 7633e2f8 2002-03-12 alex i*86 | x86_64)
358 7633e2f8 2002-03-12 alex basic_machine=$basic_machine-pc
360 7633e2f8 2002-03-12 alex # Object if more than one company name word.
362 7633e2f8 2002-03-12 alex echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
365 7633e2f8 2002-03-12 alex # Recognize the basic CPU types with company name.
368 ef392e7d 2012-02-27 alex | aarch64-* | aarch64_be-* \
369 7633e2f8 2002-03-12 alex | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
370 7633e2f8 2002-03-12 alex | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
371 4c2acd55 2014-03-18 alex | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
372 ac9390f0 2003-07-09 alex | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
373 b9661ae6 2006-09-11 alex | avr-* | avr32-* \
374 ef392e7d 2012-02-27 alex | be32-* | be64-* \
375 1e9e16fa 2005-07-24 alex | bfin-* | bs2000-* \
376 ef392e7d 2012-02-27 alex | c[123]* | c30-* | [cjt]90-* | c4x-* \
377 4c2acd55 2014-03-18 alex | c8051-* | clipper-* | craynv-* | cydra-* \
378 ac9390f0 2003-07-09 alex | d10v-* | d30v-* | dlx-* \
379 7633e2f8 2002-03-12 alex | elxsi-* \
380 f1486e6a 2007-05-26 alex | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
381 7633e2f8 2002-03-12 alex | h8300-* | h8500-* \
382 7633e2f8 2002-03-12 alex | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
383 ef392e7d 2012-02-27 alex | hexagon-* \
384 7633e2f8 2002-03-12 alex | i*86-* | i860-* | i960-* | ia64-* \
385 a5695e7e 2003-11-28 alex | ip2k-* | iq2000-* \
387 ef392e7d 2012-02-27 alex | le32-* | le64-* \
389 b9661ae6 2006-09-11 alex | m32c-* | m32r-* | m32rle-* \
390 7633e2f8 2002-03-12 alex | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
391 4c2acd55 2014-03-18 alex | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
392 4c2acd55 2014-03-18 alex | microblaze-* | microblazeel-* \
393 ac9390f0 2003-07-09 alex | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
394 ac9390f0 2003-07-09 alex | mips16-* \
395 ac9390f0 2003-07-09 alex | mips64-* | mips64el-* \
396 ef392e7d 2012-02-27 alex | mips64octeon-* | mips64octeonel-* \
397 ac9390f0 2003-07-09 alex | mips64orion-* | mips64orionel-* \
398 ef392e7d 2012-02-27 alex | mips64r5900-* | mips64r5900el-* \
399 ef392e7d 2012-02-27 alex | mips64vr-* | mips64vrel-* \
400 ac9390f0 2003-07-09 alex | mips64vr4100-* | mips64vr4100el-* \
401 ac9390f0 2003-07-09 alex | mips64vr4300-* | mips64vr4300el-* \
402 ac9390f0 2003-07-09 alex | mips64vr5000-* | mips64vr5000el-* \
403 ac55a80d 2005-10-15 alex | mips64vr5900-* | mips64vr5900el-* \
404 ac9390f0 2003-07-09 alex | mipsisa32-* | mipsisa32el-* \
405 ac9390f0 2003-07-09 alex | mipsisa32r2-* | mipsisa32r2el-* \
406 e864b1f3 2014-07-14 alex | mipsisa32r6-* | mipsisa32r6el-* \
407 ac9390f0 2003-07-09 alex | mipsisa64-* | mipsisa64el-* \
408 a5695e7e 2003-11-28 alex | mipsisa64r2-* | mipsisa64r2el-* \
409 e864b1f3 2014-07-14 alex | mipsisa64r6-* | mipsisa64r6el-* \
410 ac9390f0 2003-07-09 alex | mipsisa64sb1-* | mipsisa64sb1el-* \
411 ac9390f0 2003-07-09 alex | mipsisa64sr71k-* | mipsisa64sr71kel-* \
412 4c2acd55 2014-03-18 alex | mipsr5900-* | mipsr5900el-* \
413 ac9390f0 2003-07-09 alex | mipstx39-* | mipstx39el-* \
416 ac9390f0 2003-07-09 alex | msp430-* \
417 ef392e7d 2012-02-27 alex | nds32-* | nds32le-* | nds32be-* \
418 4c2acd55 2014-03-18 alex | nios-* | nios2-* | nios2eb-* | nios2el-* \
419 0d10c60b 2004-12-25 alex | none-* | np1-* | ns16k-* | ns32k-* \
420 ef392e7d 2012-02-27 alex | open8-* \
421 e864b1f3 2014-07-14 alex | or1k*-* \
422 7633e2f8 2002-03-12 alex | orion-* \
423 7633e2f8 2002-03-12 alex | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
424 ef392e7d 2012-02-27 alex | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
425 7633e2f8 2002-03-12 alex | pyramid-* \
426 ef392e7d 2012-02-27 alex | rl78-* | romp-* | rs6000-* | rx-* \
427 ef392e7d 2012-02-27 alex | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
428 ac9390f0 2003-07-09 alex | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
429 b9661ae6 2006-09-11 alex | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
430 1e9e16fa 2005-07-24 alex | sparclite-* \
431 ef392e7d 2012-02-27 alex | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
432 ef392e7d 2012-02-27 alex | tahoe-* \
433 ac9390f0 2003-07-09 alex | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
434 ef392e7d 2012-02-27 alex | tile*-* \
436 ef392e7d 2012-02-27 alex | ubicom32-* \
437 ef392e7d 2012-02-27 alex | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
439 7633e2f8 2002-03-12 alex | we32k-* \
440 ef392e7d 2012-02-27 alex | x86-* | x86_64-* | xc16x-* | xps100-* \
441 afd65bc7 2008-10-03 alex | xstormy16-* | xtensa*-* \
443 ef392e7d 2012-02-27 alex | z8k-* | z80-*)
445 afd65bc7 2008-10-03 alex # Recognize the basic CPU types without company name, with glob match.
447 afd65bc7 2008-10-03 alex basic_machine=$basic_machine-unknown
449 7633e2f8 2002-03-12 alex # Recognize the various machine names and aliases which stand
450 7633e2f8 2002-03-12 alex # for a CPU type and a company and sometimes even an OS.
452 7633e2f8 2002-03-12 alex basic_machine=i386-unknown
455 7633e2f8 2002-03-12 alex 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
456 7633e2f8 2002-03-12 alex basic_machine=m68000-att
459 7633e2f8 2002-03-12 alex basic_machine=we32k-att
462 7633e2f8 2002-03-12 alex basic_machine=a29k-amd
466 0d10c60b 2004-12-25 alex basic_machine=abacus-unknown
469 7633e2f8 2002-03-12 alex basic_machine=m68010-adobe
472 7633e2f8 2002-03-12 alex alliant | fx80)
473 7633e2f8 2002-03-12 alex basic_machine=fx80-alliant
475 7633e2f8 2002-03-12 alex altos | altos3068)
476 7633e2f8 2002-03-12 alex basic_machine=m68k-altos
479 7633e2f8 2002-03-12 alex basic_machine=a29k-none
483 ac9390f0 2003-07-09 alex basic_machine=x86_64-pc
486 77944629 2004-03-11 alex basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
489 7633e2f8 2002-03-12 alex basic_machine=580-amdahl
492 7633e2f8 2002-03-12 alex amiga | amiga-*)
493 7633e2f8 2002-03-12 alex basic_machine=m68k-unknown
495 7633e2f8 2002-03-12 alex amigaos | amigados)
496 7633e2f8 2002-03-12 alex basic_machine=m68k-unknown
497 7633e2f8 2002-03-12 alex os=-amigaos
499 7633e2f8 2002-03-12 alex amigaunix | amix)
500 7633e2f8 2002-03-12 alex basic_machine=m68k-unknown
504 7633e2f8 2002-03-12 alex basic_machine=m68k-apollo
507 7633e2f8 2002-03-12 alex apollo68bsd)
508 7633e2f8 2002-03-12 alex basic_machine=m68k-apollo
512 ef392e7d 2012-02-27 alex basic_machine=i386-pc
516 7633e2f8 2002-03-12 alex basic_machine=m68k-apple
520 7633e2f8 2002-03-12 alex basic_machine=ns32k-sequent
524 afd65bc7 2008-10-03 alex basic_machine=bfin-unknown
527 afd65bc7 2008-10-03 alex blackfin-*)
528 afd65bc7 2008-10-03 alex basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
532 ef392e7d 2012-02-27 alex basic_machine=powerpc-ibm
536 ef392e7d 2012-02-27 alex basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
539 ef392e7d 2012-02-27 alex basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
542 ef392e7d 2012-02-27 alex basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
545 7633e2f8 2002-03-12 alex basic_machine=c90-cray
549 ef392e7d 2012-02-27 alex basic_machine=arm-unknown
553 7633e2f8 2002-03-12 alex basic_machine=c1-convex
557 7633e2f8 2002-03-12 alex basic_machine=c2-convex
560 7633e2f8 2002-03-12 alex convex-c32)
561 7633e2f8 2002-03-12 alex basic_machine=c32-convex
564 7633e2f8 2002-03-12 alex convex-c34)
565 7633e2f8 2002-03-12 alex basic_machine=c34-convex
568 7633e2f8 2002-03-12 alex convex-c38)
569 7633e2f8 2002-03-12 alex basic_machine=c38-convex
572 7633e2f8 2002-03-12 alex cray | j90)
573 7633e2f8 2002-03-12 alex basic_machine=j90-cray
577 0d10c60b 2004-12-25 alex basic_machine=craynv-cray
578 0d10c60b 2004-12-25 alex os=-unicosmp
580 ef392e7d 2012-02-27 alex cr16 | cr16-*)
581 afd65bc7 2008-10-03 alex basic_machine=cr16-unknown
584 7633e2f8 2002-03-12 alex crds | unos)
585 7633e2f8 2002-03-12 alex basic_machine=m68k-crds
587 0c293ae9 2005-01-27 alex crisv32 | crisv32-* | etraxfs*)
588 0c293ae9 2005-01-27 alex basic_machine=crisv32-axis
590 7633e2f8 2002-03-12 alex cris | cris-* | etrax*)
591 7633e2f8 2002-03-12 alex basic_machine=cris-axis
594 0d10c60b 2004-12-25 alex basic_machine=crx-unknown
597 7633e2f8 2002-03-12 alex da30 | da30-*)
598 7633e2f8 2002-03-12 alex basic_machine=m68k-da30
600 7633e2f8 2002-03-12 alex decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
601 7633e2f8 2002-03-12 alex basic_machine=mips-dec
603 7633e2f8 2002-03-12 alex decsystem10* | dec10*)
604 7633e2f8 2002-03-12 alex basic_machine=pdp10-dec
607 7633e2f8 2002-03-12 alex decsystem20* | dec20*)
608 7633e2f8 2002-03-12 alex basic_machine=pdp10-dec
611 7633e2f8 2002-03-12 alex delta | 3300 | motorola-3300 | motorola-delta \
612 7633e2f8 2002-03-12 alex | 3300-motorola | delta-motorola)
613 7633e2f8 2002-03-12 alex basic_machine=m68k-motorola
616 7633e2f8 2002-03-12 alex basic_machine=m88k-motorola
620 ef392e7d 2012-02-27 alex basic_machine=i686-pc
624 0c293ae9 2005-01-27 alex basic_machine=i586-pc
625 0c293ae9 2005-01-27 alex os=-msdosdjgpp
627 7633e2f8 2002-03-12 alex dpx20 | dpx20-*)
628 7633e2f8 2002-03-12 alex basic_machine=rs6000-bull
631 7633e2f8 2002-03-12 alex dpx2* | dpx2*-bull)
632 7633e2f8 2002-03-12 alex basic_machine=m68k-bull
636 7633e2f8 2002-03-12 alex basic_machine=a29k-amd
640 7633e2f8 2002-03-12 alex basic_machine=elxsi-elxsi
643 7633e2f8 2002-03-12 alex encore | umax | mmax)
644 7633e2f8 2002-03-12 alex basic_machine=ns32k-encore
646 7633e2f8 2002-03-12 alex es1800 | OSE68k | ose68k | ose | OSE)
647 7633e2f8 2002-03-12 alex basic_machine=m68k-ericsson
651 7633e2f8 2002-03-12 alex basic_machine=i860-alliant
654 7633e2f8 2002-03-12 alex basic_machine=ns32k-ns
657 7633e2f8 2002-03-12 alex basic_machine=tron-gmicro
661 7633e2f8 2002-03-12 alex basic_machine=i386-pc
664 7633e2f8 2002-03-12 alex h3050r* | hiux*)
665 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hitachi
666 7633e2f8 2002-03-12 alex os=-hiuxwe2
669 7633e2f8 2002-03-12 alex basic_machine=h8300-hitachi
673 7633e2f8 2002-03-12 alex basic_machine=h8300-hitachi
677 7633e2f8 2002-03-12 alex basic_machine=h8500-hitachi
681 7633e2f8 2002-03-12 alex basic_machine=m88k-harris
685 7633e2f8 2002-03-12 alex basic_machine=m68k-hp
688 7633e2f8 2002-03-12 alex basic_machine=m68k-hp
692 7633e2f8 2002-03-12 alex basic_machine=m68k-hp
695 7633e2f8 2002-03-12 alex hp3k9[0-9][0-9] | hp9[0-9][0-9])
696 7633e2f8 2002-03-12 alex basic_machine=hppa1.0-hp
698 7633e2f8 2002-03-12 alex hp9k2[0-9][0-9] | hp9k31[0-9])
699 7633e2f8 2002-03-12 alex basic_machine=m68000-hp
701 7633e2f8 2002-03-12 alex hp9k3[2-9][0-9])
702 7633e2f8 2002-03-12 alex basic_machine=m68k-hp
704 7633e2f8 2002-03-12 alex hp9k6[0-9][0-9] | hp6[0-9][0-9])
705 7633e2f8 2002-03-12 alex basic_machine=hppa1.0-hp
707 7633e2f8 2002-03-12 alex hp9k7[0-79][0-9] | hp7[0-79][0-9])
708 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
710 7633e2f8 2002-03-12 alex hp9k78[0-9] | hp78[0-9])
711 7633e2f8 2002-03-12 alex # FIXME: really hppa2.0-hp
712 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
714 7633e2f8 2002-03-12 alex hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
715 7633e2f8 2002-03-12 alex # FIXME: really hppa2.0-hp
716 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
718 7633e2f8 2002-03-12 alex hp9k8[0-9][13679] | hp8[0-9][13679])
719 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
721 7633e2f8 2002-03-12 alex hp9k8[0-9][0-9] | hp8[0-9][0-9])
722 7633e2f8 2002-03-12 alex basic_machine=hppa1.0-hp
725 7633e2f8 2002-03-12 alex os=-nextstep3
728 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
732 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hp
735 7633e2f8 2002-03-12 alex i370-ibm* | ibm*)
736 7633e2f8 2002-03-12 alex basic_machine=i370-ibm
739 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
743 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
747 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
751 7633e2f8 2002-03-12 alex basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
752 7633e2f8 2002-03-12 alex os=-solaris2
755 7633e2f8 2002-03-12 alex basic_machine=i386-mach
758 7633e2f8 2002-03-12 alex i386-vsta | vsta)
759 7633e2f8 2002-03-12 alex basic_machine=i386-unknown
762 7633e2f8 2002-03-12 alex iris | iris4d)
763 7633e2f8 2002-03-12 alex basic_machine=mips-sgi
764 7633e2f8 2002-03-12 alex case $os in
772 7633e2f8 2002-03-12 alex isi68 | isi)
773 7633e2f8 2002-03-12 alex basic_machine=m68k-isi
777 afd65bc7 2008-10-03 alex basic_machine=m68k-unknown
780 afd65bc7 2008-10-03 alex m68knommu-*)
781 afd65bc7 2008-10-03 alex basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
784 7633e2f8 2002-03-12 alex m88k-omron*)
785 7633e2f8 2002-03-12 alex basic_machine=m88k-omron
787 7633e2f8 2002-03-12 alex magnum | m3230)
788 7633e2f8 2002-03-12 alex basic_machine=mips-mips
792 7633e2f8 2002-03-12 alex basic_machine=ns32k-utek
795 4c2acd55 2014-03-18 alex microblaze*)
796 ef392e7d 2012-02-27 alex basic_machine=microblaze-xilinx
799 107bfdc8 2012-09-16 alex basic_machine=x86_64-pc
800 107bfdc8 2012-09-16 alex os=-mingw64
803 4c2acd55 2014-03-18 alex basic_machine=i686-pc
804 7633e2f8 2002-03-12 alex os=-mingw32
807 afd65bc7 2008-10-03 alex basic_machine=arm-unknown
808 afd65bc7 2008-10-03 alex os=-mingw32ce
811 7633e2f8 2002-03-12 alex basic_machine=m68000-convergent
813 7633e2f8 2002-03-12 alex *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
814 7633e2f8 2002-03-12 alex basic_machine=m68k-atari
818 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
821 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
824 7633e2f8 2002-03-12 alex basic_machine=m68k-rom68k
828 7633e2f8 2002-03-12 alex basic_machine=powerpc-unknown
829 7633e2f8 2002-03-12 alex os=-morphos
832 7633e2f8 2002-03-12 alex basic_machine=i386-pc
836 65573d7a 2006-07-23 alex basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
839 4c2acd55 2014-03-18 alex basic_machine=i686-pc
843 7633e2f8 2002-03-12 alex basic_machine=i370-ibm
847 ef392e7d 2012-02-27 alex basic_machine=le32-unknown
851 7633e2f8 2002-03-12 alex basic_machine=i486-ncr
855 7633e2f8 2002-03-12 alex basic_machine=i386-unknown
859 7633e2f8 2002-03-12 alex basic_machine=armv4l-rebel
862 7633e2f8 2002-03-12 alex news | news700 | news800 | news900)
863 7633e2f8 2002-03-12 alex basic_machine=m68k-sony
867 7633e2f8 2002-03-12 alex basic_machine=m68030-sony
870 7633e2f8 2002-03-12 alex news-3600 | risc-news)
871 7633e2f8 2002-03-12 alex basic_machine=mips-sony
875 7633e2f8 2002-03-12 alex basic_machine=v70-nec
878 7633e2f8 2002-03-12 alex next | m*-next )
879 7633e2f8 2002-03-12 alex basic_machine=m68k-next
880 7633e2f8 2002-03-12 alex case $os in
881 7633e2f8 2002-03-12 alex -nextstep* )
884 7633e2f8 2002-03-12 alex os=-nextstep2
887 7633e2f8 2002-03-12 alex os=-nextstep3
892 7633e2f8 2002-03-12 alex basic_machine=m68k-harris
896 7633e2f8 2002-03-12 alex basic_machine=m88k-harris
900 7633e2f8 2002-03-12 alex basic_machine=i960-intel
904 7633e2f8 2002-03-12 alex basic_machine=i960-intel
908 7633e2f8 2002-03-12 alex basic_machine=mips-compaq
909 7633e2f8 2002-03-12 alex os=-nonstopux
912 7633e2f8 2002-03-12 alex basic_machine=np1-gould
914 ef392e7d 2012-02-27 alex neo-tandem)
915 ef392e7d 2012-02-27 alex basic_machine=neo-tandem
917 ef392e7d 2012-02-27 alex nse-tandem)
918 ef392e7d 2012-02-27 alex basic_machine=nse-tandem
920 7633e2f8 2002-03-12 alex nsr-tandem)
921 7633e2f8 2002-03-12 alex basic_machine=nsr-tandem
923 7633e2f8 2002-03-12 alex op50n-* | op60c-*)
924 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-oki
927 ac55a80d 2005-10-15 alex openrisc | openrisc-*)
928 7633e2f8 2002-03-12 alex basic_machine=or32-unknown
931 77944629 2004-03-11 alex basic_machine=powerpc-ibm
934 7633e2f8 2002-03-12 alex OSE68000 | ose68000)
935 7633e2f8 2002-03-12 alex basic_machine=m68000-ericsson
939 7633e2f8 2002-03-12 alex basic_machine=m68k-none
942 7633e2f8 2002-03-12 alex pa-hitachi)
943 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-hitachi
944 7633e2f8 2002-03-12 alex os=-hiuxwe2
947 7633e2f8 2002-03-12 alex basic_machine=i860-intel
951 afd65bc7 2008-10-03 alex basic_machine=hppa-unknown
955 afd65bc7 2008-10-03 alex basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
959 7633e2f8 2002-03-12 alex basic_machine=sparc-tti
962 7633e2f8 2002-03-12 alex basic_machine=m68k-tti
964 ac9390f0 2003-07-09 alex pc532 | pc532-*)
965 7633e2f8 2002-03-12 alex basic_machine=ns32k-pc532
968 65573d7a 2006-07-23 alex basic_machine=i386-pc
971 65573d7a 2006-07-23 alex basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
973 7633e2f8 2002-03-12 alex pentium | p5 | k5 | k6 | nexgen | viac3)
974 7633e2f8 2002-03-12 alex basic_machine=i586-pc
976 ac9390f0 2003-07-09 alex pentiumpro | p6 | 6x86 | athlon | athlon_*)
977 7633e2f8 2002-03-12 alex basic_machine=i686-pc
979 a5695e7e 2003-11-28 alex pentiumii | pentium2 | pentiumiii | pentium3)
980 7633e2f8 2002-03-12 alex basic_machine=i686-pc
983 a5695e7e 2003-11-28 alex basic_machine=i786-pc
985 7633e2f8 2002-03-12 alex pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
986 7633e2f8 2002-03-12 alex basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
988 7633e2f8 2002-03-12 alex pentiumpro-* | p6-* | 6x86-* | athlon-*)
989 7633e2f8 2002-03-12 alex basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
991 a5695e7e 2003-11-28 alex pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
992 7633e2f8 2002-03-12 alex basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
994 a5695e7e 2003-11-28 alex pentium4-*)
995 a5695e7e 2003-11-28 alex basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
998 7633e2f8 2002-03-12 alex basic_machine=pn-gould
1000 7633e2f8 2002-03-12 alex power) basic_machine=power-ibm
1002 ef392e7d 2012-02-27 alex ppc | ppcbe) basic_machine=powerpc-unknown
1004 ef392e7d 2012-02-27 alex ppc-* | ppcbe-*)
1005 ef392e7d 2012-02-27 alex basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1007 7633e2f8 2002-03-12 alex ppcle | powerpclittle | ppc-le | powerpc-little)
1008 7633e2f8 2002-03-12 alex basic_machine=powerpcle-unknown
1010 7633e2f8 2002-03-12 alex ppcle-* | powerpclittle-*)
1011 7633e2f8 2002-03-12 alex basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1013 7633e2f8 2002-03-12 alex ppc64) basic_machine=powerpc64-unknown
1015 7633e2f8 2002-03-12 alex ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1017 7633e2f8 2002-03-12 alex ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1018 7633e2f8 2002-03-12 alex basic_machine=powerpc64le-unknown
1020 7633e2f8 2002-03-12 alex ppc64le-* | powerpc64little-*)
1021 7633e2f8 2002-03-12 alex basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1024 7633e2f8 2002-03-12 alex basic_machine=i386-ibm
1027 7633e2f8 2002-03-12 alex basic_machine=i586-unknown
1030 4c2acd55 2014-03-18 alex rdos | rdos64)
1031 4c2acd55 2014-03-18 alex basic_machine=x86_64-pc
1035 65573d7a 2006-07-23 alex basic_machine=i386-pc
1039 7633e2f8 2002-03-12 alex basic_machine=m68k-rom68k
1043 7633e2f8 2002-03-12 alex basic_machine=mips-siemens
1045 7633e2f8 2002-03-12 alex rtpc | rtpc-*)
1046 7633e2f8 2002-03-12 alex basic_machine=romp-ibm
1048 7633e2f8 2002-03-12 alex s390 | s390-*)
1049 7633e2f8 2002-03-12 alex basic_machine=s390-ibm
1051 7633e2f8 2002-03-12 alex s390x | s390x-*)
1052 7633e2f8 2002-03-12 alex basic_machine=s390x-ibm
1055 7633e2f8 2002-03-12 alex basic_machine=a29k-amd
1059 ac9390f0 2003-07-09 alex basic_machine=mipsisa64sb1-unknown
1062 ac9390f0 2003-07-09 alex basic_machine=mipsisa64sb1el-unknown
1065 f1486e6a 2007-05-26 alex basic_machine=mipsisa32-sde
1069 a5695e7e 2003-11-28 alex basic_machine=mips-sei
1073 7633e2f8 2002-03-12 alex basic_machine=i386-sequent
1076 7633e2f8 2002-03-12 alex basic_machine=sh-hitachi
1080 f1486e6a 2007-05-26 alex basic_machine=sh5le-unknown
1083 a5695e7e 2003-11-28 alex basic_machine=sh64-unknown
1085 7633e2f8 2002-03-12 alex sparclite-wrs | simso-wrs)
1086 7633e2f8 2002-03-12 alex basic_machine=sparclite-wrs
1087 7633e2f8 2002-03-12 alex os=-vxworks
1090 7633e2f8 2002-03-12 alex basic_machine=m68k-bull
1094 7633e2f8 2002-03-12 alex basic_machine=spur-unknown
1097 7633e2f8 2002-03-12 alex basic_machine=m68k-tandem
1100 7633e2f8 2002-03-12 alex basic_machine=i860-stratus
1103 ef392e7d 2012-02-27 alex strongarm-* | thumb-*)
1104 ef392e7d 2012-02-27 alex basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1107 7633e2f8 2002-03-12 alex basic_machine=m68000-sun
1110 7633e2f8 2002-03-12 alex basic_machine=m68000-sun
1111 7633e2f8 2002-03-12 alex os=-sunos3
1114 7633e2f8 2002-03-12 alex basic_machine=m68000-sun
1115 7633e2f8 2002-03-12 alex os=-sunos4
1118 7633e2f8 2002-03-12 alex basic_machine=m68k-sun
1119 7633e2f8 2002-03-12 alex os=-sunos3
1122 7633e2f8 2002-03-12 alex basic_machine=m68k-sun
1123 7633e2f8 2002-03-12 alex os=-sunos4
1126 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1127 7633e2f8 2002-03-12 alex os=-sunos3
1130 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1131 7633e2f8 2002-03-12 alex os=-sunos4
1134 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1135 7633e2f8 2002-03-12 alex os=-solaris2
1137 7633e2f8 2002-03-12 alex sun3 | sun3-*)
1138 7633e2f8 2002-03-12 alex basic_machine=m68k-sun
1141 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1143 7633e2f8 2002-03-12 alex sun386 | sun386i | roadrunner)
1144 7633e2f8 2002-03-12 alex basic_machine=i386-sun
1147 7633e2f8 2002-03-12 alex basic_machine=sv1-cray
1148 7633e2f8 2002-03-12 alex os=-unicos
1151 7633e2f8 2002-03-12 alex basic_machine=i386-sequent
1155 7633e2f8 2002-03-12 alex basic_machine=alphaev5-cray
1156 7633e2f8 2002-03-12 alex os=-unicos
1159 7633e2f8 2002-03-12 alex basic_machine=t90-cray
1160 7633e2f8 2002-03-12 alex os=-unicos
1163 ef392e7d 2012-02-27 alex basic_machine=$basic_machine-unknown
1164 afd65bc7 2008-10-03 alex os=-linux-gnu
1167 7633e2f8 2002-03-12 alex basic_machine=mipstx39-unknown
1170 7633e2f8 2002-03-12 alex basic_machine=mipstx39el-unknown
1173 7633e2f8 2002-03-12 alex basic_machine=pdp10-xkl
1174 7633e2f8 2002-03-12 alex os=-tops20
1176 7633e2f8 2002-03-12 alex tower | tower-32)
1177 7633e2f8 2002-03-12 alex basic_machine=m68k-ncr
1180 77944629 2004-03-11 alex basic_machine=s390x-ibm
1184 7633e2f8 2002-03-12 alex basic_machine=a29k-amd
1188 7633e2f8 2002-03-12 alex basic_machine=a29k-nyu
1191 7633e2f8 2002-03-12 alex v810 | necv810)
1192 7633e2f8 2002-03-12 alex basic_machine=v810-nec
1196 7633e2f8 2002-03-12 alex basic_machine=vax-dec
1200 7633e2f8 2002-03-12 alex basic_machine=vax-dec
1203 7633e2f8 2002-03-12 alex vpp*|vx|vx-*)
1204 ac9390f0 2003-07-09 alex basic_machine=f301-fujitsu
1206 7633e2f8 2002-03-12 alex vxworks960)
1207 7633e2f8 2002-03-12 alex basic_machine=i960-wrs
1208 7633e2f8 2002-03-12 alex os=-vxworks
1210 7633e2f8 2002-03-12 alex vxworks68)
1211 7633e2f8 2002-03-12 alex basic_machine=m68k-wrs
1212 7633e2f8 2002-03-12 alex os=-vxworks
1214 7633e2f8 2002-03-12 alex vxworks29k)
1215 7633e2f8 2002-03-12 alex basic_machine=a29k-wrs
1216 7633e2f8 2002-03-12 alex os=-vxworks
1219 7633e2f8 2002-03-12 alex basic_machine=w65-wdc
1223 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-winbond
1224 7633e2f8 2002-03-12 alex os=-proelf
1227 0c293ae9 2005-01-27 alex basic_machine=i686-pc
1228 0c293ae9 2005-01-27 alex os=-mingw32
1230 ac9390f0 2003-07-09 alex xps | xps100)
1231 7633e2f8 2002-03-12 alex basic_machine=xps100-honeywell
1233 ef392e7d 2012-02-27 alex xscale-* | xscalee[bl]-*)
1234 ef392e7d 2012-02-27 alex basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1237 7633e2f8 2002-03-12 alex basic_machine=ymp-cray
1238 7633e2f8 2002-03-12 alex os=-unicos
1240 7633e2f8 2002-03-12 alex z8k-*-coff)
1241 7633e2f8 2002-03-12 alex basic_machine=z8k-unknown
1244 ef392e7d 2012-02-27 alex z80-*-coff)
1245 ef392e7d 2012-02-27 alex basic_machine=z80-unknown
1249 7633e2f8 2002-03-12 alex basic_machine=none-none
1253 7633e2f8 2002-03-12 alex # Here we handle the default manufacturer of certain CPU types. It is in
1254 7633e2f8 2002-03-12 alex # some cases the only manufacturer, in others, it is the most popular.
1256 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-winbond
1259 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-oki
1262 7633e2f8 2002-03-12 alex basic_machine=hppa1.1-oki
1265 7633e2f8 2002-03-12 alex basic_machine=romp-ibm
1268 0d10c60b 2004-12-25 alex basic_machine=mmix-knuth
1271 7633e2f8 2002-03-12 alex basic_machine=rs6000-ibm
1274 7633e2f8 2002-03-12 alex basic_machine=vax-dec
1277 7633e2f8 2002-03-12 alex # there are many clones, so DEC is not a safe bet
1278 7633e2f8 2002-03-12 alex basic_machine=pdp10-unknown
1281 7633e2f8 2002-03-12 alex basic_machine=pdp11-dec
1284 7633e2f8 2002-03-12 alex basic_machine=we32k-att
1286 ef392e7d 2012-02-27 alex sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1287 7633e2f8 2002-03-12 alex basic_machine=sh-unknown
1289 b9661ae6 2006-09-11 alex sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1290 7633e2f8 2002-03-12 alex basic_machine=sparc-sun
1293 7633e2f8 2002-03-12 alex basic_machine=cydra-cydrome
1296 7633e2f8 2002-03-12 alex basic_machine=orion-highlevel
1299 7633e2f8 2002-03-12 alex basic_machine=clipper-highlevel
1301 7633e2f8 2002-03-12 alex mac | mpw | mac-mpw)
1302 7633e2f8 2002-03-12 alex basic_machine=m68k-apple
1304 7633e2f8 2002-03-12 alex pmac | pmac-mpw)
1305 7633e2f8 2002-03-12 alex basic_machine=powerpc-apple
1307 7633e2f8 2002-03-12 alex *-unknown)
1308 7633e2f8 2002-03-12 alex # Make sure to match an already-canonicalized machine name.
1311 7633e2f8 2002-03-12 alex echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1316 7633e2f8 2002-03-12 alex # Here we canonicalize certain aliases for manufacturers.
1317 7633e2f8 2002-03-12 alex case $basic_machine in
1318 7633e2f8 2002-03-12 alex *-digital*)
1319 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1321 7633e2f8 2002-03-12 alex *-commodore*)
1322 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1328 7633e2f8 2002-03-12 alex # Decode manufacturer-specific aliases for certain operating systems.
1330 7633e2f8 2002-03-12 alex if [ x"$os" != x"" ]
1332 7633e2f8 2002-03-12 alex case $os in
1333 ef392e7d 2012-02-27 alex # First match some system type aliases
1334 ef392e7d 2012-02-27 alex # that might get confused with valid system types.
1335 7633e2f8 2002-03-12 alex # -solaris* is a basic system type, with this one exception.
1336 ef392e7d 2012-02-27 alex -auroraux)
1337 ef392e7d 2012-02-27 alex os=-auroraux
1339 7633e2f8 2002-03-12 alex -solaris1 | -solaris1.*)
1340 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|solaris1|sunos4|'`
1343 7633e2f8 2002-03-12 alex os=-solaris2
1348 7633e2f8 2002-03-12 alex -unixware*)
1349 7633e2f8 2002-03-12 alex os=-sysv4.2uw
1351 7633e2f8 2002-03-12 alex -gnu/linux*)
1352 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1354 7633e2f8 2002-03-12 alex # First accept the basic system types.
1355 7633e2f8 2002-03-12 alex # The portable systems comes first.
1356 7633e2f8 2002-03-12 alex # Each alternative MUST END IN A *, to match a version number.
1357 7633e2f8 2002-03-12 alex # -sysv* is not here because it comes later, after sysvr4.
1358 7633e2f8 2002-03-12 alex -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1359 ef392e7d 2012-02-27 alex | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1360 ef392e7d 2012-02-27 alex | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1361 4c2acd55 2014-03-18 alex | -sym* | -kopensolaris* | -plan9* \
1362 7633e2f8 2002-03-12 alex | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1363 ef392e7d 2012-02-27 alex | -aos* | -aros* \
1364 7633e2f8 2002-03-12 alex | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1365 7633e2f8 2002-03-12 alex | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1366 65573d7a 2006-07-23 alex | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1367 107bfdc8 2012-09-16 alex | -bitrig* | -openbsd* | -solidbsd* \
1368 0d10c60b 2004-12-25 alex | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1369 0d10c60b 2004-12-25 alex | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1370 7633e2f8 2002-03-12 alex | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1371 7633e2f8 2002-03-12 alex | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1372 ef392e7d 2012-02-27 alex | -chorusos* | -chorusrdb* | -cegcc* \
1373 ef392e7d 2012-02-27 alex | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1374 107bfdc8 2012-09-16 alex | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1375 107bfdc8 2012-09-16 alex | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1376 65573d7a 2006-07-23 alex | -uxpv* | -beos* | -mpeix* | -udk* \
1377 ac9390f0 2003-07-09 alex | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1378 7633e2f8 2002-03-12 alex | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1379 7633e2f8 2002-03-12 alex | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1380 7633e2f8 2002-03-12 alex | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1381 ac9390f0 2003-07-09 alex | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1382 ac55a80d 2005-10-15 alex | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1383 e864b1f3 2014-07-14 alex | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1384 7633e2f8 2002-03-12 alex # Remember, each alternative MUST END IN *, to match a version number.
1387 7633e2f8 2002-03-12 alex case $basic_machine in
1388 7633e2f8 2002-03-12 alex x86-* | i*86-*)
1391 7633e2f8 2002-03-12 alex os=-nto$os
1395 ac9390f0 2003-07-09 alex -nto-qnx*)
1398 ac9390f0 2003-07-09 alex os=`echo $os | sed -e 's|nto|nto-qnx|'`
1400 7633e2f8 2002-03-12 alex -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1401 ac55a80d 2005-10-15 alex | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1402 7633e2f8 2002-03-12 alex | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1405 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|mac|macos|'`
1407 a5695e7e 2003-11-28 alex -linux-dietlibc)
1408 a5695e7e 2003-11-28 alex os=-linux-dietlibc
1411 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|linux|linux-gnu|'`
1414 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|sunos5|solaris2|'`
1417 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|sunos6|solaris3|'`
1420 7633e2f8 2002-03-12 alex os=-openedition
1428 7633e2f8 2002-03-12 alex -osfrose*)
1429 7633e2f8 2002-03-12 alex os=-osfrose
1444 7633e2f8 2002-03-12 alex os=-atheos
1446 77944629 2004-03-11 alex -syllable*)
1447 77944629 2004-03-11 alex os=-syllable
1452 7633e2f8 2002-03-12 alex -ctix* | -uts*)
1456 7633e2f8 2002-03-12 alex os=-rtmk-nova
1459 ac9390f0 2003-07-09 alex os=-nextstep2
1464 7633e2f8 2002-03-12 alex # Preserve the version number of sinix5.
1465 7633e2f8 2002-03-12 alex -sinix5.*)
1466 7633e2f8 2002-03-12 alex os=`echo $os | sed -e 's|sinix|sysv|'`
1489 7633e2f8 2002-03-12 alex # This must come after -sysvr4.
1501 ac9390f0 2003-07-09 alex -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1518 7633e2f8 2002-03-12 alex # Get rid of the `-' at the beginning of $os.
1519 7633e2f8 2002-03-12 alex os=`echo $os | sed 's/[^-]*-//'`
1520 7633e2f8 2002-03-12 alex echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1526 7633e2f8 2002-03-12 alex # Here we handle the default operating systems that come with various machines.
1527 7633e2f8 2002-03-12 alex # The value should be what the vendor currently ships out the door with their
1528 7633e2f8 2002-03-12 alex # machine or put another way, the most popular os provided with the machine.
1530 7633e2f8 2002-03-12 alex # Note that if you're going to try to match "-MANUFACTURER" here (say,
1531 7633e2f8 2002-03-12 alex # "-sun"), then you have to tell the case statement up towards the top
1532 7633e2f8 2002-03-12 alex # that MANUFACTURER isn't an operating system. Otherwise, code above
1533 7633e2f8 2002-03-12 alex # will signal an error saying that MANUFACTURER isn't an operating
1534 7633e2f8 2002-03-12 alex # system, and we'll never get to this point.
1536 7633e2f8 2002-03-12 alex case $basic_machine in
1544 7633e2f8 2002-03-12 alex os=-riscix1.2
1546 7633e2f8 2002-03-12 alex arm*-rebel)
1549 7633e2f8 2002-03-12 alex arm*-semi)
1552 ef392e7d 2012-02-27 alex c4x-* | tic4x-*)
1558 107bfdc8 2012-09-16 alex hexagon-*)
1570 7633e2f8 2002-03-12 alex # This must come before the *-dec entry.
1572 7633e2f8 2002-03-12 alex os=-tops20
1577 7633e2f8 2002-03-12 alex *-dec | vax-*)
1578 7633e2f8 2002-03-12 alex os=-ultrix4.2
1580 7633e2f8 2002-03-12 alex m68*-apollo)
1581 7633e2f8 2002-03-12 alex os=-domain
1584 7633e2f8 2002-03-12 alex os=-sunos4.0.2
1586 7633e2f8 2002-03-12 alex m68000-sun)
1587 7633e2f8 2002-03-12 alex os=-sunos3
1589 7633e2f8 2002-03-12 alex m68*-cisco)
1595 7633e2f8 2002-03-12 alex mips*-cisco)
1604 7633e2f8 2002-03-12 alex *-tti) # must be before sparc entry or we get the wrong os.
1607 7633e2f8 2002-03-12 alex sparc-* | *-sun)
1608 7633e2f8 2002-03-12 alex os=-sunos4.1.1
1620 0d10c60b 2004-12-25 alex os=-mmixware
1623 7633e2f8 2002-03-12 alex os=-proelf
1625 7633e2f8 2002-03-12 alex *-winbond)
1626 7633e2f8 2002-03-12 alex os=-proelf
1629 7633e2f8 2002-03-12 alex os=-proelf
1634 7633e2f8 2002-03-12 alex *-hitachi)
1637 7633e2f8 2002-03-12 alex i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1641 7633e2f8 2002-03-12 alex os=-amigaos
1646 7633e2f8 2002-03-12 alex *-dolphin)
1649 7633e2f8 2002-03-12 alex m68k-ccur)
1652 7633e2f8 2002-03-12 alex m88k-omron*)
1656 7633e2f8 2002-03-12 alex os=-nextstep
1658 7633e2f8 2002-03-12 alex *-sequent)
1671 7633e2f8 2002-03-12 alex os=-nextstep3
1676 ac9390f0 2003-07-09 alex *-highlevel)
1685 ac9390f0 2003-07-09 alex *-siemens)
1688 7633e2f8 2002-03-12 alex *-masscomp)
1691 7633e2f8 2002-03-12 alex f30[01]-fujitsu | f700-fujitsu)
1712 7633e2f8 2002-03-12 alex # Here we handle the case where we know the os, and the CPU type, but not the
1713 7633e2f8 2002-03-12 alex # manufacturer. We pick the logical manufacturer.
1714 7633e2f8 2002-03-12 alex vendor=unknown
1715 7633e2f8 2002-03-12 alex case $basic_machine in
1716 7633e2f8 2002-03-12 alex *-unknown)
1717 7633e2f8 2002-03-12 alex case $os in
1719 7633e2f8 2002-03-12 alex vendor=acorn
1722 7633e2f8 2002-03-12 alex vendor=sun
1724 ef392e7d 2012-02-27 alex -cnk*|-aix*)
1725 7633e2f8 2002-03-12 alex vendor=ibm
1737 7633e2f8 2002-03-12 alex vendor=hitachi
1740 7633e2f8 2002-03-12 alex vendor=crds
1746 7633e2f8 2002-03-12 alex vendor=omron
1751 7633e2f8 2002-03-12 alex -mvs* | -opened*)
1752 7633e2f8 2002-03-12 alex vendor=ibm
1755 77944629 2004-03-11 alex vendor=ibm
1758 7633e2f8 2002-03-12 alex vendor=sequent
1761 77944629 2004-03-11 alex vendor=ibm
1763 ac9390f0 2003-07-09 alex -vxsim* | -vxworks* | -windiss*)
1764 7633e2f8 2002-03-12 alex vendor=wrs
1767 7633e2f8 2002-03-12 alex vendor=apple
1770 7633e2f8 2002-03-12 alex vendor=hitachi
1772 7633e2f8 2002-03-12 alex -mpw* | -macos*)
1773 7633e2f8 2002-03-12 alex vendor=apple
1775 7633e2f8 2002-03-12 alex -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1776 7633e2f8 2002-03-12 alex vendor=atari
1779 7633e2f8 2002-03-12 alex vendor=stratus
1782 7633e2f8 2002-03-12 alex basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1786 7633e2f8 2002-03-12 alex echo $basic_machine$os
1789 7633e2f8 2002-03-12 alex # Local variables:
1790 7633e2f8 2002-03-12 alex # eval: (add-hook 'write-file-hooks 'time-stamp)
1791 7633e2f8 2002-03-12 alex # time-stamp-start: "timestamp='"
1792 7633e2f8 2002-03-12 alex # time-stamp-format: "%:y-%02m-%02d"
1793 7633e2f8 2002-03-12 alex # time-stamp-end: "'"