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

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f8d1ac28 was 7748c0f, checked in by William Harrington <kb0iic@…>, 11 years ago

Fix GCC fixincludes edit command.

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