config.sub 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757
  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-02-24'
  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 | dvp \
  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. | or32 \
  267. | pdp10 | pdp11 | pj | pjl \
  268. | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
  269. | pyramid \
  270. | rx \
  271. | score \
  272. | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
  273. | sh64 | sh64le \
  274. | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
  275. | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
  276. | spu | strongarm \
  277. | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
  278. | ubicom32 \
  279. | v850 | v850e \
  280. | we32k \
  281. | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
  282. | z8k | z80)
  283. basic_machine=$basic_machine-unknown
  284. ;;
  285. c54x)
  286. basic_machine=tic54x-unknown
  287. ;;
  288. c55x)
  289. basic_machine=tic55x-unknown
  290. ;;
  291. c6x)
  292. basic_machine=tic6x-unknown
  293. ;;
  294. m6811 | m68hc11 | m6812 | m68hc12 | picochip)
  295. # Motorola 68HC11/12.
  296. basic_machine=$basic_machine-unknown
  297. os=-none
  298. ;;
  299. m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
  300. ;;
  301. ms1)
  302. basic_machine=mt-unknown
  303. ;;
  304. # We use `pc' rather than `unknown'
  305. # because (1) that's what they normally are, and
  306. # (2) the word "unknown" tends to confuse beginning users.
  307. i*86 | x86_64)
  308. basic_machine=$basic_machine-pc
  309. ;;
  310. # Object if more than one company name word.
  311. *-*-*)
  312. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  313. exit 1
  314. ;;
  315. # Recognize the basic CPU types with company name.
  316. 580-* \
  317. | a29k-* \
  318. | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
  319. | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
  320. | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
  321. | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
  322. | avr-* | avr32-* \
  323. | bfin-* | bs2000-* \
  324. | c[123]* | c30-* | [cjt]90-* | c4x-* \
  325. | clipper-* | craynv-* | cydra-* \
  326. | d10v-* | d30v-* | dlx-* \
  327. | elxsi-* \
  328. | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
  329. | h8300-* | h8500-* \
  330. | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
  331. | i*86-* | i860-* | i960-* | ia64-* \
  332. | ip2k-* | iq2000-* \
  333. | lm32-* \
  334. | m32c-* | m32r-* | m32rle-* \
  335. | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
  336. | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
  337. | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
  338. | mips16-* \
  339. | mips64-* | mips64el-* \
  340. | mips64octeon-* | mips64octeonel-* \
  341. | mips64orion-* | mips64orionel-* \
  342. | mips64r5900-* | mips64r5900el-* \
  343. | mips64vr-* | mips64vrel-* \
  344. | mips64vr4100-* | mips64vr4100el-* \
  345. | mips64vr4300-* | mips64vr4300el-* \
  346. | mips64vr5000-* | mips64vr5000el-* \
  347. | mips64vr5900-* | mips64vr5900el-* \
  348. | mipsisa32-* | mipsisa32el-* \
  349. | mipsisa32r2-* | mipsisa32r2el-* \
  350. | mipsisa64-* | mipsisa64el-* \
  351. | mipsisa64r2-* | mipsisa64r2el-* \
  352. | mipsisa64sb1-* | mipsisa64sb1el-* \
  353. | mipsisa64sr71k-* | mipsisa64sr71kel-* \
  354. | mipstx39-* | mipstx39el-* \
  355. | mmix-* \
  356. | mt-* \
  357. | msp430-* \
  358. | nds32-* | nds32le-* | nds32be-* \
  359. | nios-* | nios2-* \
  360. | none-* | np1-* | ns16k-* | ns32k-* \
  361. | orion-* \
  362. | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
  363. | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
  364. | pyramid-* \
  365. | romp-* | rs6000-* | rx-* \
  366. | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
  367. | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
  368. | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
  369. | sparclite-* \
  370. | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
  371. | tahoe-* | thumb-* \
  372. | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
  373. | tile-* | tilegx-* \
  374. | tron-* \
  375. | ubicom32-* \
  376. | v850-* | v850e-* | vax-* \
  377. | we32k-* \
  378. | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
  379. | xstormy16-* | xtensa*-* \
  380. | ymp-* \
  381. | z8k-* | z80-*)
  382. ;;
  383. # Recognize the basic CPU types without company name, with glob match.
  384. xtensa*)
  385. basic_machine=$basic_machine-unknown
  386. ;;
  387. # Recognize the various machine names and aliases which stand
  388. # for a CPU type and a company and sometimes even an OS.
  389. 386bsd)
  390. basic_machine=i386-unknown
  391. os=-bsd
  392. ;;
  393. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  394. basic_machine=m68000-att
  395. ;;
  396. 3b*)
  397. basic_machine=we32k-att
  398. ;;
  399. a29khif)
  400. basic_machine=a29k-amd
  401. os=-udi
  402. ;;
  403. abacus)
  404. basic_machine=abacus-unknown
  405. ;;
  406. adobe68k)
  407. basic_machine=m68010-adobe
  408. os=-scout
  409. ;;
  410. alliant | fx80)
  411. basic_machine=fx80-alliant
  412. ;;
  413. altos | altos3068)
  414. basic_machine=m68k-altos
  415. ;;
  416. am29k)
  417. basic_machine=a29k-none
  418. os=-bsd
  419. ;;
  420. amd64)
  421. basic_machine=x86_64-pc
  422. ;;
  423. amd64-*)
  424. basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
  425. ;;
  426. amdahl)
  427. basic_machine=580-amdahl
  428. os=-sysv
  429. ;;
  430. amiga | amiga-*)
  431. basic_machine=m68k-unknown
  432. ;;
  433. amigaos | amigados)
  434. basic_machine=m68k-unknown
  435. os=-amigaos
  436. ;;
  437. amigaunix | amix)
  438. basic_machine=m68k-unknown
  439. os=-sysv4
  440. ;;
  441. apollo68)
  442. basic_machine=m68k-apollo
  443. os=-sysv
  444. ;;
  445. apollo68bsd)
  446. basic_machine=m68k-apollo
  447. os=-bsd
  448. ;;
  449. aros)
  450. basic_machine=i386-pc
  451. os=-aros
  452. ;;
  453. aux)
  454. basic_machine=m68k-apple
  455. os=-aux
  456. ;;
  457. balance)
  458. basic_machine=ns32k-sequent
  459. os=-dynix
  460. ;;
  461. blackfin)
  462. basic_machine=bfin-unknown
  463. os=-linux
  464. ;;
  465. blackfin-*)
  466. basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
  467. os=-linux
  468. ;;
  469. bluegene*)
  470. basic_machine=powerpc-ibm
  471. os=-cnk
  472. ;;
  473. c54x-*)
  474. basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
  475. ;;
  476. c55x-*)
  477. basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
  478. ;;
  479. c6x-*)
  480. basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
  481. ;;
  482. c90)
  483. basic_machine=c90-cray
  484. os=-unicos
  485. ;;
  486. cegcc)
  487. basic_machine=arm-unknown
  488. os=-cegcc
  489. ;;
  490. convex-c1)
  491. basic_machine=c1-convex
  492. os=-bsd
  493. ;;
  494. convex-c2)
  495. basic_machine=c2-convex
  496. os=-bsd
  497. ;;
  498. convex-c32)
  499. basic_machine=c32-convex
  500. os=-bsd
  501. ;;
  502. convex-c34)
  503. basic_machine=c34-convex
  504. os=-bsd
  505. ;;
  506. convex-c38)
  507. basic_machine=c38-convex
  508. os=-bsd
  509. ;;
  510. cray | j90)
  511. basic_machine=j90-cray
  512. os=-unicos
  513. ;;
  514. craynv)
  515. basic_machine=craynv-cray
  516. os=-unicosmp
  517. ;;
  518. cr16 | cr16-*)
  519. basic_machine=cr16-unknown
  520. os=-elf
  521. ;;
  522. crds | unos)
  523. basic_machine=m68k-crds
  524. ;;
  525. crisv32 | crisv32-* | etraxfs*)
  526. basic_machine=crisv32-axis
  527. ;;
  528. cris | cris-* | etrax*)
  529. basic_machine=cris-axis
  530. ;;
  531. crx)
  532. basic_machine=crx-unknown
  533. os=-elf
  534. ;;
  535. da30 | da30-*)
  536. basic_machine=m68k-da30
  537. ;;
  538. decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  539. basic_machine=mips-dec
  540. ;;
  541. decsystem10* | dec10*)
  542. basic_machine=pdp10-dec
  543. os=-tops10
  544. ;;
  545. decsystem20* | dec20*)
  546. basic_machine=pdp10-dec
  547. os=-tops20
  548. ;;
  549. delta | 3300 | motorola-3300 | motorola-delta \
  550. | 3300-motorola | delta-motorola)
  551. basic_machine=m68k-motorola
  552. ;;
  553. delta88)
  554. basic_machine=m88k-motorola
  555. os=-sysv3
  556. ;;
  557. dicos)
  558. basic_machine=i686-pc
  559. os=-dicos
  560. ;;
  561. djgpp)
  562. basic_machine=i586-pc
  563. os=-msdosdjgpp
  564. ;;
  565. dpx20 | dpx20-*)
  566. basic_machine=rs6000-bull
  567. os=-bosx
  568. ;;
  569. dpx2* | dpx2*-bull)
  570. basic_machine=m68k-bull
  571. os=-sysv3
  572. ;;
  573. ebmon29k)
  574. basic_machine=a29k-amd
  575. os=-ebmon
  576. ;;
  577. elxsi)
  578. basic_machine=elxsi-elxsi
  579. os=-bsd
  580. ;;
  581. encore | umax | mmax)
  582. basic_machine=ns32k-encore
  583. ;;
  584. es1800 | OSE68k | ose68k | ose | OSE)
  585. basic_machine=m68k-ericsson
  586. os=-ose
  587. ;;
  588. fx2800)
  589. basic_machine=i860-alliant
  590. ;;
  591. genix)
  592. basic_machine=ns32k-ns
  593. ;;
  594. gmicro)
  595. basic_machine=tron-gmicro
  596. os=-sysv
  597. ;;
  598. go32)
  599. basic_machine=i386-pc
  600. os=-go32
  601. ;;
  602. h3050r* | hiux*)
  603. basic_machine=hppa1.1-hitachi
  604. os=-hiuxwe2
  605. ;;
  606. h8300hms)
  607. basic_machine=h8300-hitachi
  608. os=-hms
  609. ;;
  610. h8300xray)
  611. basic_machine=h8300-hitachi
  612. os=-xray
  613. ;;
  614. h8500hms)
  615. basic_machine=h8500-hitachi
  616. os=-hms
  617. ;;
  618. harris)
  619. basic_machine=m88k-harris
  620. os=-sysv3
  621. ;;
  622. hp300-*)
  623. basic_machine=m68k-hp
  624. ;;
  625. hp300bsd)
  626. basic_machine=m68k-hp
  627. os=-bsd
  628. ;;
  629. hp300hpux)
  630. basic_machine=m68k-hp
  631. os=-hpux
  632. ;;
  633. hp3k9[0-9][0-9] | hp9[0-9][0-9])
  634. basic_machine=hppa1.0-hp
  635. ;;
  636. hp9k2[0-9][0-9] | hp9k31[0-9])
  637. basic_machine=m68000-hp
  638. ;;
  639. hp9k3[2-9][0-9])
  640. basic_machine=m68k-hp
  641. ;;
  642. hp9k6[0-9][0-9] | hp6[0-9][0-9])
  643. basic_machine=hppa1.0-hp
  644. ;;
  645. hp9k7[0-79][0-9] | hp7[0-79][0-9])
  646. basic_machine=hppa1.1-hp
  647. ;;
  648. hp9k78[0-9] | hp78[0-9])
  649. # FIXME: really hppa2.0-hp
  650. basic_machine=hppa1.1-hp
  651. ;;
  652. hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  653. # FIXME: really hppa2.0-hp
  654. basic_machine=hppa1.1-hp
  655. ;;
  656. hp9k8[0-9][13679] | hp8[0-9][13679])
  657. basic_machine=hppa1.1-hp
  658. ;;
  659. hp9k8[0-9][0-9] | hp8[0-9][0-9])
  660. basic_machine=hppa1.0-hp
  661. ;;
  662. hppa-next)
  663. os=-nextstep3
  664. ;;
  665. hppaosf)
  666. basic_machine=hppa1.1-hp
  667. os=-osf
  668. ;;
  669. hppro)
  670. basic_machine=hppa1.1-hp
  671. os=-proelf
  672. ;;
  673. i370-ibm* | ibm*)
  674. basic_machine=i370-ibm
  675. ;;
  676. # I'm not sure what "Sysv32" means. Should this be sysv3.2?
  677. i*86v32)
  678. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  679. os=-sysv32
  680. ;;
  681. i*86v4*)
  682. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  683. os=-sysv4
  684. ;;
  685. i*86v)
  686. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  687. os=-sysv
  688. ;;
  689. i*86sol2)
  690. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  691. os=-solaris2
  692. ;;
  693. i386mach)
  694. basic_machine=i386-mach
  695. os=-mach
  696. ;;
  697. i386-vsta | vsta)
  698. basic_machine=i386-unknown
  699. os=-vsta
  700. ;;
  701. iris | iris4d)
  702. basic_machine=mips-sgi
  703. case $os in
  704. -irix*)
  705. ;;
  706. *)
  707. os=-irix4
  708. ;;
  709. esac
  710. ;;
  711. isi68 | isi)
  712. basic_machine=m68k-isi
  713. os=-sysv
  714. ;;
  715. m68knommu)
  716. basic_machine=m68k-unknown
  717. os=-linux
  718. ;;
  719. m68knommu-*)
  720. basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
  721. os=-linux
  722. ;;
  723. m88k-omron*)
  724. basic_machine=m88k-omron
  725. ;;
  726. magnum | m3230)
  727. basic_machine=mips-mips
  728. os=-sysv
  729. ;;
  730. merlin)
  731. basic_machine=ns32k-utek
  732. os=-sysv
  733. ;;
  734. microblaze)
  735. basic_machine=microblaze-xilinx
  736. ;;
  737. mingw32)
  738. basic_machine=i386-pc
  739. os=-mingw32
  740. ;;
  741. mingw32ce)
  742. basic_machine=arm-unknown
  743. os=-mingw32ce
  744. ;;
  745. miniframe)
  746. basic_machine=m68000-convergent
  747. ;;
  748. *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  749. basic_machine=m68k-atari
  750. os=-mint
  751. ;;
  752. mipsEE* | ee | ps2)
  753. basic_machine=mips64r5900el-scei
  754. case $os in
  755. -linux*)
  756. ;;
  757. *)
  758. os=-elf
  759. ;;
  760. esac
  761. ;;
  762. iop)
  763. basic_machine=mipsel-scei
  764. os=-irx
  765. ;;
  766. dvp)
  767. basic_machine=dvp-scei
  768. os=-elf
  769. ;;
  770. mips3*-*)
  771. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  772. ;;
  773. mips3*)
  774. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  775. ;;
  776. monitor)
  777. basic_machine=m68k-rom68k
  778. os=-coff
  779. ;;
  780. morphos)
  781. basic_machine=powerpc-unknown
  782. os=-morphos
  783. ;;
  784. msdos)
  785. basic_machine=i386-pc
  786. os=-msdos
  787. ;;
  788. ms1-*)
  789. basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
  790. ;;
  791. mvs)
  792. basic_machine=i370-ibm
  793. os=-mvs
  794. ;;
  795. ncr3000)
  796. basic_machine=i486-ncr
  797. os=-sysv4
  798. ;;
  799. netbsd386)
  800. basic_machine=i386-unknown
  801. os=-netbsd
  802. ;;
  803. netwinder)
  804. basic_machine=armv4l-rebel
  805. os=-linux
  806. ;;
  807. news | news700 | news800 | news900)
  808. basic_machine=m68k-sony
  809. os=-newsos
  810. ;;
  811. news1000)
  812. basic_machine=m68030-sony
  813. os=-newsos
  814. ;;
  815. news-3600 | risc-news)
  816. basic_machine=mips-sony
  817. os=-newsos
  818. ;;
  819. necv70)
  820. basic_machine=v70-nec
  821. os=-sysv
  822. ;;
  823. next | m*-next )
  824. basic_machine=m68k-next
  825. case $os in
  826. -nextstep* )
  827. ;;
  828. -ns2*)
  829. os=-nextstep2
  830. ;;
  831. *)
  832. os=-nextstep3
  833. ;;
  834. esac
  835. ;;
  836. nh3000)
  837. basic_machine=m68k-harris
  838. os=-cxux
  839. ;;
  840. nh[45]000)
  841. basic_machine=m88k-harris
  842. os=-cxux
  843. ;;
  844. nindy960)
  845. basic_machine=i960-intel
  846. os=-nindy
  847. ;;
  848. mon960)
  849. basic_machine=i960-intel
  850. os=-mon960
  851. ;;
  852. nonstopux)
  853. basic_machine=mips-compaq
  854. os=-nonstopux
  855. ;;
  856. np1)
  857. basic_machine=np1-gould
  858. ;;
  859. neo-tandem)
  860. basic_machine=neo-tandem
  861. ;;
  862. nse-tandem)
  863. basic_machine=nse-tandem
  864. ;;
  865. nsr-tandem)
  866. basic_machine=nsr-tandem
  867. ;;
  868. op50n-* | op60c-*)
  869. basic_machine=hppa1.1-oki
  870. os=-proelf
  871. ;;
  872. openrisc | openrisc-*)
  873. basic_machine=or32-unknown
  874. ;;
  875. os400)
  876. basic_machine=powerpc-ibm
  877. os=-os400
  878. ;;
  879. OSE68000 | ose68000)
  880. basic_machine=m68000-ericsson
  881. os=-ose
  882. ;;
  883. os68k)
  884. basic_machine=m68k-none
  885. os=-os68k
  886. ;;
  887. pa-hitachi)
  888. basic_machine=hppa1.1-hitachi
  889. os=-hiuxwe2
  890. ;;
  891. paragon)
  892. basic_machine=i860-intel
  893. os=-osf
  894. ;;
  895. parisc)
  896. basic_machine=hppa-unknown
  897. os=-linux
  898. ;;
  899. parisc-*)
  900. basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
  901. os=-linux
  902. ;;
  903. pbd)
  904. basic_machine=sparc-tti
  905. ;;
  906. pbb)
  907. basic_machine=m68k-tti
  908. ;;
  909. pc532 | pc532-*)
  910. basic_machine=ns32k-pc532
  911. ;;
  912. pc98)
  913. basic_machine=i386-pc
  914. ;;
  915. pc98-*)
  916. basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
  917. ;;
  918. pentium | p5 | k5 | k6 | nexgen | viac3)
  919. basic_machine=i586-pc
  920. ;;
  921. pentiumpro | p6 | 6x86 | athlon | athlon_*)
  922. basic_machine=i686-pc
  923. ;;
  924. pentiumii | pentium2 | pentiumiii | pentium3)
  925. basic_machine=i686-pc
  926. ;;
  927. pentium4)
  928. basic_machine=i786-pc
  929. ;;
  930. pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
  931. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  932. ;;
  933. pentiumpro-* | p6-* | 6x86-* | athlon-*)
  934. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  935. ;;
  936. pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
  937. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  938. ;;
  939. pentium4-*)
  940. basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  941. ;;
  942. pn)
  943. basic_machine=pn-gould
  944. ;;
  945. power) basic_machine=power-ibm
  946. ;;
  947. ppc) basic_machine=powerpc-unknown
  948. ;;
  949. ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  950. ;;
  951. ppcle | powerpclittle | ppc-le | powerpc-little)
  952. basic_machine=powerpcle-unknown
  953. ;;
  954. ppcle-* | powerpclittle-*)
  955. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  956. ;;
  957. ppc64) basic_machine=powerpc64-unknown
  958. ;;
  959. ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
  960. ;;
  961. ppc64le | powerpc64little | ppc64-le | powerpc64-little)
  962. basic_machine=powerpc64le-unknown
  963. ;;
  964. ppc64le-* | powerpc64little-*)
  965. basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
  966. ;;
  967. ps2)
  968. basic_machine=i386-ibm
  969. ;;
  970. pw32)
  971. basic_machine=i586-unknown
  972. os=-pw32
  973. ;;
  974. rdos)
  975. basic_machine=i386-pc
  976. os=-rdos
  977. ;;
  978. rom68k)
  979. basic_machine=m68k-rom68k
  980. os=-coff
  981. ;;
  982. rm[46]00)
  983. basic_machine=mips-siemens
  984. ;;
  985. rtpc | rtpc-*)
  986. basic_machine=romp-ibm
  987. ;;
  988. s390 | s390-*)
  989. basic_machine=s390-ibm
  990. ;;
  991. s390x | s390x-*)
  992. basic_machine=s390x-ibm
  993. ;;
  994. sa29200)
  995. basic_machine=a29k-amd
  996. os=-udi
  997. ;;
  998. sb1)
  999. basic_machine=mipsisa64sb1-unknown
  1000. ;;
  1001. sb1el)
  1002. basic_machine=mipsisa64sb1el-unknown
  1003. ;;
  1004. sde)
  1005. basic_machine=mipsisa32-sde
  1006. os=-elf
  1007. ;;
  1008. sei)
  1009. basic_machine=mips-sei
  1010. os=-seiux
  1011. ;;
  1012. sequent)
  1013. basic_machine=i386-sequent
  1014. ;;
  1015. sh)
  1016. basic_machine=sh-hitachi
  1017. os=-hms
  1018. ;;
  1019. sh5el)
  1020. basic_machine=sh5le-unknown
  1021. ;;
  1022. sh64)
  1023. basic_machine=sh64-unknown
  1024. ;;
  1025. sparclite-wrs | simso-wrs)
  1026. basic_machine=sparclite-wrs
  1027. os=-vxworks
  1028. ;;
  1029. sps7)
  1030. basic_machine=m68k-bull
  1031. os=-sysv2
  1032. ;;
  1033. spur)
  1034. basic_machine=spur-unknown
  1035. ;;
  1036. st2000)
  1037. basic_machine=m68k-tandem
  1038. ;;
  1039. stratus)
  1040. basic_machine=i860-stratus
  1041. os=-sysv4
  1042. ;;
  1043. sun2)
  1044. basic_machine=m68000-sun
  1045. ;;
  1046. sun2os3)
  1047. basic_machine=m68000-sun
  1048. os=-sunos3
  1049. ;;
  1050. sun2os4)
  1051. basic_machine=m68000-sun
  1052. os=-sunos4
  1053. ;;
  1054. sun3os3)
  1055. basic_machine=m68k-sun
  1056. os=-sunos3
  1057. ;;
  1058. sun3os4)
  1059. basic_machine=m68k-sun
  1060. os=-sunos4
  1061. ;;
  1062. sun4os3)
  1063. basic_machine=sparc-sun
  1064. os=-sunos3
  1065. ;;
  1066. sun4os4)
  1067. basic_machine=sparc-sun
  1068. os=-sunos4
  1069. ;;
  1070. sun4sol2)
  1071. basic_machine=sparc-sun
  1072. os=-solaris2
  1073. ;;
  1074. sun3 | sun3-*)
  1075. basic_machine=m68k-sun
  1076. ;;
  1077. sun4)
  1078. basic_machine=sparc-sun
  1079. ;;
  1080. sun386 | sun386i | roadrunner)
  1081. basic_machine=i386-sun
  1082. ;;
  1083. sv1)
  1084. basic_machine=sv1-cray
  1085. os=-unicos
  1086. ;;
  1087. symmetry)
  1088. basic_machine=i386-sequent
  1089. os=-dynix
  1090. ;;
  1091. t3e)
  1092. basic_machine=alphaev5-cray
  1093. os=-unicos
  1094. ;;
  1095. t90)
  1096. basic_machine=t90-cray
  1097. os=-unicos
  1098. ;;
  1099. # This must be matched before tile*.
  1100. tilegx*)
  1101. basic_machine=tilegx-unknown
  1102. os=-linux-gnu
  1103. ;;
  1104. tile*)
  1105. basic_machine=tile-unknown
  1106. os=-linux-gnu
  1107. ;;
  1108. tx39)
  1109. basic_machine=mipstx39-unknown
  1110. ;;
  1111. tx39el)
  1112. basic_machine=mipstx39el-unknown
  1113. ;;
  1114. toad1)
  1115. basic_machine=pdp10-xkl
  1116. os=-tops20
  1117. ;;
  1118. tower | tower-32)
  1119. basic_machine=m68k-ncr
  1120. ;;
  1121. tpf)
  1122. basic_machine=s390x-ibm
  1123. os=-tpf
  1124. ;;
  1125. udi29k)
  1126. basic_machine=a29k-amd
  1127. os=-udi
  1128. ;;
  1129. ultra3)
  1130. basic_machine=a29k-nyu
  1131. os=-sym1
  1132. ;;
  1133. v810 | necv810)
  1134. basic_machine=v810-nec
  1135. os=-none
  1136. ;;
  1137. vaxv)
  1138. basic_machine=vax-dec
  1139. os=-sysv
  1140. ;;
  1141. vms)
  1142. basic_machine=vax-dec
  1143. os=-vms
  1144. ;;
  1145. vpp*|vx|vx-*)
  1146. basic_machine=f301-fujitsu
  1147. ;;
  1148. vxworks960)
  1149. basic_machine=i960-wrs
  1150. os=-vxworks
  1151. ;;
  1152. vxworks68)
  1153. basic_machine=m68k-wrs
  1154. os=-vxworks
  1155. ;;
  1156. vxworks29k)
  1157. basic_machine=a29k-wrs
  1158. os=-vxworks
  1159. ;;
  1160. w65*)
  1161. basic_machine=w65-wdc
  1162. os=-none
  1163. ;;
  1164. w89k-*)
  1165. basic_machine=hppa1.1-winbond
  1166. os=-proelf
  1167. ;;
  1168. xbox)
  1169. basic_machine=i686-pc
  1170. os=-mingw32
  1171. ;;
  1172. xps | xps100)
  1173. basic_machine=xps100-honeywell
  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* | -irx*)
  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: