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.

1793 lines
35 KiB

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