The source code and dockerfile for the GSW2024 AI Lab.
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

1789 lines
35 KiB

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