config.sub 31 KB

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