config.sub 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809
  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: