finalinstall.html revision 1.13 1 1.11 mrg <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 1.11 mrg <html>
3 1.13 mrg <!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
4 1.13 mrg <head>
5 1.13 mrg <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 1.13 mrg <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
7 1.1 mrg
8 1.11 mrg Permission is granted to copy, distribute and/or modify this document
9 1.3 mrg under the terms of the GNU Free Documentation License, Version 1.3 or
10 1.1 mrg any later version published by the Free Software Foundation; with no
11 1.1 mrg Invariant Sections, the Front-Cover texts being (a) (see below), and
12 1.1 mrg with the Back-Cover Texts being (b) (see below). A copy of the
13 1.11 mrg license is included in the section entitled "GNU
14 1.11 mrg Free Documentation License".
15 1.1 mrg
16 1.1 mrg (a) The FSF's Front-Cover Text is:
17 1.1 mrg
18 1.11 mrg A GNU Manual
19 1.1 mrg
20 1.1 mrg (b) The FSF's Back-Cover Text is:
21 1.1 mrg
22 1.11 mrg You have freedom to copy and modify this GNU Manual, like GNU
23 1.1 mrg software. Copies published by the Free Software Foundation raise
24 1.11 mrg funds for GNU development. -->
25 1.13 mrg <title>Installing GCC: Final installation</title>
26 1.11 mrg
27 1.13 mrg <meta name="description" content="Installing GCC: Final installation">
28 1.13 mrg <meta name="keywords" content="Installing GCC: Final installation">
29 1.11 mrg <meta name="resource-type" content="document">
30 1.11 mrg <meta name="distribution" content="global">
31 1.11 mrg <meta name="Generator" content="makeinfo">
32 1.13 mrg <meta name="viewport" content="width=device-width,initial-scale=1">
33 1.13 mrg
34 1.11 mrg <style type="text/css">
35 1.11 mrg <!--
36 1.13 mrg a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
37 1.11 mrg a.summary-letter {text-decoration: none}
38 1.11 mrg blockquote.indentedblock {margin-right: 0em}
39 1.11 mrg div.display {margin-left: 3.2em}
40 1.11 mrg div.example {margin-left: 3.2em}
41 1.11 mrg kbd {font-style: oblique}
42 1.11 mrg pre.display {font-family: inherit}
43 1.11 mrg pre.format {font-family: inherit}
44 1.11 mrg pre.menu-comment {font-family: serif}
45 1.11 mrg pre.menu-preformatted {font-family: serif}
46 1.11 mrg span.nolinebreak {white-space: nowrap}
47 1.11 mrg span.roman {font-family: initial; font-weight: normal}
48 1.11 mrg span.sansserif {font-family: sans-serif; font-weight: normal}
49 1.13 mrg span:hover a.copiable-anchor {visibility: visible}
50 1.11 mrg ul.no-bullet {list-style: none}
51 1.11 mrg -->
52 1.11 mrg </style>
53 1.11 mrg
54 1.11 mrg
55 1.1 mrg </head>
56 1.11 mrg
57 1.11 mrg <body lang="en">
58 1.13 mrg <h1 class="settitle" align="center">Installing GCC: Final installation</h1>
59 1.11 mrg
60 1.11 mrg
61 1.11 mrg
62 1.11 mrg
63 1.11 mrg
64 1.11 mrg
65 1.11 mrg
66 1.11 mrg
67 1.11 mrg
68 1.11 mrg
69 1.11 mrg
70 1.11 mrg
71 1.11 mrg
72 1.11 mrg
73 1.11 mrg
74 1.11 mrg
75 1.11 mrg
76 1.11 mrg
77 1.11 mrg
78 1.11 mrg
79 1.11 mrg
80 1.11 mrg
81 1.11 mrg
82 1.11 mrg <p>Now that GCC has been built (and optionally tested), you can install it with
83 1.13 mrg </p><div class="example">
84 1.13 mrg <pre class="example">cd <var>objdir</var> && make install
85 1.11 mrg </pre></div>
86 1.11 mrg
87 1.11 mrg <p>We strongly recommend to install into a target directory where there is
88 1.1 mrg no previous version of GCC present. Also, the GNAT runtime should not
89 1.1 mrg be stripped, as this would break certain features of the debugger that
90 1.1 mrg depend on this debugging information (catching Ada exceptions for
91 1.1 mrg instance).
92 1.11 mrg </p>
93 1.11 mrg <p>That step completes the installation of GCC; user level binaries can
94 1.11 mrg be found in <samp><var>prefix</var>/bin</samp> where <var>prefix</var> is the value
95 1.11 mrg you specified with the <samp>--prefix</samp> to configure (or
96 1.11 mrg <samp>/usr/local</samp> by default). (If you specified <samp>--bindir</samp>,
97 1.1 mrg that directory will be used instead; otherwise, if you specified
98 1.11 mrg <samp>--exec-prefix</samp>, <samp><var>exec-prefix</var>/bin</samp> will be used.)
99 1.10 mrg Headers for the C++ library are installed in
100 1.11 mrg <samp><var>prefix</var>/include</samp>; libraries in <samp><var>libdir</var></samp>
101 1.11 mrg (normally <samp><var>prefix</var>/lib</samp>); internal parts of the compiler in
102 1.11 mrg <samp><var>libdir</var>/gcc</samp> and <samp><var>libexecdir</var>/gcc</samp>; documentation
103 1.1 mrg in info format in <samp><var>infodir</var></samp> (normally
104 1.11 mrg <samp><var>prefix</var>/info</samp>).
105 1.11 mrg </p>
106 1.11 mrg <p>When installing cross-compilers, GCC’s executables
107 1.1 mrg are not only installed into <samp><var>bindir</var></samp>, that
108 1.11 mrg is, <samp><var>exec-prefix</var>/bin</samp>, but additionally into
109 1.11 mrg <samp><var>exec-prefix</var>/<var>target-alias</var>/bin</samp>, if that directory
110 1.11 mrg exists. Typically, such <em>tooldirs</em> hold target-specific
111 1.1 mrg binutils, including assembler and linker.
112 1.11 mrg </p>
113 1.11 mrg <p>Installation into a temporary staging area or into a <code>chroot</code>
114 1.1 mrg jail can be achieved with the command
115 1.11 mrg </p>
116 1.13 mrg <div class="example">
117 1.13 mrg <pre class="example">make DESTDIR=<var>path-to-rootdir</var> install
118 1.11 mrg </pre></div>
119 1.1 mrg
120 1.11 mrg <p>where <var>path-to-rootdir</var> is the absolute path of
121 1.1 mrg a directory relative to which all installation paths will be
122 1.1 mrg interpreted. Note that the directory specified by <code>DESTDIR</code>
123 1.1 mrg need not exist yet; it will be created if necessary.
124 1.11 mrg </p>
125 1.11 mrg <p>There is a subtle point with tooldirs and <code>DESTDIR</code>:
126 1.1 mrg If you relocate a cross-compiler installation with
127 1.11 mrg e.g. ‘<samp>DESTDIR=<var>rootdir</var></samp>’, then the directory
128 1.11 mrg <samp><var>rootdir</var>/<var>exec-prefix</var>/<var>target-alias</var>/bin</samp> will
129 1.1 mrg be filled with duplicated GCC executables only if it already exists,
130 1.1 mrg it will not be created otherwise. This is regarded as a feature,
131 1.1 mrg not as a bug, because it gives slightly more control to the packagers
132 1.1 mrg using the <code>DESTDIR</code> feature.
133 1.11 mrg </p>
134 1.11 mrg <p>You can install stripped programs and libraries with
135 1.11 mrg </p>
136 1.13 mrg <div class="example">
137 1.13 mrg <pre class="example">make install-strip
138 1.11 mrg </pre></div>
139 1.1 mrg
140 1.11 mrg <p>If you are bootstrapping a released version of GCC then please
141 1.1 mrg quickly review the build status page for your release, available from
142 1.11 mrg <a href="http://gcc.gnu.org/buildstat.html">http://gcc.gnu.org/buildstat.html</a>.
143 1.1 mrg If your system is not listed for the version of GCC that you built,
144 1.1 mrg send a note to
145 1.1 mrg <a href="mailto:gcc (a] gcc.gnu.org">gcc (a] gcc.gnu.org</a> indicating
146 1.11 mrg that you successfully built and installed GCC.
147 1.1 mrg Include the following information:
148 1.11 mrg </p>
149 1.11 mrg <ul>
150 1.11 mrg <li> Output from running <samp><var>srcdir</var>/config.guess</samp>. Do not send
151 1.1 mrg that file itself, just the one-line output from running it.
152 1.1 mrg
153 1.11 mrg </li><li> The output of ‘<samp>gcc -v</samp>’ for your newly installed <code>gcc</code>.
154 1.1 mrg This tells us which version of GCC you built and the options you passed to
155 1.1 mrg configure.
156 1.1 mrg
157 1.11 mrg </li><li> Whether you enabled all languages or a subset of them. If you used a
158 1.1 mrg full distribution then this information is part of the configure
159 1.11 mrg options in the output of ‘<samp>gcc -v</samp>’, but if you downloaded the
160 1.11 mrg “core” compiler plus additional front ends then it isn’t apparent
161 1.1 mrg which ones you built unless you tell us about it.
162 1.1 mrg
163 1.11 mrg </li><li> If the build was for GNU/Linux, also include:
164 1.11 mrg <ul>
165 1.11 mrg <li> The distribution name and version (e.g., Red Hat 7.1 or Debian 2.2.3);
166 1.11 mrg this information should be available from <samp>/etc/issue</samp>.
167 1.11 mrg
168 1.11 mrg </li><li> The version of the Linux kernel, available from ‘<samp>uname --version</samp>’
169 1.11 mrg or ‘<samp>uname -a</samp>’.
170 1.11 mrg
171 1.11 mrg </li><li> The version of glibc you used; for RPM-based systems like Red Hat,
172 1.11 mrg Mandrake, and SuSE type ‘<samp>rpm -q glibc</samp>’ to get the glibc version,
173 1.11 mrg and on systems like Debian and Progeny use ‘<samp>dpkg -l libc6</samp>’.
174 1.11 mrg </li></ul>
175 1.11 mrg <p>For other systems, you can include similar information if you think it is
176 1.1 mrg relevant.
177 1.11 mrg </p>
178 1.11 mrg </li><li> Any other information that you think would be useful to people building
179 1.1 mrg GCC on the same configuration. The new entry in the build status list
180 1.11 mrg will include a link to the archived copy of your message.
181 1.11 mrg </li></ul>
182 1.1 mrg
183 1.11 mrg <p>We’d also like to know if the
184 1.1 mrg <a href="specific.html">host/target specific installation notes</a>
185 1.11 mrg didn’t include your host/target information or if that information is
186 1.1 mrg incomplete or out of date. Send a note to
187 1.1 mrg <a href="mailto:gcc (a] gcc.gnu.org">gcc (a] gcc.gnu.org</a> detailing how the information should be changed.
188 1.11 mrg </p>
189 1.11 mrg <p>If you find a bug, please report it following the
190 1.1 mrg <a href="../bugs/">bug reporting guidelines</a>.
191 1.11 mrg </p>
192 1.11 mrg <p>If you want to print the GCC manuals, do ‘<samp>cd <var>objdir</var>; make
193 1.11 mrg dvi</samp>’. You will need to have <code>texi2dvi</code> (version at least 4.7)
194 1.11 mrg and TeX installed. This creates a number of <samp>.dvi</samp> files in
195 1.1 mrg subdirectories of <samp><var>objdir</var></samp>; these may be converted for
196 1.11 mrg printing with programs such as <code>dvips</code>. Alternately, by using
197 1.11 mrg ‘<samp>make pdf</samp>’ in place of ‘<samp>make dvi</samp>’, you can create documentation
198 1.11 mrg in the form of <samp>.pdf</samp> files; this requires <code>texi2pdf</code>, which
199 1.1 mrg is included with Texinfo version 4.8 and later. You can also
200 1.11 mrg <a href="https://shop.fsf.org/">buy printed manuals from the
201 1.11 mrg Free Software Foundation</a>, though such manuals may not be for the most
202 1.1 mrg recent version of GCC.
203 1.11 mrg </p>
204 1.11 mrg <p>If you would like to generate online HTML documentation, do ‘<samp>cd
205 1.11 mrg <var>objdir</var>; make html</samp>’ and HTML will be generated for the gcc manuals in
206 1.11 mrg <samp><var>objdir</var>/gcc/HTML</samp>.
207 1.11 mrg </p>
208 1.11 mrg <hr />
209 1.11 mrg <p>
210 1.11 mrg <p><a href="./index.html">Return to the GCC Installation page</a>
211 1.11 mrg </p>
212 1.11 mrg
213 1.11 mrg
214 1.11 mrg
215 1.11 mrg
216 1.1 mrg
217 1.1 mrg
218 1.1 mrg
219 1.1 mrg
220 1.11 mrg </body>
221 1.11 mrg </html>
222