config.sub 31 KB

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