summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc/INSTALL/finalinstall.html
blob: b8098bb11ab30c6d29d55a5d6370a2aee9c9c6b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<html lang="en">
<head>
<title>Installing GCC: Final installation</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Installing GCC: Final installation">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.

   Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, the Front-Cover texts being (a) (see below), and
with the Back-Cover Texts being (b) (see below).  A copy of the
license is included in the section entitled "GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

     A GNU Manual

(b) The FSF's Back-Cover Text is:

     You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc { font-variant:small-caps }
  span.roman { font-family: serif; font-weight: normal; } 
--></style>
</head>
<body>
<h1 class="settitle">Installing GCC: Final installation</h1>
Now that GCC has been built (and optionally tested), you can install it with
<pre class="example">     cd <var>objdir</var>; make install
</pre>
   <p>We strongly recommend to install into a target directory where there is
no previous version of GCC present.

   <p>That step completes the installation of GCC; user level binaries can
be found in <var>prefix</var><span class="file">/bin</span> where <var>prefix</var> is the value you
specified with the <span class="option">--prefix</span> to configure (or <span class="file">/usr/local</span>
by default).  (If you specified <span class="option">--bindir</span>, that directory will
be used instead; otherwise, if you specified <span class="option">--exec-prefix</span>,
<var>exec-prefix</var><span class="file">/bin</span> will be used.)  Headers for the C++ and
Java libraries are installed in <var>prefix</var><span class="file">/include</span>; libraries
in <var>libdir</var> (normally <var>prefix</var><span class="file">/lib</span>); internal
parts of the compiler in <var>libdir</var><span class="file">/gcc-lib</span>; documentation in
info format in <var>infodir</var> (normally <var>prefix</var><span class="file">/info</span>).

   <p>When installing cross-compilers, GCC's executables
are not only installed into <var>bindir</var>, that
is, <var>exec-prefix</var><span class="file">/bin</span>, but additionally into
<var>exec-prefix</var><span class="file">/</span><var>target-alias</var><span class="file">/bin</span>, if that directory
exists.  Typically, such <dfn>tooldirs</dfn> hold target-specific
binutils, including assembler and linker.

   <p>Installation into a temporary staging area or into a <span class="command">chroot</span>
jail can be achieved with the command

<pre class="example">     make DESTDIR=<var>path-to-rootdir</var> install
</pre>
   <p class="noindent">where <var>path-to-rootdir</var> is the absolute path of
a directory relative to which all installation paths will be
interpreted.  Note that the directory specified by <code>DESTDIR</code>
need not exist yet; it will be created if necessary.

   <p>There is a subtle point with tooldirs and <code>DESTDIR</code>:
If you relocate a cross-compiler installation with
e.g. <span class="samp">DESTDIR=</span><var>rootdir</var>, then the directory
<var>rootdir</var><span class="file">/</span><var>exec-prefix</var><span class="file">/</span><var>target-alias</var><span class="file">/bin</span> will
be filled with duplicated GCC executables only if it already exists,
it will not be created otherwise.  This is regarded as a feature,
not as a bug, because it gives slightly more control to the packagers
using the <code>DESTDIR</code> feature.

   <p>If you built a released version of GCC using <span class="samp">make bootstrap</span> then please
quickly review the build status page for your release, available from
<a href="http://gcc.gnu.org/buildstat.html">http://gcc.gnu.org/buildstat.html</a>. 
If your system is not listed for the version of GCC that you built,
send a note to
<a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> indicating
that you successfully built and installed GCC. 
Include the following information:

     <ul>
<li>Output from running <var>srcdir</var><span class="file">/config.guess</span>.  Do not send us
that file itself, just the one-line output from running it.

     <li>The output of <span class="samp">gcc -v</span> for your newly installed gcc. 
This tells us which version of GCC you built and the options you passed to
configure.

     <li>Whether you enabled all languages or a subset of them.  If you used a
full distribution then this information is part of the configure
options in the output of <span class="samp">gcc -v</span>, but if you downloaded the
&ldquo;core&rdquo; compiler plus additional front ends then it isn't apparent
which ones you built unless you tell us about it.

     <li>If the build was for GNU/Linux, also include:
          <ul>
<li>The distribution name and version (e.g., Red Hat 7.1 or Debian 2.2.3);
this information should be available from <span class="file">/etc/issue</span>.

          <li>The version of the Linux kernel, available from <span class="samp">uname --version</span>
or <span class="samp">uname -a</span>.

          <li>The version of glibc you used; for RPM-based systems like Red Hat,
Mandrake, and SuSE type <span class="samp">rpm -q glibc</span> to get the glibc version,
and on systems like Debian and Progeny use <span class="samp">dpkg -l libc6</span>. 
</ul>
     For other systems, you can include similar information if you think it is
relevant.

     <li>Any other information that you think would be useful to people building
GCC on the same configuration.  The new entry in the build status list
will include a link to the archived copy of your message. 
</ul>

   <p>We'd also like to know if the
<a href="specific.html">host/target specific installation notes</a>
didn't include your host/target information or if that information is
incomplete or out of date.  Send a note to
<a href="mailto:gcc@gcc.gnu.org">gcc@gcc.gnu.org</a> telling us how the information should be changed.

   <p>If you find a bug, please report it following our
<a href="../bugs.html">bug reporting guidelines</a>.

   <p>If you want to print the GCC manuals, do <span class="samp">cd </span><var>objdir</var><span class="samp">; make
dvi</span>.  You will need to have <span class="command">texi2dvi</span> (version at least 4.2)
and TeX installed.  This creates a number of <span class="file">.dvi</span> files in
subdirectories of <var>objdir</var>; these may be converted for
printing with programs such as <span class="command">dvips</span>.  You can also
<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
recent version of GCC.

   <p><hr />
<p><a href="./index.html">Return to the GCC Installation page</a>

<!-- ***Binaries**************************************************************** -->
<!-- ***Specific**************************************************************** -->
<!-- ***Old documentation****************************************************** -->
<!-- ***GFDL******************************************************************** -->
<!-- *************************************************************************** -->
<!-- Part 6 The End of the Document -->
</body></html>