config.sub 35 KB

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