config.sub 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804
  1. #! /bin/sh
  2. # Configuration validation subroutine script.
  3. # Copyright 1992-2015 Free Software Foundation, Inc.
  4. timestamp='2015-03-08'
  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-2015 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* | netbsd*-eabi* | \
  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. | e2k | epiphany \
  240. | fido | fr30 | frv | ft32 \
  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 | powerpcspe \
  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]-* | amd64-* | 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. | e2k-* | 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-* | powerpcspe-* \
  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. amdahl)
  463. basic_machine=580-amdahl
  464. os=-sysv
  465. ;;
  466. amiga | amiga-*)
  467. basic_machine=m68k-unknown
  468. ;;
  469. amigaos | amigados)
  470. basic_machine=m68k-unknown
  471. os=-amigaos
  472. ;;
  473. amigaunix | amix)
  474. basic_machine=m68k-unknown
  475. os=-sysv4
  476. ;;
  477. apollo68)
  478. basic_machine=m68k-apollo
  479. os=-sysv
  480. ;;
  481. apollo68bsd)
  482. basic_machine=m68k-apollo
  483. os=-bsd
  484. ;;
  485. aros)
  486. basic_machine=i386-pc
  487. os=-aros
  488. ;;
  489. asmjs)
  490. basic_machine=asmjs-unknown
  491. ;;
  492. aux)
  493. basic_machine=m68k-apple
  494. os=-aux
  495. ;;
  496. balance)
  497. basic_machine=ns32k-sequent
  498. os=-dynix
  499. ;;
  500. blackfin)
  501. basic_machine=bfin-unknown
  502. os=-linux
  503. ;;
  504. blackfin-*)
  505. basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
  506. os=-linux
  507. ;;
  508. bluegene*)
  509. basic_machine=powerpc-ibm
  510. os=-cnk
  511. ;;
  512. c54x-*)
  513. basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
  514. ;;
  515. c55x-*)
  516. basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
  517. ;;
  518. c6x-*)
  519. basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
  520. ;;
  521. c90)
  522. basic_machine=c90-cray
  523. os=-unicos
  524. ;;
  525. cegcc)
  526. basic_machine=arm-unknown
  527. os=-cegcc
  528. ;;
  529. convex-c1)
  530. basic_machine=c1-convex
  531. os=-bsd
  532. ;;
  533. convex-c2)
  534. basic_machine=c2-convex
  535. os=-bsd
  536. ;;
  537. convex-c32)
  538. basic_machine=c32-convex
  539. os=-bsd
  540. ;;
  541. convex-c34)
  542. basic_machine=c34-convex
  543. os=-bsd
  544. ;;
  545. convex-c38)
  546. basic_machine=c38-convex
  547. os=-bsd
  548. ;;
  549. cray | j90)
  550. basic_machine=j90-cray
  551. os=-unicos
  552. ;;
  553. craynv)
  554. basic_machine=craynv-cray
  555. os=-unicosmp
  556. ;;
  557. cr16 | cr16-*)
  558. basic_machine=cr16-unknown
  559. os=-elf
  560. ;;
  561. crds | unos)
  562. basic_machine=m68k-crds
  563. ;;
  564. crisv32 | crisv32-* | etraxfs*)
  565. basic_machine=crisv32-axis
  566. ;;
  567. cris | cris-* | etrax*)
  568. basic_machine=cris-axis
  569. ;;
  570. crx)
  571. basic_machine=crx-unknown
  572. os=-elf
  573. ;;
  574. da30 | da30-*)
  575. basic_machine=m68k-da30
  576. ;;
  577. decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  578. basic_machine=mips-dec
  579. ;;
  580. decsystem10* | dec10*)
  581. basic_machine=pdp10-dec
  582. os=-tops10
  583. ;;
  584. decsystem20* | dec20*)
  585. basic_machine=pdp10-dec
  586. os=-tops20
  587. ;;
  588. delta | 3300 | motorola-3300 | motorola-delta \
  589. | 3300-motorola | delta-motorola)
  590. basic_machine=m68k-motorola
  591. ;;
  592. delta88)
  593. basic_machine=m88k-motorola
  594. os=-sysv3
  595. ;;
  596. dicos)
  597. basic_machine=i686-pc
  598. os=-dicos
  599. ;;
  600. djgpp)
  601. basic_machine=i586-pc
  602. os=-msdosdjgpp
  603. ;;
  604. dpx20 | dpx20-*)
  605. basic_machine=rs6000-bull
  606. os=-bosx
  607. ;;
  608. dpx2* | dpx2*-bull)
  609. basic_machine=m68k-bull
  610. os=-sysv3
  611. ;;
  612. ebmon29k)
  613. basic_machine=a29k-amd
  614. os=-ebmon
  615. ;;
  616. elxsi)
  617. basic_machine=elxsi-elxsi
  618. os=-bsd
  619. ;;
  620. encore | umax | mmax)
  621. basic_machine=ns32k-encore
  622. ;;
  623. es1800 | OSE68k | ose68k | ose | OSE)
  624. basic_machine=m68k-ericsson
  625. os=-ose
  626. ;;
  627. fx2800)
  628. basic_machine=i860-alliant
  629. ;;
  630. genix)
  631. basic_machine=ns32k-ns
  632. ;;
  633. gmicro)
  634. basic_machine=tron-gmicro
  635. os=-sysv
  636. ;;
  637. go32)
  638. basic_machine=i386-pc
  639. os=-go32
  640. ;;
  641. h3050r* | hiux*)
  642. basic_machine=hppa1.1-hitachi
  643. os=-hiuxwe2
  644. ;;
  645. h8300hms)
  646. basic_machine=h8300-hitachi
  647. os=-hms
  648. ;;
  649. h8300xray)
  650. basic_machine=h8300-hitachi
  651. os=-xray
  652. ;;
  653. h8500hms)
  654. basic_machine=h8500-hitachi
  655. os=-hms
  656. ;;
  657. harris)
  658. basic_machine=m88k-harris
  659. os=-sysv3
  660. ;;
  661. hp300-*)
  662. basic_machine=m68k-hp
  663. ;;
  664. hp300bsd)
  665. basic_machine=m68k-hp
  666. os=-bsd
  667. ;;
  668. hp300hpux)
  669. basic_machine=m68k-hp
  670. os=-hpux
  671. ;;
  672. hp3k9[0-9][0-9] | hp9[0-9][0-9])
  673. basic_machine=hppa1.0-hp
  674. ;;
  675. hp9k2[0-9][0-9] | hp9k31[0-9])
  676. basic_machine=m68000-hp
  677. ;;
  678. hp9k3[2-9][0-9])
  679. basic_machine=m68k-hp
  680. ;;
  681. hp9k6[0-9][0-9] | hp6[0-9][0-9])
  682. basic_machine=hppa1.0-hp
  683. ;;
  684. hp9k7[0-79][0-9] | hp7[0-79][0-9])
  685. basic_machine=hppa1.1-hp
  686. ;;
  687. hp9k78[0-9] | hp78[0-9])
  688. # FIXME: really hppa2.0-hp
  689. basic_machine=hppa1.1-hp
  690. ;;
  691. hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
  692. # FIXME: really hppa2.0-hp
  693. basic_machine=hppa1.1-hp
  694. ;;
  695. hp9k8[0-9][13679] | hp8[0-9][13679])
  696. basic_machine=hppa1.1-hp
  697. ;;
  698. hp9k8[0-9][0-9] | hp8[0-9][0-9])
  699. basic_machine=hppa1.0-hp
  700. ;;
  701. hppa-next)
  702. os=-nextstep3
  703. ;;
  704. hppaosf)
  705. basic_machine=hppa1.1-hp
  706. os=-osf
  707. ;;
  708. hppro)
  709. basic_machine=hppa1.1-hp
  710. os=-proelf
  711. ;;
  712. i370-ibm* | ibm*)
  713. basic_machine=i370-ibm
  714. ;;
  715. i*86v32)
  716. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  717. os=-sysv32
  718. ;;
  719. i*86v4*)
  720. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  721. os=-sysv4
  722. ;;
  723. i*86v)
  724. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  725. os=-sysv
  726. ;;
  727. i*86sol2)
  728. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  729. os=-solaris2
  730. ;;
  731. i386mach)
  732. basic_machine=i386-mach
  733. os=-mach
  734. ;;
  735. i386-vsta | vsta)
  736. basic_machine=i386-unknown
  737. os=-vsta
  738. ;;
  739. iris | iris4d)
  740. basic_machine=mips-sgi
  741. case $os in
  742. -irix*)
  743. ;;
  744. *)
  745. os=-irix4
  746. ;;
  747. esac
  748. ;;
  749. isi68 | isi)
  750. basic_machine=m68k-isi
  751. os=-sysv
  752. ;;
  753. leon-*|leon[3-9]-*)
  754. basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
  755. ;;
  756. m68knommu)
  757. basic_machine=m68k-unknown
  758. os=-linux
  759. ;;
  760. m68knommu-*)
  761. basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
  762. os=-linux
  763. ;;
  764. m88k-omron*)
  765. basic_machine=m88k-omron
  766. ;;
  767. magnum | m3230)
  768. basic_machine=mips-mips
  769. os=-sysv
  770. ;;
  771. merlin)
  772. basic_machine=ns32k-utek
  773. os=-sysv
  774. ;;
  775. microblaze*)
  776. basic_machine=microblaze-xilinx
  777. ;;
  778. mingw64)
  779. basic_machine=x86_64-pc
  780. os=-mingw64
  781. ;;
  782. mingw32)
  783. basic_machine=i686-pc
  784. os=-mingw32
  785. ;;
  786. mingw32ce)
  787. basic_machine=arm-unknown
  788. os=-mingw32ce
  789. ;;
  790. miniframe)
  791. basic_machine=m68000-convergent
  792. ;;
  793. *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  794. basic_machine=m68k-atari
  795. os=-mint
  796. ;;
  797. mips3*-*)
  798. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  799. ;;
  800. mips3*)
  801. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  802. ;;
  803. monitor)
  804. basic_machine=m68k-rom68k
  805. os=-coff
  806. ;;
  807. morphos)
  808. basic_machine=powerpc-unknown
  809. os=-morphos
  810. ;;
  811. moxiebox)
  812. basic_machine=moxie-unknown
  813. os=-moxiebox
  814. ;;
  815. msdos)
  816. basic_machine=i386-pc
  817. os=-msdos
  818. ;;
  819. ms1-*)
  820. basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
  821. ;;
  822. msys)
  823. basic_machine=i686-pc
  824. os=-msys
  825. ;;
  826. mvs)
  827. basic_machine=i370-ibm
  828. os=-mvs
  829. ;;
  830. nacl)
  831. basic_machine=le32-unknown
  832. os=-nacl
  833. ;;
  834. ncr3000)
  835. basic_machine=i486-ncr
  836. os=-sysv4
  837. ;;
  838. netbsd386)
  839. basic_machine=i386-unknown
  840. os=-netbsd
  841. ;;
  842. netwinder)
  843. basic_machine=armv4l-rebel
  844. os=-linux
  845. ;;
  846. news | news700 | news800 | news900)
  847. basic_machine=m68k-sony
  848. os=-newsos
  849. ;;
  850. news1000)
  851. basic_machine=m68030-sony
  852. os=-newsos
  853. ;;
  854. news-3600 | risc-news)
  855. basic_machine=mips-sony
  856. os=-newsos
  857. ;;
  858. necv70)
  859. basic_machine=v70-nec
  860. os=-sysv
  861. ;;
  862. next | m*-next )
  863. basic_machine=m68k-next
  864. case $os in
  865. -nextstep* )
  866. ;;
  867. -ns2*)
  868. os=-nextstep2
  869. ;;
  870. *)
  871. os=-nextstep3
  872. ;;
  873. esac
  874. ;;
  875. nh3000)
  876. basic_machine=m68k-harris
  877. os=-cxux
  878. ;;
  879. nh[45]000)
  880. basic_machine=m88k-harris
  881. os=-cxux
  882. ;;
  883. nindy960)
  884. basic_machine=i960-intel
  885. os=-nindy
  886. ;;
  887. mon960)
  888. basic_machine=i960-intel
  889. os=-mon960
  890. ;;
  891. nonstopux)
  892. basic_machine=mips-compaq
  893. os=-nonstopux
  894. ;;
  895. np1)
  896. basic_machine=np1-gould
  897. ;;
  898. neo-tandem)
  899. basic_machine=neo-tandem
  900. ;;
  901. nse-tandem)
  902. basic_machine=nse-tandem
  903. ;;
  904. nsr-tandem)
  905. basic_machine=nsr-tandem
  906. ;;
  907. op50n-* | op60c-*)
  908. basic_machine=hppa1.1-oki
  909. os=-proelf
  910. ;;
  911. openrisc | openrisc-*)
  912. basic_machine=or32-unknown
  913. ;;
  914. os400)
  915. basic_machine=powerpc-ibm
  916. os=-os400
  917. ;;
  918. OSE68000 | ose68000)
  919. basic_machine=m68000-ericsson
  920. os=-ose
  921. ;;
  922. os68k)
  923. basic_machine=m68k-none
  924. os=-os68k
  925. ;;
  926. pa-hitachi)
  927. basic_machine=hppa1.1-hitachi
  928. os=-hiuxwe2
  929. ;;
  930. paragon)
  931. basic_machine=i860-intel
  932. os=-osf
  933. ;;
  934. parisc)
  935. basic_machine=hppa-unknown
  936. os=-linux
  937. ;;
  938. parisc-*)
  939. basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
  940. os=-linux
  941. ;;
  942. pbd)
  943. basic_machine=sparc-tti
  944. ;;
  945. pbb)
  946. basic_machine=m68k-tti
  947. ;;
  948. pc532 | pc532-*)
  949. basic_machine=ns32k-pc532
  950. ;;
  951. pc98)
  952. basic_machine=i386-pc
  953. ;;
  954. pc98-*)
  955. basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
  956. ;;
  957. pentium | p5 | k5 | k6 | nexgen | viac3)
  958. basic_machine=i586-pc
  959. ;;
  960. pentiumpro | p6 | 6x86 | athlon | athlon_*)
  961. basic_machine=i686-pc
  962. ;;
  963. pentiumii | pentium2 | pentiumiii | pentium3)
  964. basic_machine=i686-pc
  965. ;;
  966. pentium4)
  967. basic_machine=i786-pc
  968. ;;
  969. pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
  970. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  971. ;;
  972. pentiumpro-* | p6-* | 6x86-* | athlon-*)
  973. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  974. ;;
  975. pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
  976. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  977. ;;
  978. pentium4-*)
  979. basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  980. ;;
  981. pn)
  982. basic_machine=pn-gould
  983. ;;
  984. power) basic_machine=power-ibm
  985. ;;
  986. ppc | ppcbe) basic_machine=powerpc-unknown
  987. ;;
  988. ppc-* | ppcbe-*)
  989. basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  990. ;;
  991. ppcle | powerpclittle | ppc-le | powerpc-little)
  992. basic_machine=powerpcle-unknown
  993. ;;
  994. ppcle-* | powerpclittle-*)
  995. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  996. ;;
  997. ppc64) basic_machine=powerpc64-unknown
  998. ;;
  999. ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
  1000. ;;
  1001. ppc64le | powerpc64little | ppc64-le | powerpc64-little)
  1002. basic_machine=powerpc64le-unknown
  1003. ;;
  1004. ppc64le-* | powerpc64little-*)
  1005. basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
  1006. ;;
  1007. ps2)
  1008. basic_machine=i386-ibm
  1009. ;;
  1010. pw32)
  1011. basic_machine=i586-unknown
  1012. os=-pw32
  1013. ;;
  1014. rdos | rdos64)
  1015. basic_machine=x86_64-pc
  1016. os=-rdos
  1017. ;;
  1018. rdos32)
  1019. basic_machine=i386-pc
  1020. os=-rdos
  1021. ;;
  1022. rom68k)
  1023. basic_machine=m68k-rom68k
  1024. os=-coff
  1025. ;;
  1026. rm[46]00)
  1027. basic_machine=mips-siemens
  1028. ;;
  1029. rtpc | rtpc-*)
  1030. basic_machine=romp-ibm
  1031. ;;
  1032. s390 | s390-*)
  1033. basic_machine=s390-ibm
  1034. ;;
  1035. s390x | s390x-*)
  1036. basic_machine=s390x-ibm
  1037. ;;
  1038. sa29200)
  1039. basic_machine=a29k-amd
  1040. os=-udi
  1041. ;;
  1042. sb1)
  1043. basic_machine=mipsisa64sb1-unknown
  1044. ;;
  1045. sb1el)
  1046. basic_machine=mipsisa64sb1el-unknown
  1047. ;;
  1048. sde)
  1049. basic_machine=mipsisa32-sde
  1050. os=-elf
  1051. ;;
  1052. sei)
  1053. basic_machine=mips-sei
  1054. os=-seiux
  1055. ;;
  1056. sequent)
  1057. basic_machine=i386-sequent
  1058. ;;
  1059. sh)
  1060. basic_machine=sh-hitachi
  1061. os=-hms
  1062. ;;
  1063. sh5el)
  1064. basic_machine=sh5le-unknown
  1065. ;;
  1066. sh64)
  1067. basic_machine=sh64-unknown
  1068. ;;
  1069. sparclite-wrs | simso-wrs)
  1070. basic_machine=sparclite-wrs
  1071. os=-vxworks
  1072. ;;
  1073. sps7)
  1074. basic_machine=m68k-bull
  1075. os=-sysv2
  1076. ;;
  1077. spur)
  1078. basic_machine=spur-unknown
  1079. ;;
  1080. st2000)
  1081. basic_machine=m68k-tandem
  1082. ;;
  1083. stratus)
  1084. basic_machine=i860-stratus
  1085. os=-sysv4
  1086. ;;
  1087. strongarm-* | thumb-*)
  1088. basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
  1089. ;;
  1090. sun2)
  1091. basic_machine=m68000-sun
  1092. ;;
  1093. sun2os3)
  1094. basic_machine=m68000-sun
  1095. os=-sunos3
  1096. ;;
  1097. sun2os4)
  1098. basic_machine=m68000-sun
  1099. os=-sunos4
  1100. ;;
  1101. sun3os3)
  1102. basic_machine=m68k-sun
  1103. os=-sunos3
  1104. ;;
  1105. sun3os4)
  1106. basic_machine=m68k-sun
  1107. os=-sunos4
  1108. ;;
  1109. sun4os3)
  1110. basic_machine=sparc-sun
  1111. os=-sunos3
  1112. ;;
  1113. sun4os4)
  1114. basic_machine=sparc-sun
  1115. os=-sunos4
  1116. ;;
  1117. sun4sol2)
  1118. basic_machine=sparc-sun
  1119. os=-solaris2
  1120. ;;
  1121. sun3 | sun3-*)
  1122. basic_machine=m68k-sun
  1123. ;;
  1124. sun4)
  1125. basic_machine=sparc-sun
  1126. ;;
  1127. sun386 | sun386i | roadrunner)
  1128. basic_machine=i386-sun
  1129. ;;
  1130. sv1)
  1131. basic_machine=sv1-cray
  1132. os=-unicos
  1133. ;;
  1134. symmetry)
  1135. basic_machine=i386-sequent
  1136. os=-dynix
  1137. ;;
  1138. t3e)
  1139. basic_machine=alphaev5-cray
  1140. os=-unicos
  1141. ;;
  1142. t90)
  1143. basic_machine=t90-cray
  1144. os=-unicos
  1145. ;;
  1146. tile*)
  1147. basic_machine=$basic_machine-unknown
  1148. os=-linux-gnu
  1149. ;;
  1150. tx39)
  1151. basic_machine=mipstx39-unknown
  1152. ;;
  1153. tx39el)
  1154. basic_machine=mipstx39el-unknown
  1155. ;;
  1156. toad1)
  1157. basic_machine=pdp10-xkl
  1158. os=-tops20
  1159. ;;
  1160. tower | tower-32)
  1161. basic_machine=m68k-ncr
  1162. ;;
  1163. tpf)
  1164. basic_machine=s390x-ibm
  1165. os=-tpf
  1166. ;;
  1167. udi29k)
  1168. basic_machine=a29k-amd
  1169. os=-udi
  1170. ;;
  1171. ultra3)
  1172. basic_machine=a29k-nyu
  1173. os=-sym1
  1174. ;;
  1175. v810 | necv810)
  1176. basic_machine=v810-nec
  1177. os=-none
  1178. ;;
  1179. vaxv)
  1180. basic_machine=vax-dec
  1181. os=-sysv
  1182. ;;
  1183. vms)
  1184. basic_machine=vax-dec
  1185. os=-vms
  1186. ;;
  1187. vpp*|vx|vx-*)
  1188. basic_machine=f301-fujitsu
  1189. ;;
  1190. vxworks960)
  1191. basic_machine=i960-wrs
  1192. os=-vxworks
  1193. ;;
  1194. vxworks68)
  1195. basic_machine=m68k-wrs
  1196. os=-vxworks
  1197. ;;
  1198. vxworks29k)
  1199. basic_machine=a29k-wrs
  1200. os=-vxworks
  1201. ;;
  1202. w65*)
  1203. basic_machine=w65-wdc
  1204. os=-none
  1205. ;;
  1206. w89k-*)
  1207. basic_machine=hppa1.1-winbond
  1208. os=-proelf
  1209. ;;
  1210. xbox)
  1211. basic_machine=i686-pc
  1212. os=-mingw32
  1213. ;;
  1214. xps | xps100)
  1215. basic_machine=xps100-honeywell
  1216. ;;
  1217. xscale-* | xscalee[bl]-*)
  1218. basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
  1219. ;;
  1220. ymp)
  1221. basic_machine=ymp-cray
  1222. os=-unicos
  1223. ;;
  1224. z8k-*-coff)
  1225. basic_machine=z8k-unknown
  1226. os=-sim
  1227. ;;
  1228. z80-*-coff)
  1229. basic_machine=z80-unknown
  1230. os=-sim
  1231. ;;
  1232. none)
  1233. basic_machine=none-none
  1234. os=-none
  1235. ;;
  1236. # Here we handle the default manufacturer of certain CPU types. It is in
  1237. # some cases the only manufacturer, in others, it is the most popular.
  1238. w89k)
  1239. basic_machine=hppa1.1-winbond
  1240. ;;
  1241. op50n)
  1242. basic_machine=hppa1.1-oki
  1243. ;;
  1244. op60c)
  1245. basic_machine=hppa1.1-oki
  1246. ;;
  1247. romp)
  1248. basic_machine=romp-ibm
  1249. ;;
  1250. mmix)
  1251. basic_machine=mmix-knuth
  1252. ;;
  1253. rs6000)
  1254. basic_machine=rs6000-ibm
  1255. ;;
  1256. vax)
  1257. basic_machine=vax-dec
  1258. ;;
  1259. pdp10)
  1260. # there are many clones, so DEC is not a safe bet
  1261. basic_machine=pdp10-unknown
  1262. ;;
  1263. pdp11)
  1264. basic_machine=pdp11-dec
  1265. ;;
  1266. we32k)
  1267. basic_machine=we32k-att
  1268. ;;
  1269. sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
  1270. basic_machine=sh-unknown
  1271. ;;
  1272. sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
  1273. basic_machine=sparc-sun
  1274. ;;
  1275. cydra)
  1276. basic_machine=cydra-cydrome
  1277. ;;
  1278. orion)
  1279. basic_machine=orion-highlevel
  1280. ;;
  1281. orion105)
  1282. basic_machine=clipper-highlevel
  1283. ;;
  1284. mac | mpw | mac-mpw)
  1285. basic_machine=m68k-apple
  1286. ;;
  1287. pmac | pmac-mpw)
  1288. basic_machine=powerpc-apple
  1289. ;;
  1290. *-unknown)
  1291. # Make sure to match an already-canonicalized machine name.
  1292. ;;
  1293. *)
  1294. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  1295. exit 1
  1296. ;;
  1297. esac
  1298. # Here we canonicalize certain aliases for manufacturers.
  1299. case $basic_machine in
  1300. *-digital*)
  1301. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  1302. ;;
  1303. *-commodore*)
  1304. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  1305. ;;
  1306. *)
  1307. ;;
  1308. esac
  1309. # Decode manufacturer-specific aliases for certain operating systems.
  1310. if [ x"$os" != x"" ]
  1311. then
  1312. case $os in
  1313. # First match some system type aliases
  1314. # that might get confused with valid system types.
  1315. # -solaris* is a basic system type, with this one exception.
  1316. -auroraux)
  1317. os=-auroraux
  1318. ;;
  1319. -solaris1 | -solaris1.*)
  1320. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  1321. ;;
  1322. -solaris)
  1323. os=-solaris2
  1324. ;;
  1325. -svr4*)
  1326. os=-sysv4
  1327. ;;
  1328. -unixware*)
  1329. os=-sysv4.2uw
  1330. ;;
  1331. -gnu/linux*)
  1332. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  1333. ;;
  1334. # First accept the basic system types.
  1335. # The portable systems comes first.
  1336. # Each alternative MUST END IN A *, to match a version number.
  1337. # -sysv* is not here because it comes later, after sysvr4.
  1338. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  1339. | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
  1340. | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
  1341. | -sym* | -kopensolaris* | -plan9* \
  1342. | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  1343. | -aos* | -aros* | -cloudabi* \
  1344. | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1345. | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1346. | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
  1347. | -bitrig* | -openbsd* | -solidbsd* \
  1348. | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
  1349. | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1350. | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1351. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1352. | -chorusos* | -chorusrdb* | -cegcc* \
  1353. | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1354. | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
  1355. | -linux-newlib* | -linux-musl* | -linux-uclibc* \
  1356. | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
  1357. | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  1358. | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1359. | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  1360. | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
  1361. | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  1362. | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  1363. | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
  1364. # Remember, each alternative MUST END IN *, to match a version number.
  1365. ;;
  1366. -qnx*)
  1367. case $basic_machine in
  1368. x86-* | i*86-*)
  1369. ;;
  1370. *)
  1371. os=-nto$os
  1372. ;;
  1373. esac
  1374. ;;
  1375. -nto-qnx*)
  1376. ;;
  1377. -nto*)
  1378. os=`echo $os | sed -e 's|nto|nto-qnx|'`
  1379. ;;
  1380. -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  1381. | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
  1382. | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  1383. ;;
  1384. -mac*)
  1385. os=`echo $os | sed -e 's|mac|macos|'`
  1386. ;;
  1387. -linux-dietlibc)
  1388. os=-linux-dietlibc
  1389. ;;
  1390. -linux*)
  1391. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  1392. ;;
  1393. -sunos5*)
  1394. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  1395. ;;
  1396. -sunos6*)
  1397. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  1398. ;;
  1399. -opened*)
  1400. os=-openedition
  1401. ;;
  1402. -os400*)
  1403. os=-os400
  1404. ;;
  1405. -wince*)
  1406. os=-wince
  1407. ;;
  1408. -osfrose*)
  1409. os=-osfrose
  1410. ;;
  1411. -osf*)
  1412. os=-osf
  1413. ;;
  1414. -utek*)
  1415. os=-bsd
  1416. ;;
  1417. -dynix*)
  1418. os=-bsd
  1419. ;;
  1420. -acis*)
  1421. os=-aos
  1422. ;;
  1423. -atheos*)
  1424. os=-atheos
  1425. ;;
  1426. -syllable*)
  1427. os=-syllable
  1428. ;;
  1429. -386bsd)
  1430. os=-bsd
  1431. ;;
  1432. -ctix* | -uts*)
  1433. os=-sysv
  1434. ;;
  1435. -nova*)
  1436. os=-rtmk-nova
  1437. ;;
  1438. -ns2 )
  1439. os=-nextstep2
  1440. ;;
  1441. -nsk*)
  1442. os=-nsk
  1443. ;;
  1444. # Preserve the version number of sinix5.
  1445. -sinix5.*)
  1446. os=`echo $os | sed -e 's|sinix|sysv|'`
  1447. ;;
  1448. -sinix*)
  1449. os=-sysv4
  1450. ;;
  1451. -tpf*)
  1452. os=-tpf
  1453. ;;
  1454. -triton*)
  1455. os=-sysv3
  1456. ;;
  1457. -oss*)
  1458. os=-sysv3
  1459. ;;
  1460. -svr4)
  1461. os=-sysv4
  1462. ;;
  1463. -svr3)
  1464. os=-sysv3
  1465. ;;
  1466. -sysvr4)
  1467. os=-sysv4
  1468. ;;
  1469. # This must come after -sysvr4.
  1470. -sysv*)
  1471. ;;
  1472. -ose*)
  1473. os=-ose
  1474. ;;
  1475. -es1800*)
  1476. os=-ose
  1477. ;;
  1478. -xenix)
  1479. os=-xenix
  1480. ;;
  1481. -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1482. os=-mint
  1483. ;;
  1484. -aros*)
  1485. os=-aros
  1486. ;;
  1487. -zvmoe)
  1488. os=-zvmoe
  1489. ;;
  1490. -dicos*)
  1491. os=-dicos
  1492. ;;
  1493. -nacl*)
  1494. ;;
  1495. -none)
  1496. ;;
  1497. *)
  1498. # Get rid of the `-' at the beginning of $os.
  1499. os=`echo $os | sed 's/[^-]*-//'`
  1500. echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  1501. exit 1
  1502. ;;
  1503. esac
  1504. else
  1505. # Here we handle the default operating systems that come with various machines.
  1506. # The value should be what the vendor currently ships out the door with their
  1507. # machine or put another way, the most popular os provided with the machine.
  1508. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1509. # "-sun"), then you have to tell the case statement up towards the top
  1510. # that MANUFACTURER isn't an operating system. Otherwise, code above
  1511. # will signal an error saying that MANUFACTURER isn't an operating
  1512. # system, and we'll never get to this point.
  1513. case $basic_machine in
  1514. score-*)
  1515. os=-elf
  1516. ;;
  1517. spu-*)
  1518. os=-elf
  1519. ;;
  1520. *-acorn)
  1521. os=-riscix1.2
  1522. ;;
  1523. arm*-rebel)
  1524. os=-linux
  1525. ;;
  1526. arm*-semi)
  1527. os=-aout
  1528. ;;
  1529. c4x-* | tic4x-*)
  1530. os=-coff
  1531. ;;
  1532. c8051-*)
  1533. os=-elf
  1534. ;;
  1535. hexagon-*)
  1536. os=-elf
  1537. ;;
  1538. tic54x-*)
  1539. os=-coff
  1540. ;;
  1541. tic55x-*)
  1542. os=-coff
  1543. ;;
  1544. tic6x-*)
  1545. os=-coff
  1546. ;;
  1547. # This must come before the *-dec entry.
  1548. pdp10-*)
  1549. os=-tops20
  1550. ;;
  1551. pdp11-*)
  1552. os=-none
  1553. ;;
  1554. *-dec | vax-*)
  1555. os=-ultrix4.2
  1556. ;;
  1557. m68*-apollo)
  1558. os=-domain
  1559. ;;
  1560. i386-sun)
  1561. os=-sunos4.0.2
  1562. ;;
  1563. m68000-sun)
  1564. os=-sunos3
  1565. ;;
  1566. m68*-cisco)
  1567. os=-aout
  1568. ;;
  1569. mep-*)
  1570. os=-elf
  1571. ;;
  1572. mips*-cisco)
  1573. os=-elf
  1574. ;;
  1575. mips*-*)
  1576. os=-elf
  1577. ;;
  1578. or32-*)
  1579. os=-coff
  1580. ;;
  1581. *-tti) # must be before sparc entry or we get the wrong os.
  1582. os=-sysv3
  1583. ;;
  1584. sparc-* | *-sun)
  1585. os=-sunos4.1.1
  1586. ;;
  1587. *-be)
  1588. os=-beos
  1589. ;;
  1590. *-haiku)
  1591. os=-haiku
  1592. ;;
  1593. *-ibm)
  1594. os=-aix
  1595. ;;
  1596. *-knuth)
  1597. os=-mmixware
  1598. ;;
  1599. *-wec)
  1600. os=-proelf
  1601. ;;
  1602. *-winbond)
  1603. os=-proelf
  1604. ;;
  1605. *-oki)
  1606. os=-proelf
  1607. ;;
  1608. *-hp)
  1609. os=-hpux
  1610. ;;
  1611. *-hitachi)
  1612. os=-hiux
  1613. ;;
  1614. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1615. os=-sysv
  1616. ;;
  1617. *-cbm)
  1618. os=-amigaos
  1619. ;;
  1620. *-dg)
  1621. os=-dgux
  1622. ;;
  1623. *-dolphin)
  1624. os=-sysv3
  1625. ;;
  1626. m68k-ccur)
  1627. os=-rtu
  1628. ;;
  1629. m88k-omron*)
  1630. os=-luna
  1631. ;;
  1632. *-next )
  1633. os=-nextstep
  1634. ;;
  1635. *-sequent)
  1636. os=-ptx
  1637. ;;
  1638. *-crds)
  1639. os=-unos
  1640. ;;
  1641. *-ns)
  1642. os=-genix
  1643. ;;
  1644. i370-*)
  1645. os=-mvs
  1646. ;;
  1647. *-next)
  1648. os=-nextstep3
  1649. ;;
  1650. *-gould)
  1651. os=-sysv
  1652. ;;
  1653. *-highlevel)
  1654. os=-bsd
  1655. ;;
  1656. *-encore)
  1657. os=-bsd
  1658. ;;
  1659. *-sgi)
  1660. os=-irix
  1661. ;;
  1662. *-siemens)
  1663. os=-sysv4
  1664. ;;
  1665. *-masscomp)
  1666. os=-rtu
  1667. ;;
  1668. f30[01]-fujitsu | f700-fujitsu)
  1669. os=-uxpv
  1670. ;;
  1671. *-rom68k)
  1672. os=-coff
  1673. ;;
  1674. *-*bug)
  1675. os=-coff
  1676. ;;
  1677. *-apple)
  1678. os=-macos
  1679. ;;
  1680. *-atari*)
  1681. os=-mint
  1682. ;;
  1683. *)
  1684. os=-none
  1685. ;;
  1686. esac
  1687. fi
  1688. # Here we handle the case where we know the os, and the CPU type, but not the
  1689. # manufacturer. We pick the logical manufacturer.
  1690. vendor=unknown
  1691. case $basic_machine in
  1692. *-unknown)
  1693. case $os in
  1694. -riscix*)
  1695. vendor=acorn
  1696. ;;
  1697. -sunos*)
  1698. vendor=sun
  1699. ;;
  1700. -cnk*|-aix*)
  1701. vendor=ibm
  1702. ;;
  1703. -beos*)
  1704. vendor=be
  1705. ;;
  1706. -hpux*)
  1707. vendor=hp
  1708. ;;
  1709. -mpeix*)
  1710. vendor=hp
  1711. ;;
  1712. -hiux*)
  1713. vendor=hitachi
  1714. ;;
  1715. -unos*)
  1716. vendor=crds
  1717. ;;
  1718. -dgux*)
  1719. vendor=dg
  1720. ;;
  1721. -luna*)
  1722. vendor=omron
  1723. ;;
  1724. -genix*)
  1725. vendor=ns
  1726. ;;
  1727. -mvs* | -opened*)
  1728. vendor=ibm
  1729. ;;
  1730. -os400*)
  1731. vendor=ibm
  1732. ;;
  1733. -ptx*)
  1734. vendor=sequent
  1735. ;;
  1736. -tpf*)
  1737. vendor=ibm
  1738. ;;
  1739. -vxsim* | -vxworks* | -windiss*)
  1740. vendor=wrs
  1741. ;;
  1742. -aux*)
  1743. vendor=apple
  1744. ;;
  1745. -hms*)
  1746. vendor=hitachi
  1747. ;;
  1748. -mpw* | -macos*)
  1749. vendor=apple
  1750. ;;
  1751. -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1752. vendor=atari
  1753. ;;
  1754. -vos*)
  1755. vendor=stratus
  1756. ;;
  1757. esac
  1758. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1759. ;;
  1760. esac
  1761. echo $basic_machine$os
  1762. exit
  1763. # Local variables:
  1764. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1765. # time-stamp-start: "timestamp='"
  1766. # time-stamp-format: "%:y-%02m-%02d"
  1767. # time-stamp-end: "'"
  1768. # End: