config.sub 36 KB

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