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

Last change on this file since 73d050d was b6831b6, checked in by Joe Ciccone <jciccone@…>, 14 years ago

Update the LDFLAGS in the final-system between the installation
of EGLIBC and the installation of GCC. This should fix build errors
in a few odd situations, but it is also correct now. Before /usr/lib*
was not being set in rpath-link, just /lib*.

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