source: BOOK/final-system/common/gcc.xml@ 17c95250

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 17c95250 was 61ad0b7f, checked in by Chris Staub <chris@…>, 15 years ago

Added installed directory info for a number of packages

  • Property mode set to 100644
File size: 9.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-gcc" role="wrap">
9 <?dbhtml filename="gcc.html"?>
10
11 <title>GCC-&gcc-version;</title>
12
13 <indexterm zone="ch-system-gcc">
14 <primary sortas="a-GCC">GCC</primary>
15 </indexterm>
16
17 <sect2 role="package">
18 <title/>
19
20 <para>The GCC package contains the GNU compiler collection, which includes
21 the C and C++ compilers.</para>
22
23 </sect2>
24
25 <sect2 role="installation">
26 <title>Installation of GCC</title>
27
28 <para os="p1">The following patch contains a number of updates to the
29 &gcc-version; branch by the GCC developers:</para>
30
31<screen os="p2"><userinput>patch -Np1 -i ../&gcc-branch_update-patch;</userinput></screen>
32
33 <para os="d">Apply a <command>sed</command> substitution that will suppress the
34 installation of <filename class="libraryfile">libiberty.a</filename>. The
35 version of <filename class="libraryfile">libiberty.a</filename> provided by
36 Binutils will be used instead:</para>
37
38<screen os="e"><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
39
40 <para os="f">The GCC documentation recommends building GCC outside of the source
41 directory in a dedicated build directory:</para>
42
43<screen os="g"><userinput>mkdir -v ../gcc-build
44cd ../gcc-build</userinput></screen>
45
46 <para os="h">Prepare GCC for compilation:</para>
47
48<screen os="i"><userinput>CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include" \
49 CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include" \
50 ../gcc-&gcc-version;/configure --prefix=/usr \
51 --libexecdir=/usr/lib --enable-shared --enable-threads=posix \
52 --enable-__cxa_atexit --enable-c99 --enable-long-long \
53 --enable-clocale=gnu --enable-languages=c,c++ \
54 --disable-multilib --disable-libstdcxx-pch</userinput></screen>
55
56 <para os="j">Compile the package:</para>
57
58<screen os="k"><userinput>make</userinput></screen>
59
60 <important os="l">
61 <para>The test suite for GCC is considered
62 critical. Do not skip it under any circumstance.</para>
63 </important>
64
65 <para os="m">Test the results, but do not stop at errors:</para>
66
67<screen os="n"><userinput>make -k check</userinput></screen>
68
69 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
70 run through to completion and not stop at the first failure. The GCC test
71 suite is very comprehensive and is almost guaranteed to generate a few
72 failures. To receive a summary of the test suite results, run:</para>
73
74<screen os="p"><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
75
76 <para os="q">For only the summaries, pipe the output through
77 <userinput>grep -A7 Summ</userinput>.</para>
78
79 <para os="r">A few unexpected failures cannot always be avoided. The
80 GCC developers are usually aware of these issues, but have not
81 resolved them yet.</para>
82
83 <para os="s">Install the package:</para>
84
85<screen os="t"><userinput>make install</userinput></screen>
86
87 <para os="u">Some packages expect the C preprocessor to be installed in the
88 <filename class="directory">/lib</filename> directory.
89 To support those packages, create this symlink:</para>
90
91<screen os="v"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
92
93 <para os="w">Many packages use the name <command>cc</command> to call the C
94 compiler. To satisfy those packages, create a symlink:</para>
95
96<screen os="x"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
97
98 </sect2>
99
100 <sect2 id="contents-gcc" role="content">
101 <title>Contents of GCC</title>
102
103 <segmentedlist>
104 <segtitle>Installed programs</segtitle>
105 <segtitle>Installed libraries</segtitle>
106 <segtitle>Installed directories</segtitle>
107
108 <seglistitem>
109 <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
110 <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libgcov.a, libgomp.[a,so],
111 libmudflap.[a,so], libmudflapth.[a,so], libssp.[a,so],
112 libssp_nonshared.a, libstdc++.[a,so], and libsupc++.a</seg>
113 <seg>/usr/include/c++, /usr/lib/gcc</seg>
114 </seglistitem>
115 </segmentedlist>
116
117 <variablelist>
118 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
119 <?dbfo list-presentation="list"?>
120 <?dbhtml list-presentation="table"?>
121
122 <varlistentry id="cc">
123 <term><command>cc</command></term>
124 <listitem>
125 <para>The C compiler</para>
126 <indexterm zone="ch-system-gcc cc">
127 <primary sortas="b-cc">cc</primary>
128 </indexterm>
129 </listitem>
130 </varlistentry>
131
132 <varlistentry id="cpp">
133 <term><command>cpp</command></term>
134 <listitem>
135 <para>The C preprocessor; it is used by the compiler to expand the
136 #include, #define, and similar statements in the source files</para>
137 <indexterm zone="ch-system-gcc cpp">
138 <primary sortas="b-cpp">cpp</primary>
139 </indexterm>
140 </listitem>
141 </varlistentry>
142
143 <varlistentry id="c">
144 <term><command>c++</command></term>
145 <listitem>
146 <para>The C++ compiler</para>
147 <indexterm zone="ch-system-gcc c">
148 <primary sortas="b-c++">c++</primary>
149 </indexterm>
150 </listitem>
151 </varlistentry>
152
153 <varlistentry id="g">
154 <term><command>g++</command></term>
155 <listitem>
156 <para>The C++ compiler</para>
157 <indexterm zone="ch-system-gcc g">
158 <primary sortas="b-g++">g++</primary>
159 </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">
168 <primary sortas="b-gcc">gcc</primary>
169 </indexterm>
170 </listitem>
171 </varlistentry>
172
173 <varlistentry id="gccbug">
174 <term><command>gccbug</command></term>
175 <listitem>
176 <para>A shell script used to help create useful bug reports</para>
177 <indexterm zone="ch-system-gcc gccbug">
178 <primary sortas="b-gccbug">gccbug</primary>
179 </indexterm>
180 </listitem>
181 </varlistentry>
182
183 <varlistentry id="gcov">
184 <term><command>gcov</command></term>
185 <listitem>
186 <para>A coverage testing tool; it is used to analyze programs to
187 determine where optimizations will have the most effect</para>
188 <indexterm zone="ch-system-gcc gcov">
189 <primary sortas="b-gcov">gcov</primary>
190 </indexterm>
191 </listitem>
192 </varlistentry>
193
194 <varlistentry id="libgcc">
195 <term><filename class="libraryfile">libgcc</filename></term>
196 <listitem>
197 <para>Contains run-time support for <command>gcc</command></para>
198 <indexterm zone="ch-system-gcc libgcc">
199 <primary sortas="c-libgcc*">libgcc*</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry id="libgcov">
205 <term><filename class="libraryfile">libgcov</filename></term>
206 <listitem>
207 <para>Library that is linked into a program when
208 <command>gcc</command> is instructed to enable profiling</para>
209 <indexterm zone="ch-system-gcc libgcov">
210 <primary sortas="c-libgcov">libgcov</primary>
211 </indexterm>
212 </listitem>
213 </varlistentry>
214
215 <varlistentry id="libgomp">
216 <term><filename class="libraryfile">libgomp</filename></term>
217 <listitem>
218 <para>GNU implementation of the OpenMP API for multi-platform
219 shared-memory parallel programming in C/C++ and Fortran</para>
220 <indexterm zone="ch-system-gcc libgomp">
221 <primary sortas="c-libgomp">libgomp</primary>
222 </indexterm>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry id="libmudflap">
227 <term><filename class="libraryfile">libmudflap</filename></term>
228 <listitem>
229 <para>The libmudflap libraries are used by GCC for instrumenting
230 pointer and array dereferencing operations.</para>
231 <indexterm zone="ch-system-gcc libmudflap">
232 <primary sortas="c-libmudflap*">libmudflap*</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry id="libssp">
238 <term><filename class="libraryfile">libssp</filename></term>
239 <listitem>
240 <para>Contains routines supporting GCC's stack-smashing protection
241 functionality</para>
242 <indexterm zone="ch-system-gcc libssp">
243 <primary sortas="c-libssp*">libssp*</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
248 <varlistentry id="libstdc">
249 <term><filename class="libraryfile">libstdc++</filename></term>
250 <listitem>
251 <para>The standard C++ library</para>
252 <indexterm zone="ch-system-gcc libstdc">
253 <primary sortas="c-libstdc++">libstdc++</primary>
254 </indexterm>
255 </listitem>
256 </varlistentry>
257
258 <varlistentry id="libsupc">
259 <term><filename class="libraryfile">libsupc++</filename></term>
260 <listitem>
261 <para>Provides supporting routines for the C++ programming
262 language</para>
263 <indexterm zone="ch-system-gcc libsupc">
264 <primary sortas="c-libsupc++">libsupc++</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 </variablelist>
270
271 </sect2>
272
273</sect1>
Note: See TracBrowser for help on using the repository browser.