finalinstall.html 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <html lang="en">
  2. <head>
  3. <title>Installing GCC: Final installation</title>
  4. <meta http-equiv="Content-Type" content="text/html">
  5. <meta name="description" content="Installing GCC: Final installation">
  6. <meta name="generator" content="makeinfo 4.12">
  7. <link title="Top" rel="top" href="#Top">
  8. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  9. <!--
  10. Copyright (C) 1988-2015 Free Software Foundation, Inc.
  11. Permission is granted to copy, distribute and/or modify this document
  12. under the terms of the GNU Free Documentation License, Version 1.3 or
  13. any later version published by the Free Software Foundation; with no
  14. Invariant Sections, the Front-Cover texts being (a) (see below), and
  15. with the Back-Cover Texts being (b) (see below). A copy of the
  16. license is included in the section entitled "GNU Free Documentation License".
  17. (a) The FSF's Front-Cover Text is:
  18. A GNU Manual
  19. (b) The FSF's Back-Cover Text is:
  20. You have freedom to copy and modify this GNU Manual, like GNU
  21. software. Copies published by the Free Software Foundation raise
  22. funds for GNU development.-->
  23. <meta http-equiv="Content-Style-Type" content="text/css">
  24. <style type="text/css"><!--
  25. pre.display { font-family:inherit }
  26. pre.format { font-family:inherit }
  27. pre.smalldisplay { font-family:inherit; font-size:smaller }
  28. pre.smallformat { font-family:inherit; font-size:smaller }
  29. pre.smallexample { font-size:smaller }
  30. pre.smalllisp { font-size:smaller }
  31. span.sc { font-variant:small-caps }
  32. span.roman { font-family:serif; font-weight:normal; }
  33. span.sansserif { font-family:sans-serif; font-weight:normal; }
  34. --></style>
  35. </head>
  36. <body>
  37. <h1 class="settitle">Installing GCC: Final installation</h1>
  38. Now that GCC has been built (and optionally tested), you can install it with
  39. <pre class="smallexample"> cd <var>objdir</var> &amp;&amp; make install
  40. </pre>
  41. <p>We strongly recommend to install into a target directory where there is
  42. no previous version of GCC present. Also, the GNAT runtime should not
  43. be stripped, as this would break certain features of the debugger that
  44. depend on this debugging information (catching Ada exceptions for
  45. instance).
  46. <p>That step completes the installation of GCC; user level binaries can
  47. be found in <samp><var>prefix</var><span class="file">/bin</span></samp> where <var>prefix</var> is the value
  48. you specified with the <samp><span class="option">--prefix</span></samp> to configure (or
  49. <samp><span class="file">/usr/local</span></samp> by default). (If you specified <samp><span class="option">--bindir</span></samp>,
  50. that directory will be used instead; otherwise, if you specified
  51. <samp><span class="option">--exec-prefix</span></samp>, <samp><var>exec-prefix</var><span class="file">/bin</span></samp> will be used.)
  52. Headers for the C++ and Java libraries are installed in
  53. <samp><var>prefix</var><span class="file">/include</span></samp>; libraries in <samp><var>libdir</var></samp>
  54. (normally <samp><var>prefix</var><span class="file">/lib</span></samp>); internal parts of the compiler in
  55. <samp><var>libdir</var><span class="file">/gcc</span></samp> and <samp><var>libexecdir</var><span class="file">/gcc</span></samp>; documentation
  56. in info format in <samp><var>infodir</var></samp> (normally
  57. <samp><var>prefix</var><span class="file">/info</span></samp>).
  58. <p>When installing cross-compilers, GCC's executables
  59. are not only installed into <samp><var>bindir</var></samp>, that
  60. is, <samp><var>exec-prefix</var><span class="file">/bin</span></samp>, but additionally into
  61. <samp><var>exec-prefix</var><span class="file">/</span><var>target-alias</var><span class="file">/bin</span></samp>, if that directory
  62. exists. Typically, such <dfn>tooldirs</dfn> hold target-specific
  63. binutils, including assembler and linker.
  64. <p>Installation into a temporary staging area or into a <samp><span class="command">chroot</span></samp>
  65. jail can be achieved with the command
  66. <pre class="smallexample"> make DESTDIR=<var>path-to-rootdir</var> install
  67. </pre>
  68. <p class="noindent">where <var>path-to-rootdir</var> is the absolute path of
  69. a directory relative to which all installation paths will be
  70. interpreted. Note that the directory specified by <code>DESTDIR</code>
  71. need not exist yet; it will be created if necessary.
  72. <p>There is a subtle point with tooldirs and <code>DESTDIR</code>:
  73. If you relocate a cross-compiler installation with
  74. e.g. &lsquo;<samp><span class="samp">DESTDIR=</span><var>rootdir</var></samp>&rsquo;, then the directory
  75. <samp><var>rootdir</var><span class="file">/</span><var>exec-prefix</var><span class="file">/</span><var>target-alias</var><span class="file">/bin</span></samp> will
  76. be filled with duplicated GCC executables only if it already exists,
  77. it will not be created otherwise. This is regarded as a feature,
  78. not as a bug, because it gives slightly more control to the packagers
  79. using the <code>DESTDIR</code> feature.
  80. <p>You can install stripped programs and libraries with
  81. <pre class="smallexample"> make install-strip
  82. </pre>
  83. <p>If you are bootstrapping a released version of GCC then please
  84. quickly review the build status page for your release, available from
  85. <a href="http://gcc.gnu.org/buildstat.html">http://gcc.gnu.org/buildstat.html</a>.
  86. If your system is not listed for the version of GCC that you built,
  87. send a note to
  88. <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> indicating
  89. that you successfully built and installed GCC.
  90. Include the following information:
  91. <ul>
  92. <li>Output from running <samp><var>srcdir</var><span class="file">/config.guess</span></samp>. Do not send
  93. that file itself, just the one-line output from running it.
  94. <li>The output of &lsquo;<samp><span class="samp">gcc -v</span></samp>&rsquo; for your newly installed <samp><span class="command">gcc</span></samp>.
  95. This tells us which version of GCC you built and the options you passed to
  96. configure.
  97. <li>Whether you enabled all languages or a subset of them. If you used a
  98. full distribution then this information is part of the configure
  99. options in the output of &lsquo;<samp><span class="samp">gcc -v</span></samp>&rsquo;, but if you downloaded the
  100. &ldquo;core&rdquo; compiler plus additional front ends then it isn't apparent
  101. which ones you built unless you tell us about it.
  102. <li>If the build was for GNU/Linux, also include:
  103. <ul>
  104. <li>The distribution name and version (e.g., Red Hat 7.1 or Debian 2.2.3);
  105. this information should be available from <samp><span class="file">/etc/issue</span></samp>.
  106. <li>The version of the Linux kernel, available from &lsquo;<samp><span class="samp">uname --version</span></samp>&rsquo;
  107. or &lsquo;<samp><span class="samp">uname -a</span></samp>&rsquo;.
  108. <li>The version of glibc you used; for RPM-based systems like Red Hat,
  109. Mandrake, and SuSE type &lsquo;<samp><span class="samp">rpm -q glibc</span></samp>&rsquo; to get the glibc version,
  110. and on systems like Debian and Progeny use &lsquo;<samp><span class="samp">dpkg -l libc6</span></samp>&rsquo;.
  111. </ul>
  112. For other systems, you can include similar information if you think it is
  113. relevant.
  114. <li>Any other information that you think would be useful to people building
  115. GCC on the same configuration. The new entry in the build status list
  116. will include a link to the archived copy of your message.
  117. </ul>
  118. <p>We'd also like to know if the
  119. <a href="specific.html">host/target specific installation notes</a>
  120. didn't include your host/target information or if that information is
  121. incomplete or out of date. Send a note to
  122. <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> detailing how the information should be changed.
  123. <p>If you find a bug, please report it following the
  124. <a href="../bugs/">bug reporting guidelines</a>.
  125. <p>If you want to print the GCC manuals, do &lsquo;<samp><span class="samp">cd </span><var>objdir</var><span class="samp">; make
  126. dvi</span></samp>&rsquo;. You will need to have <samp><span class="command">texi2dvi</span></samp> (version at least 4.7)
  127. and TeX installed. This creates a number of <samp><span class="file">.dvi</span></samp> files in
  128. subdirectories of <samp><var>objdir</var></samp>; these may be converted for
  129. printing with programs such as <samp><span class="command">dvips</span></samp>. Alternately, by using
  130. &lsquo;<samp><span class="samp">make pdf</span></samp>&rsquo; in place of &lsquo;<samp><span class="samp">make dvi</span></samp>&rsquo;, you can create documentation
  131. in the form of <samp><span class="file">.pdf</span></samp> files; this requires <samp><span class="command">texi2pdf</span></samp>, which
  132. is included with Texinfo version 4.8 and later. You can also
  133. <a href="http://shop.fsf.org/">buy printed manuals from the Free Software Foundation</a>, though such manuals may not be for the most
  134. recent version of GCC.
  135. <p>If you would like to generate online HTML documentation, do &lsquo;<samp><span class="samp">cd
  136. </span><var>objdir</var><span class="samp">; make html</span></samp>&rsquo; and HTML will be generated for the gcc manuals in
  137. <samp><var>objdir</var><span class="file">/gcc/HTML</span></samp>.
  138. <p><hr />
  139. <p><a href="./index.html">Return to the GCC Installation page</a>
  140. <!-- ***Binaries**************************************************************** -->
  141. <!-- ***Specific**************************************************************** -->
  142. <!-- ***Old documentation****************************************************** -->
  143. <!-- ***GFDL******************************************************************** -->
  144. <!-- *************************************************************************** -->
  145. <!-- Part 6 The End of the Document -->
  146. </body></html>