source: clfs-sysroot/BOOK/final-system/common/gcc.xml @ 4b6ae47

Last change on this file since 4b6ae47 was 4b6ae47, checked in by Jim Gifford <clfs@…>, 18 years ago

r3659@server (orig r1662): jciccone | 2006-05-26 12:53:57 -0700
Removed the gcc-PR20425 patch and added glibc-headers for arm.

  • Property mode set to 100644
File size: 7.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3  "http://www.oasis-open.org/docbook/xml/4.4/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    <para os="p1">The following patch fixes the searching of multilib dirs for
29    specs file:</para>
30
31<screen os="p2"><userinput>patch -Np1 -i ../&gcc-PR20425-patch;</userinput></screen>
32
33    <para os="a">Apply a <command>sed</command> substitution that will suppress the
34    installation of <filename class="libraryfile">libiberty.a</filename>. The
35    version of <filename class="libraryfile">libiberty.a</filename> provided by
36    Binutils will be used instead:</para>
37
38<screen os="b"><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
39
40    <para os="e1">GCC provides a <command>gccbug</command> script which detects at
41    compile time whether mktemp is present, and hardcodes the result in a test.
42    If mktemp is not found, the script will fall back to using less
43    random names for temporary files.  We will be installing mktemp
44    later, so the following sed will simulate its presence:</para>
45
46<screen os="e2"><userinput>sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in</userinput></screen>
47
48    <para os="c">The GCC documentation recommends building GCC outside of the source
49    directory in a dedicated build directory:</para>
50
51<screen os="d"><userinput>mkdir -v ../gcc-build
52cd ../gcc-build</userinput></screen>
53
54    <para os="e">Prepare GCC for compilation:</para>
55
56<screen os="f"><userinput>../gcc-4.1.0/configure --prefix=/usr --libexecdir=/usr/lib \
57    --build=${LFS_HOST} --host=${LFS_TARGET} --target=${LFS_TARGET} \
58    --enable-shared --enable-threads=posix --enable-__cxa_atexit \
59    --enable-c99 --enable-long-long --enable-clocale=gnu \
60    --enable-languages=c,c++ --disable-libstdcxx-pch</userinput></screen>
61
62    <para os="g">Compile the package:</para>
63
64<screen os="h"><userinput>make</userinput></screen>
65
66    <para os="i">Install the package:</para>
67
68<screen os="j"><userinput>make DESTDIR=${LFS} install</userinput></screen>
69
70    <para os="k">Some packages expect the C preprocessor to be installed in the
71    <filename class="directory">/lib</filename> directory.
72    To support those packages, create this symlink:</para>
73
74<screen os="l"><userinput>ln -sv ../usr/bin/cpp ${LFS}/lib</userinput></screen>
75
76    <para os="m">Many packages use the name <command>cc</command> to call the C
77    compiler. To satisfy those packages, create a symlink:</para>
78
79<screen os="o"><userinput>ln -sv gcc ${LFS}/usr/bin/cc</userinput></screen>
80
81  </sect2>
82
83  <sect2 id="contents-gcc" role="content">
84    <title>Contents of GCC</title>
85
86    <segmentedlist>
87      <segtitle>Installed programs</segtitle>
88      <segtitle>Installed libraries</segtitle>
89
90      <seglistitem>
91        <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
92        <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libmudflap.[a,so],
93        libmudflapth.[a,so], libstdc++.[a,so], and
94        libsupc++.a</seg>
95      </seglistitem>
96    </segmentedlist>
97
98    <variablelist>
99      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
100      <?dbfo list-presentation="list"?>
101      <?dbhtml list-presentation="table"?>
102
103      <varlistentry id="cc">
104        <term><command>cc</command></term>
105        <listitem>
106          <para>The C compiler</para>
107          <indexterm zone="ch-system-gcc cc">
108            <primary sortas="b-cc">cc</primary>
109          </indexterm>
110        </listitem>
111      </varlistentry>
112
113      <varlistentry id="cpp">
114        <term><command>cpp</command></term>
115        <listitem>
116          <para>The C preprocessor; it is used by the compiler to expand the
117          #include, #define, and similar statements in the source files</para>
118          <indexterm zone="ch-system-gcc cpp">
119            <primary sortas="b-cpp">cpp</primary>
120          </indexterm>
121        </listitem>
122      </varlistentry>
123
124      <varlistentry id="c">
125        <term><command>c++</command></term>
126        <listitem>
127          <para>The C++ compiler</para>
128          <indexterm zone="ch-system-gcc c">
129            <primary sortas="b-c++">c++</primary>
130          </indexterm>
131        </listitem>
132      </varlistentry>
133
134      <varlistentry id="g">
135        <term><command>g++</command></term>
136        <listitem>
137          <para>The C++ compiler</para>
138          <indexterm zone="ch-system-gcc g">
139            <primary sortas="b-g++">g++</primary>
140          </indexterm>
141        </listitem>
142      </varlistentry>
143
144      <varlistentry id="gcc">
145        <term><command>gcc</command></term>
146        <listitem>
147          <para>The C compiler</para>
148          <indexterm zone="ch-system-gcc gcc">
149            <primary sortas="b-gcc">gcc</primary>
150          </indexterm>
151        </listitem>
152      </varlistentry>
153
154      <varlistentry id="gccbug">
155        <term><command>gccbug</command></term>
156        <listitem>
157          <para>A shell script used to help create useful bug reports</para>
158          <indexterm zone="ch-system-gcc gccbug">
159            <primary sortas="b-gccbug">gccbug</primary>
160          </indexterm>
161        </listitem>
162      </varlistentry>
163
164      <varlistentry id="gcov">
165        <term><command>gcov</command></term>
166        <listitem>
167          <para>A coverage testing tool; it is used to analyze programs to
168          determine where optimizations will have the most effect</para>
169          <indexterm zone="ch-system-gcc gcov">
170            <primary sortas="b-gcov">gcov</primary>
171          </indexterm>
172        </listitem>
173      </varlistentry>
174
175      <varlistentry id="libgcc">
176        <term><filename class="libraryfile">libgcc</filename></term>
177        <listitem>
178          <para>Contains run-time support for <command>gcc</command></para>
179          <indexterm zone="ch-system-gcc libgcc">
180            <primary sortas="c-libgcc*">libgcc*</primary>
181          </indexterm>
182        </listitem>
183      </varlistentry>
184
185      <varlistentry id="libmudflap">
186        <term><filename class="libraryfile">libmudflap</filename></term>
187        <listitem>
188          <para>The libmudflap libraries are used by GCC for instrumenting
189          pointer and array dereferencing operations.</para>
190          <indexterm zone="ch-system-gcc libmudflap">
191            <primary sortas="c-libmudflap*">libmudflap*</primary>
192          </indexterm>
193        </listitem>
194      </varlistentry>
195
196      <varlistentry id="libstdc">
197        <term><filename class="libraryfile">libstdc++</filename></term>
198        <listitem>
199          <para>The standard C++ library</para>
200          <indexterm zone="ch-system-gcc libstdc">
201            <primary sortas="c-libstdc++">libstdc++</primary>
202          </indexterm>
203        </listitem>
204      </varlistentry>
205
206      <varlistentry id="libsupc">
207        <term><filename class="libraryfile">libsupc++</filename></term>
208        <listitem>
209          <para>Provides supporting routines for the C++ programming
210          language</para>
211          <indexterm zone="ch-system-gcc libsupc">
212            <primary sortas="c-libsupc++">libsupc++</primary>
213          </indexterm>
214        </listitem>
215      </varlistentry>
216
217    </variablelist>
218
219  </sect2>
220
221</sect1>
Note: See TracBrowser for help on using the repository browser.