config.sub 34 KB

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