source: BOOK/final-system/common/gcc.xml@ 4e7ed7a

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 4e7ed7a was 4dbd276, checked in by William Harrington <kb0iic@…>, 12 years ago

Update to gcc 4.8.0.

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