source: clfs-embedded/BOOK/cross-tools/common/gcc-static.xml@ 0e9e889

Last change on this file since 0e9e889 was 6533111, checked in by Jim Gifford <clfs@…>, 16 years ago

Toolchain Updates

  • Property mode set to 100644
File size: 3.3 KB
RevLine 
[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
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
[6533111]30<!--
[e1b2402]31 <para os="p1">The following patch contains a number of updates to the
32 &gcc-version; branch by the GCC developers:</para>
33
34<screen os="p2"><userinput>patch -Np1 -i ../&gcc-branch_update-patch;</userinput></screen>
[6533111]35-->
[e1b2402]36 <para os="p3">To make sure that a couple of tools use the proper syntax,
[a9e389d]37 apply the following patch:</para>
38
[e1b2402]39<screen os="p4"><userinput>patch -Np1 -i ../&gcc-posix-patch;</userinput></screen>
[a9e389d]40
41 <para os="c">The GCC documentation recommends building GCC outside of the source
42 directory in a dedicated build directory:</para>
43
44<screen os="d"><userinput>mkdir -v ../gcc-build
45cd ../gcc-build</userinput></screen>
46
47 <para os="e">Prepare GCC for compilation:</para>
48
[e1b2402]49<screen os="ae"><userinput>AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
50 ../gcc-&gcc-version;/configure --prefix=${CLFS}/cross-tools \
51 --build=${CLFS_HOST} --host=${CLFS_HOST} --target=${CLFS_TARGET} \
52 --with-sysroot=${CLFS} --disable-nls --disable-shared \
53 --with-mpfr=/cross-tools --with-gmp=/cross-tools \
54 --without-headers --with-newlib --disable-decimal-float \
55 --disable-libgomp --disable-libmudflap --disable-libssp \
56 --disable-threads --enable-languages=c</userinput></screen>
[a9e389d]57
58 <variablelist os="af">
59 <title>The meaning of the configure options:</title>
60
61 <varlistentry>
62 <term><parameter>--disable-shared</parameter></term>
63 <listitem>
64 <para>Disables the creation of the shared libraries.</para>
65 </listitem>
66 </varlistentry>
67
68 <varlistentry>
69 <term><parameter>--disable-threads</parameter></term>
70 <listitem>
71 <para>This will prevent GCC from looking for the multi-thread
72 include files, since they haven't been created for this architecture
73 yet. GCC will be able to find the multi-thread information after
74 the Glibc headers are created.</para>
75 </listitem>
76 </varlistentry>
77
78 <varlistentry>
79 <term><parameter>--enable-languages=c</parameter></term>
80 <listitem>
81 <para>This option ensures that only the C compiler is built.</para>
82 </listitem>
83 </varlistentry>
84
85 </variablelist>
86
87 <para os="ag">Continue with compiling the package:</para>
88
[0194a60]89<screen os="ah"><userinput>make</userinput></screen>
[a9e389d]90
91 <para os="ai">Install the package:</para>
92
[0194a60]93<screen os="aj"><userinput>make install</userinput></screen>
[a9e389d]94
95 </sect2>
96
97 <sect2 role="content">
98 <title/>
99
100 <para>Details on this package are located in <xref
101 linkend="contents-gcc" role="."/></para>
102
103 </sect2>
104
105</sect1>
Note: See TracBrowser for help on using the repository browser.