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