1
0

config.sub 35 KB

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