| 1 | <html lang="en"><head> | 
|---|
| 2 | <title>Installing GCC: Final installation</title> | 
|---|
| 3 | <meta http-equiv="Content-Type" content="text/html"> | 
|---|
| 4 | <meta name=description content="Installing GCC: Final installation"> | 
|---|
| 5 | <meta name=generator content="makeinfo 4.0"> | 
|---|
| 6 | <link href="http://texinfo.org/" rel=generator-home> | 
|---|
| 7 | </head><body> | 
|---|
| 8 |  | 
|---|
| 9 | <p>N<p>ow that GCC has been built (and optionally tested), you can install it with | 
|---|
| 10 | <pre>cd <var>objdir</var>; make install | 
|---|
| 11 | </pre> | 
|---|
| 12 |  | 
|---|
| 13 | <p>We strongly recommend to install into a target directory where there is | 
|---|
| 14 | no previous version of GCC present. | 
|---|
| 15 |  | 
|---|
| 16 | <p>That step completes the installation of GCC; user level binaries can | 
|---|
| 17 | be found in <code><var>prefix</var>/bin</code> where <var>prefix</var> is the value you | 
|---|
| 18 | specified with the <code>--prefix</code> to configure (or <code>/usr/local</code> | 
|---|
| 19 | by default).  (If you specified <code>--bindir</code>, that directory will | 
|---|
| 20 | be used instead; otherwise, if you specified <code>--exec-prefix</code>, | 
|---|
| 21 | <code><var>exec-prefix</var>/bin</code> will be used.)  Headers for the C++ and | 
|---|
| 22 | Java libraries are installed in <code><var>prefix</var>/include</code>; libraries | 
|---|
| 23 | in <code><var>libdir</var></code> (normally <code><var>prefix</var>/lib</code>); internal | 
|---|
| 24 | parts of the compiler in <code><var>libdir</var>/gcc-lib</code>; documentation in | 
|---|
| 25 | info format in <code><var>infodir</var></code> (normally <code><var>prefix</var>/info</code>). | 
|---|
| 26 |  | 
|---|
| 27 | <p>When installing cross-compilers, GCC's executables | 
|---|
| 28 | are not only installed into <code><var>bindir</var></code>, that | 
|---|
| 29 | is, <code><var>exec-prefix</var>/bin</code>, but additionally into | 
|---|
| 30 | <code><var>exec-prefix</var>/<var>target-alias</var>/bin</code>, if that directory | 
|---|
| 31 | exists.  Typically, such <dfn>tooldirs</dfn> hold target-specific | 
|---|
| 32 | binutils, including assembler and linker. | 
|---|
| 33 |  | 
|---|
| 34 | <p>Installation into a temporary staging area or into a <code>chroot</code> | 
|---|
| 35 | jail can be achieved with the command | 
|---|
| 36 |  | 
|---|
| 37 | <pre>make DESTDIR=<var>path-to-rootdir</var> install | 
|---|
| 38 | </pre> | 
|---|
| 39 |  | 
|---|
| 40 | <p>where <var>path-to-rootdir</var> is the absolute path of | 
|---|
| 41 | a directory relative to which all installation paths will be | 
|---|
| 42 | interpreted.  Note that the directory specified by <code>DESTDIR</code> | 
|---|
| 43 | need not exist yet; it will be created if necessary. | 
|---|
| 44 |  | 
|---|
| 45 | <p>There is a subtle point with tooldirs and <code>DESTDIR</code>: | 
|---|
| 46 | If you relocate a cross-compiler installation with | 
|---|
| 47 | e.g. <code>DESTDIR=<var>rootdir</var></code>, then the directory | 
|---|
| 48 | <code><var>rootdir</var>/<var>exec-prefix</var>/<var>target-alias</var>/bin</code> will | 
|---|
| 49 | be filled with duplicated GCC executables only if it already exists, | 
|---|
| 50 | it will not be created otherwise.  This is regarded as a feature, | 
|---|
| 51 | not as a bug, because it gives slightly more control to the packagers | 
|---|
| 52 | using the <code>DESTDIR</code> feature. | 
|---|
| 53 |  | 
|---|
| 54 | <p>If you built a released version of GCC using <code>make bootstrap</code> then please | 
|---|
| 55 | quickly review the build status page for your release, available from | 
|---|
| 56 | <a href="http://gcc.gnu.org/buildstat.html">http://gcc.gnu.org/buildstat.html</a>. | 
|---|
| 57 | If your system is not listed for the version of GCC that you built, | 
|---|
| 58 | send a note to | 
|---|
| 59 | <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> indicating | 
|---|
| 60 | that you successfully built and installed GCC. | 
|---|
| 61 | Include the following information: | 
|---|
| 62 |  | 
|---|
| 63 | <ul> | 
|---|
| 64 | <li>Output from running <code><var>srcdir</var>/config.guess</code>.  Do not send us | 
|---|
| 65 | that file itself, just the one-line output from running it. | 
|---|
| 66 |  | 
|---|
| 67 | <li>The output of <code>gcc -v</code> for your newly installed gcc. | 
|---|
| 68 | This tells us which version of GCC you built and the options you passed to | 
|---|
| 69 | configure. | 
|---|
| 70 |  | 
|---|
| 71 | <li>Whether you enabled all languages or a subset of them.  If you used a | 
|---|
| 72 | full distribution then this information is part of the configure | 
|---|
| 73 | options in the output of <code>gcc -v</code>, but if you downloaded the | 
|---|
| 74 | "core" compiler plus additional front ends then it isn't apparent | 
|---|
| 75 | which ones you built unless you tell us about it. | 
|---|
| 76 |  | 
|---|
| 77 | <li>If the build was for GNU/Linux, also include: | 
|---|
| 78 | <ul> | 
|---|
| 79 | <li>The distribution name and version (e.g., Red Hat 7.1 or Debian 2.2.3); | 
|---|
| 80 | this information should be available from <code>/etc/issue</code>. | 
|---|
| 81 |  | 
|---|
| 82 | <li>The version of the Linux kernel, available from <code>uname --version</code> | 
|---|
| 83 | or <code>uname -a</code>. | 
|---|
| 84 |  | 
|---|
| 85 | <li>The version of glibc you used; for RPM-based systems like Red Hat, | 
|---|
| 86 | Mandrake, and SuSE type <code>rpm -q glibc</code> to get the glibc version, | 
|---|
| 87 | and on systems like Debian and Progeny use <code>dpkg -l libc6</code>. | 
|---|
| 88 | </ul> | 
|---|
| 89 | For other systems, you can include similar information if you think it is | 
|---|
| 90 | relevant. | 
|---|
| 91 |  | 
|---|
| 92 | <li>Any other information that you think would be useful to people building | 
|---|
| 93 | GCC on the same configuration.  The new entry in the build status list | 
|---|
| 94 | will include a link to the archived copy of your message. | 
|---|
| 95 | </ul> | 
|---|
| 96 |  | 
|---|
| 97 | <p>We'd also like to know if the | 
|---|
| 98 | <a href="specific.html">host/target specific installation notes</a> | 
|---|
| 99 | didn't include your host/target information or if that information is | 
|---|
| 100 | incomplete or out of date.  Send a note to | 
|---|
| 101 | <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> telling us how the information should be changed. | 
|---|
| 102 |  | 
|---|
| 103 | <p>If you find a bug, please report it following our | 
|---|
| 104 | <a href="../bugs.html">bug reporting guidelines</a>. | 
|---|
| 105 |  | 
|---|
| 106 | <p>If you want to print the GCC manuals, do <code>cd <var>objdir</var>; make | 
|---|
| 107 | dvi</code>.  You will need to have <code>texi2dvi</code> (version at least 4.1) | 
|---|
| 108 | and TeX installed.  This creates a number of <code>.dvi</code> files in | 
|---|
| 109 | subdirectories of <code><var>objdir</var></code>; these may be converted for | 
|---|
| 110 | printing with programs such as <code>dvips</code>.  You can also | 
|---|
| 111 | <a href="http://www.gnu.org/order/order.html">buy printed manuals from the Free Software Foundation</a>, though such manuals may not be for the most | 
|---|
| 112 | recent version of GCC. | 
|---|
| 113 |  | 
|---|
| 114 | <hr /> | 
|---|
| 115 | <p> | 
|---|
| 116 | <a href="./index.html">Return to the GCC Installation page</a> | 
|---|
| 117 |  | 
|---|
| 118 | </body></html> | 
|---|
| 119 |  | 
|---|