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

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

Update gcc to version 6.2

This removes the need to patch gcc due to musl as gcc6 supports musl by
simply calling out a musl-based triplet for the target.

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