config.sub 35 KB

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