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

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

Add musl patches for gcc and binutils

  • Property mode set to 100644
File size: 5.2 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='ab'])"/>
30
31    <para os="b">GCC requires the GMP, MPFR, and MPC packages to either be
32    present on the host or to be present in source form within the gcc source
33    tree.  Unpack these into the GCC directory after unpacking GCC:</para>
34
35<screen os="ba"><userinput>tar xf ../mpfr-&mpfr-version;.tar.bz2
36mv -v mpfr-&mpfr-version; mpfr
37tar xf ../gmp-&gmp-version;.tar.bz2
38mv -v gmp-&gmp-version; gmp
39tar xf ../mpc-&mpc-version;.tar.gz
40mv -v mpc-&mpc-version; mpc</userinput></screen>
41
42    <xi:include os="c" xmlns:xi="http://www.w3.org/2003/XInclude"
43    href="gcc-static.xml"
44    xpointer="xpointer(//*[@os='c'])"/>
45
46    <xi:include os="d" xmlns:xi="http://www.w3.org/2003/XInclude"
47    href="gcc-static.xml"
48    xpointer="xpointer(//*[@os='d'])"/>
49
50    <xi:include os="e" xmlns:xi="http://www.w3.org/2003/XInclude"
51    href="gcc-static.xml"
52    xpointer="xpointer(//*[@os='e'])"/>
53
54    <note os="f"><para>If you would like to build a C++ compiler in addition
55    to the C compiler, change the following --enable-languages=c option to be
56    --enable-languages=c,c++ instead.  A C++ compiler is not required for
57    any of the software included in this book.</para></note>
58
59<!-- This is the common configure line for GCC-Final -->
60<!-- It's not actually used by any arch but is here for reference. -->
61<screen os="ae"><userinput>../gcc-&gcc-version;/configure \
62  --prefix=${CLFS}/cross-tools \
63  --build=${CLFS_HOST} \
64  --target=${CLFS_TARGET} \
65  --host=${CLFS_HOST} \
66  --with-sysroot=${CLFS}/cross-tools/sysroot \
67  --disable-nls \
68  --enable-languages=c \
69  --enable-c99 \
70  --enable-long-long \
71  --disable-libmudflap \
72  --with-mpfr=${CLFS}/cross-tools \
73  --with-gmp=${CLFS}/cross-tools \
74  --with-mpc=${CLFS}/cross-tools \
75  --disable-multilib</userinput></screen>
76
77    <variablelist os="af">
78      <title>The meaning of the configure options not used previously:</title>
79
80      <varlistentry os="af2">
81        <term><parameter>--enable-c99</parameter></term>
82        <listitem>
83          <para>Enable C99 support for C programs.</para>
84        </listitem>
85      </varlistentry>
86
87      <varlistentry os="af3">
88        <term><parameter>--enable-long-long</parameter></term>
89        <listitem>
90          <para>Enables long long support in the compiler.</para>
91        </listitem>
92      </varlistentry>
93
94    </variablelist>
95
96    <xi:include os="ah" xmlns:xi="http://www.w3.org/2003/XInclude"
97    href="gcc-static.xml"
98    xpointer="xpointer(//*[@os='ah'])"/>
99
100<screen os="ai"><userinput>make</userinput></screen>
101
102    <xi:include os="aj" xmlns:xi="http://www.w3.org/2003/XInclude"
103    href="gcc-static.xml"
104    xpointer="xpointer(//*[@os='aj'])"/>
105
106<screen os="ak"><userinput>make install</userinput></screen>
107
108  </sect2>
109
110  <sect2 id="contents-gcc" role="content">
111    <title>Contents of GCC</title>
112
113    <segmentedlist>
114      <segtitle>Installed programs</segtitle>
115      <segtitle>Installed libraries</segtitle>
116
117      <seglistitem>
118        <seg>gcc, and gcov</seg>
119        <seg>libgcc.a, libgcc_eh.a, and libgcc_s.so</seg>
120      </seglistitem>
121    </segmentedlist>
122
123    <variablelist>
124      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
125      <?dbfo list-presentation="list"?>
126      <?dbhtml list-presentation="table"?>
127
128      <varlistentry id="gcc">
129        <term><command>gcc</command></term>
130        <listitem>
131          <para>The C compiler</para>
132          <indexterm zone="ch-cross-tools-gcc-final gcc">
133            <primary sortas="b-gcc">gcc</primary>
134          </indexterm>
135        </listitem>
136      </varlistentry>
137
138      <varlistentry id="gcov">
139        <term><command>gcov</command></term>
140        <listitem>
141          <para>A coverage testing tool; it is used to analyze programs to
142          determine where optimizations will have the most effect</para>
143          <indexterm zone="ch-cross-tools-gcc-final gcov">
144            <primary sortas="b-gcov">gcov</primary>
145          </indexterm>
146        </listitem>
147      </varlistentry>
148
149      <varlistentry id="libgcc">
150        <term><filename class="libraryfile">libgcc</filename></term>
151        <listitem>
152          <para>Contains run-time support for <command>gcc</command></para>
153          <indexterm zone="ch-cross-tools-gcc-final libgcc">
154            <primary sortas="c-libgcc*">libgcc*</primary>
155          </indexterm>
156        </listitem>
157      </varlistentry>
158
159    </variablelist>
160
161  </sect2>
162
163</sect1>
Note: See TracBrowser for help on using the repository browser.