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

Last change on this file since b057d7e2 was 146587b, checked in by Andrew Bradford <andrew@…>, 11 years ago

gcc: Remove AR=ar and LDFLAGS from gcc builds

They aren't needed with gmp, mpfr, and mpc in tree and there are no host
libs built for embedded.

  • 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>../gcc-&gcc-version;/configure \
58 --prefix=${CLFS}/cross-tools \
59 --build=${CLFS_HOST} \
60 --target=${CLFS_TARGET} \
61 --host=${CLFS_HOST} \
62 --with-sysroot=${CLFS} \
63 --disable-nls \
64 --enable-shared \
65 --enable-languages=c \
66 --enable-c99 \
67 --enable-long-long \
68 --with-mpfr=${CLFS}/cross-tools \
69 --with-gmp=${CLFS}/cross-tools \
70 --with-mpc=${CLFS}/cross-tools \
71 --disable-multilib</userinput></screen>
72
73 <variablelist os="af">
74 <title>The meaning of the configure options not used previously:</title>
75
76 <varlistentry os="af1">
77 <term><parameter>--enable-shared</parameter></term>
78 <listitem>
79 <para>Enables the creation of the shared libraries.</para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry os="af2">
84 <term><parameter>--enable-c99</parameter></term>
85 <listitem>
86 <para>Enable C99 support for C programs.</para>
87 </listitem>
88 </varlistentry>
89
90 <varlistentry os="af3">
91 <term><parameter>--enable-long-long</parameter></term>
92 <listitem>
93 <para>Enables long long support in the compiler.</para>
94 </listitem>
95 </varlistentry>
96
97 </variablelist>
98
99 <xi:include os="ah" xmlns:xi="http://www.w3.org/2003/XInclude"
100 href="gcc-static.xml"
101 xpointer="xpointer(//*[@os='ah'])"/>
102
103<screen os="ai"><userinput>make</userinput></screen>
104
105 <xi:include os="aj" xmlns:xi="http://www.w3.org/2003/XInclude"
106 href="gcc-static.xml"
107 xpointer="xpointer(//*[@os='aj'])"/>
108
109<screen os="ak"><userinput>make install</userinput></screen>
110
111 <para os="al">Some programs need <filename class="libraryfile">libgcc_s.so.1</filename>
112 to be included in the target file system. Copy it to the
113 <filename class="directory">${CLFS}/lib</filename> directory:</para>
114
115<screen os="am"><userinput>cp -v ${CLFS}/cross-tools/${CLFS_TARGET}/lib/libgcc_s.so.1 ${CLFS}/lib</userinput></screen>
116
117 </sect2>
118
119 <sect2 id="contents-gcc" role="content">
120 <title>Contents of GCC</title>
121
122 <segmentedlist>
123 <segtitle>Installed programs</segtitle>
124 <segtitle>Installed libraries</segtitle>
125
126 <seglistitem>
127 <seg>cc (link to gcc), gcc, gccbug, and gcov</seg>
128 <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libmudflap.[a,so],
129 and libmudflapth.[a,so]</seg>
130 </seglistitem>
131 </segmentedlist>
132
133 <variablelist>
134 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
135 <?dbfo list-presentation="list"?>
136 <?dbhtml list-presentation="table"?>
137
138 <varlistentry id="cc">
139 <term><command>cc</command></term>
140 <listitem>
141 <para>The C compiler</para>
142 <indexterm zone="ch-cross-tools-gcc-final cc">
143 <primary sortas="b-cc">cc</primary>
144 </indexterm>
145 </listitem>
146 </varlistentry>
147
148 <varlistentry id="gcc">
149 <term><command>gcc</command></term>
150 <listitem>
151 <para>The C compiler</para>
152 <indexterm zone="ch-cross-tools-gcc-final gcc">
153 <primary sortas="b-gcc">gcc</primary>
154 </indexterm>
155 </listitem>
156 </varlistentry>
157
158 <varlistentry id="gccbug">
159 <term><command>gccbug</command></term>
160 <listitem>
161 <para>A shell script used to help create useful bug reports</para>
162 <indexterm zone="ch-cross-tools-gcc-final gccbug">
163 <primary sortas="b-gccbug">gccbug</primary>
164 </indexterm>
165 </listitem>
166 </varlistentry>
167
168 <varlistentry id="gcov">
169 <term><command>gcov</command></term>
170 <listitem>
171 <para>A coverage testing tool; it is used to analyze programs to
172 determine where optimizations will have the most effect</para>
173 <indexterm zone="ch-cross-tools-gcc-final gcov">
174 <primary sortas="b-gcov">gcov</primary>
175 </indexterm>
176 </listitem>
177 </varlistentry>
178
179 <varlistentry id="libgcc">
180 <term><filename class="libraryfile">libgcc</filename></term>
181 <listitem>
182 <para>Contains run-time support for <command>gcc</command></para>
183 <indexterm zone="ch-cross-tools-gcc-final libgcc">
184 <primary sortas="c-libgcc*">libgcc*</primary>
185 </indexterm>
186 </listitem>
187 </varlistentry>
188
189 <varlistentry id="libmudflap">
190 <term><filename class="libraryfile">libmudflap</filename></term>
191 <listitem>
192 <para>The libmudflap libraries are used by GCC for instrumenting
193 pointer and array dereferencing operations.</para>
194 <indexterm zone="ch-cross-tools-gcc-final libmudflap">
195 <primary sortas="c-libmudflap*">libmudflap*</primary>
196 </indexterm>
197 </listitem>
198 </varlistentry>
199
200 </variablelist>
201
202 </sect2>
203
204</sect1>
Note: See TracBrowser for help on using the repository browser.