config.sub 35 KB

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