config.sub revision 1.9 1 1.1 skrll #! /bin/sh
2 1.1 skrll # Configuration validation subroutine script.
3 1.9 christos # Copyright 1992-2015 Free Software Foundation, Inc.
4 1.9 christos
5 1.9 christos timestamp='2015-07-28'
6 1.9 christos
7 1.9 christos # This file is free software; you can redistribute it and/or modify it
8 1.9 christos # under the terms of the GNU General Public License as published by
9 1.9 christos # the Free Software Foundation; either version 3 of the License, or
10 1.1 skrll # (at your option) any later version.
11 1.1 skrll #
12 1.9 christos # This program is distributed in the hope that it will be useful, but
13 1.9 christos # WITHOUT ANY WARRANTY; without even the implied warranty of
14 1.9 christos # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 1.9 christos # General Public License for more details.
16 1.1 skrll #
17 1.1 skrll # You should have received a copy of the GNU General Public License
18 1.6 christos # along with this program; if not, see <http://www.gnu.org/licenses/>.
19 1.1 skrll #
20 1.1 skrll # As a special exception to the GNU General Public License, if you
21 1.1 skrll # distribute this file as part of a program that contains a
22 1.1 skrll # configuration script generated by Autoconf, you may include it under
23 1.9 christos # the same distribution terms that you use for the rest of that
24 1.9 christos # program. This Exception is an additional permission under section 7
25 1.9 christos # of the GNU General Public License, version 3 ("GPLv3").
26 1.1 skrll
27 1.1 skrll
28 1.9 christos # Please send patches to <config-patches (at] gnu.org>.
29 1.1 skrll #
30 1.1 skrll # Configuration subroutine to validate and canonicalize a configuration type.
31 1.1 skrll # Supply the specified configuration type as an argument.
32 1.1 skrll # If it is invalid, we print an error message on stderr and exit with code 1.
33 1.1 skrll # Otherwise, we print the canonical config type on stdout and succeed.
34 1.1 skrll
35 1.3 christos # You can get the latest version of this script from:
36 1.3 christos # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
37 1.3 christos
38 1.1 skrll # This file is supposed to be the same for all GNU packages
39 1.1 skrll # and recognize all the CPU types, system types and aliases
40 1.1 skrll # that are meaningful with *any* GNU software.
41 1.1 skrll # Each package is responsible for reporting which valid configurations
42 1.1 skrll # it does not support. The user should be able to distinguish
43 1.1 skrll # a failure to support a valid configuration from a meaningless
44 1.1 skrll # configuration.
45 1.1 skrll
46 1.1 skrll # The goal of this file is to map all the various variations of a given
47 1.1 skrll # machine specification into a single specification in the form:
48 1.1 skrll # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
49 1.1 skrll # or in some cases, the newer four-part form:
50 1.1 skrll # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
51 1.1 skrll # It is wrong to echo any other type of specification.
52 1.1 skrll
53 1.1 skrll me=`echo "$0" | sed -e 's,.*/,,'`
54 1.1 skrll
55 1.1 skrll usage="\
56 1.1 skrll Usage: $0 [OPTION] CPU-MFR-OPSYS
57 1.1 skrll $0 [OPTION] ALIAS
58 1.1 skrll
59 1.1 skrll Canonicalize a configuration name.
60 1.1 skrll
61 1.1 skrll Operation modes:
62 1.1 skrll -h, --help print this help, then exit
63 1.1 skrll -t, --time-stamp print date of last modification, then exit
64 1.1 skrll -v, --version print version number, then exit
65 1.1 skrll
66 1.1 skrll Report bugs and patches to <config-patches (at] gnu.org>."
67 1.1 skrll
68 1.1 skrll version="\
69 1.1 skrll GNU config.sub ($timestamp)
70 1.1 skrll
71 1.9 christos Copyright 1992-2015 Free Software Foundation, Inc.
72 1.1 skrll
73 1.1 skrll This is free software; see the source for copying conditions. There is NO
74 1.1 skrll warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
75 1.1 skrll
76 1.1 skrll help="
77 1.1 skrll Try \`$me --help' for more information."
78 1.1 skrll
79 1.1 skrll # Parse command line
80 1.1 skrll while test $# -gt 0 ; do
81 1.1 skrll case $1 in
82 1.1 skrll --time-stamp | --time* | -t )
83 1.1 skrll echo "$timestamp" ; exit ;;
84 1.1 skrll --version | -v )
85 1.1 skrll echo "$version" ; exit ;;
86 1.1 skrll --help | --h* | -h )
87 1.1 skrll echo "$usage"; exit ;;
88 1.1 skrll -- ) # Stop option processing
89 1.1 skrll shift; break ;;
90 1.1 skrll - ) # Use stdin as input.
91 1.1 skrll break ;;
92 1.1 skrll -* )
93 1.1 skrll echo "$me: invalid option $1$help"
94 1.1 skrll exit 1 ;;
95 1.1 skrll
96 1.1 skrll *local*)
97 1.1 skrll # First pass through any local machine types.
98 1.1 skrll echo $1
99 1.1 skrll exit ;;
100 1.1 skrll
101 1.1 skrll * )
102 1.1 skrll break ;;
103 1.1 skrll esac
104 1.1 skrll done
105 1.1 skrll
106 1.1 skrll case $# in
107 1.1 skrll 0) echo "$me: missing argument$help" >&2
108 1.1 skrll exit 1;;
109 1.1 skrll 1) ;;
110 1.1 skrll *) echo "$me: too many arguments$help" >&2
111 1.1 skrll exit 1;;
112 1.1 skrll esac
113 1.1 skrll
114 1.1 skrll # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
115 1.1 skrll # Here we must recognize all the valid KERNEL-OS combinations.
116 1.1 skrll maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
117 1.1 skrll case $maybe_os in
118 1.9 christos nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
119 1.9 christos linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
120 1.9 christos knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
121 1.3 christos kopensolaris*-gnu* | \
122 1.1 skrll storm-chaos* | os2-emx* | rtmk-nova*)
123 1.1 skrll os=-$maybe_os
124 1.1 skrll basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
125 1.1 skrll ;;
126 1.6 christos android-linux)
127 1.6 christos os=-linux-android
128 1.6 christos basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
129 1.6 christos ;;
130 1.1 skrll *)
131 1.1 skrll basic_machine=`echo $1 | sed 's/-[^-]*$//'`
132 1.1 skrll if [ $basic_machine != $1 ]
133 1.1 skrll then os=`echo $1 | sed 's/.*-/-/'`
134 1.1 skrll else os=; fi
135 1.1 skrll ;;
136 1.1 skrll esac
137 1.1 skrll
138 1.1 skrll ### Let's recognize common machines as not being operating systems so
139 1.1 skrll ### that things like config.sub decstation-3100 work. We also
140 1.1 skrll ### recognize some manufacturers as not being operating systems, so we
141 1.1 skrll ### can provide default operating systems below.
142 1.1 skrll case $os in
143 1.1 skrll -sun*os*)
144 1.1 skrll # Prevent following clause from handling this invalid input.
145 1.1 skrll ;;
146 1.1 skrll -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
147 1.1 skrll -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
148 1.1 skrll -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
149 1.1 skrll -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
150 1.1 skrll -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
151 1.1 skrll -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
152 1.9 christos -apple | -axis | -knuth | -cray | -microblaze*)
153 1.1 skrll os=
154 1.1 skrll basic_machine=$1
155 1.1 skrll ;;
156 1.6 christos -bluegene*)
157 1.6 christos os=-cnk
158 1.3 christos ;;
159 1.1 skrll -sim | -cisco | -oki | -wec | -winbond)
160 1.1 skrll os=
161 1.1 skrll basic_machine=$1
162 1.1 skrll ;;
163 1.1 skrll -scout)
164 1.1 skrll ;;
165 1.1 skrll -wrs)
166 1.1 skrll os=-vxworks
167 1.1 skrll basic_machine=$1
168 1.1 skrll ;;
169 1.1 skrll -chorusos*)
170 1.1 skrll os=-chorusos
171 1.1 skrll basic_machine=$1
172 1.1 skrll ;;
173 1.6 christos -chorusrdb)
174 1.6 christos os=-chorusrdb
175 1.1 skrll basic_machine=$1
176 1.6 christos ;;
177 1.1 skrll -hiux*)
178 1.1 skrll os=-hiuxwe2
179 1.1 skrll ;;
180 1.1 skrll -sco6)
181 1.1 skrll os=-sco5v6
182 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183 1.1 skrll ;;
184 1.1 skrll -sco5)
185 1.1 skrll os=-sco3.2v5
186 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187 1.1 skrll ;;
188 1.1 skrll -sco4)
189 1.1 skrll os=-sco3.2v4
190 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 1.1 skrll ;;
192 1.1 skrll -sco3.2.[4-9]*)
193 1.1 skrll os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
194 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 1.1 skrll ;;
196 1.1 skrll -sco3.2v[4-9]*)
197 1.1 skrll # Don't forget version if it is 3.2v4 or newer.
198 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199 1.1 skrll ;;
200 1.1 skrll -sco5v6*)
201 1.1 skrll # Don't forget version if it is 3.2v4 or newer.
202 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 1.1 skrll ;;
204 1.1 skrll -sco*)
205 1.1 skrll os=-sco3.2v2
206 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 1.1 skrll ;;
208 1.1 skrll -udk*)
209 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210 1.1 skrll ;;
211 1.1 skrll -isc)
212 1.1 skrll os=-isc2.2
213 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214 1.1 skrll ;;
215 1.1 skrll -clix*)
216 1.1 skrll basic_machine=clipper-intergraph
217 1.1 skrll ;;
218 1.1 skrll -isc*)
219 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
220 1.1 skrll ;;
221 1.6 christos -lynx*178)
222 1.6 christos os=-lynxos178
223 1.6 christos ;;
224 1.6 christos -lynx*5)
225 1.6 christos os=-lynxos5
226 1.6 christos ;;
227 1.1 skrll -lynx*)
228 1.1 skrll os=-lynxos
229 1.1 skrll ;;
230 1.1 skrll -ptx*)
231 1.1 skrll basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
232 1.1 skrll ;;
233 1.1 skrll -windowsnt*)
234 1.1 skrll os=`echo $os | sed -e 's/windowsnt/winnt/'`
235 1.1 skrll ;;
236 1.1 skrll -psos*)
237 1.1 skrll os=-psos
238 1.1 skrll ;;
239 1.1 skrll -mint | -mint[0-9]*)
240 1.1 skrll basic_machine=m68k-atari
241 1.1 skrll os=-mint
242 1.1 skrll ;;
243 1.1 skrll esac
244 1.1 skrll
245 1.1 skrll # Decode aliases for certain CPU-COMPANY combinations.
246 1.1 skrll case $basic_machine in
247 1.1 skrll # Recognize the basic CPU types without company name.
248 1.1 skrll # Some are omitted here because they have special meanings below.
249 1.1 skrll 1750a | 580 \
250 1.1 skrll | a29k \
251 1.6 christos | aarch64 | aarch64_be \
252 1.1 skrll | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
253 1.1 skrll | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
254 1.1 skrll | am33_2.0 \
255 1.9 christos | arc | arceb \
256 1.9 christos | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
257 1.9 christos | avr | avr32 \
258 1.9 christos | ba \
259 1.9 christos | be32 | be64 \
260 1.1 skrll | bfin \
261 1.9 christos | c4x | c8051 | clipper \
262 1.1 skrll | d10v | d30v | dlx | dsp16xx \
263 1.9 christos | e2k | epiphany \
264 1.9 christos | fido | fr30 | frv | ft32 \
265 1.1 skrll | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
266 1.6 christos | hexagon \
267 1.1 skrll | i370 | i860 | i960 | ia64 \
268 1.1 skrll | ip2k | iq2000 \
269 1.9 christos | k1om \
270 1.6 christos | le32 | le64 \
271 1.3 christos | lm32 \
272 1.1 skrll | m32c | m32r | m32rle | m68000 | m68k | m88k \
273 1.9 christos | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
274 1.1 skrll | mips | mipsbe | mipseb | mipsel | mipsle \
275 1.1 skrll | mips16 \
276 1.1 skrll | mips64 | mips64el \
277 1.1 skrll | mips64octeon | mips64octeonel \
278 1.1 skrll | mips64orion | mips64orionel \
279 1.1 skrll | mips64r5900 | mips64r5900el \
280 1.1 skrll | mips64vr | mips64vrel \
281 1.1 skrll | mips64vr4100 | mips64vr4100el \
282 1.1 skrll | mips64vr4300 | mips64vr4300el \
283 1.1 skrll | mips64vr5000 | mips64vr5000el \
284 1.1 skrll | mips64vr5900 | mips64vr5900el \
285 1.1 skrll | mipsisa32 | mipsisa32el \
286 1.1 skrll | mipsisa32r2 | mipsisa32r2el \
287 1.9 christos | mipsisa32r6 | mipsisa32r6el \
288 1.1 skrll | mipsisa64 | mipsisa64el \
289 1.1 skrll | mipsisa64r2 | mipsisa64r2el \
290 1.9 christos | mipsisa64r6 | mipsisa64r6el \
291 1.1 skrll | mipsisa64sb1 | mipsisa64sb1el \
292 1.1 skrll | mipsisa64sr71k | mipsisa64sr71kel \
293 1.9 christos | mipsr5900 | mipsr5900el \
294 1.1 skrll | mipstx39 | mipstx39el \
295 1.1 skrll | mn10200 | mn10300 \
296 1.3 christos | moxie \
297 1.1 skrll | mt \
298 1.1 skrll | msp430 \
299 1.6 christos | nds32 | nds32le | nds32be \
300 1.9 christos | nios | nios2 | nios2eb | nios2el \
301 1.1 skrll | ns16k | ns32k \
302 1.9 christos | open8 | or1k | or1knd | or32 \
303 1.1 skrll | pdp10 | pdp11 | pj | pjl \
304 1.6 christos | powerpc | powerpc64 | powerpc64le | powerpcle \
305 1.1 skrll | pyramid \
306 1.9 christos | riscv32 | riscv64 \
307 1.6 christos | rl78 | rx \
308 1.1 skrll | score \
309 1.3 christos | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
310 1.1 skrll | sh64 | sh64le \
311 1.1 skrll | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
312 1.1 skrll | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
313 1.6 christos | spu \
314 1.6 christos | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
315 1.3 christos | ubicom32 \
316 1.6 christos | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
317 1.9 christos | visium \
318 1.1 skrll | we32k \
319 1.6 christos | x86 | xc16x | xstormy16 | xtensa \
320 1.3 christos | z8k | z80)
321 1.1 skrll basic_machine=$basic_machine-unknown
322 1.1 skrll ;;
323 1.6 christos c54x)
324 1.6 christos basic_machine=tic54x-unknown
325 1.6 christos ;;
326 1.6 christos c55x)
327 1.6 christos basic_machine=tic55x-unknown
328 1.6 christos ;;
329 1.6 christos c6x)
330 1.6 christos basic_machine=tic6x-unknown
331 1.6 christos ;;
332 1.9 christos leon|leon[3-9])
333 1.9 christos basic_machine=sparc-$basic_machine
334 1.9 christos ;;
335 1.9 christos m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
336 1.1 skrll basic_machine=$basic_machine-unknown
337 1.1 skrll os=-none
338 1.1 skrll ;;
339 1.5 matt m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | m5407 \
340 1.5 matt | v70 | w65 | z8k)
341 1.1 skrll ;;
342 1.1 skrll ms1)
343 1.1 skrll basic_machine=mt-unknown
344 1.1 skrll ;;
345 1.1 skrll
346 1.8 matt riscv32-*)
347 1.8 matt basic_machine=riscv32-ucb
348 1.8 matt ;;
349 1.8 matt
350 1.8 matt riscv*-*)
351 1.8 matt basic_machine=riscv-ucb
352 1.8 matt ;;
353 1.8 matt
354 1.6 christos strongarm | thumb | xscale)
355 1.6 christos basic_machine=arm-unknown
356 1.6 christos ;;
357 1.6 christos xgate)
358 1.6 christos basic_machine=$basic_machine-unknown
359 1.6 christos os=-none
360 1.6 christos ;;
361 1.6 christos xscaleeb)
362 1.6 christos basic_machine=armeb-unknown
363 1.6 christos ;;
364 1.6 christos
365 1.6 christos xscaleel)
366 1.6 christos basic_machine=armel-unknown
367 1.6 christos ;;
368 1.6 christos
369 1.1 skrll # We use `pc' rather than `unknown'
370 1.1 skrll # because (1) that's what they normally are, and
371 1.1 skrll # (2) the word "unknown" tends to confuse beginning users.
372 1.1 skrll i*86 | x86_64)
373 1.1 skrll basic_machine=$basic_machine-pc
374 1.1 skrll ;;
375 1.1 skrll # Object if more than one company name word.
376 1.1 skrll *-*-*)
377 1.1 skrll echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
378 1.1 skrll exit 1
379 1.1 skrll ;;
380 1.1 skrll # Recognize the basic CPU types with company name.
381 1.1 skrll 580-* \
382 1.1 skrll | a29k-* \
383 1.6 christos | aarch64-* | aarch64_be-* \
384 1.1 skrll | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
385 1.1 skrll | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
386 1.9 christos | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
387 1.1 skrll | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
388 1.1 skrll | avr-* | avr32-* \
389 1.9 christos | ba-* \
390 1.6 christos | be32-* | be64-* \
391 1.1 skrll | bfin-* | bs2000-* \
392 1.1 skrll | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
393 1.9 christos | c8051-* | clipper-* | craynv-* | cydra-* \
394 1.1 skrll | d10v-* | d30v-* | dlx-* \
395 1.9 christos | e2k-* | elxsi-* \
396 1.1 skrll | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
397 1.1 skrll | h8300-* | h8500-* \
398 1.1 skrll | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
399 1.6 christos | hexagon-* \
400 1.1 skrll | i*86-* | i860-* | i960-* | ia64-* \
401 1.1 skrll | ip2k-* | iq2000-* \
402 1.9 christos | k1om-* \
403 1.6 christos | le32-* | le64-* \
404 1.3 christos | lm32-* \
405 1.1 skrll | m32c-* | m32r-* | m32rle-* \
406 1.5 matt | m5200-* | m5407-* \
407 1.1 skrll | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
408 1.9 christos | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
409 1.9 christos | microblaze-* | microblazeel-* \
410 1.1 skrll | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
411 1.1 skrll | mips16-* \
412 1.1 skrll | mips64-* | mips64el-* \
413 1.1 skrll | mips64octeon-* | mips64octeonel-* \
414 1.1 skrll | mips64orion-* | mips64orionel-* \
415 1.1 skrll | mips64r5900-* | mips64r5900el-* \
416 1.1 skrll | mips64vr-* | mips64vrel-* \
417 1.1 skrll | mips64vr4100-* | mips64vr4100el-* \
418 1.1 skrll | mips64vr4300-* | mips64vr4300el-* \
419 1.1 skrll | mips64vr5000-* | mips64vr5000el-* \
420 1.1 skrll | mips64vr5900-* | mips64vr5900el-* \
421 1.1 skrll | mipsisa32-* | mipsisa32el-* \
422 1.1 skrll | mipsisa32r2-* | mipsisa32r2el-* \
423 1.9 christos | mipsisa32r6-* | mipsisa32r6el-* \
424 1.1 skrll | mipsisa64-* | mipsisa64el-* \
425 1.1 skrll | mipsisa64r2-* | mipsisa64r2el-* \
426 1.9 christos | mipsisa64r6-* | mipsisa64r6el-* \
427 1.1 skrll | mipsisa64sb1-* | mipsisa64sb1el-* \
428 1.1 skrll | mipsisa64sr71k-* | mipsisa64sr71kel-* \
429 1.9 christos | mipsr5900-* | mipsr5900el-* \
430 1.1 skrll | mipstx39-* | mipstx39el-* \
431 1.1 skrll | mmix-* \
432 1.1 skrll | mt-* \
433 1.1 skrll | msp430-* \
434 1.6 christos | nds32-* | nds32le-* | nds32be-* \
435 1.9 christos | nios-* | nios2-* | nios2eb-* | nios2el-* \
436 1.1 skrll | none-* | np1-* | ns16k-* | ns32k-* \
437 1.6 christos | open8-* \
438 1.9 christos | or1k*-* \
439 1.1 skrll | orion-* \
440 1.1 skrll | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
441 1.6 christos | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
442 1.1 skrll | pyramid-* \
443 1.9 christos | riscv32-* | riscv64-* \
444 1.6 christos | rl78-* | romp-* | rs6000-* | rx-* \
445 1.3 christos | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
446 1.3 christos | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
447 1.1 skrll | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
448 1.1 skrll | sparclite-* \
449 1.9 christos | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
450 1.6 christos | tahoe-* \
451 1.6 christos | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
452 1.6 christos | tile*-* \
453 1.1 skrll | tron-* \
454 1.3 christos | ubicom32-* \
455 1.6 christos | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
456 1.6 christos | vax-* \
457 1.9 christos | visium-* \
458 1.1 skrll | we32k-* \
459 1.6 christos | x86-* | x86_64-* | xc16x-* | xps100-* \
460 1.1 skrll | xstormy16-* | xtensa*-* \
461 1.1 skrll | ymp-* \
462 1.3 christos | z8k-* | z80-*)
463 1.1 skrll ;;
464 1.1 skrll # Recognize the basic CPU types without company name, with glob match.
465 1.1 skrll xtensa*)
466 1.1 skrll basic_machine=$basic_machine-unknown
467 1.1 skrll ;;
468 1.1 skrll # Recognize the various machine names and aliases which stand
469 1.1 skrll # for a CPU type and a company and sometimes even an OS.
470 1.1 skrll 386bsd)
471 1.1 skrll basic_machine=i386-unknown
472 1.1 skrll os=-bsd
473 1.1 skrll ;;
474 1.1 skrll 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
475 1.1 skrll basic_machine=m68000-att
476 1.1 skrll ;;
477 1.1 skrll 3b*)
478 1.1 skrll basic_machine=we32k-att
479 1.1 skrll ;;
480 1.1 skrll a29khif)
481 1.1 skrll basic_machine=a29k-amd
482 1.1 skrll os=-udi
483 1.1 skrll ;;
484 1.6 christos abacus)
485 1.1 skrll basic_machine=abacus-unknown
486 1.1 skrll ;;
487 1.1 skrll adobe68k)
488 1.1 skrll basic_machine=m68010-adobe
489 1.1 skrll os=-scout
490 1.1 skrll ;;
491 1.1 skrll alliant | fx80)
492 1.1 skrll basic_machine=fx80-alliant
493 1.1 skrll ;;
494 1.1 skrll altos | altos3068)
495 1.1 skrll basic_machine=m68k-altos
496 1.1 skrll ;;
497 1.1 skrll am29k)
498 1.1 skrll basic_machine=a29k-none
499 1.1 skrll os=-bsd
500 1.1 skrll ;;
501 1.1 skrll amd64)
502 1.1 skrll basic_machine=x86_64-pc
503 1.1 skrll ;;
504 1.1 skrll amd64-*)
505 1.1 skrll basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
506 1.1 skrll ;;
507 1.1 skrll amdahl)
508 1.1 skrll basic_machine=580-amdahl
509 1.1 skrll os=-sysv
510 1.1 skrll ;;
511 1.1 skrll amiga | amiga-*)
512 1.1 skrll basic_machine=m68k-unknown
513 1.1 skrll ;;
514 1.1 skrll amigaos | amigados)
515 1.1 skrll basic_machine=m68k-unknown
516 1.1 skrll os=-amigaos
517 1.1 skrll ;;
518 1.1 skrll amigaunix | amix)
519 1.1 skrll basic_machine=m68k-unknown
520 1.1 skrll os=-sysv4
521 1.1 skrll ;;
522 1.1 skrll apollo68)
523 1.1 skrll basic_machine=m68k-apollo
524 1.1 skrll os=-sysv
525 1.1 skrll ;;
526 1.1 skrll apollo68bsd)
527 1.1 skrll basic_machine=m68k-apollo
528 1.1 skrll os=-bsd
529 1.1 skrll ;;
530 1.3 christos aros)
531 1.3 christos basic_machine=i386-pc
532 1.3 christos os=-aros
533 1.3 christos ;;
534 1.9 christos asmjs)
535 1.9 christos basic_machine=asmjs-unknown
536 1.9 christos ;;
537 1.1 skrll aux)
538 1.1 skrll basic_machine=m68k-apple
539 1.1 skrll os=-aux
540 1.1 skrll ;;
541 1.1 skrll balance)
542 1.1 skrll basic_machine=ns32k-sequent
543 1.1 skrll os=-dynix
544 1.1 skrll ;;
545 1.1 skrll blackfin)
546 1.1 skrll basic_machine=bfin-unknown
547 1.1 skrll os=-linux
548 1.1 skrll ;;
549 1.1 skrll blackfin-*)
550 1.1 skrll basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
551 1.1 skrll os=-linux
552 1.1 skrll ;;
553 1.3 christos bluegene*)
554 1.3 christos basic_machine=powerpc-ibm
555 1.3 christos os=-cnk
556 1.3 christos ;;
557 1.1 skrll c90)
558 1.1 skrll basic_machine=c90-cray
559 1.1 skrll os=-unicos
560 1.1 skrll ;;
561 1.6 christos cegcc)
562 1.3 christos basic_machine=arm-unknown
563 1.3 christos os=-cegcc
564 1.3 christos ;;
565 1.1 skrll convex-c1)
566 1.1 skrll basic_machine=c1-convex
567 1.1 skrll os=-bsd
568 1.1 skrll ;;
569 1.1 skrll convex-c2)
570 1.1 skrll basic_machine=c2-convex
571 1.1 skrll os=-bsd
572 1.1 skrll ;;
573 1.1 skrll convex-c32)
574 1.1 skrll basic_machine=c32-convex
575 1.1 skrll os=-bsd
576 1.1 skrll ;;
577 1.1 skrll convex-c34)
578 1.1 skrll basic_machine=c34-convex
579 1.1 skrll os=-bsd
580 1.1 skrll ;;
581 1.1 skrll convex-c38)
582 1.1 skrll basic_machine=c38-convex
583 1.1 skrll os=-bsd
584 1.1 skrll ;;
585 1.1 skrll cray | j90)
586 1.1 skrll basic_machine=j90-cray
587 1.1 skrll os=-unicos
588 1.1 skrll ;;
589 1.1 skrll craynv)
590 1.1 skrll basic_machine=craynv-cray
591 1.1 skrll os=-unicosmp
592 1.1 skrll ;;
593 1.6 christos cr16 | cr16-*)
594 1.1 skrll basic_machine=cr16-unknown
595 1.1 skrll os=-elf
596 1.1 skrll ;;
597 1.1 skrll crds | unos)
598 1.1 skrll basic_machine=m68k-crds
599 1.1 skrll ;;
600 1.1 skrll crisv32 | crisv32-* | etraxfs*)
601 1.1 skrll basic_machine=crisv32-axis
602 1.1 skrll ;;
603 1.1 skrll cris | cris-* | etrax*)
604 1.1 skrll basic_machine=cris-axis
605 1.1 skrll ;;
606 1.1 skrll crx)
607 1.1 skrll basic_machine=crx-unknown
608 1.1 skrll os=-elf
609 1.1 skrll ;;
610 1.1 skrll da30 | da30-*)
611 1.1 skrll basic_machine=m68k-da30
612 1.1 skrll ;;
613 1.1 skrll decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
614 1.1 skrll basic_machine=mips-dec
615 1.1 skrll ;;
616 1.1 skrll decsystem10* | dec10*)
617 1.1 skrll basic_machine=pdp10-dec
618 1.1 skrll os=-tops10
619 1.1 skrll ;;
620 1.1 skrll decsystem20* | dec20*)
621 1.1 skrll basic_machine=pdp10-dec
622 1.1 skrll os=-tops20
623 1.1 skrll ;;
624 1.1 skrll delta | 3300 | motorola-3300 | motorola-delta \
625 1.1 skrll | 3300-motorola | delta-motorola)
626 1.1 skrll basic_machine=m68k-motorola
627 1.1 skrll ;;
628 1.1 skrll delta88)
629 1.1 skrll basic_machine=m88k-motorola
630 1.1 skrll os=-sysv3
631 1.1 skrll ;;
632 1.1 skrll dicos)
633 1.1 skrll basic_machine=i686-pc
634 1.1 skrll os=-dicos
635 1.1 skrll ;;
636 1.1 skrll djgpp)
637 1.1 skrll basic_machine=i586-pc
638 1.1 skrll os=-msdosdjgpp
639 1.1 skrll ;;
640 1.1 skrll dpx20 | dpx20-*)
641 1.1 skrll basic_machine=rs6000-bull
642 1.1 skrll os=-bosx
643 1.1 skrll ;;
644 1.1 skrll dpx2* | dpx2*-bull)
645 1.1 skrll basic_machine=m68k-bull
646 1.1 skrll os=-sysv3
647 1.1 skrll ;;
648 1.1 skrll ebmon29k)
649 1.1 skrll basic_machine=a29k-amd
650 1.1 skrll os=-ebmon
651 1.1 skrll ;;
652 1.1 skrll elxsi)
653 1.1 skrll basic_machine=elxsi-elxsi
654 1.1 skrll os=-bsd
655 1.1 skrll ;;
656 1.1 skrll encore | umax | mmax)
657 1.1 skrll basic_machine=ns32k-encore
658 1.1 skrll ;;
659 1.1 skrll es1800 | OSE68k | ose68k | ose | OSE)
660 1.1 skrll basic_machine=m68k-ericsson
661 1.1 skrll os=-ose
662 1.1 skrll ;;
663 1.1 skrll fx2800)
664 1.1 skrll basic_machine=i860-alliant
665 1.1 skrll ;;
666 1.1 skrll genix)
667 1.1 skrll basic_machine=ns32k-ns
668 1.1 skrll ;;
669 1.1 skrll gmicro)
670 1.1 skrll basic_machine=tron-gmicro
671 1.1 skrll os=-sysv
672 1.1 skrll ;;
673 1.1 skrll go32)
674 1.1 skrll basic_machine=i386-pc
675 1.1 skrll os=-go32
676 1.1 skrll ;;
677 1.1 skrll h3050r* | hiux*)
678 1.1 skrll basic_machine=hppa1.1-hitachi
679 1.1 skrll os=-hiuxwe2
680 1.1 skrll ;;
681 1.1 skrll h8300hms)
682 1.1 skrll basic_machine=h8300-hitachi
683 1.1 skrll os=-hms
684 1.1 skrll ;;
685 1.1 skrll h8300xray)
686 1.1 skrll basic_machine=h8300-hitachi
687 1.1 skrll os=-xray
688 1.1 skrll ;;
689 1.1 skrll h8500hms)
690 1.1 skrll basic_machine=h8500-hitachi
691 1.1 skrll os=-hms
692 1.1 skrll ;;
693 1.1 skrll harris)
694 1.1 skrll basic_machine=m88k-harris
695 1.1 skrll os=-sysv3
696 1.1 skrll ;;
697 1.1 skrll hp300-*)
698 1.1 skrll basic_machine=m68k-hp
699 1.1 skrll ;;
700 1.1 skrll hp300bsd)
701 1.1 skrll basic_machine=m68k-hp
702 1.1 skrll os=-bsd
703 1.1 skrll ;;
704 1.1 skrll hp300hpux)
705 1.1 skrll basic_machine=m68k-hp
706 1.1 skrll os=-hpux
707 1.1 skrll ;;
708 1.1 skrll hp3k9[0-9][0-9] | hp9[0-9][0-9])
709 1.1 skrll basic_machine=hppa1.0-hp
710 1.1 skrll ;;
711 1.1 skrll hp9k2[0-9][0-9] | hp9k31[0-9])
712 1.1 skrll basic_machine=m68000-hp
713 1.1 skrll ;;
714 1.1 skrll hp9k3[2-9][0-9])
715 1.1 skrll basic_machine=m68k-hp
716 1.1 skrll ;;
717 1.1 skrll hp9k6[0-9][0-9] | hp6[0-9][0-9])
718 1.1 skrll basic_machine=hppa1.0-hp
719 1.1 skrll ;;
720 1.1 skrll hp9k7[0-79][0-9] | hp7[0-79][0-9])
721 1.1 skrll basic_machine=hppa1.1-hp
722 1.1 skrll ;;
723 1.1 skrll hp9k78[0-9] | hp78[0-9])
724 1.1 skrll # FIXME: really hppa2.0-hp
725 1.1 skrll basic_machine=hppa1.1-hp
726 1.1 skrll ;;
727 1.1 skrll hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
728 1.1 skrll # FIXME: really hppa2.0-hp
729 1.1 skrll basic_machine=hppa1.1-hp
730 1.1 skrll ;;
731 1.1 skrll hp9k8[0-9][13679] | hp8[0-9][13679])
732 1.1 skrll basic_machine=hppa1.1-hp
733 1.1 skrll ;;
734 1.1 skrll hp9k8[0-9][0-9] | hp8[0-9][0-9])
735 1.1 skrll basic_machine=hppa1.0-hp
736 1.1 skrll ;;
737 1.1 skrll hppa-next)
738 1.1 skrll os=-nextstep3
739 1.1 skrll ;;
740 1.1 skrll hppaosf)
741 1.1 skrll basic_machine=hppa1.1-hp
742 1.1 skrll os=-osf
743 1.1 skrll ;;
744 1.1 skrll hppro)
745 1.1 skrll basic_machine=hppa1.1-hp
746 1.1 skrll os=-proelf
747 1.1 skrll ;;
748 1.1 skrll i370-ibm* | ibm*)
749 1.1 skrll basic_machine=i370-ibm
750 1.1 skrll ;;
751 1.1 skrll i*86v32)
752 1.1 skrll basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
753 1.1 skrll os=-sysv32
754 1.1 skrll ;;
755 1.1 skrll i*86v4*)
756 1.1 skrll basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
757 1.1 skrll os=-sysv4
758 1.1 skrll ;;
759 1.1 skrll i*86v)
760 1.1 skrll basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
761 1.1 skrll os=-sysv
762 1.1 skrll ;;
763 1.1 skrll i*86sol2)
764 1.1 skrll basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
765 1.1 skrll os=-solaris2
766 1.1 skrll ;;
767 1.1 skrll i386mach)
768 1.1 skrll basic_machine=i386-mach
769 1.1 skrll os=-mach
770 1.1 skrll ;;
771 1.1 skrll i386-vsta | vsta)
772 1.1 skrll basic_machine=i386-unknown
773 1.1 skrll os=-vsta
774 1.1 skrll ;;
775 1.1 skrll iris | iris4d)
776 1.1 skrll basic_machine=mips-sgi
777 1.1 skrll case $os in
778 1.1 skrll -irix*)
779 1.1 skrll ;;
780 1.1 skrll *)
781 1.1 skrll os=-irix4
782 1.1 skrll ;;
783 1.1 skrll esac
784 1.1 skrll ;;
785 1.1 skrll isi68 | isi)
786 1.1 skrll basic_machine=m68k-isi
787 1.1 skrll os=-sysv
788 1.1 skrll ;;
789 1.9 christos leon-*|leon[3-9]-*)
790 1.9 christos basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
791 1.9 christos ;;
792 1.1 skrll m68knommu)
793 1.1 skrll basic_machine=m68k-unknown
794 1.1 skrll os=-linux
795 1.1 skrll ;;
796 1.1 skrll m68knommu-*)
797 1.1 skrll basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
798 1.1 skrll os=-linux
799 1.1 skrll ;;
800 1.1 skrll m88k-omron*)
801 1.1 skrll basic_machine=m88k-omron
802 1.1 skrll ;;
803 1.1 skrll magnum | m3230)
804 1.1 skrll basic_machine=mips-mips
805 1.1 skrll os=-sysv
806 1.1 skrll ;;
807 1.1 skrll merlin)
808 1.1 skrll basic_machine=ns32k-utek
809 1.1 skrll os=-sysv
810 1.1 skrll ;;
811 1.9 christos microblaze*)
812 1.3 christos basic_machine=microblaze-xilinx
813 1.3 christos ;;
814 1.9 christos mingw64)
815 1.9 christos basic_machine=x86_64-pc
816 1.9 christos os=-mingw64
817 1.9 christos ;;
818 1.1 skrll mingw32)
819 1.9 christos basic_machine=i686-pc
820 1.1 skrll os=-mingw32
821 1.1 skrll ;;
822 1.1 skrll mingw32ce)
823 1.1 skrll basic_machine=arm-unknown
824 1.1 skrll os=-mingw32ce
825 1.1 skrll ;;
826 1.1 skrll miniframe)
827 1.1 skrll basic_machine=m68000-convergent
828 1.1 skrll ;;
829 1.1 skrll *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
830 1.1 skrll basic_machine=m68k-atari
831 1.1 skrll os=-mint
832 1.1 skrll ;;
833 1.1 skrll mips3*-*)
834 1.1 skrll basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
835 1.1 skrll ;;
836 1.1 skrll mips3*)
837 1.1 skrll basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
838 1.1 skrll ;;
839 1.1 skrll monitor)
840 1.1 skrll basic_machine=m68k-rom68k
841 1.1 skrll os=-coff
842 1.1 skrll ;;
843 1.1 skrll morphos)
844 1.1 skrll basic_machine=powerpc-unknown
845 1.1 skrll os=-morphos
846 1.1 skrll ;;
847 1.9 christos moxiebox)
848 1.9 christos basic_machine=moxie-unknown
849 1.9 christos os=-moxiebox
850 1.9 christos ;;
851 1.1 skrll msdos)
852 1.1 skrll basic_machine=i386-pc
853 1.1 skrll os=-msdos
854 1.1 skrll ;;
855 1.1 skrll ms1-*)
856 1.1 skrll basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
857 1.1 skrll ;;
858 1.6 christos msys)
859 1.9 christos basic_machine=i686-pc
860 1.6 christos os=-msys
861 1.6 christos ;;
862 1.1 skrll mvs)
863 1.1 skrll basic_machine=i370-ibm
864 1.1 skrll os=-mvs
865 1.1 skrll ;;
866 1.6 christos nacl)
867 1.6 christos basic_machine=le32-unknown
868 1.6 christos os=-nacl
869 1.6 christos ;;
870 1.1 skrll ncr3000)
871 1.1 skrll basic_machine=i486-ncr
872 1.1 skrll os=-sysv4
873 1.1 skrll ;;
874 1.1 skrll netbsd386)
875 1.1 skrll basic_machine=i386-unknown
876 1.1 skrll os=-netbsd
877 1.1 skrll ;;
878 1.1 skrll netwinder)
879 1.1 skrll basic_machine=armv4l-rebel
880 1.1 skrll os=-linux
881 1.1 skrll ;;
882 1.1 skrll news | news700 | news800 | news900)
883 1.1 skrll basic_machine=m68k-sony
884 1.1 skrll os=-newsos
885 1.1 skrll ;;
886 1.1 skrll news1000)
887 1.1 skrll basic_machine=m68030-sony
888 1.1 skrll os=-newsos
889 1.1 skrll ;;
890 1.1 skrll news-3600 | risc-news)
891 1.1 skrll basic_machine=mips-sony
892 1.1 skrll os=-newsos
893 1.1 skrll ;;
894 1.1 skrll necv70)
895 1.1 skrll basic_machine=v70-nec
896 1.1 skrll os=-sysv
897 1.1 skrll ;;
898 1.1 skrll next | m*-next )
899 1.1 skrll basic_machine=m68k-next
900 1.1 skrll case $os in
901 1.1 skrll -nextstep* )
902 1.1 skrll ;;
903 1.1 skrll -ns2*)
904 1.1 skrll os=-nextstep2
905 1.1 skrll ;;
906 1.1 skrll *)
907 1.1 skrll os=-nextstep3
908 1.1 skrll ;;
909 1.1 skrll esac
910 1.1 skrll ;;
911 1.1 skrll nh3000)
912 1.1 skrll basic_machine=m68k-harris
913 1.1 skrll os=-cxux
914 1.1 skrll ;;
915 1.1 skrll nh[45]000)
916 1.1 skrll basic_machine=m88k-harris
917 1.1 skrll os=-cxux
918 1.1 skrll ;;
919 1.1 skrll nindy960)
920 1.1 skrll basic_machine=i960-intel
921 1.1 skrll os=-nindy
922 1.1 skrll ;;
923 1.1 skrll mon960)
924 1.1 skrll basic_machine=i960-intel
925 1.1 skrll os=-mon960
926 1.1 skrll ;;
927 1.1 skrll nonstopux)
928 1.1 skrll basic_machine=mips-compaq
929 1.1 skrll os=-nonstopux
930 1.1 skrll ;;
931 1.1 skrll np1)
932 1.1 skrll basic_machine=np1-gould
933 1.1 skrll ;;
934 1.6 christos neo-tandem)
935 1.6 christos basic_machine=neo-tandem
936 1.6 christos ;;
937 1.6 christos nse-tandem)
938 1.6 christos basic_machine=nse-tandem
939 1.6 christos ;;
940 1.1 skrll nsr-tandem)
941 1.1 skrll basic_machine=nsr-tandem
942 1.1 skrll ;;
943 1.1 skrll op50n-* | op60c-*)
944 1.1 skrll basic_machine=hppa1.1-oki
945 1.1 skrll os=-proelf
946 1.1 skrll ;;
947 1.7 matt or1k | or1k-*)
948 1.7 matt basic_machine=or1k-unknown
949 1.7 matt ;;
950 1.7 matt or1knd | or1knd-*)
951 1.7 matt basic_machine=or1knd-unknown
952 1.1 skrll ;;
953 1.1 skrll os400)
954 1.1 skrll basic_machine=powerpc-ibm
955 1.1 skrll os=-os400
956 1.1 skrll ;;
957 1.1 skrll OSE68000 | ose68000)
958 1.1 skrll basic_machine=m68000-ericsson
959 1.1 skrll os=-ose
960 1.1 skrll ;;
961 1.1 skrll os68k)
962 1.1 skrll basic_machine=m68k-none
963 1.1 skrll os=-os68k
964 1.1 skrll ;;
965 1.1 skrll pa-hitachi)
966 1.1 skrll basic_machine=hppa1.1-hitachi
967 1.1 skrll os=-hiuxwe2
968 1.1 skrll ;;
969 1.1 skrll paragon)
970 1.1 skrll basic_machine=i860-intel
971 1.1 skrll os=-osf
972 1.1 skrll ;;
973 1.1 skrll parisc)
974 1.1 skrll basic_machine=hppa-unknown
975 1.1 skrll os=-linux
976 1.1 skrll ;;
977 1.1 skrll parisc-*)
978 1.1 skrll basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
979 1.1 skrll os=-linux
980 1.1 skrll ;;
981 1.1 skrll pbd)
982 1.1 skrll basic_machine=sparc-tti
983 1.1 skrll ;;
984 1.1 skrll pbb)
985 1.1 skrll basic_machine=m68k-tti
986 1.1 skrll ;;
987 1.1 skrll pc532 | pc532-*)
988 1.1 skrll basic_machine=ns32k-pc532
989 1.1 skrll ;;
990 1.1 skrll pc98)
991 1.1 skrll basic_machine=i386-pc
992 1.1 skrll ;;
993 1.1 skrll pc98-*)
994 1.1 skrll basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
995 1.1 skrll ;;
996 1.1 skrll pentium | p5 | k5 | k6 | nexgen | viac3)
997 1.1 skrll basic_machine=i586-pc
998 1.1 skrll ;;
999 1.1 skrll pentiumpro | p6 | 6x86 | athlon | athlon_*)
1000 1.1 skrll basic_machine=i686-pc
1001 1.1 skrll ;;
1002 1.1 skrll pentiumii | pentium2 | pentiumiii | pentium3)
1003 1.1 skrll basic_machine=i686-pc
1004 1.1 skrll ;;
1005 1.1 skrll pentium4)
1006 1.1 skrll basic_machine=i786-pc
1007 1.1 skrll ;;
1008 1.1 skrll pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1009 1.1 skrll basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1010 1.1 skrll ;;
1011 1.1 skrll pentiumpro-* | p6-* | 6x86-* | athlon-*)
1012 1.1 skrll basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1013 1.1 skrll ;;
1014 1.1 skrll pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1015 1.1 skrll basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1016 1.1 skrll ;;
1017 1.1 skrll pentium4-*)
1018 1.1 skrll basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1019 1.1 skrll ;;
1020 1.1 skrll pn)
1021 1.1 skrll basic_machine=pn-gould
1022 1.1 skrll ;;
1023 1.1 skrll power) basic_machine=power-ibm
1024 1.1 skrll ;;
1025 1.6 christos ppc | ppcbe) basic_machine=powerpc-unknown
1026 1.1 skrll ;;
1027 1.6 christos ppc-* | ppcbe-*)
1028 1.6 christos basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1029 1.1 skrll ;;
1030 1.1 skrll ppcle | powerpclittle | ppc-le | powerpc-little)
1031 1.1 skrll basic_machine=powerpcle-unknown
1032 1.1 skrll ;;
1033 1.1 skrll ppcle-* | powerpclittle-*)
1034 1.1 skrll basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1035 1.1 skrll ;;
1036 1.1 skrll ppc64) basic_machine=powerpc64-unknown
1037 1.1 skrll ;;
1038 1.1 skrll ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1039 1.1 skrll ;;
1040 1.1 skrll ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1041 1.1 skrll basic_machine=powerpc64le-unknown
1042 1.1 skrll ;;
1043 1.1 skrll ppc64le-* | powerpc64little-*)
1044 1.1 skrll basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1045 1.1 skrll ;;
1046 1.1 skrll ps2)
1047 1.1 skrll basic_machine=i386-ibm
1048 1.1 skrll ;;
1049 1.1 skrll pw32)
1050 1.1 skrll basic_machine=i586-unknown
1051 1.1 skrll os=-pw32
1052 1.1 skrll ;;
1053 1.9 christos rdos | rdos64)
1054 1.9 christos basic_machine=x86_64-pc
1055 1.9 christos os=-rdos
1056 1.9 christos ;;
1057 1.9 christos rdos32)
1058 1.1 skrll basic_machine=i386-pc
1059 1.1 skrll os=-rdos
1060 1.1 skrll ;;
1061 1.1 skrll rom68k)
1062 1.1 skrll basic_machine=m68k-rom68k
1063 1.1 skrll os=-coff
1064 1.1 skrll ;;
1065 1.1 skrll rm[46]00)
1066 1.1 skrll basic_machine=mips-siemens
1067 1.1 skrll ;;
1068 1.1 skrll rtpc | rtpc-*)
1069 1.1 skrll basic_machine=romp-ibm
1070 1.1 skrll ;;
1071 1.1 skrll s390 | s390-*)
1072 1.1 skrll basic_machine=s390-ibm
1073 1.1 skrll ;;
1074 1.1 skrll s390x | s390x-*)
1075 1.1 skrll basic_machine=s390x-ibm
1076 1.1 skrll ;;
1077 1.1 skrll sa29200)
1078 1.1 skrll basic_machine=a29k-amd
1079 1.1 skrll os=-udi
1080 1.1 skrll ;;
1081 1.1 skrll sb1)
1082 1.1 skrll basic_machine=mipsisa64sb1-unknown
1083 1.1 skrll ;;
1084 1.1 skrll sb1el)
1085 1.1 skrll basic_machine=mipsisa64sb1el-unknown
1086 1.1 skrll ;;
1087 1.1 skrll sde)
1088 1.1 skrll basic_machine=mipsisa32-sde
1089 1.1 skrll os=-elf
1090 1.1 skrll ;;
1091 1.1 skrll sei)
1092 1.1 skrll basic_machine=mips-sei
1093 1.1 skrll os=-seiux
1094 1.1 skrll ;;
1095 1.1 skrll sequent)
1096 1.1 skrll basic_machine=i386-sequent
1097 1.1 skrll ;;
1098 1.1 skrll sh)
1099 1.1 skrll basic_machine=sh-hitachi
1100 1.1 skrll os=-hms
1101 1.1 skrll ;;
1102 1.1 skrll sh5el)
1103 1.1 skrll basic_machine=sh5le-unknown
1104 1.1 skrll ;;
1105 1.1 skrll sh64)
1106 1.1 skrll basic_machine=sh64-unknown
1107 1.1 skrll ;;
1108 1.1 skrll sparclite-wrs | simso-wrs)
1109 1.1 skrll basic_machine=sparclite-wrs
1110 1.1 skrll os=-vxworks
1111 1.1 skrll ;;
1112 1.1 skrll sps7)
1113 1.1 skrll basic_machine=m68k-bull
1114 1.1 skrll os=-sysv2
1115 1.1 skrll ;;
1116 1.1 skrll spur)
1117 1.1 skrll basic_machine=spur-unknown
1118 1.1 skrll ;;
1119 1.1 skrll st2000)
1120 1.1 skrll basic_machine=m68k-tandem
1121 1.1 skrll ;;
1122 1.1 skrll stratus)
1123 1.1 skrll basic_machine=i860-stratus
1124 1.1 skrll os=-sysv4
1125 1.1 skrll ;;
1126 1.6 christos strongarm-* | thumb-*)
1127 1.6 christos basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1128 1.6 christos ;;
1129 1.1 skrll sun2)
1130 1.1 skrll basic_machine=m68000-sun
1131 1.1 skrll ;;
1132 1.1 skrll sun2os3)
1133 1.1 skrll basic_machine=m68000-sun
1134 1.1 skrll os=-sunos3
1135 1.1 skrll ;;
1136 1.1 skrll sun2os4)
1137 1.1 skrll basic_machine=m68000-sun
1138 1.1 skrll os=-sunos4
1139 1.1 skrll ;;
1140 1.1 skrll sun3os3)
1141 1.1 skrll basic_machine=m68k-sun
1142 1.1 skrll os=-sunos3
1143 1.1 skrll ;;
1144 1.1 skrll sun3os4)
1145 1.1 skrll basic_machine=m68k-sun
1146 1.1 skrll os=-sunos4
1147 1.1 skrll ;;
1148 1.1 skrll sun4os3)
1149 1.1 skrll basic_machine=sparc-sun
1150 1.1 skrll os=-sunos3
1151 1.1 skrll ;;
1152 1.1 skrll sun4os4)
1153 1.1 skrll basic_machine=sparc-sun
1154 1.1 skrll os=-sunos4
1155 1.1 skrll ;;
1156 1.1 skrll sun4sol2)
1157 1.1 skrll basic_machine=sparc-sun
1158 1.1 skrll os=-solaris2
1159 1.1 skrll ;;
1160 1.1 skrll sun3 | sun3-*)
1161 1.1 skrll basic_machine=m68k-sun
1162 1.1 skrll ;;
1163 1.1 skrll sun4)
1164 1.1 skrll basic_machine=sparc-sun
1165 1.1 skrll ;;
1166 1.1 skrll sun386 | sun386i | roadrunner)
1167 1.1 skrll basic_machine=i386-sun
1168 1.1 skrll ;;
1169 1.1 skrll sv1)
1170 1.1 skrll basic_machine=sv1-cray
1171 1.1 skrll os=-unicos
1172 1.1 skrll ;;
1173 1.1 skrll symmetry)
1174 1.1 skrll basic_machine=i386-sequent
1175 1.1 skrll os=-dynix
1176 1.1 skrll ;;
1177 1.1 skrll t3e)
1178 1.1 skrll basic_machine=alphaev5-cray
1179 1.1 skrll os=-unicos
1180 1.1 skrll ;;
1181 1.1 skrll t90)
1182 1.1 skrll basic_machine=t90-cray
1183 1.1 skrll os=-unicos
1184 1.1 skrll ;;
1185 1.1 skrll tile*)
1186 1.6 christos basic_machine=$basic_machine-unknown
1187 1.1 skrll os=-linux-gnu
1188 1.1 skrll ;;
1189 1.1 skrll tx39)
1190 1.1 skrll basic_machine=mipstx39-unknown
1191 1.1 skrll ;;
1192 1.1 skrll tx39el)
1193 1.1 skrll basic_machine=mipstx39el-unknown
1194 1.1 skrll ;;
1195 1.1 skrll toad1)
1196 1.1 skrll basic_machine=pdp10-xkl
1197 1.1 skrll os=-tops20
1198 1.1 skrll ;;
1199 1.1 skrll tower | tower-32)
1200 1.1 skrll basic_machine=m68k-ncr
1201 1.1 skrll ;;
1202 1.1 skrll tpf)
1203 1.1 skrll basic_machine=s390x-ibm
1204 1.1 skrll os=-tpf
1205 1.1 skrll ;;
1206 1.1 skrll udi29k)
1207 1.1 skrll basic_machine=a29k-amd
1208 1.1 skrll os=-udi
1209 1.1 skrll ;;
1210 1.1 skrll ultra3)
1211 1.1 skrll basic_machine=a29k-nyu
1212 1.1 skrll os=-sym1
1213 1.1 skrll ;;
1214 1.1 skrll v810 | necv810)
1215 1.1 skrll basic_machine=v810-nec
1216 1.1 skrll os=-none
1217 1.1 skrll ;;
1218 1.1 skrll vaxv)
1219 1.1 skrll basic_machine=vax-dec
1220 1.1 skrll os=-sysv
1221 1.1 skrll ;;
1222 1.1 skrll vms)
1223 1.1 skrll basic_machine=vax-dec
1224 1.1 skrll os=-vms
1225 1.1 skrll ;;
1226 1.1 skrll vpp*|vx|vx-*)
1227 1.1 skrll basic_machine=f301-fujitsu
1228 1.1 skrll ;;
1229 1.1 skrll vxworks960)
1230 1.1 skrll basic_machine=i960-wrs
1231 1.1 skrll os=-vxworks
1232 1.1 skrll ;;
1233 1.1 skrll vxworks68)
1234 1.1 skrll basic_machine=m68k-wrs
1235 1.1 skrll os=-vxworks
1236 1.1 skrll ;;
1237 1.1 skrll vxworks29k)
1238 1.1 skrll basic_machine=a29k-wrs
1239 1.1 skrll os=-vxworks
1240 1.1 skrll ;;
1241 1.1 skrll w65*)
1242 1.1 skrll basic_machine=w65-wdc
1243 1.1 skrll os=-none
1244 1.1 skrll ;;
1245 1.1 skrll w89k-*)
1246 1.1 skrll basic_machine=hppa1.1-winbond
1247 1.1 skrll os=-proelf
1248 1.1 skrll ;;
1249 1.1 skrll xbox)
1250 1.1 skrll basic_machine=i686-pc
1251 1.1 skrll os=-mingw32
1252 1.1 skrll ;;
1253 1.1 skrll xps | xps100)
1254 1.1 skrll basic_machine=xps100-honeywell
1255 1.1 skrll ;;
1256 1.6 christos xscale-* | xscalee[bl]-*)
1257 1.6 christos basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1258 1.6 christos ;;
1259 1.1 skrll ymp)
1260 1.1 skrll basic_machine=ymp-cray
1261 1.1 skrll os=-unicos
1262 1.1 skrll ;;
1263 1.1 skrll z8k-*-coff)
1264 1.1 skrll basic_machine=z8k-unknown
1265 1.1 skrll os=-sim
1266 1.1 skrll ;;
1267 1.3 christos z80-*-coff)
1268 1.3 christos basic_machine=z80-unknown
1269 1.3 christos os=-sim
1270 1.3 christos ;;
1271 1.1 skrll none)
1272 1.1 skrll basic_machine=none-none
1273 1.1 skrll os=-none
1274 1.1 skrll ;;
1275 1.1 skrll
1276 1.1 skrll # Here we handle the default manufacturer of certain CPU types. It is in
1277 1.1 skrll # some cases the only manufacturer, in others, it is the most popular.
1278 1.1 skrll w89k)
1279 1.1 skrll basic_machine=hppa1.1-winbond
1280 1.1 skrll ;;
1281 1.1 skrll op50n)
1282 1.1 skrll basic_machine=hppa1.1-oki
1283 1.1 skrll ;;
1284 1.1 skrll op60c)
1285 1.1 skrll basic_machine=hppa1.1-oki
1286 1.1 skrll ;;
1287 1.1 skrll romp)
1288 1.1 skrll basic_machine=romp-ibm
1289 1.1 skrll ;;
1290 1.1 skrll mmix)
1291 1.1 skrll basic_machine=mmix-knuth
1292 1.1 skrll ;;
1293 1.1 skrll rs6000)
1294 1.1 skrll basic_machine=rs6000-ibm
1295 1.1 skrll ;;
1296 1.1 skrll vax)
1297 1.1 skrll basic_machine=vax-dec
1298 1.1 skrll ;;
1299 1.1 skrll pdp10)
1300 1.1 skrll # there are many clones, so DEC is not a safe bet
1301 1.1 skrll basic_machine=pdp10-unknown
1302 1.1 skrll ;;
1303 1.1 skrll pdp11)
1304 1.1 skrll basic_machine=pdp11-dec
1305 1.1 skrll ;;
1306 1.1 skrll we32k)
1307 1.1 skrll basic_machine=we32k-att
1308 1.1 skrll ;;
1309 1.3 christos sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1310 1.1 skrll basic_machine=sh-unknown
1311 1.1 skrll ;;
1312 1.1 skrll sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1313 1.1 skrll basic_machine=sparc-sun
1314 1.1 skrll ;;
1315 1.1 skrll cydra)
1316 1.1 skrll basic_machine=cydra-cydrome
1317 1.1 skrll ;;
1318 1.1 skrll orion)
1319 1.1 skrll basic_machine=orion-highlevel
1320 1.1 skrll ;;
1321 1.1 skrll orion105)
1322 1.1 skrll basic_machine=clipper-highlevel
1323 1.1 skrll ;;
1324 1.1 skrll mac | mpw | mac-mpw)
1325 1.1 skrll basic_machine=m68k-apple
1326 1.1 skrll ;;
1327 1.1 skrll pmac | pmac-mpw)
1328 1.1 skrll basic_machine=powerpc-apple
1329 1.1 skrll ;;
1330 1.1 skrll *-unknown)
1331 1.1 skrll # Make sure to match an already-canonicalized machine name.
1332 1.1 skrll ;;
1333 1.1 skrll *)
1334 1.1 skrll echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1335 1.1 skrll exit 1
1336 1.1 skrll ;;
1337 1.1 skrll esac
1338 1.1 skrll
1339 1.1 skrll # Here we canonicalize certain aliases for manufacturers.
1340 1.1 skrll case $basic_machine in
1341 1.1 skrll *-digital*)
1342 1.1 skrll basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1343 1.1 skrll ;;
1344 1.1 skrll *-commodore*)
1345 1.1 skrll basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1346 1.1 skrll ;;
1347 1.1 skrll *)
1348 1.1 skrll ;;
1349 1.1 skrll esac
1350 1.1 skrll
1351 1.1 skrll # Decode manufacturer-specific aliases for certain operating systems.
1352 1.1 skrll
1353 1.1 skrll if [ x"$os" != x"" ]
1354 1.1 skrll then
1355 1.1 skrll case $os in
1356 1.6 christos # First match some system type aliases
1357 1.6 christos # that might get confused with valid system types.
1358 1.1 skrll # -solaris* is a basic system type, with this one exception.
1359 1.6 christos -auroraux)
1360 1.6 christos os=-auroraux
1361 1.3 christos ;;
1362 1.1 skrll -solaris1 | -solaris1.*)
1363 1.1 skrll os=`echo $os | sed -e 's|solaris1|sunos4|'`
1364 1.1 skrll ;;
1365 1.1 skrll -solaris)
1366 1.1 skrll os=-solaris2
1367 1.1 skrll ;;
1368 1.1 skrll -svr4*)
1369 1.1 skrll os=-sysv4
1370 1.1 skrll ;;
1371 1.1 skrll -unixware*)
1372 1.1 skrll os=-sysv4.2uw
1373 1.1 skrll ;;
1374 1.1 skrll -gnu/linux*)
1375 1.1 skrll os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1376 1.1 skrll ;;
1377 1.1 skrll # First accept the basic system types.
1378 1.1 skrll # The portable systems comes first.
1379 1.1 skrll # Each alternative MUST END IN A *, to match a version number.
1380 1.1 skrll # -sysv* is not here because it comes later, after sysvr4.
1381 1.1 skrll -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1382 1.3 christos | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1383 1.3 christos | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1384 1.9 christos | -sym* | -kopensolaris* | -plan9* \
1385 1.1 skrll | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1386 1.9 christos | -aos* | -aros* | -cloudabi* \
1387 1.1 skrll | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1388 1.1 skrll | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1389 1.1 skrll | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1390 1.9 christos | -bitrig* | -openbsd* | -solidbsd* \
1391 1.1 skrll | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1392 1.1 skrll | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1393 1.1 skrll | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1394 1.1 skrll | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1395 1.3 christos | -chorusos* | -chorusrdb* | -cegcc* \
1396 1.6 christos | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1397 1.9 christos | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1398 1.9 christos | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1399 1.9 christos | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1400 1.1 skrll | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1401 1.1 skrll | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1402 1.1 skrll | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1403 1.1 skrll | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1404 1.1 skrll | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1405 1.1 skrll | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1406 1.9 christos | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1407 1.1 skrll # Remember, each alternative MUST END IN *, to match a version number.
1408 1.1 skrll ;;
1409 1.1 skrll -qnx*)
1410 1.1 skrll case $basic_machine in
1411 1.1 skrll x86-* | i*86-*)
1412 1.1 skrll ;;
1413 1.1 skrll *)
1414 1.1 skrll os=-nto$os
1415 1.1 skrll ;;
1416 1.1 skrll esac
1417 1.1 skrll ;;
1418 1.1 skrll -nto-qnx*)
1419 1.1 skrll ;;
1420 1.1 skrll -nto*)
1421 1.1 skrll os=`echo $os | sed -e 's|nto|nto-qnx|'`
1422 1.1 skrll ;;
1423 1.1 skrll -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1424 1.1 skrll | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1425 1.1 skrll | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1426 1.1 skrll ;;
1427 1.1 skrll -mac*)
1428 1.1 skrll os=`echo $os | sed -e 's|mac|macos|'`
1429 1.1 skrll ;;
1430 1.1 skrll -linux-dietlibc)
1431 1.1 skrll os=-linux-dietlibc
1432 1.1 skrll ;;
1433 1.1 skrll -linux*)
1434 1.1 skrll os=`echo $os | sed -e 's|linux|linux-gnu|'`
1435 1.1 skrll ;;
1436 1.1 skrll -sunos5*)
1437 1.1 skrll os=`echo $os | sed -e 's|sunos5|solaris2|'`
1438 1.1 skrll ;;
1439 1.1 skrll -sunos6*)
1440 1.1 skrll os=`echo $os | sed -e 's|sunos6|solaris3|'`
1441 1.1 skrll ;;
1442 1.1 skrll -opened*)
1443 1.1 skrll os=-openedition
1444 1.1 skrll ;;
1445 1.6 christos -os400*)
1446 1.1 skrll os=-os400
1447 1.1 skrll ;;
1448 1.1 skrll -wince*)
1449 1.1 skrll os=-wince
1450 1.1 skrll ;;
1451 1.1 skrll -osfrose*)
1452 1.1 skrll os=-osfrose
1453 1.1 skrll ;;
1454 1.1 skrll -osf*)
1455 1.1 skrll os=-osf
1456 1.1 skrll ;;
1457 1.1 skrll -utek*)
1458 1.1 skrll os=-bsd
1459 1.1 skrll ;;
1460 1.1 skrll -dynix*)
1461 1.1 skrll os=-bsd
1462 1.1 skrll ;;
1463 1.1 skrll -acis*)
1464 1.1 skrll os=-aos
1465 1.1 skrll ;;
1466 1.1 skrll -atheos*)
1467 1.1 skrll os=-atheos
1468 1.1 skrll ;;
1469 1.1 skrll -syllable*)
1470 1.1 skrll os=-syllable
1471 1.1 skrll ;;
1472 1.1 skrll -386bsd)
1473 1.1 skrll os=-bsd
1474 1.1 skrll ;;
1475 1.1 skrll -ctix* | -uts*)
1476 1.1 skrll os=-sysv
1477 1.1 skrll ;;
1478 1.1 skrll -nova*)
1479 1.1 skrll os=-rtmk-nova
1480 1.1 skrll ;;
1481 1.1 skrll -ns2 )
1482 1.1 skrll os=-nextstep2
1483 1.1 skrll ;;
1484 1.1 skrll -nsk*)
1485 1.1 skrll os=-nsk
1486 1.1 skrll ;;
1487 1.1 skrll # Preserve the version number of sinix5.
1488 1.1 skrll -sinix5.*)
1489 1.1 skrll os=`echo $os | sed -e 's|sinix|sysv|'`
1490 1.1 skrll ;;
1491 1.1 skrll -sinix*)
1492 1.1 skrll os=-sysv4
1493 1.1 skrll ;;
1494 1.6 christos -tpf*)
1495 1.1 skrll os=-tpf
1496 1.1 skrll ;;
1497 1.1 skrll -triton*)
1498 1.1 skrll os=-sysv3
1499 1.1 skrll ;;
1500 1.1 skrll -oss*)
1501 1.1 skrll os=-sysv3
1502 1.1 skrll ;;
1503 1.1 skrll -svr4)
1504 1.1 skrll os=-sysv4
1505 1.1 skrll ;;
1506 1.1 skrll -svr3)
1507 1.1 skrll os=-sysv3
1508 1.1 skrll ;;
1509 1.1 skrll -sysvr4)
1510 1.1 skrll os=-sysv4
1511 1.1 skrll ;;
1512 1.1 skrll # This must come after -sysvr4.
1513 1.1 skrll -sysv*)
1514 1.1 skrll ;;
1515 1.1 skrll -ose*)
1516 1.1 skrll os=-ose
1517 1.1 skrll ;;
1518 1.1 skrll -es1800*)
1519 1.1 skrll os=-ose
1520 1.1 skrll ;;
1521 1.1 skrll -xenix)
1522 1.1 skrll os=-xenix
1523 1.1 skrll ;;
1524 1.1 skrll -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1525 1.1 skrll os=-mint
1526 1.1 skrll ;;
1527 1.1 skrll -aros*)
1528 1.1 skrll os=-aros
1529 1.1 skrll ;;
1530 1.1 skrll -zvmoe)
1531 1.1 skrll os=-zvmoe
1532 1.1 skrll ;;
1533 1.1 skrll -dicos*)
1534 1.1 skrll os=-dicos
1535 1.1 skrll ;;
1536 1.6 christos -nacl*)
1537 1.6 christos ;;
1538 1.1 skrll -none)
1539 1.1 skrll ;;
1540 1.1 skrll *)
1541 1.1 skrll # Get rid of the `-' at the beginning of $os.
1542 1.1 skrll os=`echo $os | sed 's/[^-]*-//'`
1543 1.1 skrll echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1544 1.1 skrll exit 1
1545 1.1 skrll ;;
1546 1.1 skrll esac
1547 1.1 skrll else
1548 1.1 skrll
1549 1.1 skrll # Here we handle the default operating systems that come with various machines.
1550 1.1 skrll # The value should be what the vendor currently ships out the door with their
1551 1.1 skrll # machine or put another way, the most popular os provided with the machine.
1552 1.1 skrll
1553 1.1 skrll # Note that if you're going to try to match "-MANUFACTURER" here (say,
1554 1.1 skrll # "-sun"), then you have to tell the case statement up towards the top
1555 1.1 skrll # that MANUFACTURER isn't an operating system. Otherwise, code above
1556 1.1 skrll # will signal an error saying that MANUFACTURER isn't an operating
1557 1.1 skrll # system, and we'll never get to this point.
1558 1.1 skrll
1559 1.1 skrll case $basic_machine in
1560 1.6 christos score-*)
1561 1.1 skrll os=-elf
1562 1.1 skrll ;;
1563 1.6 christos spu-*)
1564 1.1 skrll os=-elf
1565 1.1 skrll ;;
1566 1.1 skrll *-acorn)
1567 1.1 skrll os=-riscix1.2
1568 1.1 skrll ;;
1569 1.1 skrll arm*-rebel)
1570 1.1 skrll os=-linux
1571 1.1 skrll ;;
1572 1.1 skrll arm*-semi)
1573 1.1 skrll os=-aout
1574 1.1 skrll ;;
1575 1.6 christos c4x-* | tic4x-*)
1576 1.6 christos os=-coff
1577 1.1 skrll ;;
1578 1.9 christos c8051-*)
1579 1.9 christos os=-elf
1580 1.9 christos ;;
1581 1.9 christos hexagon-*)
1582 1.9 christos os=-elf
1583 1.9 christos ;;
1584 1.9 christos tic54x-*)
1585 1.9 christos os=-coff
1586 1.9 christos ;;
1587 1.9 christos tic55x-*)
1588 1.9 christos os=-coff
1589 1.9 christos ;;
1590 1.9 christos tic6x-*)
1591 1.9 christos os=-coff
1592 1.9 christos ;;
1593 1.1 skrll # This must come before the *-dec entry.
1594 1.1 skrll pdp10-*)
1595 1.1 skrll os=-tops20
1596 1.1 skrll ;;
1597 1.1 skrll pdp11-*)
1598 1.1 skrll os=-none
1599 1.1 skrll ;;
1600 1.1 skrll *-dec | vax-*)
1601 1.1 skrll os=-ultrix4.2
1602 1.1 skrll ;;
1603 1.1 skrll m68*-apollo)
1604 1.1 skrll os=-domain
1605 1.1 skrll ;;
1606 1.1 skrll i386-sun)
1607 1.1 skrll os=-sunos4.0.2
1608 1.1 skrll ;;
1609 1.1 skrll m68000-sun)
1610 1.1 skrll os=-sunos3
1611 1.1 skrll ;;
1612 1.1 skrll m68*-cisco)
1613 1.1 skrll os=-aout
1614 1.1 skrll ;;
1615 1.6 christos mep-*)
1616 1.1 skrll os=-elf
1617 1.1 skrll ;;
1618 1.1 skrll mips*-cisco)
1619 1.1 skrll os=-elf
1620 1.1 skrll ;;
1621 1.1 skrll mips*-*)
1622 1.1 skrll os=-elf
1623 1.1 skrll ;;
1624 1.7 matt or1k-*)
1625 1.7 matt os=-elf
1626 1.7 matt ;;
1627 1.7 matt or1knd-*)
1628 1.7 matt os=-elf
1629 1.1 skrll ;;
1630 1.1 skrll *-tti) # must be before sparc entry or we get the wrong os.
1631 1.1 skrll os=-sysv3
1632 1.1 skrll ;;
1633 1.1 skrll sparc-* | *-sun)
1634 1.1 skrll os=-sunos4.1.1
1635 1.1 skrll ;;
1636 1.1 skrll *-be)
1637 1.1 skrll os=-beos
1638 1.1 skrll ;;
1639 1.1 skrll *-haiku)
1640 1.1 skrll os=-haiku
1641 1.1 skrll ;;
1642 1.1 skrll *-ibm)
1643 1.1 skrll os=-aix
1644 1.1 skrll ;;
1645 1.6 christos *-knuth)
1646 1.1 skrll os=-mmixware
1647 1.1 skrll ;;
1648 1.1 skrll *-wec)
1649 1.1 skrll os=-proelf
1650 1.1 skrll ;;
1651 1.1 skrll *-winbond)
1652 1.1 skrll os=-proelf
1653 1.1 skrll ;;
1654 1.1 skrll *-oki)
1655 1.1 skrll os=-proelf
1656 1.1 skrll ;;
1657 1.1 skrll *-hp)
1658 1.1 skrll os=-hpux
1659 1.1 skrll ;;
1660 1.1 skrll *-hitachi)
1661 1.1 skrll os=-hiux
1662 1.1 skrll ;;
1663 1.1 skrll i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1664 1.1 skrll os=-sysv
1665 1.1 skrll ;;
1666 1.1 skrll *-cbm)
1667 1.1 skrll os=-amigaos
1668 1.1 skrll ;;
1669 1.1 skrll *-dg)
1670 1.1 skrll os=-dgux
1671 1.1 skrll ;;
1672 1.1 skrll *-dolphin)
1673 1.1 skrll os=-sysv3
1674 1.1 skrll ;;
1675 1.1 skrll m68k-ccur)
1676 1.1 skrll os=-rtu
1677 1.1 skrll ;;
1678 1.1 skrll m88k-omron*)
1679 1.1 skrll os=-luna
1680 1.1 skrll ;;
1681 1.1 skrll *-next )
1682 1.1 skrll os=-nextstep
1683 1.1 skrll ;;
1684 1.1 skrll *-sequent)
1685 1.1 skrll os=-ptx
1686 1.1 skrll ;;
1687 1.1 skrll *-crds)
1688 1.1 skrll os=-unos
1689 1.1 skrll ;;
1690 1.1 skrll *-ns)
1691 1.1 skrll os=-genix
1692 1.1 skrll ;;
1693 1.1 skrll i370-*)
1694 1.1 skrll os=-mvs
1695 1.1 skrll ;;
1696 1.1 skrll *-next)
1697 1.1 skrll os=-nextstep3
1698 1.1 skrll ;;
1699 1.1 skrll *-gould)
1700 1.1 skrll os=-sysv
1701 1.1 skrll ;;
1702 1.1 skrll *-highlevel)
1703 1.1 skrll os=-bsd
1704 1.1 skrll ;;
1705 1.1 skrll *-encore)
1706 1.1 skrll os=-bsd
1707 1.1 skrll ;;
1708 1.1 skrll *-sgi)
1709 1.1 skrll os=-irix
1710 1.1 skrll ;;
1711 1.1 skrll *-siemens)
1712 1.1 skrll os=-sysv4
1713 1.1 skrll ;;
1714 1.1 skrll *-masscomp)
1715 1.1 skrll os=-rtu
1716 1.1 skrll ;;
1717 1.1 skrll f30[01]-fujitsu | f700-fujitsu)
1718 1.1 skrll os=-uxpv
1719 1.1 skrll ;;
1720 1.1 skrll *-rom68k)
1721 1.1 skrll os=-coff
1722 1.1 skrll ;;
1723 1.1 skrll *-*bug)
1724 1.1 skrll os=-coff
1725 1.1 skrll ;;
1726 1.1 skrll *-apple)
1727 1.1 skrll os=-macos
1728 1.1 skrll ;;
1729 1.1 skrll *-atari*)
1730 1.1 skrll os=-mint
1731 1.1 skrll ;;
1732 1.1 skrll *)
1733 1.1 skrll os=-none
1734 1.1 skrll ;;
1735 1.1 skrll esac
1736 1.1 skrll fi
1737 1.1 skrll
1738 1.1 skrll # Here we handle the case where we know the os, and the CPU type, but not the
1739 1.1 skrll # manufacturer. We pick the logical manufacturer.
1740 1.1 skrll vendor=unknown
1741 1.1 skrll case $basic_machine in
1742 1.1 skrll *-unknown)
1743 1.1 skrll case $os in
1744 1.1 skrll -riscix*)
1745 1.1 skrll vendor=acorn
1746 1.1 skrll ;;
1747 1.1 skrll -sunos*)
1748 1.1 skrll vendor=sun
1749 1.1 skrll ;;
1750 1.3 christos -cnk*|-aix*)
1751 1.1 skrll vendor=ibm
1752 1.1 skrll ;;
1753 1.1 skrll -beos*)
1754 1.1 skrll vendor=be
1755 1.1 skrll ;;
1756 1.1 skrll -hpux*)
1757 1.1 skrll vendor=hp
1758 1.1 skrll ;;
1759 1.1 skrll -mpeix*)
1760 1.1 skrll vendor=hp
1761 1.1 skrll ;;
1762 1.1 skrll -hiux*)
1763 1.1 skrll vendor=hitachi
1764 1.1 skrll ;;
1765 1.1 skrll -unos*)
1766 1.1 skrll vendor=crds
1767 1.1 skrll ;;
1768 1.1 skrll -dgux*)
1769 1.1 skrll vendor=dg
1770 1.1 skrll ;;
1771 1.1 skrll -luna*)
1772 1.1 skrll vendor=omron
1773 1.1 skrll ;;
1774 1.1 skrll -genix*)
1775 1.1 skrll vendor=ns
1776 1.1 skrll ;;
1777 1.1 skrll -mvs* | -opened*)
1778 1.1 skrll vendor=ibm
1779 1.1 skrll ;;
1780 1.1 skrll -os400*)
1781 1.1 skrll vendor=ibm
1782 1.1 skrll ;;
1783 1.1 skrll -ptx*)
1784 1.1 skrll vendor=sequent
1785 1.1 skrll ;;
1786 1.1 skrll -tpf*)
1787 1.1 skrll vendor=ibm
1788 1.1 skrll ;;
1789 1.1 skrll -vxsim* | -vxworks* | -windiss*)
1790 1.1 skrll vendor=wrs
1791 1.1 skrll ;;
1792 1.1 skrll -aux*)
1793 1.1 skrll vendor=apple
1794 1.1 skrll ;;
1795 1.1 skrll -hms*)
1796 1.1 skrll vendor=hitachi
1797 1.1 skrll ;;
1798 1.1 skrll -mpw* | -macos*)
1799 1.1 skrll vendor=apple
1800 1.1 skrll ;;
1801 1.1 skrll -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1802 1.1 skrll vendor=atari
1803 1.1 skrll ;;
1804 1.1 skrll -vos*)
1805 1.1 skrll vendor=stratus
1806 1.1 skrll ;;
1807 1.1 skrll esac
1808 1.1 skrll basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1809 1.1 skrll ;;
1810 1.1 skrll esac
1811 1.1 skrll
1812 1.1 skrll echo $basic_machine$os
1813 1.1 skrll exit
1814 1.1 skrll
1815 1.1 skrll # Local variables:
1816 1.1 skrll # eval: (add-hook 'write-file-hooks 'time-stamp)
1817 1.1 skrll # time-stamp-start: "timestamp='"
1818 1.1 skrll # time-stamp-format: "%:y-%02m-%02d"
1819 1.1 skrll # time-stamp-end: "'"
1820 1.1 skrll # End:
1821