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

Last change on this file since 7f42027 was c4b2364, checked in by Andrew Bradford <andrew@…>, 10 years ago

gcc: Add notes for static vs final builds

To clarify that the first pass is mainly to build the libc and the
second pass uses that libc to build the actual cross compiler.

  • Property mode set to 100644
File size: 5.4 KB
RevLine 
[a9e389d]1<?xml version="1.0" encoding="ISO-8859-1"?>
[bd48e48]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[a9e389d]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
[bd0ad10]8<!-- Common GCC-Final -->
9
[a9e389d]10<sect1 id="ch-cross-tools-gcc-final" role="wrap">
11 <?dbhtml filename="gcc-final.html"?>
12
[8f65e24]13 <title>GCC-&gcc-version; - Final</title>
[a9e389d]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
[c4b2364]20 <sect2 role="package">
21 <title/>
22
23 <para>The GCC package contains the GNU compiler collection, which includes
24 the C compiler. This second build of GCC will produce the final cross
25 compiler which will use the previously built C library.</para>
26
27 </sect2>
[a9e389d]28
29 <sect2 role="installation">
30 <title>Installation of GCC Cross Compiler</title>
31
[c01e552]32 <xi:include os="c" xmlns:xi="http://www.w3.org/2003/XInclude"
33 href="gcc-static.xml"
34 xpointer="xpointer(//*[@os='ab'])"/>
35
[2b9574b]36 <para os="b">GCC requires the GMP, MPFR, and MPC packages to either be
37 present on the host or to be present in source form within the gcc source
38 tree. Unpack these into the GCC directory after unpacking GCC:</para>
39
40<screen os="ba"><userinput>tar xf ../mpfr-&mpfr-version;.tar.bz2
41mv -v mpfr-&mpfr-version; mpfr
42tar xf ../gmp-&gmp-version;.tar.bz2
43mv -v gmp-&gmp-version; gmp
44tar xf ../mpc-&mpc-version;.tar.gz
45mv -v mpc-&mpc-version; mpc</userinput></screen>
46
[bd0ad10]47 <xi:include os="c" xmlns:xi="http://www.w3.org/2003/XInclude"
[a9e389d]48 href="gcc-static.xml"
49 xpointer="xpointer(//*[@os='c'])"/>
50
[bd0ad10]51 <xi:include os="d" xmlns:xi="http://www.w3.org/2003/XInclude"
[a9e389d]52 href="gcc-static.xml"
53 xpointer="xpointer(//*[@os='d'])"/>
54
[bd0ad10]55 <xi:include os="e" xmlns:xi="http://www.w3.org/2003/XInclude"
[a9e389d]56 href="gcc-static.xml"
57 xpointer="xpointer(//*[@os='e'])"/>
58
[d38764e]59 <note os="f"><para>If you would like to build a C++ compiler in addition
60 to the C compiler, change the following --enable-languages=c option to be
[3961d27]61 --enable-languages=c,c++ instead. A C++ compiler is not required for
[d38764e]62 any of the software included in this book.</para></note>
63
[bd0ad10]64<!-- This is the common configure line for GCC-Final -->
65<!-- It's not actually used by any arch but is here for reference. -->
[146587b]66<screen os="ae"><userinput>../gcc-&gcc-version;/configure \
[54fde8f]67 --prefix=${CLFS}/cross-tools \
68 --build=${CLFS_HOST} \
69 --target=${CLFS_TARGET} \
70 --host=${CLFS_HOST} \
[94e2400]71 --with-sysroot=${CLFS}/cross-tools/${CLFS_TARGET} \
[54fde8f]72 --disable-nls \
73 --enable-languages=c \
74 --enable-c99 \
75 --enable-long-long \
[2bb7576]76 --disable-libmudflap \
[54fde8f]77 --with-mpfr=${CLFS}/cross-tools \
78 --with-gmp=${CLFS}/cross-tools \
79 --with-mpc=${CLFS}/cross-tools \
[5f18bea]80 --disable-multilib \
81 --with-mpfr-include=$(pwd)/../gcc-&gcc-version;/mpfr/src \
82 --with-mpfr-lib=$(pwd)/mpfr/src/.libs</userinput></screen>
[a9e389d]83
84 <variablelist os="af">
[65b296c]85 <title>The meaning of the configure options not used previously:</title>
[a9e389d]86
87 <varlistentry os="af2">
88 <term><parameter>--enable-c99</parameter></term>
89 <listitem>
90 <para>Enable C99 support for C programs.</para>
91 </listitem>
92 </varlistentry>
93
[e1b2402]94 <varlistentry os="af3">
[a9e389d]95 <term><parameter>--enable-long-long</parameter></term>
96 <listitem>
97 <para>Enables long long support in the compiler.</para>
98 </listitem>
99 </varlistentry>
100
101 </variablelist>
102
[bd0ad10]103 <xi:include os="ah" xmlns:xi="http://www.w3.org/2003/XInclude"
[a9e389d]104 href="gcc-static.xml"
[ae51e2a]105 xpointer="xpointer(//*[@os='ah'])"/>
[a9e389d]106
[bd0ad10]107<screen os="ai"><userinput>make</userinput></screen>
[a9e389d]108
[bd0ad10]109 <xi:include os="aj" xmlns:xi="http://www.w3.org/2003/XInclude"
[a9e389d]110 href="gcc-static.xml"
[ae51e2a]111 xpointer="xpointer(//*[@os='aj'])"/>
[a9e389d]112
[bd0ad10]113<screen os="ak"><userinput>make install</userinput></screen>
[a9e389d]114
115 </sect2>
116
117 <sect2 id="contents-gcc" role="content">
118 <title>Contents of GCC</title>
119
120 <segmentedlist>
121 <segtitle>Installed programs</segtitle>
122 <segtitle>Installed libraries</segtitle>
123
124 <seglistitem>
[9228651]125 <seg>gcc, and gcov</seg>
[2bb7576]126 <seg>libgcc.a, libgcc_eh.a, and libgcc_s.so</seg>
[a9e389d]127 </seglistitem>
128 </segmentedlist>
129
130 <variablelist>
131 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
132 <?dbfo list-presentation="list"?>
133 <?dbhtml list-presentation="table"?>
134
135 <varlistentry id="gcc">
136 <term><command>gcc</command></term>
137 <listitem>
138 <para>The C compiler</para>
[6561a0f]139 <indexterm zone="ch-cross-tools-gcc-final gcc">
[a9e389d]140 <primary sortas="b-gcc">gcc</primary>
141 </indexterm>
142 </listitem>
143 </varlistentry>
144
145 <varlistentry id="gcov">
146 <term><command>gcov</command></term>
147 <listitem>
148 <para>A coverage testing tool; it is used to analyze programs to
149 determine where optimizations will have the most effect</para>
[6561a0f]150 <indexterm zone="ch-cross-tools-gcc-final gcov">
[a9e389d]151 <primary sortas="b-gcov">gcov</primary>
152 </indexterm>
153 </listitem>
154 </varlistentry>
155
156 <varlistentry id="libgcc">
157 <term><filename class="libraryfile">libgcc</filename></term>
158 <listitem>
159 <para>Contains run-time support for <command>gcc</command></para>
[6561a0f]160 <indexterm zone="ch-cross-tools-gcc-final libgcc">
[a9e389d]161 <primary sortas="c-libgcc*">libgcc*</primary>
162 </indexterm>
163 </listitem>
164 </varlistentry>
165
166 </variablelist>
167
168 </sect2>
169
170</sect1>
Note: See TracBrowser for help on using the repository browser.