[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 |
|
---|
| 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 |
|
---|
[bd0ad10] | 20 | <xi:include role="package" xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[a9e389d] | 21 | href="gcc-static.xml"
|
---|
| 22 | xpointer="xpointer(//*[@role='package'])"/>
|
---|
| 23 |
|
---|
| 24 | <sect2 role="installation">
|
---|
| 25 | <title>Installation of GCC Cross Compiler</title>
|
---|
| 26 |
|
---|
[2b9574b] | 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
|
---|
| 32 | mv -v mpfr-&mpfr-version; mpfr
|
---|
| 33 | tar xf ../gmp-&gmp-version;.tar.bz2
|
---|
| 34 | mv -v gmp-&gmp-version; gmp
|
---|
| 35 | tar xf ../mpc-&mpc-version;.tar.gz
|
---|
| 36 | mv -v mpc-&mpc-version; mpc</userinput></screen>
|
---|
| 37 |
|
---|
[bd0ad10] | 38 | <xi:include os="c" xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[a9e389d] | 39 | href="gcc-static.xml"
|
---|
| 40 | xpointer="xpointer(//*[@os='c'])"/>
|
---|
| 41 |
|
---|
[bd0ad10] | 42 | <xi:include os="d" xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[a9e389d] | 43 | href="gcc-static.xml"
|
---|
| 44 | xpointer="xpointer(//*[@os='d'])"/>
|
---|
| 45 |
|
---|
[bd0ad10] | 46 | <xi:include os="e" xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[a9e389d] | 47 | href="gcc-static.xml"
|
---|
| 48 | xpointer="xpointer(//*[@os='e'])"/>
|
---|
| 49 |
|
---|
[d38764e] | 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
|
---|
[3961d27] | 52 | --enable-languages=c,c++ instead. A C++ compiler is not required for
|
---|
[d38764e] | 53 | any of the software included in this book.</para></note>
|
---|
| 54 |
|
---|
[bd0ad10] | 55 | <!-- This is the common configure line for GCC-Final -->
|
---|
| 56 | <!-- It's not actually used by any arch but is here for reference. -->
|
---|
[35e0963] | 57 | <screen os="ae"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
|
---|
[54fde8f] | 58 | ../gcc-&gcc-version;/configure \
|
---|
| 59 | --prefix=${CLFS}/cross-tools \
|
---|
| 60 | --build=${CLFS_HOST} \
|
---|
| 61 | --target=${CLFS_TARGET} \
|
---|
| 62 | --host=${CLFS_HOST} \
|
---|
| 63 | --with-sysroot=${CLFS} \
|
---|
| 64 | --disable-nls \
|
---|
| 65 | --enable-shared \
|
---|
| 66 | --enable-languages=c \
|
---|
| 67 | --enable-c99 \
|
---|
| 68 | --enable-long-long \
|
---|
| 69 | --with-mpfr=${CLFS}/cross-tools \
|
---|
| 70 | --with-gmp=${CLFS}/cross-tools \
|
---|
| 71 | --with-mpc=${CLFS}/cross-tools \
|
---|
| 72 | --disable-multilib</userinput></screen>
|
---|
[a9e389d] | 73 |
|
---|
| 74 | <variablelist os="af">
|
---|
[65b296c] | 75 | <title>The meaning of the configure options not used previously:</title>
|
---|
[a9e389d] | 76 |
|
---|
| 77 | <varlistentry os="af1">
|
---|
[65b296c] | 78 | <term><parameter>--enable-shared</parameter></term>
|
---|
[a9e389d] | 79 | <listitem>
|
---|
[65b296c] | 80 | <para>Enables the creation of the shared libraries.</para>
|
---|
[a9e389d] | 81 | </listitem>
|
---|
| 82 | </varlistentry>
|
---|
| 83 |
|
---|
| 84 | <varlistentry os="af2">
|
---|
| 85 | <term><parameter>--enable-c99</parameter></term>
|
---|
| 86 | <listitem>
|
---|
| 87 | <para>Enable C99 support for C programs.</para>
|
---|
| 88 | </listitem>
|
---|
| 89 | </varlistentry>
|
---|
| 90 |
|
---|
[e1b2402] | 91 | <varlistentry os="af3">
|
---|
[a9e389d] | 92 | <term><parameter>--enable-long-long</parameter></term>
|
---|
| 93 | <listitem>
|
---|
| 94 | <para>Enables long long support in the compiler.</para>
|
---|
| 95 | </listitem>
|
---|
| 96 | </varlistentry>
|
---|
| 97 |
|
---|
| 98 | </variablelist>
|
---|
| 99 |
|
---|
[bd0ad10] | 100 | <xi:include os="ah" xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[a9e389d] | 101 | href="gcc-static.xml"
|
---|
[ae51e2a] | 102 | xpointer="xpointer(//*[@os='ah'])"/>
|
---|
[a9e389d] | 103 |
|
---|
[bd0ad10] | 104 | <screen os="ai"><userinput>make</userinput></screen>
|
---|
[a9e389d] | 105 |
|
---|
[bd0ad10] | 106 | <xi:include os="aj" xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[a9e389d] | 107 | href="gcc-static.xml"
|
---|
[ae51e2a] | 108 | xpointer="xpointer(//*[@os='aj'])"/>
|
---|
[a9e389d] | 109 |
|
---|
[bd0ad10] | 110 | <screen os="ak"><userinput>make install</userinput></screen>
|
---|
[a9e389d] | 111 |
|
---|
[c98e933] | 112 | <para os="al">Some programs need <filename class="libraryfile">libgcc_s.so.1</filename>
|
---|
| 113 | to be included in the target file system. Copy it to the
|
---|
| 114 | <filename class="directory">${CLFS}/lib</filename> directory:</para>
|
---|
| 115 |
|
---|
| 116 | <screen os="am"><userinput>cp -v ${CLFS}/cross-tools/${CLFS_TARGET}/lib/libgcc_s.so.1 ${CLFS}/lib</userinput></screen>
|
---|
| 117 |
|
---|
[a9e389d] | 118 | </sect2>
|
---|
| 119 |
|
---|
| 120 | <sect2 id="contents-gcc" role="content">
|
---|
| 121 | <title>Contents of GCC</title>
|
---|
| 122 |
|
---|
| 123 | <segmentedlist>
|
---|
| 124 | <segtitle>Installed programs</segtitle>
|
---|
| 125 | <segtitle>Installed libraries</segtitle>
|
---|
| 126 |
|
---|
| 127 | <seglistitem>
|
---|
[e1b2402] | 128 | <seg>cc (link to gcc), gcc, gccbug, and gcov</seg>
|
---|
[a9e389d] | 129 | <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libmudflap.[a,so],
|
---|
[e1b2402] | 130 | and libmudflapth.[a,so]</seg>
|
---|
[a9e389d] | 131 | </seglistitem>
|
---|
| 132 | </segmentedlist>
|
---|
| 133 |
|
---|
| 134 | <variablelist>
|
---|
| 135 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 136 | <?dbfo list-presentation="list"?>
|
---|
| 137 | <?dbhtml list-presentation="table"?>
|
---|
| 138 |
|
---|
| 139 | <varlistentry id="cc">
|
---|
| 140 | <term><command>cc</command></term>
|
---|
| 141 | <listitem>
|
---|
| 142 | <para>The C compiler</para>
|
---|
[6561a0f] | 143 | <indexterm zone="ch-cross-tools-gcc-final cc">
|
---|
[a9e389d] | 144 | <primary sortas="b-cc">cc</primary>
|
---|
| 145 | </indexterm>
|
---|
| 146 | </listitem>
|
---|
| 147 | </varlistentry>
|
---|
| 148 |
|
---|
| 149 | <varlistentry id="gcc">
|
---|
| 150 | <term><command>gcc</command></term>
|
---|
| 151 | <listitem>
|
---|
| 152 | <para>The C compiler</para>
|
---|
[6561a0f] | 153 | <indexterm zone="ch-cross-tools-gcc-final gcc">
|
---|
[a9e389d] | 154 | <primary sortas="b-gcc">gcc</primary>
|
---|
| 155 | </indexterm>
|
---|
| 156 | </listitem>
|
---|
| 157 | </varlistentry>
|
---|
| 158 |
|
---|
| 159 | <varlistentry id="gccbug">
|
---|
| 160 | <term><command>gccbug</command></term>
|
---|
| 161 | <listitem>
|
---|
| 162 | <para>A shell script used to help create useful bug reports</para>
|
---|
[6561a0f] | 163 | <indexterm zone="ch-cross-tools-gcc-final gccbug">
|
---|
[a9e389d] | 164 | <primary sortas="b-gccbug">gccbug</primary>
|
---|
| 165 | </indexterm>
|
---|
| 166 | </listitem>
|
---|
| 167 | </varlistentry>
|
---|
| 168 |
|
---|
| 169 | <varlistentry id="gcov">
|
---|
| 170 | <term><command>gcov</command></term>
|
---|
| 171 | <listitem>
|
---|
| 172 | <para>A coverage testing tool; it is used to analyze programs to
|
---|
| 173 | determine where optimizations will have the most effect</para>
|
---|
[6561a0f] | 174 | <indexterm zone="ch-cross-tools-gcc-final gcov">
|
---|
[a9e389d] | 175 | <primary sortas="b-gcov">gcov</primary>
|
---|
| 176 | </indexterm>
|
---|
| 177 | </listitem>
|
---|
| 178 | </varlistentry>
|
---|
| 179 |
|
---|
| 180 | <varlistentry id="libgcc">
|
---|
| 181 | <term><filename class="libraryfile">libgcc</filename></term>
|
---|
| 182 | <listitem>
|
---|
| 183 | <para>Contains run-time support for <command>gcc</command></para>
|
---|
[6561a0f] | 184 | <indexterm zone="ch-cross-tools-gcc-final libgcc">
|
---|
[a9e389d] | 185 | <primary sortas="c-libgcc*">libgcc*</primary>
|
---|
| 186 | </indexterm>
|
---|
| 187 | </listitem>
|
---|
| 188 | </varlistentry>
|
---|
| 189 |
|
---|
| 190 | <varlistentry id="libmudflap">
|
---|
| 191 | <term><filename class="libraryfile">libmudflap</filename></term>
|
---|
| 192 | <listitem>
|
---|
| 193 | <para>The libmudflap libraries are used by GCC for instrumenting
|
---|
| 194 | pointer and array dereferencing operations.</para>
|
---|
[6561a0f] | 195 | <indexterm zone="ch-cross-tools-gcc-final libmudflap">
|
---|
[a9e389d] | 196 | <primary sortas="c-libmudflap*">libmudflap*</primary>
|
---|
| 197 | </indexterm>
|
---|
| 198 | </listitem>
|
---|
| 199 | </varlistentry>
|
---|
| 200 |
|
---|
| 201 | </variablelist>
|
---|
| 202 |
|
---|
| 203 | </sect2>
|
---|
| 204 |
|
---|
| 205 | </sect1>
|
---|