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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since da13888 was d4bb6ba, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Apply the GCC PR31490 patch to all builds of gcc except for gcc static and update the kernel to 2.6.23.13.

  • Property mode set to 100644
File size: 8.7 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
[a9f0cdb]28 <para os="p1">The following patches merges all updates from the &gcc-version; Branch
29 from the GCC developers:</para>
30
31<screen os="p2"><userinput>patch -Np1 -i ../&gcc-branch_update-patch;</userinput></screen>
32
[d4bb6ba]33 <para os="p3">The following patch enables fixes compilation errors with the kernel:</para>
34
35<screen os="p4"><userinput>patch -Np1 -i ../&gcc-PR31490-patch;</userinput></screen>
36
[3f8be484]37 <para os="d">Apply a <command>sed</command> substitution that will suppress the
38 installation of <filename class="libraryfile">libiberty.a</filename>. The
39 version of <filename class="libraryfile">libiberty.a</filename> provided by
40 Binutils will be used instead:</para>
41
42<screen os="e"><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
43
[bcaa438]44 <para os="e1">GCC provides a <command>gccbug</command> script which detects at
45 compile time whether mktemp is present, and hardcodes the result in a test.
[39139e4]46 If mktemp is not found, the script will fall back to using less
47 random names for temporary files. We will be installing mktemp
48 later, so the following sed will simulate its presence:</para>
[bcaa438]49
[de1676e]50<screen os="e2"><userinput>sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in</userinput></screen>
[bcaa438]51
[3f8be484]52 <para os="f">The GCC documentation recommends building GCC outside of the source
53 directory in a dedicated build directory:</para>
54
[94e6142]55<screen os="g"><userinput>mkdir -v ../gcc-build
[3f8be484]56cd ../gcc-build</userinput></screen>
57
58 <para os="h">Prepare GCC for compilation:</para>
59
[d55f00bc]60<screen os="i"><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
[3f8be484]61 --libexecdir=/usr/lib --enable-shared --enable-threads=posix \
62 --enable-__cxa_atexit --enable-c99 --enable-long-long \
[43f3140]63 --enable-clocale=gnu --enable-languages=c,c++ \
[a1a0762]64 --disable-multilib --disable-libstdcxx-pch</userinput></screen>
[3f8be484]65
[d55f00bc]66 <para os="j">Compile the package:</para>
[3f8be484]67
[450a4e5]68<screen os="k"><userinput>make bootstrap</userinput></screen>
[3f8be484]69
[d55f00bc]70 <important os="l">
[121c48a]71 <para>The test suite for GCC is considered
[3f8be484]72 critical. Do not skip it under any circumstance.</para>
73 </important>
74
[d55f00bc]75 <para os="m">Test the results, but do not stop at errors:</para>
[3f8be484]76
[d55f00bc]77<screen os="n"><userinput>make -k check</userinput></screen>
[3f8be484]78
[d55f00bc]79 <para os="o">The <parameter>-k</parameter> flag is used to make the test suite
[3f8be484]80 run through to completion and not stop at the first failure. The GCC test
81 suite is very comprehensive and is almost guaranteed to generate a few
82 failures. To receive a summary of the test suite results, run:</para>
83
[d55f00bc]84<screen os="p"><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
[3f8be484]85
[d55f00bc]86 <para os="q">For only the summaries, pipe the output through
[3f8be484]87 <userinput>grep -A7 Summ</userinput>.</para>
88
89 <para os="r">A few unexpected failures cannot always be avoided. The
90 GCC developers are usually aware of these issues, but have not
[d55f00bc]91 resolved them yet.</para>
[3f8be484]92
93 <para os="s">Install the package:</para>
94
95<screen os="t"><userinput>make install</userinput></screen>
96
97 <para os="u">Some packages expect the C preprocessor to be installed in the
98 <filename class="directory">/lib</filename> directory.
99 To support those packages, create this symlink:</para>
100
[94e6142]101<screen os="v"><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
[3f8be484]102
103 <para os="w">Many packages use the name <command>cc</command> to call the C
104 compiler. To satisfy those packages, create a symlink:</para>
105
[94e6142]106<screen os="x"><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
[3f8be484]107
108 </sect2>
109
110 <sect2 id="contents-gcc" role="content">
111 <title>Contents of GCC</title>
112
113 <segmentedlist>
114 <segtitle>Installed programs</segtitle>
115 <segtitle>Installed libraries</segtitle>
116
117 <seglistitem>
118 <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
[9324199]119 <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libgomp.[a,so], libmudflap.[a,so],
120 libmudflapth.[a,so], libssp.[a,so], libstdc++.[a,so], and
[3f8be484]121 libsupc++.a</seg>
122 </seglistitem>
123 </segmentedlist>
124
125 <variablelist>
126 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
127 <?dbfo list-presentation="list"?>
128 <?dbhtml list-presentation="table"?>
129
130 <varlistentry id="cc">
131 <term><command>cc</command></term>
132 <listitem>
133 <para>The C compiler</para>
134 <indexterm zone="ch-system-gcc cc">
135 <primary sortas="b-cc">cc</primary>
136 </indexterm>
137 </listitem>
138 </varlistentry>
139
140 <varlistentry id="cpp">
141 <term><command>cpp</command></term>
142 <listitem>
143 <para>The C preprocessor; it is used by the compiler to expand the
144 #include, #define, and similar statements in the source files</para>
145 <indexterm zone="ch-system-gcc cpp">
146 <primary sortas="b-cpp">cpp</primary>
147 </indexterm>
148 </listitem>
149 </varlistentry>
150
151 <varlistentry id="c">
152 <term><command>c++</command></term>
153 <listitem>
154 <para>The C++ compiler</para>
155 <indexterm zone="ch-system-gcc c">
156 <primary sortas="b-c++">c++</primary>
157 </indexterm>
158 </listitem>
159 </varlistentry>
160
161 <varlistentry id="g">
162 <term><command>g++</command></term>
163 <listitem>
164 <para>The C++ compiler</para>
165 <indexterm zone="ch-system-gcc g">
166 <primary sortas="b-g++">g++</primary>
167 </indexterm>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry id="gcc">
172 <term><command>gcc</command></term>
173 <listitem>
174 <para>The C compiler</para>
175 <indexterm zone="ch-system-gcc gcc">
176 <primary sortas="b-gcc">gcc</primary>
177 </indexterm>
178 </listitem>
179 </varlistentry>
180
181 <varlistentry id="gccbug">
182 <term><command>gccbug</command></term>
183 <listitem>
184 <para>A shell script used to help create useful bug reports</para>
185 <indexterm zone="ch-system-gcc gccbug">
186 <primary sortas="b-gccbug">gccbug</primary>
187 </indexterm>
188 </listitem>
189 </varlistentry>
190
191 <varlistentry id="gcov">
192 <term><command>gcov</command></term>
193 <listitem>
194 <para>A coverage testing tool; it is used to analyze programs to
195 determine where optimizations will have the most effect</para>
196 <indexterm zone="ch-system-gcc gcov">
197 <primary sortas="b-gcov">gcov</primary>
198 </indexterm>
199 </listitem>
200 </varlistentry>
201
202 <varlistentry id="libgcc">
203 <term><filename class="libraryfile">libgcc</filename></term>
204 <listitem>
205 <para>Contains run-time support for <command>gcc</command></para>
206 <indexterm zone="ch-system-gcc libgcc">
207 <primary sortas="c-libgcc*">libgcc*</primary>
208 </indexterm>
209 </listitem>
210 </varlistentry>
211
[12a457e]212 <varlistentry id="libmudflap">
213 <term><filename class="libraryfile">libmudflap</filename></term>
214 <listitem>
215 <para>The libmudflap libraries are used by GCC for instrumenting
[3bec8f3]216 pointer and array dereferencing operations.</para>
[12a457e]217 <indexterm zone="ch-system-gcc libmudflap">
218 <primary sortas="c-libmudflap*">libmudflap*</primary>
219 </indexterm>
220 </listitem>
221 </varlistentry>
222
[3f8be484]223 <varlistentry id="libstdc">
224 <term><filename class="libraryfile">libstdc++</filename></term>
225 <listitem>
226 <para>The standard C++ library</para>
227 <indexterm zone="ch-system-gcc libstdc">
228 <primary sortas="c-libstdc++">libstdc++</primary>
229 </indexterm>
230 </listitem>
231 </varlistentry>
232
233 <varlistentry id="libsupc">
234 <term><filename class="libraryfile">libsupc++</filename></term>
235 <listitem>
236 <para>Provides supporting routines for the C++ programming
237 language</para>
238 <indexterm zone="ch-system-gcc libsupc">
239 <primary sortas="c-libsupc++">libsupc++</primary>
240 </indexterm>
241 </listitem>
242 </varlistentry>
243
244 </variablelist>
245
246 </sect2>
247
248</sect1>
Note: See TracBrowser for help on using the repository browser.