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.

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