config.sub 35 KB

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