Home | History | Annotate | Line # | Download | only in INSTALL
finalinstall.html revision 1.17
      1   1.9    mrg <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      2   1.9    mrg <html>
      3  1.17    mrg <!-- Copyright (C) 1988-2024 Free Software Foundation, Inc.
      4   1.1    mrg 
      5   1.9    mrg Permission is granted to copy, distribute and/or modify this document
      6   1.3  skrll 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.9    mrg license is included in the section entitled "GNU
     11   1.9    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.9    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.9    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.9    mrg      funds for GNU development. -->
     22  1.16    mrg <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
     23  1.16    mrg <head>
     24  1.16    mrg <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     25  1.11    mrg <title>Installing GCC: Final installation</title>
     26   1.9    mrg 
     27  1.11    mrg <meta name="description" content="Installing GCC: Final installation">
     28  1.11    mrg <meta name="keywords" content="Installing GCC: Final installation">
     29   1.9    mrg <meta name="resource-type" content="document">
     30   1.9    mrg <meta name="distribution" content="global">
     31   1.9    mrg <meta name="Generator" content="makeinfo">
     32   1.9    mrg <style type="text/css">
     33   1.9    mrg <!--
     34   1.9    mrg a.summary-letter {text-decoration: none}
     35   1.9    mrg blockquote.indentedblock {margin-right: 0em}
     36  1.16    mrg blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
     37  1.16    mrg blockquote.smallquotation {font-size: smaller}
     38   1.9    mrg div.display {margin-left: 3.2em}
     39   1.9    mrg div.example {margin-left: 3.2em}
     40  1.16    mrg div.lisp {margin-left: 3.2em}
     41  1.16    mrg div.smalldisplay {margin-left: 3.2em}
     42  1.16    mrg div.smallexample {margin-left: 3.2em}
     43  1.16    mrg div.smalllisp {margin-left: 3.2em}
     44   1.9    mrg kbd {font-style: oblique}
     45   1.9    mrg pre.display {font-family: inherit}
     46   1.9    mrg pre.format {font-family: inherit}
     47   1.9    mrg pre.menu-comment {font-family: serif}
     48   1.9    mrg pre.menu-preformatted {font-family: serif}
     49  1.16    mrg pre.smalldisplay {font-family: inherit; font-size: smaller}
     50  1.16    mrg pre.smallexample {font-size: smaller}
     51  1.16    mrg pre.smallformat {font-family: inherit; font-size: smaller}
     52  1.16    mrg pre.smalllisp {font-size: smaller}
     53   1.9    mrg span.nolinebreak {white-space: nowrap}
     54   1.9    mrg span.roman {font-family: initial; font-weight: normal}
     55   1.9    mrg span.sansserif {font-family: sans-serif; font-weight: normal}
     56   1.9    mrg ul.no-bullet {list-style: none}
     57   1.9    mrg -->
     58   1.9    mrg </style>
     59   1.9    mrg 
     60   1.9    mrg 
     61   1.1    mrg </head>
     62   1.9    mrg 
     63   1.9    mrg <body lang="en">
     64  1.11    mrg <h1 class="settitle" align="center">Installing GCC: Final installation</h1>
     65   1.9    mrg 
     66   1.9    mrg 
     67   1.9    mrg 
     68   1.9    mrg 
     69   1.9    mrg 
     70   1.9    mrg 
     71   1.9    mrg 
     72   1.9    mrg 
     73   1.9    mrg 
     74   1.9    mrg 
     75   1.9    mrg 
     76   1.9    mrg 
     77   1.9    mrg 
     78   1.9    mrg 
     79   1.9    mrg 
     80   1.9    mrg 
     81   1.9    mrg 
     82   1.9    mrg 
     83   1.9    mrg 
     84   1.9    mrg 
     85   1.9    mrg 
     86   1.9    mrg 
     87   1.9    mrg 
     88  1.17    mrg 
     89  1.17    mrg 
     90  1.17    mrg 
     91   1.9    mrg <p>Now that GCC has been built (and optionally tested), you can install it with
     92  1.16    mrg </p><div class="smallexample">
     93  1.16    mrg <pre class="smallexample">cd <var>objdir</var> &amp;&amp; make install
     94   1.9    mrg </pre></div>
     95   1.9    mrg 
     96   1.9    mrg <p>We strongly recommend to install into a target directory where there is
     97   1.1    mrg no previous version of GCC present.  Also, the GNAT runtime should not
     98   1.1    mrg be stripped, as this would break certain features of the debugger that
     99   1.1    mrg depend on this debugging information (catching Ada exceptions for
    100   1.1    mrg instance).
    101   1.9    mrg </p>
    102   1.9    mrg <p>That step completes the installation of GCC; user level binaries can
    103   1.9    mrg be found in <samp><var>prefix</var>/bin</samp> where <var>prefix</var> is the value
    104   1.9    mrg you specified with the <samp>--prefix</samp> to configure (or
    105   1.9    mrg <samp>/usr/local</samp> by default).  (If you specified <samp>--bindir</samp>,
    106   1.1    mrg that directory will be used instead; otherwise, if you specified
    107   1.9    mrg <samp>--exec-prefix</samp>, <samp><var>exec-prefix</var>/bin</samp> will be used.)
    108   1.8    mrg Headers for the C++ library are installed in
    109   1.9    mrg <samp><var>prefix</var>/include</samp>; libraries in <samp><var>libdir</var></samp>
    110   1.9    mrg (normally <samp><var>prefix</var>/lib</samp>); internal parts of the compiler in
    111   1.9    mrg <samp><var>libdir</var>/gcc</samp> and <samp><var>libexecdir</var>/gcc</samp>; documentation
    112   1.1    mrg in info format in <samp><var>infodir</var></samp> (normally
    113   1.9    mrg <samp><var>prefix</var>/info</samp>).
    114   1.9    mrg </p>
    115   1.9    mrg <p>When installing cross-compilers, GCC&rsquo;s executables
    116   1.1    mrg are not only installed into <samp><var>bindir</var></samp>, that
    117   1.9    mrg is, <samp><var>exec-prefix</var>/bin</samp>, but additionally into
    118   1.9    mrg <samp><var>exec-prefix</var>/<var>target-alias</var>/bin</samp>, if that directory
    119   1.9    mrg exists.  Typically, such <em>tooldirs</em> hold target-specific
    120   1.1    mrg binutils, including assembler and linker.
    121   1.9    mrg </p>
    122   1.9    mrg <p>Installation into a temporary staging area or into a <code>chroot</code>
    123   1.1    mrg jail can be achieved with the command
    124   1.9    mrg </p>
    125  1.16    mrg <div class="smallexample">
    126  1.16    mrg <pre class="smallexample">make DESTDIR=<var>path-to-rootdir</var> install
    127   1.9    mrg </pre></div>
    128   1.1    mrg 
    129   1.9    mrg <p>where <var>path-to-rootdir</var> is the absolute path of
    130   1.1    mrg a directory relative to which all installation paths will be
    131   1.1    mrg interpreted.  Note that the directory specified by <code>DESTDIR</code>
    132   1.1    mrg need not exist yet; it will be created if necessary.
    133   1.9    mrg </p>
    134   1.9    mrg <p>There is a subtle point with tooldirs and <code>DESTDIR</code>:
    135   1.1    mrg If you relocate a cross-compiler installation with
    136   1.9    mrg e.g. &lsquo;<samp>DESTDIR=<var>rootdir</var></samp>&rsquo;, then the directory
    137   1.9    mrg <samp><var>rootdir</var>/<var>exec-prefix</var>/<var>target-alias</var>/bin</samp> will
    138   1.1    mrg be filled with duplicated GCC executables only if it already exists,
    139   1.1    mrg it will not be created otherwise.  This is regarded as a feature,
    140   1.1    mrg not as a bug, because it gives slightly more control to the packagers
    141   1.1    mrg using the <code>DESTDIR</code> feature.
    142   1.9    mrg </p>
    143   1.9    mrg <p>You can install stripped programs and libraries with
    144   1.9    mrg </p>
    145  1.16    mrg <div class="smallexample">
    146  1.16    mrg <pre class="smallexample">make install-strip
    147   1.9    mrg </pre></div>
    148   1.1    mrg 
    149  1.17    mrg <p>By default, only the man pages and info-format GCC documentation
    150  1.17    mrg are built and installed.  If you want to generate the GCC manuals in
    151  1.17    mrg other formats, use commands like
    152  1.17    mrg </p>
    153  1.17    mrg <div class="smallexample">
    154  1.17    mrg <pre class="smallexample">make dvi
    155  1.17    mrg make pdf
    156  1.17    mrg make html
    157  1.17    mrg </pre></div>
    158  1.17    mrg 
    159  1.17    mrg <p>to build the manuals in the corresponding formats, and
    160  1.17    mrg </p>
    161  1.17    mrg <div class="smallexample">
    162  1.17    mrg <pre class="smallexample">make install-dvi
    163  1.17    mrg make install-pdf
    164  1.17    mrg make install-html
    165  1.17    mrg </pre></div>
    166   1.1    mrg 
    167  1.17    mrg <p>to install them.
    168  1.17    mrg Alternatively, there are prebuilt online versions of the manuals for
    169  1.17    mrg released versions of GCC on
    170  1.17    mrg <a href="https://gcc.gnu.org/onlinedocs/">the GCC web site</a>.
    171  1.17    mrg </p>
    172  1.17    mrg <p>If you built GCC yourself we would like to know if the
    173   1.1    mrg <a href="specific.html">host/target specific installation notes</a>
    174   1.9    mrg didn&rsquo;t include your host/target information or if that information is
    175   1.1    mrg incomplete or out of date.  Send a note to
    176   1.1    mrg <a href="mailto:gcc (a] gcc.gnu.org">gcc (a] gcc.gnu.org</a> detailing how the information should be changed.
    177   1.9    mrg </p>
    178   1.9    mrg <p>If you find a bug, please report it following the
    179   1.1    mrg <a href="../bugs/">bug reporting guidelines</a>.
    180   1.9    mrg </p>
    181   1.9    mrg <hr />
    182   1.9    mrg <p>
    183   1.9    mrg <p><a href="./index.html">Return to the GCC Installation page</a>
    184   1.9    mrg </p>
    185   1.9    mrg 
    186   1.9    mrg 
    187   1.9    mrg 
    188   1.9    mrg 
    189   1.1    mrg 
    190   1.1    mrg 
    191   1.1    mrg 
    192   1.9    mrg </body>
    193   1.9    mrg </html>
    194