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.

256 lines
9.6KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with no
  7. Invariant Sections, the Front-Cover texts being (a) (see below), and
  8. with the Back-Cover Texts being (b) (see below). A copy of the
  9. license is included in the section entitled "GNU
  10. Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>Installing GCC: Old documentation</title>
  21. <meta name="description" content="Installing GCC: Old documentation">
  22. <meta name="keywords" content="Installing GCC: Old documentation">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <style type="text/css">
  27. <!--
  28. a.summary-letter {text-decoration: none}
  29. blockquote.indentedblock {margin-right: 0em}
  30. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.lisp {margin-left: 3.2em}
  35. div.smalldisplay {margin-left: 3.2em}
  36. div.smallexample {margin-left: 3.2em}
  37. div.smalllisp {margin-left: 3.2em}
  38. kbd {font-style: oblique}
  39. pre.display {font-family: inherit}
  40. pre.format {font-family: inherit}
  41. pre.menu-comment {font-family: serif}
  42. pre.menu-preformatted {font-family: serif}
  43. pre.smalldisplay {font-family: inherit; font-size: smaller}
  44. pre.smallexample {font-size: smaller}
  45. pre.smallformat {font-family: inherit; font-size: smaller}
  46. pre.smalllisp {font-size: smaller}
  47. span.nolinebreak {white-space: nowrap}
  48. span.roman {font-family: initial; font-weight: normal}
  49. span.sansserif {font-family: sans-serif; font-weight: normal}
  50. ul.no-bullet {list-style: none}
  51. -->
  52. </style>
  53. </head>
  54. <body lang="en">
  55. <h1 class="settitle" align="center">Installing GCC: Old documentation</h1>
  56. <h1 align="center">Old installation documentation</h1>
  57. <p>Note most of this information is out of date and superseded by the
  58. previous chapters of this manual. It is provided for historical
  59. reference only, because of a lack of volunteers to merge it into the
  60. main manual.
  61. </p>
  62. <p>Here is the procedure for installing GCC on a GNU or Unix system.
  63. </p>
  64. <ol>
  65. <li> If you have chosen a configuration for GCC which requires other GNU
  66. tools (such as GAS or the GNU linker) instead of the standard system
  67. tools, install the required tools in the build directory under the names
  68. <samp>as</samp>, <samp>ld</samp> or whatever is appropriate.
  69. <p>Alternatively, you can do subsequent compilation using a value of the
  70. <code>PATH</code> environment variable such that the necessary GNU tools come
  71. before the standard system tools.
  72. </p>
  73. </li><li> Specify the host, build and target machine configurations. You do this
  74. when you run the <samp>configure</samp> script.
  75. <p>The <em>build</em> machine is the system which you are using, the
  76. <em>host</em> machine is the system where you want to run the resulting
  77. compiler (normally the build machine), and the <em>target</em> machine is
  78. the system for which you want the compiler to generate code.
  79. </p>
  80. <p>If you are building a compiler to produce code for the machine it runs
  81. on (a native compiler), you normally do not need to specify any operands
  82. to <samp>configure</samp>; it will try to guess the type of machine you are on
  83. and use that as the build, host and target machines. So you don&rsquo;t need
  84. to specify a configuration when building a native compiler unless
  85. <samp>configure</samp> cannot figure out what your configuration is or guesses
  86. wrong.
  87. </p>
  88. <p>In those cases, specify the build machine&rsquo;s <em>configuration name</em>
  89. with the <samp>--host</samp> option; the host and target will default to be
  90. the same as the host machine.
  91. </p>
  92. <p>Here is an example:
  93. </p>
  94. <div class="smallexample">
  95. <pre class="smallexample">./configure --host=sparc-sun-sunos4.1
  96. </pre></div>
  97. <p>A configuration name may be canonical or it may be more or less
  98. abbreviated.
  99. </p>
  100. <p>A canonical configuration name has three parts, separated by dashes.
  101. It looks like this: &lsquo;<samp><var>cpu</var>-<var>company</var>-<var>system</var></samp>&rsquo;.
  102. (The three parts may themselves contain dashes; <samp>configure</samp>
  103. can figure out which dashes serve which purpose.) For example,
  104. &lsquo;<samp>m68k-sun-sunos4.1</samp>&rsquo; specifies a Sun 3.
  105. </p>
  106. <p>You can also replace parts of the configuration by nicknames or aliases.
  107. For example, &lsquo;<samp>sun3</samp>&rsquo; stands for &lsquo;<samp>m68k-sun</samp>&rsquo;, so
  108. &lsquo;<samp>sun3-sunos4.1</samp>&rsquo; is another way to specify a Sun 3.
  109. </p>
  110. <p>You can specify a version number after any of the system types, and some
  111. of the CPU types. In most cases, the version is irrelevant, and will be
  112. ignored. So you might as well specify the version if you know it.
  113. </p>
  114. <p>See <a href="#Configurations">Configurations</a>, for a list of supported configuration names and
  115. notes on many of the configurations. You should check the notes in that
  116. section before proceeding any further with the installation of GCC.
  117. </p>
  118. </li></ol>
  119. <h2><a name="Configurations"></a>Configurations Supported by GCC</h2>
  120. <a name="index-configurations-supported-by-GCC"></a>
  121. <p>Here are the possible CPU types:
  122. </p>
  123. <blockquote>
  124. <p>1750a, a29k, alpha, arm, avr, c<var>n</var>, clipper, dsp16xx, elxsi, fr30, h8300,
  125. hppa1.0, hppa1.1, i370, i386, i486, i586, i686, i786, i860, i960, ip2k, m32r,
  126. m68000, m68k, m88k, mcore, mips, mipsel, mips64, mips64el,
  127. mn10200, mn10300, ns32k, pdp11, powerpc, powerpcle, romp, rs6000, sh, sparc,
  128. sparclite, sparc64, v850, vax, we32k.
  129. </p></blockquote>
  130. <p>Here are the recognized company names. As you can see, customary
  131. abbreviations are used rather than the longer official names.
  132. </p>
  133. <blockquote>
  134. <p>acorn, alliant, altos, apollo, apple, att, bull,
  135. cbm, convergent, convex, crds, dec, dg, dolphin,
  136. elxsi, encore, harris, hitachi, hp, ibm, intergraph, isi,
  137. mips, motorola, ncr, next, ns, omron, plexus,
  138. sequent, sgi, sony, sun, tti, unicom, wrs.
  139. </p></blockquote>
  140. <p>The company name is meaningful only to disambiguate when the rest of
  141. the information supplied is insufficient. You can omit it, writing
  142. just &lsquo;<samp><var>cpu</var>-<var>system</var></samp>&rsquo;, if it is not needed. For example,
  143. &lsquo;<samp>vax-ultrix4.2</samp>&rsquo; is equivalent to &lsquo;<samp>vax-dec-ultrix4.2</samp>&rsquo;.
  144. </p>
  145. <p>Here is a list of system types:
  146. </p>
  147. <blockquote>
  148. <p>386bsd, aix, acis, amigaos, aos, aout, aux, bosx, bsd, clix, coff, ctix, cxux,
  149. dgux, dynix, ebmon, ecoff, elf, esix, freebsd, hms, genix, gnu, linux,
  150. linux-gnu, hiux, hpux, iris, irix, isc, luna, lynxos, mach, minix, msdos, mvs,
  151. netbsd, newsos, nindy, ns, osf, osfrose, ptx, riscix, riscos, rtu, sco, sim,
  152. solaris, sunos, sym, sysv, udi, ultrix, unicos, uniplus, unos, vms, vsta,
  153. vxworks, winnt, xenix.
  154. </p></blockquote>
  155. <p>You can omit the system type; then <samp>configure</samp> guesses the
  156. operating system from the CPU and company.
  157. </p>
  158. <p>You can add a version number to the system type; this may or may not
  159. make a difference. For example, you can write &lsquo;<samp>bsd4.3</samp>&rsquo; or
  160. &lsquo;<samp>bsd4.4</samp>&rsquo; to distinguish versions of BSD. In practice, the version
  161. number is most needed for &lsquo;<samp>sysv3</samp>&rsquo; and &lsquo;<samp>sysv4</samp>&rsquo;, which are often
  162. treated differently.
  163. </p>
  164. <p>&lsquo;<samp>linux-gnu</samp>&rsquo; is the canonical name for the GNU/Linux target; however
  165. GCC will also accept &lsquo;<samp>linux</samp>&rsquo;. The version of the kernel in use is
  166. not relevant on these systems. A suffix such as &lsquo;<samp>libc1</samp>&rsquo; or &lsquo;<samp>aout</samp>&rsquo;
  167. distinguishes major versions of the C library; all of the suffixed versions
  168. are obsolete.
  169. </p>
  170. <p>If you specify an impossible combination such as &lsquo;<samp>i860-dg-vms</samp>&rsquo;,
  171. then you may get an error message from <samp>configure</samp>, or it may
  172. ignore part of the information and do the best it can with the rest.
  173. <samp>configure</samp> always prints the canonical name for the alternative
  174. that it used. GCC does not support all possible alternatives.
  175. </p>
  176. <p>Often a particular model of machine has a name. Many machine names are
  177. recognized as aliases for CPU/company combinations. Thus, the machine
  178. name &lsquo;<samp>sun3</samp>&rsquo;, mentioned above, is an alias for &lsquo;<samp>m68k-sun</samp>&rsquo;.
  179. Sometimes we accept a company name as a machine name, when the name is
  180. popularly used for a particular machine. Here is a table of the known
  181. machine names:
  182. </p>
  183. <blockquote>
  184. <p>3300, 3b1, 3b<var>n</var>, 7300, altos3068, altos,
  185. apollo68, att-7300, balance,
  186. convex-c<var>n</var>, crds, decstation-3100,
  187. decstation, delta, encore,
  188. fx2800, gmicro, hp7<var>nn</var>, hp8<var>nn</var>,
  189. hp9k2<var>nn</var>, hp9k3<var>nn</var>, hp9k7<var>nn</var>,
  190. hp9k8<var>nn</var>, iris4d, iris, isi68,
  191. m3230, magnum, merlin, miniframe,
  192. mmax, news-3600, news800, news, next,
  193. pbd, pc532, pmax, powerpc, powerpcle, ps2, risc-news,
  194. rtpc, sun2, sun386i, sun386, sun3,
  195. sun4, symmetry, tower-32, tower.
  196. </p></blockquote>
  197. <p>Remember that a machine name specifies both the cpu type and the company
  198. name.
  199. <hr />
  200. <p>
  201. <a href="./index.html">Return to the GCC Installation page</a>
  202. </p>
  203. </body>
  204. </html>