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.
 
 
 
 
 
 

1826 lines
35 KiB

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