config.sub 35 KB

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