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="c">The GCC documentation recommends building GCC outside of the source
|
---|
31 | directory in a dedicated build directory:</para>
|
---|
32 |
|
---|
33 | <screen os="d"><userinput>mkdir -v ../gcc-build
|
---|
34 | cd ../gcc-build</userinput></screen>
|
---|
35 |
|
---|
36 | <para os="e">Prepare GCC for compilation:</para>
|
---|
37 |
|
---|
38 | <screen os="ae"><userinput>AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" \
|
---|
39 | ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
|
---|
40 | --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
|
---|
41 | --with-sysroot=${CLFS} --disable-nls --disable-shared \
|
---|
42 | --with-mpfr=${CLFS}/cross-tools --with-gmp=${CLFS}/cross-tools \
|
---|
43 | --without-headers --with-newlib --disable-decimal-float \
|
---|
44 | --disable-libgomp --disable-libmudflap --disable-libssp \
|
---|
45 | --disable-threads --enable-languages=c</userinput></screen>
|
---|
46 |
|
---|
47 | <variablelist os="af">
|
---|
48 | <title>The meaning of the configure options:</title>
|
---|
49 |
|
---|
50 | <varlistentry>
|
---|
51 | <term><parameter>--disable-shared</parameter></term>
|
---|
52 | <listitem>
|
---|
53 | <para>Disables the creation of the shared libraries.</para>
|
---|
54 | </listitem>
|
---|
55 | </varlistentry>
|
---|
56 |
|
---|
57 | <varlistentry>
|
---|
58 | <term><parameter>--disable-threads</parameter></term>
|
---|
59 | <listitem>
|
---|
60 | <para>This will prevent GCC from looking for the multi-thread
|
---|
61 | include files, since they haven't been created for this architecture
|
---|
62 | yet. GCC will be able to find the multi-thread information after
|
---|
63 | the Glibc headers are created.</para>
|
---|
64 | </listitem>
|
---|
65 | </varlistentry>
|
---|
66 |
|
---|
67 | <varlistentry>
|
---|
68 | <term><parameter>--enable-languages=c</parameter></term>
|
---|
69 | <listitem>
|
---|
70 | <para>This option ensures that only the C compiler is built.</para>
|
---|
71 | </listitem>
|
---|
72 | </varlistentry>
|
---|
73 |
|
---|
74 | </variablelist>
|
---|
75 |
|
---|
76 | <para os="ag">Continue with compiling the package:</para>
|
---|
77 |
|
---|
78 | <screen os="ah"><userinput>make all-gcc all-target-libgcc</userinput></screen>
|
---|
79 |
|
---|
80 | <para os="ai">Install the package:</para>
|
---|
81 |
|
---|
82 | <screen os="aj"><userinput>make install-gcc install-target-libgcc</userinput></screen>
|
---|
83 |
|
---|
84 | </sect2>
|
---|
85 |
|
---|
86 | <sect2 role="content">
|
---|
87 | <title/>
|
---|
88 |
|
---|
89 | <para>Details on this package are located in <xref
|
---|
90 | linkend="contents-gcc" role="."/></para>
|
---|
91 |
|
---|
92 | </sect2>
|
---|
93 |
|
---|
94 | </sect1>
|
---|