source: clfs-embedded/BOOK/cross-tools/common/gcc-final.xml @ d38764e

Last change on this file since d38764e was d38764e, checked in by Andrew Bradford <bradfa@…>, 12 years ago

Added note for building C++ compiler

It would be nice to have a C++ compiler in addition to the C compiler.
Although nothing in embedded requires a C++ compiler, other programs
that people want to compile may. Added a note saying how to enable
the GCC-Final configure script to build g++.

  • Property mode set to 100644
File size: 6.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4  <!ENTITY % general-entities SYSTEM "../../general.ent">
5  %general-entities;
6]>
7
8<!-- Common GCC-Final -->
9
10<sect1 id="ch-cross-tools-gcc-final" role="wrap">
11  <?dbhtml filename="gcc-final.html"?>
12
13  <title>GCC-&gcc-version; - Cross Compiler Final</title>
14
15  <indexterm zone="ch-cross-tools-gcc-final">
16    <primary sortas="a-GCC">GCC</primary>
17    <secondary>cross tools, final</secondary>
18  </indexterm>
19
20  <xi:include role="package" xmlns:xi="http://www.w3.org/2003/XInclude"
21  href="gcc-static.xml"
22  xpointer="xpointer(//*[@role='package'])"/>
23
24  <sect2 role="installation">
25    <title>Installation of GCC Cross Compiler</title>
26
27    <xi:include os="c" xmlns:xi="http://www.w3.org/2003/XInclude"
28    href="gcc-static.xml"
29    xpointer="xpointer(//*[@os='c'])"/>
30
31    <xi:include os="d" xmlns:xi="http://www.w3.org/2003/XInclude"
32    href="gcc-static.xml"
33    xpointer="xpointer(//*[@os='d'])"/>
34
35    <xi:include os="e" xmlns:xi="http://www.w3.org/2003/XInclude"
36    href="gcc-static.xml"
37    xpointer="xpointer(//*[@os='e'])"/>
38
39    <note os="f"><para>If you would like to build a C++ compiler in addition
40    to the C compiler, change the following --enable-languages=c option to be
41    --enable-languages=c,c++ instead.  A C++ compiler is not required in for
42    any of the software included in this book.</para></note>
43
44<!-- This is the common configure line for GCC-Final -->
45<!-- It's not actually used by any arch but is here for reference. -->
46<screen os="ae"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
47  ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
48  --build=${CLFS_HOST} --target=${CLFS_TARGET} --host=${CLFS_HOST} \
49  --with-sysroot=${CLFS} --disable-nls --enable-shared \
50  --enable-languages=c --enable-c99 --enable-long-long \
51  --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
52  --with-mpc=${CLFS}/cross-tools --disable-multilib</userinput></screen>
53
54    <variablelist os="af">
55      <title>The meaning of the configure options not used previously:</title>
56
57      <varlistentry os="af1">
58        <term><parameter>--enable-shared</parameter></term>
59        <listitem>
60          <para>Enables the creation of the shared libraries.</para>
61        </listitem>
62      </varlistentry>
63
64      <varlistentry os="af2">
65        <term><parameter>--enable-c99</parameter></term>
66        <listitem>
67          <para>Enable C99 support for C programs.</para>
68        </listitem>
69      </varlistentry>
70
71      <varlistentry os="af3">
72        <term><parameter>--enable-long-long</parameter></term>
73        <listitem>
74          <para>Enables long long support in the compiler.</para>
75        </listitem>
76      </varlistentry>
77
78    </variablelist>
79
80    <xi:include os="ah" xmlns:xi="http://www.w3.org/2003/XInclude"
81    href="gcc-static.xml"
82    xpointer="xpointer(//*[@os='ah'])"/>
83
84<screen os="ai"><userinput>make</userinput></screen>
85
86    <xi:include os="aj" xmlns:xi="http://www.w3.org/2003/XInclude"
87    href="gcc-static.xml"
88    xpointer="xpointer(//*[@os='aj'])"/>
89
90<screen os="ak"><userinput>make install</userinput></screen>
91
92  </sect2>
93
94  <sect2 id="contents-gcc" role="content">
95    <title>Contents of GCC</title>
96
97    <segmentedlist>
98      <segtitle>Installed programs</segtitle>
99      <segtitle>Installed libraries</segtitle>
100
101      <seglistitem>
102        <seg>cc (link to gcc), gcc, gccbug, and gcov</seg>
103        <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libmudflap.[a,so],
104        and libmudflapth.[a,so]</seg>
105      </seglistitem>
106    </segmentedlist>
107
108    <variablelist>
109      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
110      <?dbfo list-presentation="list"?>
111      <?dbhtml list-presentation="table"?>
112
113      <varlistentry id="cc">
114        <term><command>cc</command></term>
115        <listitem>
116          <para>The C compiler</para>
117          <indexterm zone="ch-cross-tools-gcc-final cc">
118            <primary sortas="b-cc">cc</primary>
119          </indexterm>
120        </listitem>
121      </varlistentry>
122
123      <varlistentry id="gcc">
124        <term><command>gcc</command></term>
125        <listitem>
126          <para>The C compiler</para>
127          <indexterm zone="ch-cross-tools-gcc-final gcc">
128            <primary sortas="b-gcc">gcc</primary>
129          </indexterm>
130        </listitem>
131      </varlistentry>
132
133      <varlistentry id="gccbug">
134        <term><command>gccbug</command></term>
135        <listitem>
136          <para>A shell script used to help create useful bug reports</para>
137          <indexterm zone="ch-cross-tools-gcc-final gccbug">
138            <primary sortas="b-gccbug">gccbug</primary>
139          </indexterm>
140        </listitem>
141      </varlistentry>
142
143      <varlistentry id="gcov">
144        <term><command>gcov</command></term>
145        <listitem>
146          <para>A coverage testing tool; it is used to analyze programs to
147          determine where optimizations will have the most effect</para>
148          <indexterm zone="ch-cross-tools-gcc-final gcov">
149            <primary sortas="b-gcov">gcov</primary>
150          </indexterm>
151        </listitem>
152      </varlistentry>
153
154      <varlistentry id="libgcc">
155        <term><filename class="libraryfile">libgcc</filename></term>
156        <listitem>
157          <para>Contains run-time support for <command>gcc</command></para>
158          <indexterm zone="ch-cross-tools-gcc-final libgcc">
159            <primary sortas="c-libgcc*">libgcc*</primary>
160          </indexterm>
161        </listitem>
162      </varlistentry>
163
164      <varlistentry id="libmudflap">
165        <term><filename class="libraryfile">libmudflap</filename></term>
166        <listitem>
167          <para>The libmudflap libraries are used by GCC for instrumenting
168          pointer and array dereferencing operations.</para>
169          <indexterm zone="ch-cross-tools-gcc-final libmudflap">
170            <primary sortas="c-libmudflap*">libmudflap*</primary>
171          </indexterm>
172        </listitem>
173      </varlistentry>
174
175    </variablelist>
176
177  </sect2>
178
179</sect1>
Note: See TracBrowser for help on using the repository browser.