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