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