config.sub 34 KB

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