autosetup-config.sub 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355
  1. #! /bin/sh
  2. # Configuration validation subroutine script.
  3. # Copyright 1992-2024 Free Software Foundation, Inc.
  4. # shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
  5. timestamp='2024-05-27'
  6. # This file is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. # General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, see <https://www.gnu.org/licenses/>.
  18. #
  19. # As a special exception to the GNU General Public License, if you
  20. # distribute this file as part of a program that contains a
  21. # configuration script generated by Autoconf, you may include it under
  22. # the same distribution terms that you use for the rest of that
  23. # program. This Exception is an additional permission under section 7
  24. # of the GNU General Public License, version 3 ("GPLv3").
  25. # Please send patches to <config-patches@gnu.org>.
  26. #
  27. # Configuration subroutine to validate and canonicalize a configuration type.
  28. # Supply the specified configuration type as an argument.
  29. # If it is invalid, we print an error message on stderr and exit with code 1.
  30. # Otherwise, we print the canonical config type on stdout and succeed.
  31. # You can get the latest version of this script from:
  32. # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
  33. # This file is supposed to be the same for all GNU packages
  34. # and recognize all the CPU types, system types and aliases
  35. # that are meaningful with *any* GNU software.
  36. # Each package is responsible for reporting which valid configurations
  37. # it does not support. The user should be able to distinguish
  38. # a failure to support a valid configuration from a meaningless
  39. # configuration.
  40. # The goal of this file is to map all the various variations of a given
  41. # machine specification into a single specification in the form:
  42. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  43. # or in some cases, the newer four-part form:
  44. # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  45. # It is wrong to echo any other type of specification.
  46. # The "shellcheck disable" line above the timestamp inhibits complaints
  47. # about features and limitations of the classic Bourne shell that were
  48. # superseded or lifted in POSIX. However, this script identifies a wide
  49. # variety of pre-POSIX systems that do not have POSIX shells at all, and
  50. # even some reasonably current systems (Solaris 10 as case-in-point) still
  51. # have a pre-POSIX /bin/sh.
  52. me=`echo "$0" | sed -e 's,.*/,,'`
  53. usage="\
  54. Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
  55. Canonicalize a configuration name.
  56. Options:
  57. -h, --help print this help, then exit
  58. -t, --time-stamp print date of last modification, then exit
  59. -v, --version print version number, then exit
  60. Report bugs and patches to <config-patches@gnu.org>."
  61. version="\
  62. GNU config.sub ($timestamp)
  63. Copyright 1992-2024 Free Software Foundation, Inc.
  64. This is free software; see the source for copying conditions. There is NO
  65. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  66. help="
  67. Try '$me --help' for more information."
  68. # Parse command line
  69. while test $# -gt 0 ; do
  70. case $1 in
  71. --time-stamp | --time* | -t )
  72. echo "$timestamp" ; exit ;;
  73. --version | -v )
  74. echo "$version" ; exit ;;
  75. --help | --h* | -h )
  76. echo "$usage"; exit ;;
  77. -- ) # Stop option processing
  78. shift; break ;;
  79. - ) # Use stdin as input.
  80. break ;;
  81. -* )
  82. echo "$me: invalid option $1$help" >&2
  83. exit 1 ;;
  84. *local*)
  85. # First pass through any local machine types.
  86. echo "$1"
  87. exit ;;
  88. * )
  89. break ;;
  90. esac
  91. done
  92. case $# in
  93. 0) echo "$me: missing argument$help" >&2
  94. exit 1;;
  95. 1) ;;
  96. *) echo "$me: too many arguments$help" >&2
  97. exit 1;;
  98. esac
  99. # Split fields of configuration type
  100. saved_IFS=$IFS
  101. IFS="-" read field1 field2 field3 field4 <<EOF
  102. $1
  103. EOF
  104. IFS=$saved_IFS
  105. # Separate into logical components for further validation
  106. case $1 in
  107. *-*-*-*-*)
  108. echo "Invalid configuration '$1': more than four components" >&2
  109. exit 1
  110. ;;
  111. *-*-*-*)
  112. basic_machine=$field1-$field2
  113. basic_os=$field3-$field4
  114. ;;
  115. *-*-*)
  116. # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
  117. # parts
  118. maybe_os=$field2-$field3
  119. case $maybe_os in
  120. cloudabi*-eabi* \
  121. | kfreebsd*-gnu* \
  122. | knetbsd*-gnu* \
  123. | kopensolaris*-gnu* \
  124. | linux-* \
  125. | managarm-* \
  126. | netbsd*-eabi* \
  127. | netbsd*-gnu* \
  128. | nto-qnx* \
  129. | os2-emx* \
  130. | rtmk-nova* \
  131. | storm-chaos* \
  132. | uclinux-gnu* \
  133. | uclinux-uclibc* \
  134. | windows-* )
  135. basic_machine=$field1
  136. basic_os=$maybe_os
  137. ;;
  138. android-linux)
  139. basic_machine=$field1-unknown
  140. basic_os=linux-android
  141. ;;
  142. *)
  143. basic_machine=$field1-$field2
  144. basic_os=$field3
  145. ;;
  146. esac
  147. ;;
  148. *-*)
  149. case $field1-$field2 in
  150. # Shorthands that happen to contain a single dash
  151. convex-c[12] | convex-c3[248])
  152. basic_machine=$field2-convex
  153. basic_os=
  154. ;;
  155. decstation-3100)
  156. basic_machine=mips-dec
  157. basic_os=
  158. ;;
  159. *-*)
  160. # Second component is usually, but not always the OS
  161. case $field2 in
  162. # Do not treat sunos as a manufacturer
  163. sun*os*)
  164. basic_machine=$field1
  165. basic_os=$field2
  166. ;;
  167. # Manufacturers
  168. 3100* \
  169. | 32* \
  170. | 3300* \
  171. | 3600* \
  172. | 7300* \
  173. | acorn \
  174. | altos* \
  175. | apollo \
  176. | apple \
  177. | atari \
  178. | att* \
  179. | axis \
  180. | be \
  181. | bull \
  182. | cbm \
  183. | ccur \
  184. | cisco \
  185. | commodore \
  186. | convergent* \
  187. | convex* \
  188. | cray \
  189. | crds \
  190. | dec* \
  191. | delta* \
  192. | dg \
  193. | digital \
  194. | dolphin \
  195. | encore* \
  196. | gould \
  197. | harris \
  198. | highlevel \
  199. | hitachi* \
  200. | hp \
  201. | ibm* \
  202. | intergraph \
  203. | isi* \
  204. | knuth \
  205. | masscomp \
  206. | microblaze* \
  207. | mips* \
  208. | motorola* \
  209. | ncr* \
  210. | news \
  211. | next \
  212. | ns \
  213. | oki \
  214. | omron* \
  215. | pc533* \
  216. | rebel \
  217. | rom68k \
  218. | rombug \
  219. | semi \
  220. | sequent* \
  221. | siemens \
  222. | sgi* \
  223. | siemens \
  224. | sim \
  225. | sni \
  226. | sony* \
  227. | stratus \
  228. | sun \
  229. | sun[234]* \
  230. | tektronix \
  231. | tti* \
  232. | ultra \
  233. | unicom* \
  234. | wec \
  235. | winbond \
  236. | wrs)
  237. basic_machine=$field1-$field2
  238. basic_os=
  239. ;;
  240. zephyr*)
  241. basic_machine=$field1-unknown
  242. basic_os=$field2
  243. ;;
  244. *)
  245. basic_machine=$field1
  246. basic_os=$field2
  247. ;;
  248. esac
  249. ;;
  250. esac
  251. ;;
  252. *)
  253. # Convert single-component short-hands not valid as part of
  254. # multi-component configurations.
  255. case $field1 in
  256. 386bsd)
  257. basic_machine=i386-pc
  258. basic_os=bsd
  259. ;;
  260. a29khif)
  261. basic_machine=a29k-amd
  262. basic_os=udi
  263. ;;
  264. adobe68k)
  265. basic_machine=m68010-adobe
  266. basic_os=scout
  267. ;;
  268. alliant)
  269. basic_machine=fx80-alliant
  270. basic_os=
  271. ;;
  272. altos | altos3068)
  273. basic_machine=m68k-altos
  274. basic_os=
  275. ;;
  276. am29k)
  277. basic_machine=a29k-none
  278. basic_os=bsd
  279. ;;
  280. amdahl)
  281. basic_machine=580-amdahl
  282. basic_os=sysv
  283. ;;
  284. amiga)
  285. basic_machine=m68k-unknown
  286. basic_os=
  287. ;;
  288. amigaos | amigados)
  289. basic_machine=m68k-unknown
  290. basic_os=amigaos
  291. ;;
  292. amigaunix | amix)
  293. basic_machine=m68k-unknown
  294. basic_os=sysv4
  295. ;;
  296. apollo68)
  297. basic_machine=m68k-apollo
  298. basic_os=sysv
  299. ;;
  300. apollo68bsd)
  301. basic_machine=m68k-apollo
  302. basic_os=bsd
  303. ;;
  304. aros)
  305. basic_machine=i386-pc
  306. basic_os=aros
  307. ;;
  308. aux)
  309. basic_machine=m68k-apple
  310. basic_os=aux
  311. ;;
  312. balance)
  313. basic_machine=ns32k-sequent
  314. basic_os=dynix
  315. ;;
  316. blackfin)
  317. basic_machine=bfin-unknown
  318. basic_os=linux
  319. ;;
  320. cegcc)
  321. basic_machine=arm-unknown
  322. basic_os=cegcc
  323. ;;
  324. cray)
  325. basic_machine=j90-cray
  326. basic_os=unicos
  327. ;;
  328. crds | unos)
  329. basic_machine=m68k-crds
  330. basic_os=
  331. ;;
  332. da30)
  333. basic_machine=m68k-da30
  334. basic_os=
  335. ;;
  336. decstation | pmax | pmin | dec3100 | decstatn)
  337. basic_machine=mips-dec
  338. basic_os=
  339. ;;
  340. delta88)
  341. basic_machine=m88k-motorola
  342. basic_os=sysv3
  343. ;;
  344. dicos)
  345. basic_machine=i686-pc
  346. basic_os=dicos
  347. ;;
  348. djgpp)
  349. basic_machine=i586-pc
  350. basic_os=msdosdjgpp
  351. ;;
  352. ebmon29k)
  353. basic_machine=a29k-amd
  354. basic_os=ebmon
  355. ;;
  356. es1800 | OSE68k | ose68k | ose | OSE)
  357. basic_machine=m68k-ericsson
  358. basic_os=ose
  359. ;;
  360. gmicro)
  361. basic_machine=tron-gmicro
  362. basic_os=sysv
  363. ;;
  364. go32)
  365. basic_machine=i386-pc
  366. basic_os=go32
  367. ;;
  368. h8300hms)
  369. basic_machine=h8300-hitachi
  370. basic_os=hms
  371. ;;
  372. h8300xray)
  373. basic_machine=h8300-hitachi
  374. basic_os=xray
  375. ;;
  376. h8500hms)
  377. basic_machine=h8500-hitachi
  378. basic_os=hms
  379. ;;
  380. harris)
  381. basic_machine=m88k-harris
  382. basic_os=sysv3
  383. ;;
  384. hp300 | hp300hpux)
  385. basic_machine=m68k-hp
  386. basic_os=hpux
  387. ;;
  388. hp300bsd)
  389. basic_machine=m68k-hp
  390. basic_os=bsd
  391. ;;
  392. hppaosf)
  393. basic_machine=hppa1.1-hp
  394. basic_os=osf
  395. ;;
  396. hppro)
  397. basic_machine=hppa1.1-hp
  398. basic_os=proelf
  399. ;;
  400. i386mach)
  401. basic_machine=i386-mach
  402. basic_os=mach
  403. ;;
  404. isi68 | isi)
  405. basic_machine=m68k-isi
  406. basic_os=sysv
  407. ;;
  408. m68knommu)
  409. basic_machine=m68k-unknown
  410. basic_os=linux
  411. ;;
  412. magnum | m3230)
  413. basic_machine=mips-mips
  414. basic_os=sysv
  415. ;;
  416. merlin)
  417. basic_machine=ns32k-utek
  418. basic_os=sysv
  419. ;;
  420. mingw64)
  421. basic_machine=x86_64-pc
  422. basic_os=mingw64
  423. ;;
  424. mingw32)
  425. basic_machine=i686-pc
  426. basic_os=mingw32
  427. ;;
  428. mingw32ce)
  429. basic_machine=arm-unknown
  430. basic_os=mingw32ce
  431. ;;
  432. monitor)
  433. basic_machine=m68k-rom68k
  434. basic_os=coff
  435. ;;
  436. morphos)
  437. basic_machine=powerpc-unknown
  438. basic_os=morphos
  439. ;;
  440. moxiebox)
  441. basic_machine=moxie-unknown
  442. basic_os=moxiebox
  443. ;;
  444. msdos)
  445. basic_machine=i386-pc
  446. basic_os=msdos
  447. ;;
  448. msys)
  449. basic_machine=i686-pc
  450. basic_os=msys
  451. ;;
  452. mvs)
  453. basic_machine=i370-ibm
  454. basic_os=mvs
  455. ;;
  456. nacl)
  457. basic_machine=le32-unknown
  458. basic_os=nacl
  459. ;;
  460. ncr3000)
  461. basic_machine=i486-ncr
  462. basic_os=sysv4
  463. ;;
  464. netbsd386)
  465. basic_machine=i386-pc
  466. basic_os=netbsd
  467. ;;
  468. netwinder)
  469. basic_machine=armv4l-rebel
  470. basic_os=linux
  471. ;;
  472. news | news700 | news800 | news900)
  473. basic_machine=m68k-sony
  474. basic_os=newsos
  475. ;;
  476. news1000)
  477. basic_machine=m68030-sony
  478. basic_os=newsos
  479. ;;
  480. necv70)
  481. basic_machine=v70-nec
  482. basic_os=sysv
  483. ;;
  484. nh3000)
  485. basic_machine=m68k-harris
  486. basic_os=cxux
  487. ;;
  488. nh[45]000)
  489. basic_machine=m88k-harris
  490. basic_os=cxux
  491. ;;
  492. nindy960)
  493. basic_machine=i960-intel
  494. basic_os=nindy
  495. ;;
  496. mon960)
  497. basic_machine=i960-intel
  498. basic_os=mon960
  499. ;;
  500. nonstopux)
  501. basic_machine=mips-compaq
  502. basic_os=nonstopux
  503. ;;
  504. os400)
  505. basic_machine=powerpc-ibm
  506. basic_os=os400
  507. ;;
  508. OSE68000 | ose68000)
  509. basic_machine=m68000-ericsson
  510. basic_os=ose
  511. ;;
  512. os68k)
  513. basic_machine=m68k-none
  514. basic_os=os68k
  515. ;;
  516. paragon)
  517. basic_machine=i860-intel
  518. basic_os=osf
  519. ;;
  520. parisc)
  521. basic_machine=hppa-unknown
  522. basic_os=linux
  523. ;;
  524. psp)
  525. basic_machine=mipsallegrexel-sony
  526. basic_os=psp
  527. ;;
  528. pw32)
  529. basic_machine=i586-unknown
  530. basic_os=pw32
  531. ;;
  532. rdos | rdos64)
  533. basic_machine=x86_64-pc
  534. basic_os=rdos
  535. ;;
  536. rdos32)
  537. basic_machine=i386-pc
  538. basic_os=rdos
  539. ;;
  540. rom68k)
  541. basic_machine=m68k-rom68k
  542. basic_os=coff
  543. ;;
  544. sa29200)
  545. basic_machine=a29k-amd
  546. basic_os=udi
  547. ;;
  548. sei)
  549. basic_machine=mips-sei
  550. basic_os=seiux
  551. ;;
  552. sequent)
  553. basic_machine=i386-sequent
  554. basic_os=
  555. ;;
  556. sps7)
  557. basic_machine=m68k-bull
  558. basic_os=sysv2
  559. ;;
  560. st2000)
  561. basic_machine=m68k-tandem
  562. basic_os=
  563. ;;
  564. stratus)
  565. basic_machine=i860-stratus
  566. basic_os=sysv4
  567. ;;
  568. sun2)
  569. basic_machine=m68000-sun
  570. basic_os=
  571. ;;
  572. sun2os3)
  573. basic_machine=m68000-sun
  574. basic_os=sunos3
  575. ;;
  576. sun2os4)
  577. basic_machine=m68000-sun
  578. basic_os=sunos4
  579. ;;
  580. sun3)
  581. basic_machine=m68k-sun
  582. basic_os=
  583. ;;
  584. sun3os3)
  585. basic_machine=m68k-sun
  586. basic_os=sunos3
  587. ;;
  588. sun3os4)
  589. basic_machine=m68k-sun
  590. basic_os=sunos4
  591. ;;
  592. sun4)
  593. basic_machine=sparc-sun
  594. basic_os=
  595. ;;
  596. sun4os3)
  597. basic_machine=sparc-sun
  598. basic_os=sunos3
  599. ;;
  600. sun4os4)
  601. basic_machine=sparc-sun
  602. basic_os=sunos4
  603. ;;
  604. sun4sol2)
  605. basic_machine=sparc-sun
  606. basic_os=solaris2
  607. ;;
  608. sun386 | sun386i | roadrunner)
  609. basic_machine=i386-sun
  610. basic_os=
  611. ;;
  612. sv1)
  613. basic_machine=sv1-cray
  614. basic_os=unicos
  615. ;;
  616. symmetry)
  617. basic_machine=i386-sequent
  618. basic_os=dynix
  619. ;;
  620. t3e)
  621. basic_machine=alphaev5-cray
  622. basic_os=unicos
  623. ;;
  624. t90)
  625. basic_machine=t90-cray
  626. basic_os=unicos
  627. ;;
  628. toad1)
  629. basic_machine=pdp10-xkl
  630. basic_os=tops20
  631. ;;
  632. tpf)
  633. basic_machine=s390x-ibm
  634. basic_os=tpf
  635. ;;
  636. udi29k)
  637. basic_machine=a29k-amd
  638. basic_os=udi
  639. ;;
  640. ultra3)
  641. basic_machine=a29k-nyu
  642. basic_os=sym1
  643. ;;
  644. v810 | necv810)
  645. basic_machine=v810-nec
  646. basic_os=none
  647. ;;
  648. vaxv)
  649. basic_machine=vax-dec
  650. basic_os=sysv
  651. ;;
  652. vms)
  653. basic_machine=vax-dec
  654. basic_os=vms
  655. ;;
  656. vsta)
  657. basic_machine=i386-pc
  658. basic_os=vsta
  659. ;;
  660. vxworks960)
  661. basic_machine=i960-wrs
  662. basic_os=vxworks
  663. ;;
  664. vxworks68)
  665. basic_machine=m68k-wrs
  666. basic_os=vxworks
  667. ;;
  668. vxworks29k)
  669. basic_machine=a29k-wrs
  670. basic_os=vxworks
  671. ;;
  672. xbox)
  673. basic_machine=i686-pc
  674. basic_os=mingw32
  675. ;;
  676. ymp)
  677. basic_machine=ymp-cray
  678. basic_os=unicos
  679. ;;
  680. *)
  681. basic_machine=$1
  682. basic_os=
  683. ;;
  684. esac
  685. ;;
  686. esac
  687. # Decode 1-component or ad-hoc basic machines
  688. case $basic_machine in
  689. # Here we handle the default manufacturer of certain CPU types. It is in
  690. # some cases the only manufacturer, in others, it is the most popular.
  691. w89k)
  692. cpu=hppa1.1
  693. vendor=winbond
  694. ;;
  695. op50n)
  696. cpu=hppa1.1
  697. vendor=oki
  698. ;;
  699. op60c)
  700. cpu=hppa1.1
  701. vendor=oki
  702. ;;
  703. ibm*)
  704. cpu=i370
  705. vendor=ibm
  706. ;;
  707. orion105)
  708. cpu=clipper
  709. vendor=highlevel
  710. ;;
  711. mac | mpw | mac-mpw)
  712. cpu=m68k
  713. vendor=apple
  714. ;;
  715. pmac | pmac-mpw)
  716. cpu=powerpc
  717. vendor=apple
  718. ;;
  719. # Recognize the various machine names and aliases which stand
  720. # for a CPU type and a company and sometimes even an OS.
  721. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  722. cpu=m68000
  723. vendor=att
  724. ;;
  725. 3b*)
  726. cpu=we32k
  727. vendor=att
  728. ;;
  729. bluegene*)
  730. cpu=powerpc
  731. vendor=ibm
  732. basic_os=cnk
  733. ;;
  734. decsystem10* | dec10*)
  735. cpu=pdp10
  736. vendor=dec
  737. basic_os=tops10
  738. ;;
  739. decsystem20* | dec20*)
  740. cpu=pdp10
  741. vendor=dec
  742. basic_os=tops20
  743. ;;
  744. delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300)
  745. cpu=m68k
  746. vendor=motorola
  747. ;;
  748. # This used to be dpx2*, but that gets the RS6000-based
  749. # DPX/20 and the x86-based DPX/2-100 wrong. See
  750. # https://oldskool.silicium.org/stations/bull_dpx20.htm
  751. # https://www.feb-patrimoine.com/english/bull_dpx2.htm
  752. # https://www.feb-patrimoine.com/english/unix_and_bull.htm
  753. dpx2 | dpx2[23]00 | dpx2[23]xx)
  754. cpu=m68k
  755. vendor=bull
  756. ;;
  757. dpx2100 | dpx21xx)
  758. cpu=i386
  759. vendor=bull
  760. ;;
  761. dpx20)
  762. cpu=rs6000
  763. vendor=bull
  764. ;;
  765. encore | umax | mmax)
  766. cpu=ns32k
  767. vendor=encore
  768. ;;
  769. elxsi)
  770. cpu=elxsi
  771. vendor=elxsi
  772. basic_os=${basic_os:-bsd}
  773. ;;
  774. fx2800)
  775. cpu=i860
  776. vendor=alliant
  777. ;;
  778. genix)
  779. cpu=ns32k
  780. vendor=ns
  781. ;;
  782. h3050r* | hiux*)
  783. cpu=hppa1.1
  784. vendor=hitachi
  785. basic_os=hiuxwe2
  786. ;;
  787. hp3k9[0-9][0-9] | hp9[0-9][0-9])
  788. cpu=hppa1.0
  789. vendor=hp
  790. ;;
  791. hp9k2[0-9][0-9] | hp9k31[0-9])
  792. cpu=m68000
  793. vendor=hp
  794. ;;
  795. hp9k3[2-9][0-9])
  796. cpu=m68k
  797. vendor=hp
  798. ;;
  799. hp9k6[0-9][0-9] | hp6[0-9][0-9])
  800. cpu=hppa1.0
  801. vendor=hp
  802. ;;
  803. hp9k7[0-79][0-9] | hp7[0-79][0-9])
  804. cpu=hppa1.1
  805. vendor=hp
  806. ;;
  807. hp9k78[0-9] | hp78[0-9])
  808. # FIXME: really hppa2.0-hp
  809. cpu=hppa1.1
  810. vendor=hp
  811. ;;
  812. hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  813. # FIXME: really hppa2.0-hp
  814. cpu=hppa1.1
  815. vendor=hp
  816. ;;
  817. hp9k8[0-9][13679] | hp8[0-9][13679])
  818. cpu=hppa1.1
  819. vendor=hp
  820. ;;
  821. hp9k8[0-9][0-9] | hp8[0-9][0-9])
  822. cpu=hppa1.0
  823. vendor=hp
  824. ;;
  825. i*86v32)
  826. cpu=`echo "$1" | sed -e 's/86.*/86/'`
  827. vendor=pc
  828. basic_os=sysv32
  829. ;;
  830. i*86v4*)
  831. cpu=`echo "$1" | sed -e 's/86.*/86/'`
  832. vendor=pc
  833. basic_os=sysv4
  834. ;;
  835. i*86v)
  836. cpu=`echo "$1" | sed -e 's/86.*/86/'`
  837. vendor=pc
  838. basic_os=sysv
  839. ;;
  840. i*86sol2)
  841. cpu=`echo "$1" | sed -e 's/86.*/86/'`
  842. vendor=pc
  843. basic_os=solaris2
  844. ;;
  845. j90 | j90-cray)
  846. cpu=j90
  847. vendor=cray
  848. basic_os=${basic_os:-unicos}
  849. ;;
  850. iris | iris4d)
  851. cpu=mips
  852. vendor=sgi
  853. case $basic_os in
  854. irix*)
  855. ;;
  856. *)
  857. basic_os=irix4
  858. ;;
  859. esac
  860. ;;
  861. miniframe)
  862. cpu=m68000
  863. vendor=convergent
  864. ;;
  865. *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
  866. cpu=m68k
  867. vendor=atari
  868. basic_os=mint
  869. ;;
  870. news-3600 | risc-news)
  871. cpu=mips
  872. vendor=sony
  873. basic_os=newsos
  874. ;;
  875. next | m*-next)
  876. cpu=m68k
  877. vendor=next
  878. ;;
  879. np1)
  880. cpu=np1
  881. vendor=gould
  882. ;;
  883. op50n-* | op60c-*)
  884. cpu=hppa1.1
  885. vendor=oki
  886. basic_os=proelf
  887. ;;
  888. pa-hitachi)
  889. cpu=hppa1.1
  890. vendor=hitachi
  891. basic_os=hiuxwe2
  892. ;;
  893. pbd)
  894. cpu=sparc
  895. vendor=tti
  896. ;;
  897. pbb)
  898. cpu=m68k
  899. vendor=tti
  900. ;;
  901. pc532)
  902. cpu=ns32k
  903. vendor=pc532
  904. ;;
  905. pn)
  906. cpu=pn
  907. vendor=gould
  908. ;;
  909. power)
  910. cpu=power
  911. vendor=ibm
  912. ;;
  913. ps2)
  914. cpu=i386
  915. vendor=ibm
  916. ;;
  917. rm[46]00)
  918. cpu=mips
  919. vendor=siemens
  920. ;;
  921. rtpc | rtpc-*)
  922. cpu=romp
  923. vendor=ibm
  924. ;;
  925. sde)
  926. cpu=mipsisa32
  927. vendor=sde
  928. basic_os=${basic_os:-elf}
  929. ;;
  930. simso-wrs)
  931. cpu=sparclite
  932. vendor=wrs
  933. basic_os=vxworks
  934. ;;
  935. tower | tower-32)
  936. cpu=m68k
  937. vendor=ncr
  938. ;;
  939. vpp*|vx|vx-*)
  940. cpu=f301
  941. vendor=fujitsu
  942. ;;
  943. w65)
  944. cpu=w65
  945. vendor=wdc
  946. ;;
  947. w89k-*)
  948. cpu=hppa1.1
  949. vendor=winbond
  950. basic_os=proelf
  951. ;;
  952. none)
  953. cpu=none
  954. vendor=none
  955. ;;
  956. leon|leon[3-9])
  957. cpu=sparc
  958. vendor=$basic_machine
  959. ;;
  960. leon-*|leon[3-9]-*)
  961. cpu=sparc
  962. vendor=`echo "$basic_machine" | sed 's/-.*//'`
  963. ;;
  964. *-*)
  965. saved_IFS=$IFS
  966. IFS="-" read cpu vendor <<EOF
  967. $basic_machine
  968. EOF
  969. IFS=$saved_IFS
  970. ;;
  971. # We use 'pc' rather than 'unknown'
  972. # because (1) that's what they normally are, and
  973. # (2) the word "unknown" tends to confuse beginning users.
  974. i*86 | x86_64)
  975. cpu=$basic_machine
  976. vendor=pc
  977. ;;
  978. # These rules are duplicated from below for sake of the special case above;
  979. # i.e. things that normalized to x86 arches should also default to "pc"
  980. pc98)
  981. cpu=i386
  982. vendor=pc
  983. ;;
  984. x64 | amd64)
  985. cpu=x86_64
  986. vendor=pc
  987. ;;
  988. # Recognize the basic CPU types without company name.
  989. *)
  990. cpu=$basic_machine
  991. vendor=unknown
  992. ;;
  993. esac
  994. unset -v basic_machine
  995. # Decode basic machines in the full and proper CPU-Company form.
  996. case $cpu-$vendor in
  997. # Here we handle the default manufacturer of certain CPU types in canonical form.
  998. # It is in some cases the only manufacturer, in others, it is the most popular.
  999. c[12]-convex | c[12]-unknown | c3[248]-convex | c3[248]-unknown)
  1000. vendor=convex
  1001. basic_os=${basic_os:-bsd}
  1002. ;;
  1003. craynv-unknown)
  1004. vendor=cray
  1005. basic_os=${basic_os:-unicosmp}
  1006. ;;
  1007. c90-unknown | c90-cray)
  1008. vendor=cray
  1009. basic_os=${basic_os:-unicos}
  1010. ;;
  1011. fx80-unknown)
  1012. vendor=alliant
  1013. ;;
  1014. romp-unknown)
  1015. vendor=ibm
  1016. ;;
  1017. mmix-unknown)
  1018. vendor=knuth
  1019. ;;
  1020. microblaze-unknown | microblazeel-unknown)
  1021. vendor=xilinx
  1022. ;;
  1023. rs6000-unknown)
  1024. vendor=ibm
  1025. ;;
  1026. vax-unknown)
  1027. vendor=dec
  1028. ;;
  1029. pdp11-unknown)
  1030. vendor=dec
  1031. ;;
  1032. we32k-unknown)
  1033. vendor=att
  1034. ;;
  1035. cydra-unknown)
  1036. vendor=cydrome
  1037. ;;
  1038. i370-ibm*)
  1039. vendor=ibm
  1040. ;;
  1041. orion-unknown)
  1042. vendor=highlevel
  1043. ;;
  1044. xps-unknown | xps100-unknown)
  1045. cpu=xps100
  1046. vendor=honeywell
  1047. ;;
  1048. # Here we normalize CPU types with a missing or matching vendor
  1049. armh-unknown | armh-alt)
  1050. cpu=armv7l
  1051. vendor=alt
  1052. basic_os=${basic_os:-linux-gnueabihf}
  1053. ;;
  1054. # Normalized CPU+vendor pairs that imply an OS, if not otherwise specified
  1055. m68k-isi)
  1056. basic_os=${basic_os:-sysv}
  1057. ;;
  1058. m68k-sony)
  1059. basic_os=${basic_os:-newsos}
  1060. ;;
  1061. m68k-tektronix)
  1062. basic_os=${basic_os:-bsd}
  1063. ;;
  1064. m88k-harris)
  1065. basic_os=${basic_os:-sysv3}
  1066. ;;
  1067. i386-bull | m68k-bull)
  1068. basic_os=${basic_os:-sysv3}
  1069. ;;
  1070. rs6000-bull)
  1071. basic_os=${basic_os:-bosx}
  1072. ;;
  1073. mips-sni)
  1074. basic_os=${basic_os:-sysv4}
  1075. ;;
  1076. # Here we normalize CPU types irrespective of the vendor
  1077. amd64-*)
  1078. cpu=x86_64
  1079. ;;
  1080. blackfin-*)
  1081. cpu=bfin
  1082. basic_os=${basic_os:-linux}
  1083. ;;
  1084. c54x-*)
  1085. cpu=tic54x
  1086. ;;
  1087. c55x-*)
  1088. cpu=tic55x
  1089. ;;
  1090. c6x-*)
  1091. cpu=tic6x
  1092. ;;
  1093. e500v[12]-*)
  1094. cpu=powerpc
  1095. basic_os=${basic_os}"spe"
  1096. ;;
  1097. mips3*-*)
  1098. cpu=mips64
  1099. ;;
  1100. ms1-*)
  1101. cpu=mt
  1102. ;;
  1103. m68knommu-*)
  1104. cpu=m68k
  1105. basic_os=${basic_os:-linux}
  1106. ;;
  1107. m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
  1108. cpu=s12z
  1109. ;;
  1110. openrisc-*)
  1111. cpu=or32
  1112. ;;
  1113. parisc-*)
  1114. cpu=hppa
  1115. basic_os=${basic_os:-linux}
  1116. ;;
  1117. pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
  1118. cpu=i586
  1119. ;;
  1120. pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
  1121. cpu=i686
  1122. ;;
  1123. pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
  1124. cpu=i686
  1125. ;;
  1126. pentium4-*)
  1127. cpu=i786
  1128. ;;
  1129. ppc-* | ppcbe-*)
  1130. cpu=powerpc
  1131. ;;
  1132. ppcle-* | powerpclittle-*)
  1133. cpu=powerpcle
  1134. ;;
  1135. ppc64-*)
  1136. cpu=powerpc64
  1137. ;;
  1138. ppc64le-* | powerpc64little-*)
  1139. cpu=powerpc64le
  1140. ;;
  1141. sb1-*)
  1142. cpu=mipsisa64sb1
  1143. ;;
  1144. sb1el-*)
  1145. cpu=mipsisa64sb1el
  1146. ;;
  1147. sh5e[lb]-*)
  1148. cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
  1149. ;;
  1150. spur-*)
  1151. cpu=spur
  1152. ;;
  1153. strongarm-* | thumb-*)
  1154. cpu=arm
  1155. ;;
  1156. tx39-*)
  1157. cpu=mipstx39
  1158. ;;
  1159. tx39el-*)
  1160. cpu=mipstx39el
  1161. ;;
  1162. xscale-* | xscalee[bl]-*)
  1163. cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
  1164. ;;
  1165. arm64-* | aarch64le-*)
  1166. cpu=aarch64
  1167. ;;
  1168. # Recognize the canonical CPU Types that limit and/or modify the
  1169. # company names they are paired with.
  1170. cr16-*)
  1171. basic_os=${basic_os:-elf}
  1172. ;;
  1173. crisv32-* | etraxfs*-*)
  1174. cpu=crisv32
  1175. vendor=axis
  1176. ;;
  1177. cris-* | etrax*-*)
  1178. cpu=cris
  1179. vendor=axis
  1180. ;;
  1181. crx-*)
  1182. basic_os=${basic_os:-elf}
  1183. ;;
  1184. neo-tandem)
  1185. cpu=neo
  1186. vendor=tandem
  1187. ;;
  1188. nse-tandem)
  1189. cpu=nse
  1190. vendor=tandem
  1191. ;;
  1192. nsr-tandem)
  1193. cpu=nsr
  1194. vendor=tandem
  1195. ;;
  1196. nsv-tandem)
  1197. cpu=nsv
  1198. vendor=tandem
  1199. ;;
  1200. nsx-tandem)
  1201. cpu=nsx
  1202. vendor=tandem
  1203. ;;
  1204. mipsallegrexel-sony)
  1205. cpu=mipsallegrexel
  1206. vendor=sony
  1207. ;;
  1208. tile*-*)
  1209. basic_os=${basic_os:-linux-gnu}
  1210. ;;
  1211. *)
  1212. # Recognize the canonical CPU types that are allowed with any
  1213. # company name.
  1214. case $cpu in
  1215. 1750a \
  1216. | 580 \
  1217. | [cjt]90 \
  1218. | a29k \
  1219. | aarch64 \
  1220. | aarch64_be \
  1221. | aarch64c \
  1222. | abacus \
  1223. | alpha \
  1224. | alpha64 \
  1225. | alpha64ev56 \
  1226. | alpha64ev6[78] \
  1227. | alpha64ev[4-8] \
  1228. | alpha64pca5[67] \
  1229. | alphaev56 \
  1230. | alphaev6[78] \
  1231. | alphaev[4-8] \
  1232. | alphapca5[67] \
  1233. | am33_2.0 \
  1234. | amdgcn \
  1235. | arc \
  1236. | arc32 \
  1237. | arc64 \
  1238. | arceb \
  1239. | arm \
  1240. | arm64e \
  1241. | arm64ec \
  1242. | arm[lb]e \
  1243. | arme[lb] \
  1244. | armv* \
  1245. | asmjs \
  1246. | avr \
  1247. | avr32 \
  1248. | ba \
  1249. | be32 \
  1250. | be64 \
  1251. | bfin \
  1252. | bpf \
  1253. | bs2000 \
  1254. | c30 \
  1255. | c4x \
  1256. | c8051 \
  1257. | c[123]* \
  1258. | clipper \
  1259. | craynv \
  1260. | csky \
  1261. | cydra \
  1262. | d10v \
  1263. | d30v \
  1264. | dlx \
  1265. | dsp16xx \
  1266. | e2k \
  1267. | elxsi \
  1268. | epiphany \
  1269. | f30[01] \
  1270. | f700 \
  1271. | fido \
  1272. | fr30 \
  1273. | frv \
  1274. | ft32 \
  1275. | fx80 \
  1276. | h8300 \
  1277. | h8500 \
  1278. | hexagon \
  1279. | hppa \
  1280. | hppa1.[01] \
  1281. | hppa2.0 \
  1282. | hppa2.0[nw] \
  1283. | hppa64 \
  1284. | i*86 \
  1285. | i370 \
  1286. | i860 \
  1287. | i960 \
  1288. | ia16 \
  1289. | ia64 \
  1290. | ip2k \
  1291. | iq2000 \
  1292. | javascript \
  1293. | k1om \
  1294. | kvx \
  1295. | le32 \
  1296. | le64 \
  1297. | lm32 \
  1298. | loongarch32 \
  1299. | loongarch64 \
  1300. | m32c \
  1301. | m32r \
  1302. | m32rle \
  1303. | m5200 \
  1304. | m68000 \
  1305. | m680[012346]0 \
  1306. | m6811 \
  1307. | m6812 \
  1308. | m68360 \
  1309. | m683?2 \
  1310. | m68hc11 \
  1311. | m68hc12 \
  1312. | m68hcs12x \
  1313. | m68k \
  1314. | m88110 \
  1315. | m88k \
  1316. | maxq \
  1317. | mb \
  1318. | mcore \
  1319. | mep \
  1320. | metag \
  1321. | microblaze \
  1322. | microblazeel \
  1323. | mips* \
  1324. | mmix \
  1325. | mn10200 \
  1326. | mn10300 \
  1327. | moxie \
  1328. | msp430 \
  1329. | mt \
  1330. | nanomips* \
  1331. | nds32 \
  1332. | nds32be \
  1333. | nds32le \
  1334. | nfp \
  1335. | nios \
  1336. | nios2 \
  1337. | nios2eb \
  1338. | nios2el \
  1339. | none \
  1340. | np1 \
  1341. | ns16k \
  1342. | ns32k \
  1343. | nvptx \
  1344. | open8 \
  1345. | or1k* \
  1346. | or32 \
  1347. | orion \
  1348. | pdp10 \
  1349. | pdp11 \
  1350. | picochip \
  1351. | pj \
  1352. | pjl \
  1353. | pn \
  1354. | power \
  1355. | powerpc \
  1356. | powerpc64 \
  1357. | powerpc64le \
  1358. | powerpcle \
  1359. | powerpcspe \
  1360. | pru \
  1361. | pyramid \
  1362. | riscv \
  1363. | riscv32 \
  1364. | riscv32be \
  1365. | riscv64 \
  1366. | riscv64be \
  1367. | rl78 \
  1368. | romp \
  1369. | rs6000 \
  1370. | rx \
  1371. | s390 \
  1372. | s390x \
  1373. | score \
  1374. | sh \
  1375. | sh64 \
  1376. | sh64le \
  1377. | sh[12345][lb]e \
  1378. | sh[1234] \
  1379. | sh[1234]e[lb] \
  1380. | sh[23]e \
  1381. | sh[23]ele \
  1382. | sh[24]a \
  1383. | sh[24]ae[lb] \
  1384. | sh[lb]e \
  1385. | she[lb] \
  1386. | shl \
  1387. | sparc \
  1388. | sparc64 \
  1389. | sparc64b \
  1390. | sparc64v \
  1391. | sparc86x \
  1392. | sparclet \
  1393. | sparclite \
  1394. | sparcv8 \
  1395. | sparcv9 \
  1396. | sparcv9b \
  1397. | sparcv9v \
  1398. | spu \
  1399. | sv1 \
  1400. | sx* \
  1401. | tahoe \
  1402. | thumbv7* \
  1403. | tic30 \
  1404. | tic4x \
  1405. | tic54x \
  1406. | tic55x \
  1407. | tic6x \
  1408. | tic80 \
  1409. | tron \
  1410. | ubicom32 \
  1411. | v70 \
  1412. | v810 \
  1413. | v850 \
  1414. | v850e \
  1415. | v850e1 \
  1416. | v850e2 \
  1417. | v850e2v3 \
  1418. | v850es \
  1419. | vax \
  1420. | vc4 \
  1421. | visium \
  1422. | w65 \
  1423. | wasm32 \
  1424. | wasm64 \
  1425. | we32k \
  1426. | x86 \
  1427. | x86_64 \
  1428. | xc16x \
  1429. | xgate \
  1430. | xps100 \
  1431. | xstormy16 \
  1432. | xtensa* \
  1433. | ymp \
  1434. | z80 \
  1435. | z8k)
  1436. ;;
  1437. *)
  1438. echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
  1439. exit 1
  1440. ;;
  1441. esac
  1442. ;;
  1443. esac
  1444. # Here we canonicalize certain aliases for manufacturers.
  1445. case $vendor in
  1446. digital*)
  1447. vendor=dec
  1448. ;;
  1449. commodore*)
  1450. vendor=cbm
  1451. ;;
  1452. *)
  1453. ;;
  1454. esac
  1455. # Decode manufacturer-specific aliases for certain operating systems.
  1456. if test x"$basic_os" != x
  1457. then
  1458. # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
  1459. # set os.
  1460. obj=
  1461. case $basic_os in
  1462. gnu/linux*)
  1463. kernel=linux
  1464. os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
  1465. ;;
  1466. os2-emx)
  1467. kernel=os2
  1468. os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
  1469. ;;
  1470. nto-qnx*)
  1471. kernel=nto
  1472. os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
  1473. ;;
  1474. *-*)
  1475. saved_IFS=$IFS
  1476. IFS="-" read kernel os <<EOF
  1477. $basic_os
  1478. EOF
  1479. IFS=$saved_IFS
  1480. ;;
  1481. # Default OS when just kernel was specified
  1482. nto*)
  1483. kernel=nto
  1484. os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
  1485. ;;
  1486. linux*)
  1487. kernel=linux
  1488. os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
  1489. ;;
  1490. managarm*)
  1491. kernel=managarm
  1492. os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
  1493. ;;
  1494. *)
  1495. kernel=
  1496. os=$basic_os
  1497. ;;
  1498. esac
  1499. # Now, normalize the OS (knowing we just have one component, it's not a kernel,
  1500. # etc.)
  1501. case $os in
  1502. # First match some system type aliases that might get confused
  1503. # with valid system types.
  1504. # solaris* is a basic system type, with this one exception.
  1505. auroraux)
  1506. os=auroraux
  1507. ;;
  1508. bluegene*)
  1509. os=cnk
  1510. ;;
  1511. solaris1 | solaris1.*)
  1512. os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
  1513. ;;
  1514. solaris)
  1515. os=solaris2
  1516. ;;
  1517. unixware*)
  1518. os=sysv4.2uw
  1519. ;;
  1520. # The marketing names for NeXT's operating systems were
  1521. # NeXTSTEP, NeXTSTEP 2, OpenSTEP 3, OpenSTEP 4. 'openstep' is
  1522. # mapped to 'openstep3', but 'openstep1' and 'openstep2' are
  1523. # mapped to 'nextstep' and 'nextstep2', consistent with the
  1524. # treatment of SunOS/Solaris.
  1525. ns | ns1 | nextstep | nextstep1 | openstep1)
  1526. os=nextstep
  1527. ;;
  1528. ns2 | nextstep2 | openstep2)
  1529. os=nextstep2
  1530. ;;
  1531. ns3 | nextstep3 | openstep | openstep3)
  1532. os=openstep3
  1533. ;;
  1534. ns4 | nextstep4 | openstep4)
  1535. os=openstep4
  1536. ;;
  1537. # es1800 is here to avoid being matched by es* (a different OS)
  1538. es1800*)
  1539. os=ose
  1540. ;;
  1541. # Some version numbers need modification
  1542. chorusos*)
  1543. os=chorusos
  1544. ;;
  1545. isc)
  1546. os=isc2.2
  1547. ;;
  1548. sco6)
  1549. os=sco5v6
  1550. ;;
  1551. sco5)
  1552. os=sco3.2v5
  1553. ;;
  1554. sco4)
  1555. os=sco3.2v4
  1556. ;;
  1557. sco3.2.[4-9]*)
  1558. os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
  1559. ;;
  1560. sco*v* | scout)
  1561. # Don't match below
  1562. ;;
  1563. sco*)
  1564. os=sco3.2v2
  1565. ;;
  1566. psos*)
  1567. os=psos
  1568. ;;
  1569. qnx*)
  1570. os=qnx
  1571. ;;
  1572. hiux*)
  1573. os=hiuxwe2
  1574. ;;
  1575. lynx*178)
  1576. os=lynxos178
  1577. ;;
  1578. lynx*5)
  1579. os=lynxos5
  1580. ;;
  1581. lynxos*)
  1582. # don't get caught up in next wildcard
  1583. ;;
  1584. lynx*)
  1585. os=lynxos
  1586. ;;
  1587. mac[0-9]*)
  1588. os=`echo "$os" | sed -e 's|mac|macos|'`
  1589. ;;
  1590. opened*)
  1591. os=openedition
  1592. ;;
  1593. os400*)
  1594. os=os400
  1595. ;;
  1596. sunos5*)
  1597. os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
  1598. ;;
  1599. sunos6*)
  1600. os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
  1601. ;;
  1602. wince*)
  1603. os=wince
  1604. ;;
  1605. utek*)
  1606. os=bsd
  1607. vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'`
  1608. ;;
  1609. dynix*)
  1610. os=bsd
  1611. ;;
  1612. acis*)
  1613. os=aos
  1614. ;;
  1615. atheos*)
  1616. os=atheos
  1617. ;;
  1618. syllable*)
  1619. os=syllable
  1620. ;;
  1621. 386bsd)
  1622. os=bsd
  1623. ;;
  1624. ctix*)
  1625. os=sysv
  1626. vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'`
  1627. ;;
  1628. uts*)
  1629. os=sysv
  1630. ;;
  1631. nova*)
  1632. kernel=rtmk
  1633. os=nova
  1634. ;;
  1635. # Preserve the version number of sinix5.
  1636. sinix5.*)
  1637. os=`echo "$os" | sed -e 's|sinix|sysv|'`
  1638. vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
  1639. ;;
  1640. sinix*)
  1641. os=sysv4
  1642. vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
  1643. ;;
  1644. tpf*)
  1645. os=tpf
  1646. ;;
  1647. triton*)
  1648. os=sysv3
  1649. ;;
  1650. oss*)
  1651. os=sysv3
  1652. ;;
  1653. svr4*)
  1654. os=sysv4
  1655. ;;
  1656. svr3)
  1657. os=sysv3
  1658. ;;
  1659. sysvr4)
  1660. os=sysv4
  1661. ;;
  1662. ose*)
  1663. os=ose
  1664. ;;
  1665. *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
  1666. os=mint
  1667. ;;
  1668. dicos*)
  1669. os=dicos
  1670. ;;
  1671. pikeos*)
  1672. # Until real need of OS specific support for
  1673. # particular features comes up, bare metal
  1674. # configurations are quite functional.
  1675. case $cpu in
  1676. arm*)
  1677. os=eabi
  1678. ;;
  1679. *)
  1680. os=
  1681. obj=elf
  1682. ;;
  1683. esac
  1684. ;;
  1685. aout* | coff* | elf* | pe*)
  1686. # These are machine code file formats, not OSes
  1687. obj=$os
  1688. os=
  1689. ;;
  1690. *)
  1691. # No normalization, but not necessarily accepted, that comes below.
  1692. ;;
  1693. esac
  1694. else
  1695. # Here we handle the default operating systems that come with various machines.
  1696. # The value should be what the vendor currently ships out the door with their
  1697. # machine or put another way, the most popular os provided with the machine.
  1698. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1699. # "-sun"), then you have to tell the case statement up towards the top
  1700. # that MANUFACTURER isn't an operating system. Otherwise, code above
  1701. # will signal an error saying that MANUFACTURER isn't an operating
  1702. # system, and we'll never get to this point.
  1703. kernel=
  1704. obj=
  1705. case $cpu-$vendor in
  1706. score-*)
  1707. os=
  1708. obj=elf
  1709. ;;
  1710. spu-*)
  1711. os=
  1712. obj=elf
  1713. ;;
  1714. *-acorn)
  1715. os=riscix1.2
  1716. ;;
  1717. arm*-rebel)
  1718. kernel=linux
  1719. os=gnu
  1720. ;;
  1721. arm*-semi)
  1722. os=
  1723. obj=aout
  1724. ;;
  1725. c4x-* | tic4x-*)
  1726. os=
  1727. obj=coff
  1728. ;;
  1729. c8051-*)
  1730. os=
  1731. obj=elf
  1732. ;;
  1733. clipper-intergraph)
  1734. os=clix
  1735. ;;
  1736. hexagon-*)
  1737. os=
  1738. obj=elf
  1739. ;;
  1740. tic54x-*)
  1741. os=
  1742. obj=coff
  1743. ;;
  1744. tic55x-*)
  1745. os=
  1746. obj=coff
  1747. ;;
  1748. tic6x-*)
  1749. os=
  1750. obj=coff
  1751. ;;
  1752. # This must come before the *-dec entry.
  1753. pdp10-*)
  1754. os=tops20
  1755. ;;
  1756. pdp11-*)
  1757. os=none
  1758. ;;
  1759. *-dec | vax-*)
  1760. os=ultrix4.2
  1761. ;;
  1762. m68*-apollo)
  1763. os=domain
  1764. ;;
  1765. i386-sun)
  1766. os=sunos4.0.2
  1767. ;;
  1768. m68000-sun)
  1769. os=sunos3
  1770. ;;
  1771. m68*-cisco)
  1772. os=
  1773. obj=aout
  1774. ;;
  1775. mep-*)
  1776. os=
  1777. obj=elf
  1778. ;;
  1779. # The -sgi and -siemens entries must be before the mips- entry
  1780. # or we get the wrong os.
  1781. *-sgi)
  1782. os=irix
  1783. ;;
  1784. *-siemens)
  1785. os=sysv4
  1786. ;;
  1787. mips*-cisco)
  1788. os=
  1789. obj=elf
  1790. ;;
  1791. mips*-*|nanomips*-*)
  1792. os=
  1793. obj=elf
  1794. ;;
  1795. or32-*)
  1796. os=
  1797. obj=coff
  1798. ;;
  1799. # This must be before the sparc-* entry or we get the wrong os.
  1800. *-tti)
  1801. os=sysv3
  1802. ;;
  1803. sparc-* | *-sun)
  1804. os=sunos4.1.1
  1805. ;;
  1806. pru-*)
  1807. os=
  1808. obj=elf
  1809. ;;
  1810. *-be)
  1811. os=beos
  1812. ;;
  1813. *-ibm)
  1814. os=aix
  1815. ;;
  1816. *-knuth)
  1817. os=mmixware
  1818. ;;
  1819. *-wec)
  1820. os=proelf
  1821. ;;
  1822. *-winbond)
  1823. os=proelf
  1824. ;;
  1825. *-oki)
  1826. os=proelf
  1827. ;;
  1828. *-hp)
  1829. os=hpux
  1830. ;;
  1831. *-hitachi)
  1832. os=hiuxwe2
  1833. ;;
  1834. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1835. os=sysv
  1836. ;;
  1837. *-cbm)
  1838. os=amigaos
  1839. ;;
  1840. *-dg)
  1841. os=dgux
  1842. ;;
  1843. *-dolphin)
  1844. os=sysv3
  1845. ;;
  1846. m68k-ccur)
  1847. os=rtu
  1848. ;;
  1849. m88k-omron*)
  1850. os=luna
  1851. ;;
  1852. *-next)
  1853. os=nextstep
  1854. ;;
  1855. *-sequent)
  1856. os=ptx
  1857. ;;
  1858. *-crds)
  1859. os=unos
  1860. ;;
  1861. *-ns)
  1862. os=genix
  1863. ;;
  1864. i370-*)
  1865. os=mvs
  1866. ;;
  1867. *-gould)
  1868. os=sysv
  1869. ;;
  1870. *-highlevel)
  1871. os=bsd
  1872. ;;
  1873. *-encore)
  1874. os=bsd
  1875. ;;
  1876. *-masscomp)
  1877. os=rtu
  1878. ;;
  1879. f30[01]-fujitsu | f700-fujitsu)
  1880. os=uxpv
  1881. ;;
  1882. *-rom68k)
  1883. os=
  1884. obj=coff
  1885. ;;
  1886. *-*bug)
  1887. os=
  1888. obj=coff
  1889. ;;
  1890. *-apple)
  1891. os=macos
  1892. ;;
  1893. *-atari*)
  1894. os=mint
  1895. ;;
  1896. *-wrs)
  1897. os=vxworks
  1898. ;;
  1899. *)
  1900. os=none
  1901. ;;
  1902. esac
  1903. fi
  1904. # Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
  1905. case $os in
  1906. # Sometimes we do "kernel-libc", so those need to count as OSes.
  1907. llvm* | musl* | newlib* | relibc* | uclibc*)
  1908. ;;
  1909. # Likewise for "kernel-abi"
  1910. eabi* | gnueabi*)
  1911. ;;
  1912. # VxWorks passes extra cpu info in the 4th filed.
  1913. simlinux | simwindows | spe)
  1914. ;;
  1915. # See `case $cpu-$os` validation below
  1916. ghcjs)
  1917. ;;
  1918. # Now accept the basic system types.
  1919. # Each alternative MUST end in a * to match a version number.
  1920. abug \
  1921. | aix* \
  1922. | amdhsa* \
  1923. | amigados* \
  1924. | amigaos* \
  1925. | android* \
  1926. | aof* \
  1927. | aos* \
  1928. | aros* \
  1929. | atheos* \
  1930. | auroraux* \
  1931. | aux* \
  1932. | beos* \
  1933. | bitrig* \
  1934. | bme* \
  1935. | bosx* \
  1936. | bsd* \
  1937. | cegcc* \
  1938. | chorusos* \
  1939. | chorusrdb* \
  1940. | clix* \
  1941. | cloudabi* \
  1942. | cnk* \
  1943. | conix* \
  1944. | cos* \
  1945. | cxux* \
  1946. | cygwin* \
  1947. | darwin* \
  1948. | dgux* \
  1949. | dicos* \
  1950. | dnix* \
  1951. | domain* \
  1952. | dragonfly* \
  1953. | drops* \
  1954. | ebmon* \
  1955. | ecoff* \
  1956. | ekkobsd* \
  1957. | emscripten* \
  1958. | emx* \
  1959. | es* \
  1960. | fiwix* \
  1961. | freebsd* \
  1962. | fuchsia* \
  1963. | genix* \
  1964. | genode* \
  1965. | glidix* \
  1966. | gnu* \
  1967. | go32* \
  1968. | haiku* \
  1969. | hcos* \
  1970. | hiux* \
  1971. | hms* \
  1972. | hpux* \
  1973. | ieee* \
  1974. | interix* \
  1975. | ios* \
  1976. | iris* \
  1977. | irix* \
  1978. | ironclad* \
  1979. | isc* \
  1980. | its* \
  1981. | l4re* \
  1982. | libertybsd* \
  1983. | lites* \
  1984. | lnews* \
  1985. | luna* \
  1986. | lynxos* \
  1987. | mach* \
  1988. | macos* \
  1989. | magic* \
  1990. | mbr* \
  1991. | midipix* \
  1992. | midnightbsd* \
  1993. | mingw32* \
  1994. | mingw64* \
  1995. | minix* \
  1996. | mint* \
  1997. | mirbsd* \
  1998. | mks* \
  1999. | mlibc* \
  2000. | mmixware* \
  2001. | mon960* \
  2002. | morphos* \
  2003. | moss* \
  2004. | moxiebox* \
  2005. | mpeix* \
  2006. | mpw* \
  2007. | msdos* \
  2008. | msys* \
  2009. | mvs* \
  2010. | nacl* \
  2011. | netbsd* \
  2012. | netware* \
  2013. | newsos* \
  2014. | nextstep* \
  2015. | nindy* \
  2016. | nonstopux* \
  2017. | nova* \
  2018. | nsk* \
  2019. | nucleus* \
  2020. | nx6 \
  2021. | nx7 \
  2022. | oabi* \
  2023. | ohos* \
  2024. | onefs* \
  2025. | openbsd* \
  2026. | openedition* \
  2027. | openstep* \
  2028. | os108* \
  2029. | os2* \
  2030. | os400* \
  2031. | os68k* \
  2032. | os9* \
  2033. | ose* \
  2034. | osf* \
  2035. | oskit* \
  2036. | osx* \
  2037. | palmos* \
  2038. | phoenix* \
  2039. | plan9* \
  2040. | powermax* \
  2041. | powerunix* \
  2042. | proelf* \
  2043. | psos* \
  2044. | psp* \
  2045. | ptx* \
  2046. | pw32* \
  2047. | qnx* \
  2048. | rdos* \
  2049. | redox* \
  2050. | rhapsody* \
  2051. | riscix* \
  2052. | riscos* \
  2053. | rtems* \
  2054. | rtmk* \
  2055. | rtu* \
  2056. | scout* \
  2057. | secbsd* \
  2058. | sei* \
  2059. | serenity* \
  2060. | sim* \
  2061. | skyos* \
  2062. | solaris* \
  2063. | solidbsd* \
  2064. | sortix* \
  2065. | storm-chaos* \
  2066. | sunos \
  2067. | sunos[34]* \
  2068. | superux* \
  2069. | syllable* \
  2070. | sym* \
  2071. | sysv* \
  2072. | tenex* \
  2073. | tirtos* \
  2074. | toppers* \
  2075. | tops10* \
  2076. | tops20* \
  2077. | tpf* \
  2078. | tvos* \
  2079. | twizzler* \
  2080. | uclinux* \
  2081. | udi* \
  2082. | udk* \
  2083. | ultrix* \
  2084. | unicos* \
  2085. | uniplus* \
  2086. | unleashed* \
  2087. | unos* \
  2088. | uwin* \
  2089. | uxpv* \
  2090. | v88r* \
  2091. |*vms* \
  2092. | vos* \
  2093. | vsta* \
  2094. | vxsim* \
  2095. | vxworks* \
  2096. | wasi* \
  2097. | watchos* \
  2098. | wince* \
  2099. | windiss* \
  2100. | windows* \
  2101. | winnt* \
  2102. | xenix* \
  2103. | xray* \
  2104. | zephyr* \
  2105. | zvmoe* )
  2106. ;;
  2107. # This one is extra strict with allowed versions
  2108. sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
  2109. # Don't forget version if it is 3.2v4 or newer.
  2110. ;;
  2111. # This refers to builds using the UEFI calling convention
  2112. # (which depends on the architecture) and PE file format.
  2113. # Note that this is both a different calling convention and
  2114. # different file format than that of GNU-EFI
  2115. # (x86_64-w64-mingw32).
  2116. uefi)
  2117. ;;
  2118. none)
  2119. ;;
  2120. kernel* | msvc* )
  2121. # Restricted further below
  2122. ;;
  2123. '')
  2124. if test x"$obj" = x
  2125. then
  2126. echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
  2127. fi
  2128. ;;
  2129. *)
  2130. echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
  2131. exit 1
  2132. ;;
  2133. esac
  2134. case $obj in
  2135. aout* | coff* | elf* | pe*)
  2136. ;;
  2137. '')
  2138. # empty is fine
  2139. ;;
  2140. *)
  2141. echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
  2142. exit 1
  2143. ;;
  2144. esac
  2145. # Here we handle the constraint that a (synthetic) cpu and os are
  2146. # valid only in combination with each other and nowhere else.
  2147. case $cpu-$os in
  2148. # The "javascript-unknown-ghcjs" triple is used by GHC; we
  2149. # accept it here in order to tolerate that, but reject any
  2150. # variations.
  2151. javascript-ghcjs)
  2152. ;;
  2153. javascript-* | *-ghcjs)
  2154. echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
  2155. exit 1
  2156. ;;
  2157. esac
  2158. # As a final step for OS-related things, validate the OS-kernel combination
  2159. # (given a valid OS), if there is a kernel.
  2160. case $kernel-$os-$obj in
  2161. linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
  2162. | linux-mlibc*- | linux-musl*- | linux-newlib*- \
  2163. | linux-relibc*- | linux-uclibc*- | linux-ohos*- )
  2164. ;;
  2165. uclinux-uclibc*- | uclinux-gnu*- )
  2166. ;;
  2167. managarm-mlibc*- | managarm-kernel*- )
  2168. ;;
  2169. windows*-msvc*-)
  2170. ;;
  2171. -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \
  2172. | -uclibc*- )
  2173. # These are just libc implementations, not actual OSes, and thus
  2174. # require a kernel.
  2175. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
  2176. exit 1
  2177. ;;
  2178. -kernel*- )
  2179. echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
  2180. exit 1
  2181. ;;
  2182. *-kernel*- )
  2183. echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
  2184. exit 1
  2185. ;;
  2186. *-msvc*- )
  2187. echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
  2188. exit 1
  2189. ;;
  2190. kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-)
  2191. ;;
  2192. vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
  2193. ;;
  2194. nto-qnx*-)
  2195. ;;
  2196. os2-emx-)
  2197. ;;
  2198. rtmk-nova-)
  2199. ;;
  2200. *-eabi*- | *-gnueabi*-)
  2201. ;;
  2202. none--*)
  2203. # None (no kernel, i.e. freestanding / bare metal),
  2204. # can be paired with an machine code file format
  2205. ;;
  2206. -*-)
  2207. # Blank kernel with real OS is always fine.
  2208. ;;
  2209. --*)
  2210. # Blank kernel and OS with real machine code file format is always fine.
  2211. ;;
  2212. *-*-*)
  2213. echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
  2214. exit 1
  2215. ;;
  2216. esac
  2217. # Here we handle the case where we know the os, and the CPU type, but not the
  2218. # manufacturer. We pick the logical manufacturer.
  2219. case $vendor in
  2220. unknown)
  2221. case $cpu-$os in
  2222. *-riscix*)
  2223. vendor=acorn
  2224. ;;
  2225. *-sunos* | *-solaris*)
  2226. vendor=sun
  2227. ;;
  2228. *-cnk* | *-aix*)
  2229. vendor=ibm
  2230. ;;
  2231. *-beos*)
  2232. vendor=be
  2233. ;;
  2234. *-hpux*)
  2235. vendor=hp
  2236. ;;
  2237. *-mpeix*)
  2238. vendor=hp
  2239. ;;
  2240. *-hiux*)
  2241. vendor=hitachi
  2242. ;;
  2243. *-unos*)
  2244. vendor=crds
  2245. ;;
  2246. *-dgux*)
  2247. vendor=dg
  2248. ;;
  2249. *-luna*)
  2250. vendor=omron
  2251. ;;
  2252. *-genix*)
  2253. vendor=ns
  2254. ;;
  2255. *-clix*)
  2256. vendor=intergraph
  2257. ;;
  2258. *-mvs* | *-opened*)
  2259. vendor=ibm
  2260. ;;
  2261. *-os400*)
  2262. vendor=ibm
  2263. ;;
  2264. s390-* | s390x-*)
  2265. vendor=ibm
  2266. ;;
  2267. *-ptx*)
  2268. vendor=sequent
  2269. ;;
  2270. *-tpf*)
  2271. vendor=ibm
  2272. ;;
  2273. *-vxsim* | *-vxworks* | *-windiss*)
  2274. vendor=wrs
  2275. ;;
  2276. *-aux*)
  2277. vendor=apple
  2278. ;;
  2279. *-hms*)
  2280. vendor=hitachi
  2281. ;;
  2282. *-mpw* | *-macos*)
  2283. vendor=apple
  2284. ;;
  2285. *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
  2286. vendor=atari
  2287. ;;
  2288. *-vos*)
  2289. vendor=stratus
  2290. ;;
  2291. esac
  2292. ;;
  2293. esac
  2294. echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
  2295. exit
  2296. # Local variables:
  2297. # eval: (add-hook 'before-save-hook 'time-stamp)
  2298. # time-stamp-start: "timestamp='"
  2299. # time-stamp-format: "%:y-%02m-%02d"
  2300. # time-stamp-end: "'"
  2301. # End: