config.sub 35 KB

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