config.sub 35 KB

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