source: BOOK/final-system/common/gcc.xml@ 36f408e1

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 36f408e1 was 3373dd11, checked in by Jim Gifford <clfs@…>, 19 years ago

r668@server (orig r666): manuel | 2005-11-08 15:25:13 -0800
Removing SBUs and DUs. Chapter final-system, round 6.

  • Property mode set to 100644
File size: 7.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 <!ENTITY % patches-entities SYSTEM "../../patches.ent">
6 %general-entities;
7 %patches-entities;
8]>
9
10<sect1 id="ch-system-gcc" role="wrap">
11 <?dbhtml filename="gcc.html"?>
12
13 <title>GCC-&gcc-version;</title>
14
15 <indexterm zone="ch-system-gcc">
16 <primary sortas="a-GCC">GCC</primary>
17 </indexterm>
18
19 <sect2 role="package">
20 <title/>
21
22 <para>The GCC package contains the GNU compiler collection, which includes
23 the C and C++ compilers.</para>
24
25 <segmentedlist>
26 <segtitle>&dependencies;</segtitle>
27
28 <seglistitem>
29 <seg>Bash, Binutils, Coreutils, Diffutils, Findutils,
30 Gawk, Gettext, Glibc, Grep, Make, Perl, Sed, and Texinfo</seg>
31 </seglistitem>
32 </segmentedlist>
33
34 </sect2>
35
36 <sect2 role="installation">
37 <title>Installation of GCC</title>
38
39 <para os="d">Apply a <command>sed</command> substitution that will suppress the
40 installation of <filename class="libraryfile">libiberty.a</filename>. The
41 version of <filename class="libraryfile">libiberty.a</filename> provided by
42 Binutils will be used instead:</para>
43
44<screen os="e"><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
45
46 <para os="f">The GCC documentation recommends building GCC outside of the source
47 directory in a dedicated build directory:</para>
48
49<screen os="g"><userinput>mkdir ../gcc-build
50cd ../gcc-build</userinput></screen>
51
52 <para os="h">Prepare GCC for compilation:</para>
53
54<screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
55 --libexecdir=/usr/lib --enable-shared --enable-threads=posix \
56 --enable-__cxa_atexit --enable-c99 --enable-long-long \
57 --enable-clocale=gnu --enable-languages=c,c++ --disable-libstdcxx-pch</userinput></screen>
58
59 <para os="i">Compile the package:</para>
60
61<screen os="j"><userinput>make</userinput></screen>
62
63 <important os="k">
64 <para>In this section, the test suite for GCC is considered
65 critical. Do not skip it under any circumstance.</para>
66 </important>
67
68 <para os="l">Test the results, but do not stop at errors:</para>
69
70<screen os="m"><userinput>make -k check</userinput></screen>
71
72 <para os="n">The <parameter>-k</parameter> flag is used to make the test suite
73 run through to completion and not stop at the first failure. The GCC test
74 suite is very comprehensive and is almost guaranteed to generate a few
75 failures. To receive a summary of the test suite results, run:</para>
76
77<screen os="o"><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
78
79 <para os="p">For only the summaries, pipe the output through
80 <userinput>grep -A7 Summ</userinput>.</para>
81
82 <para os="q">Results can be compared with those located at <ulink
83 url="&test-results;"/>.</para>
84
85 <para os="r">A few unexpected failures cannot always be avoided. The
86 GCC developers are usually aware of these issues, but have not
87 resolved them yet. Unless the test results are vastly different from
88 those at the above URL, it is safe to continue.</para>
89
90 <para os="s">Install the package:</para>
91
92<screen os="t"><userinput>make install</userinput></screen>
93
94 <para os="u">Some packages expect the C preprocessor to be installed in the
95 <filename class="directory">/lib</filename> directory.
96 To support those packages, create this symlink:</para>
97
98<screen os="v"><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen>
99
100 <para os="w">Many packages use the name <command>cc</command> to call the C
101 compiler. To satisfy those packages, create a symlink:</para>
102
103<screen os="x"><userinput>ln -s gcc /usr/bin/cc</userinput></screen>
104
105 </sect2>
106
107 <sect2 id="contents-gcc" role="content">
108 <title>Contents of GCC</title>
109
110 <segmentedlist>
111 <segtitle>Installed programs</segtitle>
112 <segtitle>Installed libraries</segtitle>
113
114 <seglistitem>
115 <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
116 <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libstdc++.[a,so], and
117 libsupc++.a</seg>
118 </seglistitem>
119 </segmentedlist>
120
121 <variablelist>
122 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
123 <?dbfo list-presentation="list"?>
124 <?dbhtml list-presentation="table"?>
125
126 <varlistentry id="cc">
127 <term><command>cc</command></term>
128 <listitem>
129 <para>The C compiler</para>
130 <indexterm zone="ch-system-gcc cc">
131 <primary sortas="b-cc">cc</primary>
132 </indexterm>
133 </listitem>
134 </varlistentry>
135
136 <varlistentry id="cpp">
137 <term><command>cpp</command></term>
138 <listitem>
139 <para>The C preprocessor; it is used by the compiler to expand the
140 #include, #define, and similar statements in the source files</para>
141 <indexterm zone="ch-system-gcc cpp">
142 <primary sortas="b-cpp">cpp</primary>
143 </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">
152 <primary sortas="b-c++">c++</primary>
153 </indexterm>
154 </listitem>
155 </varlistentry>
156
157 <varlistentry id="g">
158 <term><command>g++</command></term>
159 <listitem>
160 <para>The C++ compiler</para>
161 <indexterm zone="ch-system-gcc g">
162 <primary sortas="b-g++">g++</primary>
163 </indexterm>
164 </listitem>
165 </varlistentry>
166
167 <varlistentry id="gcc">
168 <term><command>gcc</command></term>
169 <listitem>
170 <para>The C compiler</para>
171 <indexterm zone="ch-system-gcc gcc">
172 <primary sortas="b-gcc">gcc</primary>
173 </indexterm>
174 </listitem>
175 </varlistentry>
176
177 <varlistentry id="gccbug">
178 <term><command>gccbug</command></term>
179 <listitem>
180 <para>A shell script used to help create useful bug reports</para>
181 <indexterm zone="ch-system-gcc gccbug">
182 <primary sortas="b-gccbug">gccbug</primary>
183 </indexterm>
184 </listitem>
185 </varlistentry>
186
187 <varlistentry id="gcov">
188 <term><command>gcov</command></term>
189 <listitem>
190 <para>A coverage testing tool; it is used to analyze programs to
191 determine where optimizations will have the most effect</para>
192 <indexterm zone="ch-system-gcc gcov">
193 <primary sortas="b-gcov">gcov</primary>
194 </indexterm>
195 </listitem>
196 </varlistentry>
197
198 <varlistentry id="libgcc">
199 <term><filename class="libraryfile">libgcc</filename></term>
200 <listitem>
201 <para>Contains run-time support for <command>gcc</command></para>
202 <indexterm zone="ch-system-gcc libgcc">
203 <primary sortas="c-libgcc*">libgcc*</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="libstdc">
209 <term><filename class="libraryfile">libstdc++</filename></term>
210 <listitem>
211 <para>The standard C++ library</para>
212 <indexterm zone="ch-system-gcc libstdc">
213 <primary sortas="c-libstdc++">libstdc++</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="libsupc">
219 <term><filename class="libraryfile">libsupc++</filename></term>
220 <listitem>
221 <para>Provides supporting routines for the C++ programming
222 language</para>
223 <indexterm zone="ch-system-gcc libsupc">
224 <primary sortas="c-libsupc++">libsupc++</primary>
225 </indexterm>
226 </listitem>
227 </varlistentry>
228
229 </variablelist>
230
231 </sect2>
232
233</sect1>
Note: See TracBrowser for help on using the repository browser.