Changeset 81fd230 for chapter06/gcc.xml


Ignore:
Timestamp:
02/19/2005 10:16:42 PM (19 years ago)
Author:
Gerard Beekmans <gerard@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
3d31fc4
Parents:
2f9131f
Message:

Trunk is now identical to Testing

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4648 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/gcc.xml

    r2f9131f r81fd230  
    44  %general-entities;
    55]>
    6 <sect1 id="ch-system-gcc" xreflabel="GCC" role="wrap">
     6<sect1 id="ch-system-gcc" role="wrap">
    77<title>GCC-&gcc-version;</title>
    88<?dbhtml filename="gcc.html"?>
     
    1111
    1212<sect2 role="package"><title/>
     13<para>The GCC package contains the GNU compiler collection, which includes
     14the C and C++ compilers.</para>
    1315
    1416<segmentedlist>
     
    1820</segmentedlist>
    1921
     22<segmentedlist>
     23<segtitle>GCC installation depends on</segtitle>
     24<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, Findutils,
     25Gawk, Gettext, Glibc, Grep, Make, Perl, Sed, and Texinfo</seg></seglistitem>
     26</segmentedlist>
    2027</sect2>
    2128
     
    2330<title>Installation of GCC</title>
    2431
    25 <para>Apply a patch:</para>
     32<para>This package is known to have issues when its default
     33optimization flags (including the <parameter>-march</parameter> and
     34<parameter>-mcpu</parameter> options) are changed. If any environment
     35variables that override default optimizations have been defined, such
     36as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
     37unset them when building GCC.</para>
     38
     39<para>Unpack both the gcc-core and the gcc-g++ tarballs&mdash;they will
     40unpack into the same directory. Likewise, extract the gcc-testsuite
     41package.  The full GCC package contains additional compilers.
     42Instructions for building these can be found at <ulink
     43url="&blfs-root;view/svn/general/gcc.html"/>.</para>
     44
     45<para>Apply only the No-Fixincludes patch (not the Specs patch) also
     46used in the previous chapter:</para>
    2647
    2748<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch</userinput></screen>
    2849
    29 <para>Apply another patch:</para>
     50<para>GCC fails to compile some packages outside of a base Linux From Scratch
     51install (e.g., Mozilla and kdegraphics) when used in conjunction with newer
     52versions of Binutils.  Apply the following patch to fix this issue:</para>
    3053
    3154<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-linkonce-1.patch</userinput></screen>
    3255
    33 <para>Apply a sed substitution:</para>
     56<para>Apply a sed substitution that will suppress the installation of
     57<filename class="libraryfile">libiberty.a</filename>. The version of
     58<filename class="libraryfile">libiberty.a</filename> provided by
     59Binutils will be used instead:</para>
    3460
    3561<screen><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
    3662
    37 <para>Create a build directory:</para>
     63<para>The GCC documentation recommends building GCC outside of the source
     64directory in a dedicated build directory:</para>
    3865
    3966<screen><userinput>mkdir ../gcc-build
    4067cd ../gcc-build</userinput></screen>
    4168
    42 <para>Now prepare GCC for compilation:</para>
     69<para>Prepare GCC for compilation:</para>
    4370
    4471<screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
     
    5178<screen><userinput>make</userinput></screen>
    5279
    53 <para>Test the results):</para>
     80<important><para>In this section, the test suite for GCC is considered
     81critical. Do not skip it under any circumstance.</para></important>
     82
     83<para>Test the results, but do not stop at errors:</para>
    5484
    5585<screen><userinput>make -k check</userinput></screen>
    5686
    57 <para>The test suite notes from <xref linkend="ch-tools-gcc-pass2"/> are still very
    58 much appropriate here.</para>
    59 
    60 <para>Now install the package:</para>
     87<para>Some of the errors are known issues and were noted in the
     88previous chapter. The test suite notes from <xref
     89linkend="ch-tools-gcc-pass2" role=","/> are still relevant here. Be sure to
     90refer back to them as necessary.</para>
     91
     92<para>Install the package:</para>
    6193
    6294<screen><userinput>make install</userinput></screen>
    6395
    64 <para>Create this symlink:</para>
     96<para>Some packages expect the C PreProcessor to be installed in the
     97<filename class="directory">/lib</filename> directory.
     98To support those packages, create this symlink:</para>
    6599
    66100<screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen>
    67101
    68 <para>Create another symlink:</para>
     102<para>Many packages use the name <command>cc</command> to call the C
     103compiler. To satisfy those packages, create a symlink:</para>
    69104
    70105<screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen>
    71106
    72 <note><para>Refer back to <xref linkend="ch-system-readjusting"/>
    73 and repeat the check.</para></note>
     107<note><para>At this point, it is strongly recommended to repeat the
     108sanity check performed earlier in this chapter. Refer back to <xref
     109linkend="ch-system-readjusting" role=","/> and repeat the check. If the results
     110are in error, then the most likely reason is that the GCC Specs patch
     111from <xref linkend="chapter-temporary-tools"/> was erroneously applied
     112here.</para></note>
    74113
    75114</sect2>
     
    78117<sect2 id="contents-gcc" role="content"><title>Contents of GCC</title>
    79118
    80 <para>See testing</para>
     119<segmentedlist>
     120<segtitle>Installed programs</segtitle>
     121<segtitle>Installed libraries</segtitle>
     122<seglistitem><seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and
     123gcov</seg>
     124<seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libstdc++.[a,so], and libsupc++.a</seg></seglistitem>
     125</segmentedlist>
     126
     127<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
     128<?dbfo list-presentation="list"?>
     129
     130<varlistentry id="cc">
     131<term><command>cc</command></term>
     132<listitem>
     133<para>The C compiler</para>
     134<indexterm zone="ch-system-gcc cc"><primary sortas="b-cc">cc</primary></indexterm>
     135</listitem>
     136</varlistentry>
     137
     138<varlistentry id="cpp">
     139<term><command>cpp</command></term>
     140<listitem>
     141<para>The C preprocessor; it is used by the compiler to expand the
     142#include, #define, and similar statements in the source files</para>
     143<indexterm zone="ch-system-gcc cpp"><primary sortas="b-cpp">cpp</primary></indexterm>
     144</listitem>
     145</varlistentry>
     146
     147<varlistentry id="c">
     148<term><command>c++</command></term>
     149<listitem>
     150<para>The C++ compiler</para>
     151<indexterm zone="ch-system-gcc c"><primary sortas="b-c++">c++</primary></indexterm>
     152</listitem>
     153</varlistentry>
     154
     155<varlistentry id="g">
     156<term><command>g++</command></term>
     157<listitem>
     158<para>The C++ compiler</para>
     159<indexterm zone="ch-system-gcc g"><primary sortas="b-g++">g++</primary></indexterm>
     160</listitem>
     161</varlistentry>
     162
     163<varlistentry id="gcc">
     164<term><command>gcc</command></term>
     165<listitem>
     166<para>The C compiler</para>
     167<indexterm zone="ch-system-gcc gcc"><primary sortas="b-gcc">gcc</primary></indexterm>
     168</listitem>
     169</varlistentry>
     170
     171<varlistentry id="gccbug">
     172<term><command>gccbug</command></term>
     173<listitem>
     174<para>A shell script used to help create useful bug reports</para>
     175<indexterm zone="ch-system-gcc gccbug"><primary sortas="b-gccbug">gccbug</primary></indexterm>
     176</listitem>
     177</varlistentry>
     178
     179<varlistentry id="gcov">
     180<term><command>gcov</command></term>
     181<listitem>
     182<para>A coverage testing tool; it is used to analyze programs to
     183determine where optimizations will have the most effect</para>
     184<indexterm zone="ch-system-gcc gcov"><primary sortas="b-gcov">gcov</primary></indexterm>
     185</listitem>
     186</varlistentry>
     187
     188<varlistentry id="libgcc">
     189<term><filename class="libraryfile">libgcc</filename></term>
     190<listitem>
     191<para>Contains run-time support for <command>gcc</command></para>
     192<indexterm zone="ch-system-gcc libgcc"><primary sortas="c-libgcc*">libgcc*</primary></indexterm>
     193</listitem>
     194</varlistentry>
     195
     196<varlistentry id="libstdc">
     197<term><filename class="libraryfile">libstdc++</filename></term>
     198<listitem>
     199<para>The standard C++ library</para>
     200<indexterm zone="ch-system-gcc libstdc"><primary sortas="c-libstdc++">libstdc++</primary></indexterm>
     201</listitem>
     202</varlistentry>
     203
     204<varlistentry id="libsupc">
     205<term><filename class="libraryfile">libsupc++</filename></term>
     206<listitem>
     207<para>Provides supporting routines for the C++ programming language</para>
     208<indexterm zone="ch-system-gcc libsupc"><primary sortas="c-libsupc++">libsupc++</primary></indexterm>
     209</listitem>
     210</varlistentry>
     211</variablelist>
    81212
    82213</sect2>
    83214
    84215</sect1>
     216
Note: See TracChangeset for help on using the changeset viewer.