config.sub 34 KB

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