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

Last change on this file since 2a5f9db was 2b9574b, checked in by Andrew Bradford <andrew@…>, 11 years ago

gcc-final: Do mpfr, gmp, and mpc, too

Due to removal of MPFR, GMP, and MPC steps now gcc-final needs to unpack
them, too.

  • Property mode set to 100644
File size: 6.8 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 <para os="b">GCC requires the GMP, MPFR, and MPC packages to either be
28 present on the host or to be present in source form within the gcc source
29 tree. Unpack these into the GCC directory after unpacking GCC:</para>
30
31<screen os="ba"><userinput>tar xf ../mpfr-&mpfr-version;.tar.bz2
32mv -v mpfr-&mpfr-version; mpfr
33tar xf ../gmp-&gmp-version;.tar.bz2
34mv -v gmp-&gmp-version; gmp
35tar xf ../mpc-&mpc-version;.tar.gz
36mv -v mpc-&mpc-version; mpc</userinput></screen>
37
38 <xi:include os="c" xmlns:xi="http://www.w3.org/2003/XInclude"
39 href="gcc-static.xml"
40 xpointer="xpointer(//*[@os='c'])"/>
41
42 <xi:include os="d" xmlns:xi="http://www.w3.org/2003/XInclude"
43 href="gcc-static.xml"
44 xpointer="xpointer(//*[@os='d'])"/>
45
46 <xi:include os="e" xmlns:xi="http://www.w3.org/2003/XInclude"
47 href="gcc-static.xml"
48 xpointer="xpointer(//*[@os='e'])"/>
49
50 <note os="f"><para>If you would like to build a C++ compiler in addition
51 to the C compiler, change the following --enable-languages=c option to be
52 --enable-languages=c,c++ instead. A C++ compiler is not required for
53 any of the software included in this book.</para></note>
54
55<!-- This is the common configure line for GCC-Final -->
56<!-- It's not actually used by any arch but is here for reference. -->
57<screen os="ae"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
58 ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
59 --build=${CLFS_HOST} --target=${CLFS_TARGET} --host=${CLFS_HOST} \
60 --with-sysroot=${CLFS} --disable-nls --enable-shared \
61 --enable-languages=c --enable-c99 --enable-long-long \
62 --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
63 --with-mpc=${CLFS}/cross-tools --disable-multilib</userinput></screen>
64
65 <variablelist os="af">
66 <title>The meaning of the configure options not used previously:</title>
67
68 <varlistentry os="af1">
69 <term><parameter>--enable-shared</parameter></term>
70 <listitem>
71 <para>Enables the creation of the shared libraries.</para>
72 </listitem>
73 </varlistentry>
74
75 <varlistentry os="af2">
76 <term><parameter>--enable-c99</parameter></term>
77 <listitem>
78 <para>Enable C99 support for C programs.</para>
79 </listitem>
80 </varlistentry>
81
82 <varlistentry os="af3">
83 <term><parameter>--enable-long-long</parameter></term>
84 <listitem>
85 <para>Enables long long support in the compiler.</para>
86 </listitem>
87 </varlistentry>
88
89 </variablelist>
90
91 <xi:include os="ah" xmlns:xi="http://www.w3.org/2003/XInclude"
92 href="gcc-static.xml"
93 xpointer="xpointer(//*[@os='ah'])"/>
94
95<screen os="ai"><userinput>make</userinput></screen>
96
97 <xi:include os="aj" xmlns:xi="http://www.w3.org/2003/XInclude"
98 href="gcc-static.xml"
99 xpointer="xpointer(//*[@os='aj'])"/>
100
101<screen os="ak"><userinput>make install</userinput></screen>
102
103 <para os="al">Some programs need <filename class="libraryfile">libgcc_s.so.1</filename>
104 to be included in the target file system. Copy it to the
105 <filename class="directory">${CLFS}/lib</filename> directory:</para>
106
107<screen os="am"><userinput>cp -v ${CLFS}/cross-tools/${CLFS_TARGET}/lib/libgcc_s.so.1 ${CLFS}/lib</userinput></screen>
108
109 </sect2>
110
111 <sect2 id="contents-gcc" role="content">
112 <title>Contents of GCC</title>
113
114 <segmentedlist>
115 <segtitle>Installed programs</segtitle>
116 <segtitle>Installed libraries</segtitle>
117
118 <seglistitem>
119 <seg>cc (link to gcc), gcc, gccbug, and gcov</seg>
120 <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libmudflap.[a,so],
121 and libmudflapth.[a,so]</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-cross-tools-gcc-final cc">
135 <primary sortas="b-cc">cc</primary>
136 </indexterm>
137 </listitem>
138 </varlistentry>
139
140 <varlistentry id="gcc">
141 <term><command>gcc</command></term>
142 <listitem>
143 <para>The C compiler</para>
144 <indexterm zone="ch-cross-tools-gcc-final gcc">
145 <primary sortas="b-gcc">gcc</primary>
146 </indexterm>
147 </listitem>
148 </varlistentry>
149
150 <varlistentry id="gccbug">
151 <term><command>gccbug</command></term>
152 <listitem>
153 <para>A shell script used to help create useful bug reports</para>
154 <indexterm zone="ch-cross-tools-gcc-final gccbug">
155 <primary sortas="b-gccbug">gccbug</primary>
156 </indexterm>
157 </listitem>
158 </varlistentry>
159
160 <varlistentry id="gcov">
161 <term><command>gcov</command></term>
162 <listitem>
163 <para>A coverage testing tool; it is used to analyze programs to
164 determine where optimizations will have the most effect</para>
165 <indexterm zone="ch-cross-tools-gcc-final gcov">
166 <primary sortas="b-gcov">gcov</primary>
167 </indexterm>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry id="libgcc">
172 <term><filename class="libraryfile">libgcc</filename></term>
173 <listitem>
174 <para>Contains run-time support for <command>gcc</command></para>
175 <indexterm zone="ch-cross-tools-gcc-final libgcc">
176 <primary sortas="c-libgcc*">libgcc*</primary>
177 </indexterm>
178 </listitem>
179 </varlistentry>
180
181 <varlistentry id="libmudflap">
182 <term><filename class="libraryfile">libmudflap</filename></term>
183 <listitem>
184 <para>The libmudflap libraries are used by GCC for instrumenting
185 pointer and array dereferencing operations.</para>
186 <indexterm zone="ch-cross-tools-gcc-final libmudflap">
187 <primary sortas="c-libmudflap*">libmudflap*</primary>
188 </indexterm>
189 </listitem>
190 </varlistentry>
191
192 </variablelist>
193
194 </sect2>
195
196</sect1>
Note: See TracBrowser for help on using the repository browser.