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