config.sub 31 KB

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