config.sub 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791
  1. #! /bin/sh
  2. # Configuration validation subroutine script.
  3. # Copyright 1992-2018 Free Software Foundation, Inc.
  4. timestamp='2018-11-28'
  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. | amdgcn \
  1134. | arc | arceb \
  1135. | arm | arm[lb]e | arme[lb] | armv* \
  1136. | avr | avr32 \
  1137. | asmjs \
  1138. | ba \
  1139. | be32 | be64 \
  1140. | bfin | bs2000 \
  1141. | c[123]* | c30 | [cjt]90 | c4x \
  1142. | c8051 | clipper | craynv | csky | cydra \
  1143. | d10v | d30v | dlx | dsp16xx \
  1144. | e2k | elxsi | epiphany \
  1145. | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
  1146. | h8300 | h8500 \
  1147. | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
  1148. | hexagon \
  1149. | i370 | i*86 | i860 | i960 | ia16 | ia64 \
  1150. | ip2k | iq2000 \
  1151. | k1om \
  1152. | le32 | le64 \
  1153. | lm32 \
  1154. | m32c | m32r | m32rle \
  1155. | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
  1156. | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
  1157. | m88110 | m88k | maxq | mb | mcore | mep | metag \
  1158. | microblaze | microblazeel \
  1159. | mips | mipsbe | mipseb | mipsel | mipsle \
  1160. | mips16 \
  1161. | mips64 | mips64el \
  1162. | mips64octeon | mips64octeonel \
  1163. | mips64orion | mips64orionel \
  1164. | mips64r5900 | mips64r5900el \
  1165. | mips64vr | mips64vrel \
  1166. | mips64vr4100 | mips64vr4100el \
  1167. | mips64vr4300 | mips64vr4300el \
  1168. | mips64vr5000 | mips64vr5000el \
  1169. | mips64vr5900 | mips64vr5900el \
  1170. | mipsisa32 | mipsisa32el \
  1171. | mipsisa32r2 | mipsisa32r2el \
  1172. | mipsisa32r6 | mipsisa32r6el \
  1173. | mipsisa64 | mipsisa64el \
  1174. | mipsisa64r2 | mipsisa64r2el \
  1175. | mipsisa64r6 | mipsisa64r6el \
  1176. | mipsisa64sb1 | mipsisa64sb1el \
  1177. | mipsisa64sr71k | mipsisa64sr71kel \
  1178. | mipsr5900 | mipsr5900el \
  1179. | mipstx39 | mipstx39el \
  1180. | mmix \
  1181. | mn10200 | mn10300 \
  1182. | moxie \
  1183. | mt \
  1184. | msp430 \
  1185. | nds32 | nds32le | nds32be \
  1186. | nfp \
  1187. | nios | nios2 | nios2eb | nios2el \
  1188. | none | np1 | ns16k | ns32k \
  1189. | open8 \
  1190. | or1k* \
  1191. | or32 \
  1192. | orion \
  1193. | pdp10 | pdp11 | pj | pjl | pn | power \
  1194. | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
  1195. | pru \
  1196. | pyramid \
  1197. | riscv | riscv32 | riscv64 \
  1198. | rl78 | romp | rs6000 | rx \
  1199. | score \
  1200. | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
  1201. | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
  1202. | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
  1203. | sparclite \
  1204. | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
  1205. | spu \
  1206. | tahoe \
  1207. | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
  1208. | tron \
  1209. | ubicom32 \
  1210. | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
  1211. | vax \
  1212. | visium \
  1213. | wasm32 \
  1214. | we32k \
  1215. | x86 | x86_64 | xc16x | xgate | xps100 \
  1216. | xstormy16 | xtensa* \
  1217. | ymp \
  1218. | z8k | z80)
  1219. ;;
  1220. *)
  1221. echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
  1222. exit 1
  1223. ;;
  1224. esac
  1225. ;;
  1226. esac
  1227. # Here we canonicalize certain aliases for manufacturers.
  1228. case $vendor in
  1229. digital*)
  1230. vendor=dec
  1231. ;;
  1232. commodore*)
  1233. vendor=cbm
  1234. ;;
  1235. *)
  1236. ;;
  1237. esac
  1238. # Decode manufacturer-specific aliases for certain operating systems.
  1239. if [ x$os != x ]
  1240. then
  1241. case $os in
  1242. # First match some system type aliases that might get confused
  1243. # with valid system types.
  1244. # solaris* is a basic system type, with this one exception.
  1245. auroraux)
  1246. os=auroraux
  1247. ;;
  1248. bluegene*)
  1249. os=cnk
  1250. ;;
  1251. solaris1 | solaris1.*)
  1252. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  1253. ;;
  1254. solaris)
  1255. os=solaris2
  1256. ;;
  1257. unixware*)
  1258. os=sysv4.2uw
  1259. ;;
  1260. gnu/linux*)
  1261. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  1262. ;;
  1263. # es1800 is here to avoid being matched by es* (a different OS)
  1264. es1800*)
  1265. os=ose
  1266. ;;
  1267. # Some version numbers need modification
  1268. chorusos*)
  1269. os=chorusos
  1270. ;;
  1271. isc)
  1272. os=isc2.2
  1273. ;;
  1274. sco6)
  1275. os=sco5v6
  1276. ;;
  1277. sco5)
  1278. os=sco3.2v5
  1279. ;;
  1280. sco4)
  1281. os=sco3.2v4
  1282. ;;
  1283. sco3.2.[4-9]*)
  1284. os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  1285. ;;
  1286. sco3.2v[4-9]* | sco5v6*)
  1287. # Don't forget version if it is 3.2v4 or newer.
  1288. ;;
  1289. scout)
  1290. # Don't match below
  1291. ;;
  1292. sco*)
  1293. os=sco3.2v2
  1294. ;;
  1295. psos*)
  1296. os=psos
  1297. ;;
  1298. # Now accept the basic system types.
  1299. # The portable systems comes first.
  1300. # Each alternative MUST end in a * to match a version number.
  1301. # sysv* is not here because it comes later, after sysvr4.
  1302. gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
  1303. | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
  1304. | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
  1305. | sym* | kopensolaris* | plan9* \
  1306. | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
  1307. | aos* | aros* | cloudabi* | sortix* \
  1308. | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
  1309. | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
  1310. | knetbsd* | mirbsd* | netbsd* \
  1311. | bitrig* | openbsd* | solidbsd* | libertybsd* \
  1312. | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
  1313. | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
  1314. | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
  1315. | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
  1316. | chorusrdb* | cegcc* | glidix* \
  1317. | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
  1318. | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
  1319. | linux-newlib* | linux-musl* | linux-uclibc* \
  1320. | uxpv* | beos* | mpeix* | udk* | moxiebox* \
  1321. | interix* | uwin* | mks* | rhapsody* | darwin* \
  1322. | openstep* | oskit* | conix* | pw32* | nonstopux* \
  1323. | storm-chaos* | tops10* | tenex* | tops20* | its* \
  1324. | os2* | vos* | palmos* | uclinux* | nucleus* \
  1325. | morphos* | superux* | rtmk* | windiss* \
  1326. | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
  1327. | skyos* | haiku* | rdos* | toppers* | drops* | es* \
  1328. | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
  1329. | midnightbsd* | amdhsa* | unleashed*)
  1330. # Remember, each alternative MUST END IN *, to match a version number.
  1331. ;;
  1332. qnx*)
  1333. case $cpu in
  1334. x86 | i*86)
  1335. ;;
  1336. *)
  1337. os=nto-$os
  1338. ;;
  1339. esac
  1340. ;;
  1341. hiux*)
  1342. os=hiuxwe2
  1343. ;;
  1344. nto-qnx*)
  1345. ;;
  1346. nto*)
  1347. os=`echo $os | sed -e 's|nto|nto-qnx|'`
  1348. ;;
  1349. sim | xray | os68k* | v88r* \
  1350. | windows* | osx | abug | netware* | os9* \
  1351. | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
  1352. ;;
  1353. linux-dietlibc)
  1354. os=linux-dietlibc
  1355. ;;
  1356. linux*)
  1357. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  1358. ;;
  1359. lynx*178)
  1360. os=lynxos178
  1361. ;;
  1362. lynx*5)
  1363. os=lynxos5
  1364. ;;
  1365. lynx*)
  1366. os=lynxos
  1367. ;;
  1368. mac*)
  1369. os=`echo "$os" | sed -e 's|mac|macos|'`
  1370. ;;
  1371. opened*)
  1372. os=openedition
  1373. ;;
  1374. os400*)
  1375. os=os400
  1376. ;;
  1377. sunos5*)
  1378. os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
  1379. ;;
  1380. sunos6*)
  1381. os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
  1382. ;;
  1383. wince*)
  1384. os=wince
  1385. ;;
  1386. utek*)
  1387. os=bsd
  1388. ;;
  1389. dynix*)
  1390. os=bsd
  1391. ;;
  1392. acis*)
  1393. os=aos
  1394. ;;
  1395. atheos*)
  1396. os=atheos
  1397. ;;
  1398. syllable*)
  1399. os=syllable
  1400. ;;
  1401. 386bsd)
  1402. os=bsd
  1403. ;;
  1404. ctix* | uts*)
  1405. os=sysv
  1406. ;;
  1407. nova*)
  1408. os=rtmk-nova
  1409. ;;
  1410. ns2)
  1411. os=nextstep2
  1412. ;;
  1413. nsk*)
  1414. os=nsk
  1415. ;;
  1416. # Preserve the version number of sinix5.
  1417. sinix5.*)
  1418. os=`echo $os | sed -e 's|sinix|sysv|'`
  1419. ;;
  1420. sinix*)
  1421. os=sysv4
  1422. ;;
  1423. tpf*)
  1424. os=tpf
  1425. ;;
  1426. triton*)
  1427. os=sysv3
  1428. ;;
  1429. oss*)
  1430. os=sysv3
  1431. ;;
  1432. svr4*)
  1433. os=sysv4
  1434. ;;
  1435. svr3)
  1436. os=sysv3
  1437. ;;
  1438. sysvr4)
  1439. os=sysv4
  1440. ;;
  1441. # This must come after sysvr4.
  1442. sysv*)
  1443. ;;
  1444. ose*)
  1445. os=ose
  1446. ;;
  1447. *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
  1448. os=mint
  1449. ;;
  1450. zvmoe)
  1451. os=zvmoe
  1452. ;;
  1453. dicos*)
  1454. os=dicos
  1455. ;;
  1456. pikeos*)
  1457. # Until real need of OS specific support for
  1458. # particular features comes up, bare metal
  1459. # configurations are quite functional.
  1460. case $cpu in
  1461. arm*)
  1462. os=eabi
  1463. ;;
  1464. *)
  1465. os=elf
  1466. ;;
  1467. esac
  1468. ;;
  1469. nacl*)
  1470. ;;
  1471. ios)
  1472. ;;
  1473. none)
  1474. ;;
  1475. *-eabi)
  1476. ;;
  1477. *)
  1478. echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
  1479. exit 1
  1480. ;;
  1481. esac
  1482. else
  1483. # Here we handle the default operating systems that come with various machines.
  1484. # The value should be what the vendor currently ships out the door with their
  1485. # machine or put another way, the most popular os provided with the machine.
  1486. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1487. # "-sun"), then you have to tell the case statement up towards the top
  1488. # that MANUFACTURER isn't an operating system. Otherwise, code above
  1489. # will signal an error saying that MANUFACTURER isn't an operating
  1490. # system, and we'll never get to this point.
  1491. case $cpu-$vendor in
  1492. score-*)
  1493. os=elf
  1494. ;;
  1495. spu-*)
  1496. os=elf
  1497. ;;
  1498. *-acorn)
  1499. os=riscix1.2
  1500. ;;
  1501. arm*-rebel)
  1502. os=linux
  1503. ;;
  1504. arm*-semi)
  1505. os=aout
  1506. ;;
  1507. c4x-* | tic4x-*)
  1508. os=coff
  1509. ;;
  1510. c8051-*)
  1511. os=elf
  1512. ;;
  1513. clipper-intergraph)
  1514. os=clix
  1515. ;;
  1516. hexagon-*)
  1517. os=elf
  1518. ;;
  1519. tic54x-*)
  1520. os=coff
  1521. ;;
  1522. tic55x-*)
  1523. os=coff
  1524. ;;
  1525. tic6x-*)
  1526. os=coff
  1527. ;;
  1528. # This must come before the *-dec entry.
  1529. pdp10-*)
  1530. os=tops20
  1531. ;;
  1532. pdp11-*)
  1533. os=none
  1534. ;;
  1535. *-dec | vax-*)
  1536. os=ultrix4.2
  1537. ;;
  1538. m68*-apollo)
  1539. os=domain
  1540. ;;
  1541. i386-sun)
  1542. os=sunos4.0.2
  1543. ;;
  1544. m68000-sun)
  1545. os=sunos3
  1546. ;;
  1547. m68*-cisco)
  1548. os=aout
  1549. ;;
  1550. mep-*)
  1551. os=elf
  1552. ;;
  1553. mips*-cisco)
  1554. os=elf
  1555. ;;
  1556. mips*-*)
  1557. os=elf
  1558. ;;
  1559. or32-*)
  1560. os=coff
  1561. ;;
  1562. *-tti) # must be before sparc entry or we get the wrong os.
  1563. os=sysv3
  1564. ;;
  1565. sparc-* | *-sun)
  1566. os=sunos4.1.1
  1567. ;;
  1568. pru-*)
  1569. os=elf
  1570. ;;
  1571. *-be)
  1572. os=beos
  1573. ;;
  1574. *-ibm)
  1575. os=aix
  1576. ;;
  1577. *-knuth)
  1578. os=mmixware
  1579. ;;
  1580. *-wec)
  1581. os=proelf
  1582. ;;
  1583. *-winbond)
  1584. os=proelf
  1585. ;;
  1586. *-oki)
  1587. os=proelf
  1588. ;;
  1589. *-hp)
  1590. os=hpux
  1591. ;;
  1592. *-hitachi)
  1593. os=hiux
  1594. ;;
  1595. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1596. os=sysv
  1597. ;;
  1598. *-cbm)
  1599. os=amigaos
  1600. ;;
  1601. *-dg)
  1602. os=dgux
  1603. ;;
  1604. *-dolphin)
  1605. os=sysv3
  1606. ;;
  1607. m68k-ccur)
  1608. os=rtu
  1609. ;;
  1610. m88k-omron*)
  1611. os=luna
  1612. ;;
  1613. *-next)
  1614. os=nextstep
  1615. ;;
  1616. *-sequent)
  1617. os=ptx
  1618. ;;
  1619. *-crds)
  1620. os=unos
  1621. ;;
  1622. *-ns)
  1623. os=genix
  1624. ;;
  1625. i370-*)
  1626. os=mvs
  1627. ;;
  1628. *-gould)
  1629. os=sysv
  1630. ;;
  1631. *-highlevel)
  1632. os=bsd
  1633. ;;
  1634. *-encore)
  1635. os=bsd
  1636. ;;
  1637. *-sgi)
  1638. os=irix
  1639. ;;
  1640. *-siemens)
  1641. os=sysv4
  1642. ;;
  1643. *-masscomp)
  1644. os=rtu
  1645. ;;
  1646. f30[01]-fujitsu | f700-fujitsu)
  1647. os=uxpv
  1648. ;;
  1649. *-rom68k)
  1650. os=coff
  1651. ;;
  1652. *-*bug)
  1653. os=coff
  1654. ;;
  1655. *-apple)
  1656. os=macos
  1657. ;;
  1658. *-atari*)
  1659. os=mint
  1660. ;;
  1661. *-wrs)
  1662. os=vxworks
  1663. ;;
  1664. *)
  1665. os=none
  1666. ;;
  1667. esac
  1668. fi
  1669. # Here we handle the case where we know the os, and the CPU type, but not the
  1670. # manufacturer. We pick the logical manufacturer.
  1671. case $vendor in
  1672. unknown)
  1673. case $os in
  1674. riscix*)
  1675. vendor=acorn
  1676. ;;
  1677. sunos*)
  1678. vendor=sun
  1679. ;;
  1680. cnk*|-aix*)
  1681. vendor=ibm
  1682. ;;
  1683. beos*)
  1684. vendor=be
  1685. ;;
  1686. hpux*)
  1687. vendor=hp
  1688. ;;
  1689. mpeix*)
  1690. vendor=hp
  1691. ;;
  1692. hiux*)
  1693. vendor=hitachi
  1694. ;;
  1695. unos*)
  1696. vendor=crds
  1697. ;;
  1698. dgux*)
  1699. vendor=dg
  1700. ;;
  1701. luna*)
  1702. vendor=omron
  1703. ;;
  1704. genix*)
  1705. vendor=ns
  1706. ;;
  1707. clix*)
  1708. vendor=intergraph
  1709. ;;
  1710. mvs* | opened*)
  1711. vendor=ibm
  1712. ;;
  1713. os400*)
  1714. vendor=ibm
  1715. ;;
  1716. ptx*)
  1717. vendor=sequent
  1718. ;;
  1719. tpf*)
  1720. vendor=ibm
  1721. ;;
  1722. vxsim* | vxworks* | windiss*)
  1723. vendor=wrs
  1724. ;;
  1725. aux*)
  1726. vendor=apple
  1727. ;;
  1728. hms*)
  1729. vendor=hitachi
  1730. ;;
  1731. mpw* | macos*)
  1732. vendor=apple
  1733. ;;
  1734. *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
  1735. vendor=atari
  1736. ;;
  1737. vos*)
  1738. vendor=stratus
  1739. ;;
  1740. esac
  1741. ;;
  1742. esac
  1743. echo "$cpu-$vendor-$os"
  1744. exit
  1745. # Local variables:
  1746. # eval: (add-hook 'before-save-hook 'time-stamp)
  1747. # time-stamp-start: "timestamp='"
  1748. # time-stamp-format: "%:y-%02m-%02d"
  1749. # time-stamp-end: "'"
  1750. # End: