| 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 | <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 | 
|---|
| 36 | mv -v mpfr-&mpfr-version; mpfr | 
|---|
| 37 | tar xf ../gmp-&gmp-version;.tar.bz2 | 
|---|
| 38 | mv -v gmp-&gmp-version; gmp | 
|---|
| 39 | tar xf ../mpc-&mpc-version;.tar.gz | 
|---|
| 40 | mv -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/${CLFS_TARGET} \ | 
|---|
| 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 \ | 
|---|
| 76 | --with-mpfr-include=$(pwd)/../gcc-&gcc-version;/mpfr/src \ | 
|---|
| 77 | --with-mpfr-lib=$(pwd)/mpfr/src/.libs</userinput></screen> | 
|---|
| 78 |  | 
|---|
| 79 | <variablelist os="af"> | 
|---|
| 80 | <title>The meaning of the configure options not used previously:</title> | 
|---|
| 81 |  | 
|---|
| 82 | <varlistentry os="af2"> | 
|---|
| 83 | <term><parameter>--enable-c99</parameter></term> | 
|---|
| 84 | <listitem> | 
|---|
| 85 | <para>Enable C99 support for C programs.</para> | 
|---|
| 86 | </listitem> | 
|---|
| 87 | </varlistentry> | 
|---|
| 88 |  | 
|---|
| 89 | <varlistentry os="af3"> | 
|---|
| 90 | <term><parameter>--enable-long-long</parameter></term> | 
|---|
| 91 | <listitem> | 
|---|
| 92 | <para>Enables long long support in the compiler.</para> | 
|---|
| 93 | </listitem> | 
|---|
| 94 | </varlistentry> | 
|---|
| 95 |  | 
|---|
| 96 | </variablelist> | 
|---|
| 97 |  | 
|---|
| 98 | <xi:include os="ah" xmlns:xi="http://www.w3.org/2003/XInclude" | 
|---|
| 99 | href="gcc-static.xml" | 
|---|
| 100 | xpointer="xpointer(//*[@os='ah'])"/> | 
|---|
| 101 |  | 
|---|
| 102 | <screen os="ai"><userinput>make</userinput></screen> | 
|---|
| 103 |  | 
|---|
| 104 | <xi:include os="aj" xmlns:xi="http://www.w3.org/2003/XInclude" | 
|---|
| 105 | href="gcc-static.xml" | 
|---|
| 106 | xpointer="xpointer(//*[@os='aj'])"/> | 
|---|
| 107 |  | 
|---|
| 108 | <screen os="ak"><userinput>make install</userinput></screen> | 
|---|
| 109 |  | 
|---|
| 110 | </sect2> | 
|---|
| 111 |  | 
|---|
| 112 | <sect2 id="contents-gcc" role="content"> | 
|---|
| 113 | <title>Contents of GCC</title> | 
|---|
| 114 |  | 
|---|
| 115 | <segmentedlist> | 
|---|
| 116 | <segtitle>Installed programs</segtitle> | 
|---|
| 117 | <segtitle>Installed libraries</segtitle> | 
|---|
| 118 |  | 
|---|
| 119 | <seglistitem> | 
|---|
| 120 | <seg>gcc, and gcov</seg> | 
|---|
| 121 | <seg>libgcc.a, libgcc_eh.a, and libgcc_s.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="gcc"> | 
|---|
| 131 | <term><command>gcc</command></term> | 
|---|
| 132 | <listitem> | 
|---|
| 133 | <para>The C compiler</para> | 
|---|
| 134 | <indexterm zone="ch-cross-tools-gcc-final gcc"> | 
|---|
| 135 | <primary sortas="b-gcc">gcc</primary> | 
|---|
| 136 | </indexterm> | 
|---|
| 137 | </listitem> | 
|---|
| 138 | </varlistentry> | 
|---|
| 139 |  | 
|---|
| 140 | <varlistentry id="gcov"> | 
|---|
| 141 | <term><command>gcov</command></term> | 
|---|
| 142 | <listitem> | 
|---|
| 143 | <para>A coverage testing tool; it is used to analyze programs to | 
|---|
| 144 | determine where optimizations will have the most effect</para> | 
|---|
| 145 | <indexterm zone="ch-cross-tools-gcc-final gcov"> | 
|---|
| 146 | <primary sortas="b-gcov">gcov</primary> | 
|---|
| 147 | </indexterm> | 
|---|
| 148 | </listitem> | 
|---|
| 149 | </varlistentry> | 
|---|
| 150 |  | 
|---|
| 151 | <varlistentry id="libgcc"> | 
|---|
| 152 | <term><filename class="libraryfile">libgcc</filename></term> | 
|---|
| 153 | <listitem> | 
|---|
| 154 | <para>Contains run-time support for <command>gcc</command></para> | 
|---|
| 155 | <indexterm zone="ch-cross-tools-gcc-final libgcc"> | 
|---|
| 156 | <primary sortas="c-libgcc*">libgcc*</primary> | 
|---|
| 157 | </indexterm> | 
|---|
| 158 | </listitem> | 
|---|
| 159 | </varlistentry> | 
|---|
| 160 |  | 
|---|
| 161 | </variablelist> | 
|---|
| 162 |  | 
|---|
| 163 | </sect2> | 
|---|
| 164 |  | 
|---|
| 165 | </sect1> | 
|---|