2
0

config.sub 35 KB

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