config.sub 35 KB

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