Port of the PCE emulator suite to the 3DS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.sub 35KB

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