config.sub 35 KB

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