config.sub 35 KB

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