config.sub 35 KB

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