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