Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

228 linhas
8.8KB

  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: Final installation</title>
  21. <meta name="description" content="Installing GCC: Final installation">
  22. <meta name="keywords" content="Installing GCC: Final installation">
  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: Final installation</h1>
  56. <p>Now that GCC has been built (and optionally tested), you can install it with
  57. </p><div class="smallexample">
  58. <pre class="smallexample">cd <var>objdir</var> &amp;&amp; make install
  59. </pre></div>
  60. <p>We strongly recommend to install into a target directory where there is
  61. no previous version of GCC present. Also, the GNAT runtime should not
  62. be stripped, as this would break certain features of the debugger that
  63. depend on this debugging information (catching Ada exceptions for
  64. instance).
  65. </p>
  66. <p>That step completes the installation of GCC; user level binaries can
  67. be found in <samp><var>prefix</var>/bin</samp> where <var>prefix</var> is the value
  68. you specified with the <samp>--prefix</samp> to configure (or
  69. <samp>/usr/local</samp> by default). (If you specified <samp>--bindir</samp>,
  70. that directory will be used instead; otherwise, if you specified
  71. <samp>--exec-prefix</samp>, <samp><var>exec-prefix</var>/bin</samp> will be used.)
  72. Headers for the C++ library are installed in
  73. <samp><var>prefix</var>/include</samp>; libraries in <samp><var>libdir</var></samp>
  74. (normally <samp><var>prefix</var>/lib</samp>); internal parts of the compiler in
  75. <samp><var>libdir</var>/gcc</samp> and <samp><var>libexecdir</var>/gcc</samp>; documentation
  76. in info format in <samp><var>infodir</var></samp> (normally
  77. <samp><var>prefix</var>/info</samp>).
  78. </p>
  79. <p>When installing cross-compilers, GCC&rsquo;s executables
  80. are not only installed into <samp><var>bindir</var></samp>, that
  81. is, <samp><var>exec-prefix</var>/bin</samp>, but additionally into
  82. <samp><var>exec-prefix</var>/<var>target-alias</var>/bin</samp>, if that directory
  83. exists. Typically, such <em>tooldirs</em> hold target-specific
  84. binutils, including assembler and linker.
  85. </p>
  86. <p>Installation into a temporary staging area or into a <code>chroot</code>
  87. jail can be achieved with the command
  88. </p>
  89. <div class="smallexample">
  90. <pre class="smallexample">make DESTDIR=<var>path-to-rootdir</var> install
  91. </pre></div>
  92. <p>where <var>path-to-rootdir</var> is the absolute path of
  93. a directory relative to which all installation paths will be
  94. interpreted. Note that the directory specified by <code>DESTDIR</code>
  95. need not exist yet; it will be created if necessary.
  96. </p>
  97. <p>There is a subtle point with tooldirs and <code>DESTDIR</code>:
  98. If you relocate a cross-compiler installation with
  99. e.g. &lsquo;<samp>DESTDIR=<var>rootdir</var></samp>&rsquo;, then the directory
  100. <samp><var>rootdir</var>/<var>exec-prefix</var>/<var>target-alias</var>/bin</samp> will
  101. be filled with duplicated GCC executables only if it already exists,
  102. it will not be created otherwise. This is regarded as a feature,
  103. not as a bug, because it gives slightly more control to the packagers
  104. using the <code>DESTDIR</code> feature.
  105. </p>
  106. <p>You can install stripped programs and libraries with
  107. </p>
  108. <div class="smallexample">
  109. <pre class="smallexample">make install-strip
  110. </pre></div>
  111. <p>If you are bootstrapping a released version of GCC then please
  112. quickly review the build status page for your release, available from
  113. <a href="http://gcc.gnu.org/buildstat.html">http://gcc.gnu.org/buildstat.html</a>.
  114. If your system is not listed for the version of GCC that you built,
  115. send a note to
  116. <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> indicating
  117. that you successfully built and installed GCC.
  118. Include the following information:
  119. </p>
  120. <ul>
  121. <li> Output from running <samp><var>srcdir</var>/config.guess</samp>. Do not send
  122. that file itself, just the one-line output from running it.
  123. </li><li> The output of &lsquo;<samp>gcc -v</samp>&rsquo; for your newly installed <code>gcc</code>.
  124. This tells us which version of GCC you built and the options you passed to
  125. configure.
  126. </li><li> Whether you enabled all languages or a subset of them. If you used a
  127. full distribution then this information is part of the configure
  128. options in the output of &lsquo;<samp>gcc -v</samp>&rsquo;, but if you downloaded the
  129. &ldquo;core&rdquo; compiler plus additional front ends then it isn&rsquo;t apparent
  130. which ones you built unless you tell us about it.
  131. </li><li> If the build was for GNU/Linux, also include:
  132. <ul>
  133. <li> The distribution name and version (e.g., Red Hat 7.1 or Debian 2.2.3);
  134. this information should be available from <samp>/etc/issue</samp>.
  135. </li><li> The version of the Linux kernel, available from &lsquo;<samp>uname --version</samp>&rsquo;
  136. or &lsquo;<samp>uname -a</samp>&rsquo;.
  137. </li><li> The version of glibc you used; for RPM-based systems like Red Hat,
  138. Mandrake, and SuSE type &lsquo;<samp>rpm -q glibc</samp>&rsquo; to get the glibc version,
  139. and on systems like Debian and Progeny use &lsquo;<samp>dpkg -l libc6</samp>&rsquo;.
  140. </li></ul>
  141. <p>For other systems, you can include similar information if you think it is
  142. relevant.
  143. </p>
  144. </li><li> Any other information that you think would be useful to people building
  145. GCC on the same configuration. The new entry in the build status list
  146. will include a link to the archived copy of your message.
  147. </li></ul>
  148. <p>We&rsquo;d also like to know if the
  149. <a href="specific.html">host/target specific installation notes</a>
  150. didn&rsquo;t include your host/target information or if that information is
  151. incomplete or out of date. Send a note to
  152. <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> detailing how the information should be changed.
  153. </p>
  154. <p>If you find a bug, please report it following the
  155. <a href="../bugs/">bug reporting guidelines</a>.
  156. </p>
  157. <p>If you want to print the GCC manuals, do &lsquo;<samp>cd <var>objdir</var>; make
  158. dvi</samp>&rsquo;. You will need to have <code>texi2dvi</code> (version at least 4.7)
  159. and TeX installed. This creates a number of <samp>.dvi</samp> files in
  160. subdirectories of <samp><var>objdir</var></samp>; these may be converted for
  161. printing with programs such as <code>dvips</code>. Alternately, by using
  162. &lsquo;<samp>make pdf</samp>&rsquo; in place of &lsquo;<samp>make dvi</samp>&rsquo;, you can create documentation
  163. in the form of <samp>.pdf</samp> files; this requires <code>texi2pdf</code>, which
  164. is included with Texinfo version 4.8 and later. You can also
  165. <a href="https://shop.fsf.org/">buy printed manuals from the
  166. Free Software Foundation</a>, though such manuals may not be for the most
  167. recent version of GCC.
  168. </p>
  169. <p>If you would like to generate online HTML documentation, do &lsquo;<samp>cd
  170. <var>objdir</var>; make html</samp>&rsquo; and HTML will be generated for the gcc manuals in
  171. <samp><var>objdir</var>/gcc/HTML</samp>.
  172. </p>
  173. <hr />
  174. <p>
  175. <p><a href="./index.html">Return to the GCC Installation page</a>
  176. </p>
  177. </body>
  178. </html>