🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
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.

1868 lines
36 KiB

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