source: BOOK/final-system/common/gcc.xml@ 79e7622

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 79e7622 was e05c4f0, checked in by Jonathan <nate@…>, 13 years ago

Added gcc 4.6.0-branch_update-1.patch to all archs

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