| 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.6">
|
|---|
| 7 | <!--
|
|---|
| 8 | Copyright © 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
|---|
| 9 | 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
|---|
| 10 | <br><p>
|
|---|
| 11 | <p>Permission is granted to copy, distribute and/or modify this document
|
|---|
| 12 | under the terms of the GNU Free Documentation License, Version 1.2 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 "<a href="./gfdl.html">GNU Free Documentation License</a>".
|
|---|
| 17 |
|
|---|
| 18 | <p>(a) The FSF's Front-Cover Text is:
|
|---|
| 19 |
|
|---|
| 20 | <p>A GNU Manual
|
|---|
| 21 |
|
|---|
| 22 | <p>(b) The FSF's Back-Cover Text is:
|
|---|
| 23 |
|
|---|
| 24 | <p>You have freedom to copy and modify this GNU Manual, like GNU
|
|---|
| 25 | software. Copies published by the Free Software Foundation raise
|
|---|
| 26 | funds for GNU development.-->
|
|---|
| 27 | <meta http-equiv="Content-Style-Type" content="text/css">
|
|---|
| 28 | <style type="text/css"><!--
|
|---|
| 29 | pre.display { font-family:inherit }
|
|---|
| 30 | pre.format { font-family:inherit }
|
|---|
| 31 | pre.smalldisplay { font-family:inherit; font-size:smaller }
|
|---|
| 32 | pre.smallformat { font-family:inherit; font-size:smaller }
|
|---|
| 33 | pre.smallexample { font-size:smaller }
|
|---|
| 34 | pre.smalllisp { font-size:smaller }
|
|---|
| 35 | --></style>
|
|---|
| 36 | </head>
|
|---|
| 37 | <body>
|
|---|
| 38 | <h1 class="settitle">Installing GCC: Final installation</h1>
|
|---|
| 39 | Now that GCC has been built (and optionally tested), you can install it with
|
|---|
| 40 | <pre class="example"> cd <var>objdir</var>; make install
|
|---|
| 41 | </pre>
|
|---|
| 42 |
|
|---|
| 43 | <p>We strongly recommend to install into a target directory where there is
|
|---|
| 44 | no previous version of GCC present.
|
|---|
| 45 |
|
|---|
| 46 | <p>That step completes the installation of GCC; user level binaries can
|
|---|
| 47 | be found in <code></code><var>prefix</var><code>/bin</code> where <var>prefix</var> is the value you
|
|---|
| 48 | specified with the <code>--prefix</code> to configure (or <code>/usr/local</code>
|
|---|
| 49 | by default). (If you specified <code>--bindir</code>, that directory will
|
|---|
| 50 | be used instead; otherwise, if you specified <code>--exec-prefix</code>,
|
|---|
| 51 | <code></code><var>exec-prefix</var><code>/bin</code> will be used.) Headers for the C++ and
|
|---|
| 52 | Java libraries are installed in <code></code><var>prefix</var><code>/include</code>; libraries
|
|---|
| 53 | in <code></code><var>libdir</var><code></code> (normally <code></code><var>prefix</var><code>/lib</code>); internal
|
|---|
| 54 | parts of the compiler in <code></code><var>libdir</var><code>/gcc-lib</code>; documentation in
|
|---|
| 55 | info format in <code></code><var>infodir</var><code></code> (normally <code></code><var>prefix</var><code>/info</code>).
|
|---|
| 56 |
|
|---|
| 57 | <p>When installing cross-compilers, GCC's executables
|
|---|
| 58 | are not only installed into <code></code><var>bindir</var><code></code>, that
|
|---|
| 59 | is, <code></code><var>exec-prefix</var><code>/bin</code>, but additionally into
|
|---|
| 60 | <code></code><var>exec-prefix</var><code>/</code><var>target-alias</var><code>/bin</code>, if that directory
|
|---|
| 61 | exists. Typically, such <dfn>tooldirs</dfn> hold target-specific
|
|---|
| 62 | binutils, including assembler and linker.
|
|---|
| 63 |
|
|---|
| 64 | <p>Installation into a temporary staging area or into a <code>chroot</code>
|
|---|
| 65 | jail can be achieved with the command
|
|---|
| 66 |
|
|---|
| 67 | <pre class="example"> make DESTDIR=<var>path-to-rootdir</var> install
|
|---|
| 68 | </pre>
|
|---|
| 69 |
|
|---|
| 70 | <p>where <var>path-to-rootdir</var> is the absolute path of
|
|---|
| 71 | a directory relative to which all installation paths will be
|
|---|
| 72 | interpreted. Note that the directory specified by <code>DESTDIR</code>
|
|---|
| 73 | need not exist yet; it will be created if necessary.
|
|---|
| 74 |
|
|---|
| 75 | <p>There is a subtle point with tooldirs and <code>DESTDIR</code>:
|
|---|
| 76 | If you relocate a cross-compiler installation with
|
|---|
| 77 | e.g. <code>DESTDIR=</code><var>rootdir</var><code></code>, then the directory
|
|---|
| 78 | <code></code><var>rootdir</var><code>/</code><var>exec-prefix</var><code>/</code><var>target-alias</var><code>/bin</code> will
|
|---|
| 79 | be filled with duplicated GCC executables only if it already exists,
|
|---|
| 80 | it will not be created otherwise. This is regarded as a feature,
|
|---|
| 81 | not as a bug, because it gives slightly more control to the packagers
|
|---|
| 82 | using the <code>DESTDIR</code> feature.
|
|---|
| 83 |
|
|---|
| 84 | <p>If you built a released version of GCC using <code>make bootstrap</code> then please
|
|---|
| 85 | quickly review the build status page for your release, available from
|
|---|
| 86 | <a href="http://gcc.gnu.org/buildstat.html">http://gcc.gnu.org/buildstat.html</a>.
|
|---|
| 87 | If your system is not listed for the version of GCC that you built,
|
|---|
| 88 | send a note to
|
|---|
| 89 | <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> indicating
|
|---|
| 90 | that you successfully built and installed GCC.
|
|---|
| 91 | Include the following information:
|
|---|
| 92 |
|
|---|
| 93 | <ul>
|
|---|
| 94 | <li>Output from running <code></code><var>srcdir</var><code>/config.guess</code>. Do not send us
|
|---|
| 95 | that file itself, just the one-line output from running it.
|
|---|
| 96 |
|
|---|
| 97 | <li>The output of <code>gcc -v</code> for your newly installed gcc.
|
|---|
| 98 | This tells us which version of GCC you built and the options you passed to
|
|---|
| 99 | configure.
|
|---|
| 100 |
|
|---|
| 101 | <li>Whether you enabled all languages or a subset of them. If you used a
|
|---|
| 102 | full distribution then this information is part of the configure
|
|---|
| 103 | options in the output of <code>gcc -v</code>, but if you downloaded the
|
|---|
| 104 | "core" compiler plus additional front ends then it isn't apparent
|
|---|
| 105 | which ones you built unless you tell us about it.
|
|---|
| 106 |
|
|---|
| 107 | <li>If the build was for GNU/Linux, also include:
|
|---|
| 108 | <ul>
|
|---|
| 109 | <li>The distribution name and version (e.g., Red Hat 7.1 or Debian 2.2.3);
|
|---|
| 110 | this information should be available from <code>/etc/issue</code>.
|
|---|
| 111 |
|
|---|
| 112 | <li>The version of the Linux kernel, available from <code>uname --version</code>
|
|---|
| 113 | or <code>uname -a</code>.
|
|---|
| 114 |
|
|---|
| 115 | <li>The version of glibc you used; for RPM-based systems like Red Hat,
|
|---|
| 116 | Mandrake, and SuSE type <code>rpm -q glibc</code> to get the glibc version,
|
|---|
| 117 | and on systems like Debian and Progeny use <code>dpkg -l libc6</code>.
|
|---|
| 118 | </ul>
|
|---|
| 119 | For other systems, you can include similar information if you think it is
|
|---|
| 120 | relevant.
|
|---|
| 121 |
|
|---|
| 122 | <li>Any other information that you think would be useful to people building
|
|---|
| 123 | GCC on the same configuration. The new entry in the build status list
|
|---|
| 124 | will include a link to the archived copy of your message.
|
|---|
| 125 | </ul>
|
|---|
| 126 |
|
|---|
| 127 | <p>We'd also like to know if the
|
|---|
| 128 | <a href="specific.html">host/target specific installation notes</a>
|
|---|
| 129 | didn't include your host/target information or if that information is
|
|---|
| 130 | incomplete or out of date. Send a note to
|
|---|
| 131 | <a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> telling us how the information should be changed.
|
|---|
| 132 |
|
|---|
| 133 | <p>If you find a bug, please report it following our
|
|---|
| 134 | <a href="../bugs.html">bug reporting guidelines</a>.
|
|---|
| 135 |
|
|---|
| 136 | <p>If you want to print the GCC manuals, do <code>cd </code><var>objdir</var><code>; make
|
|---|
| 137 | dvi</code>. You will need to have <code>texi2dvi</code> (version at least 4.2)
|
|---|
| 138 | and TeX installed. This creates a number of <code>.dvi</code> files in
|
|---|
| 139 | subdirectories of <code></code><var>objdir</var><code></code>; these may be converted for
|
|---|
| 140 | printing with programs such as <code>dvips</code>. You can also
|
|---|
| 141 | <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
|
|---|
| 142 | recent version of GCC.
|
|---|
| 143 |
|
|---|
| 144 | <hr />
|
|---|
| 145 | <p>
|
|---|
| 146 | <a href="./index.html">Return to the GCC Installation page</a>
|
|---|
| 147 |
|
|---|
| 148 | </body></html>
|
|---|
| 149 |
|
|---|