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.

1805 lines
35 KiB

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