config.sub 35 KB

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