config.sub 35 KB

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