source: clfs-embedded/BOOK/cross-tools/common/gcc-static.xml @ 0194a60

Last change on this file since 0194a60 was 0194a60, checked in by Joe Ciccone <jciccone@…>, 15 years ago

Updated Binutils to 2.19.
Updated GCC to 4.3.2.
Dropped the uClibc Headers Page.

  • Property mode set to 100644
File size: 3.0 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<sect1 id="ch-cross-tools-gcc-static" role="wrap">
9  <?dbhtml filename="gcc-static.html"?>
10
11  <title>Cross GCC-&gcc-version; - Static</title>
12
13  <indexterm zone="ch-cross-tools-gcc-static">
14    <primary sortas="a-GCC">GCC</primary>
15    <secondary>cross tools, static</secondary>
16  </indexterm>
17
18  <sect2 role="package">
19    <title/>
20
21    <para>The GCC package contains the GNU compiler collection, which includes
22    the C and C++ compilers.</para>
23
24  </sect2>
25
26  <sect2 role="installation">
27    <title>Installation of Cross GCC Compiler with Static libgcc
28    and no Threads</title>
29
30    <para os="p1">To make sure that a couple of tools use the proper syntax,
31    apply the following patch:</para>
32
33<screen os="p2"><userinput>patch -Np1 -i ../&gcc-posix-patch;</userinput></screen>
34
35    <para os="c">The GCC documentation recommends building GCC outside of the source
36    directory in a dedicated build directory:</para>
37
38<screen os="d"><userinput>mkdir -v ../gcc-build
39cd ../gcc-build</userinput></screen>
40
41    <para os="e">Prepare GCC for compilation:</para>
42
43<screen os="ae"><userinput>../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
44    --target=${CLFS_TARGET} --disable-multilib \
45    --with-sysroot=${CLFS} --disable-nls --disable-shared \
46    --without-headers --with-newlib --disable-decimal-float \
47    --disable-libgomp --disable-libmudflap --disable-libssp \
48    --disable-threads --enable-languages=c</userinput></screen>
49
50    <variablelist os="af">
51      <title>The meaning of the configure options:</title>
52
53      <varlistentry>
54        <term><parameter>--disable-shared</parameter></term>
55        <listitem>
56          <para>Disables the creation of the shared libraries.</para>
57        </listitem>
58      </varlistentry>
59
60      <varlistentry>
61        <term><parameter>--disable-threads</parameter></term>
62        <listitem>
63          <para>This will prevent GCC from looking for the multi-thread
64          include files, since they haven't been created for this architecture
65          yet. GCC will be able to find the multi-thread information after
66          the Glibc headers are created.</para>
67        </listitem>
68      </varlistentry>
69
70      <varlistentry>
71        <term><parameter>--enable-languages=c</parameter></term>
72        <listitem>
73          <para>This option ensures that only the C compiler is built.</para>
74        </listitem>
75      </varlistentry>
76
77    </variablelist>
78
79    <para os="ag">Continue with compiling the package:</para>
80
81<screen os="ah"><userinput>make</userinput></screen>
82
83    <para os="ai">Install the package:</para>
84
85<screen os="aj"><userinput>make install</userinput></screen>
86
87  </sect2>
88
89  <sect2 role="content">
90    <title/>
91
92    <para>Details on this package are located in <xref
93    linkend="contents-gcc" role="."/></para>
94
95  </sect2>
96
97</sect1>
Note: See TracBrowser for help on using the repository browser.