config.sub 34 KB

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