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.
 
 
 
 
 
 

1802 lines
35 KiB

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