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.

1791 lines
35 KiB

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