config.sub 36 KB

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