config.sub 35 KB

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