You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1782 lines
35 KiB

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