config.sub 35 KB

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