Portable build framework for OpenNTPD
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.

1836 lines
36 KiB

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