source: cross-tools/x86/gcc-final.xml@ 4bf0b52

Last change on this file since 4bf0b52 was bf8c11f, checked in by Jim Gifford <clfs@…>, 19 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

  • Property mode set to 100644
File size: 6.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 <!ENTITY % patches-entities SYSTEM "../../patches.ent">
6 %general-entities;
7 %patches-entities;
8]>
9
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
20 <sect2 role="package">
21 <title/>
22
23 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
24 href="../../final-system/common/gcc.xml"
25 xpointer="xpointer(//*[@role='package']/para[1])"/>
26
27 <segmentedlist>
28 <segtitle>&buildtime;</segtitle>
29 <segtitle>&diskspace;</segtitle>
30
31 <seglistitem>
32 <seg>Not checked yet</seg>
33 <seg>Not checked yet</seg>
34 </seglistitem>
35 </segmentedlist>
36
37 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
38 href="../../final-system/common/gcc.xml"
39 xpointer="xpointer(//*[@role='package']/segmentedlist[2])"/>
40
41 </sect2>
42
43 <sect2 role="installation">
44 <title>Installation of GCC Cross Compiler</title>
45
46 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
47 href="gcc-static.xml"
48 xpointer="xpointer(//*[@os='aa'])"/>
49
50 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
51 href="gcc-static.xml"
52 xpointer="xpointer(//*[@os='ab'])"/>
53
54 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
55 href="gcc-static.xml"
56 xpointer="xpointer(//*[@os='ac'])"/>
57
58 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
59 href="gcc-static.xml"
60 xpointer="xpointer(//*[@os='ad'])"/>
61
62 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
63 href="gcc-static.xml"
64 xpointer="xpointer(//*[@os='ae'])"/>
65
66 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
67 href="gcc-static.xml"
68 xpointer="xpointer(//*[@os='af'])"/>
69
70 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
71 href="gcc-static.xml"
72 xpointer="xpointer(//*[@os='ag'])"/>
73
74 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
75 href="gcc-static.xml"
76 xpointer="xpointer(//*[@os='ah'])"/>
77
78 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
79 href="gcc-static.xml"
80 xpointer="xpointer(//*[@os='ai'])"/>
81
82 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
83 href="gcc-static.xml"
84 xpointer="xpointer(//*[@os='aj'])"/>
85
86 <para os="ba">Now we will disable <command>gcc</command>'s linking to
87 <filename class="libraryfile">libc</filename> since it doesn't
88 exist yet:</para>
89
90<screen os="bc"><userinput>cp gcc/config/t-slibgcc-elf-ver{,.orig}
91sed -e '/^SHLIB_LC = /s@-lc@@' gcc/config/t-slibgcc-elf-ver.orig \
92 > gcc/config/t-slibgcc-elf-ver
93cp gcc/config/t-libunwind{,.orig}
94sed -e '/^SHLIB_LC = /s@-lc@@' gcc/config/t-libunwind.orig \
95 > gcc/config/t-libunwind</userinput></screen>
96
97 <para os="bd">Finally, disable <option>-B</option> in <filename>configure</filename>,
98 so it doesn't pick up the host's header files:</para>
99
100<screen os="be"><userinput>cp configure{,.orig}
101sed -e '/FLAGS_FOR_TARGET.*\/lib\//s@-B[^ ]*/lib/@@g' configure.orig >configure</userinput></screen>
102
103 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
104 href="gcc-static.xml"
105 xpointer="xpointer(//*[@os='ak'])"/>
106
107 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
108 href="gcc-static.xml"
109 xpointer="xpointer(//*[@os='f'])"/>
110
111 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
112 href="gcc-static.xml"
113 xpointer="xpointer(//*[@os='g'])"/>
114
115 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
116 href="gcc-static.xml"
117 xpointer="xpointer(//*[@os='h'])"/>
118
119<screen><userinput>../gcc-&gcc-version;/configure --prefix=/cross-tools \
120 --target=${LFS_TARGET} --host=${LFS_HOST} --disable-multilib \
121 --with-local-prefix=/tools --disable-nls --enable-shared \
122 --enable-languages=c,c++ --enable-__cxa_atexit \
123 --enable-c99 --enable-long-long --enable-threads=posix</userinput></screen>
124
125 <variablelist os="bf">
126 <title>The meaning of the new configure options:</title>
127
128 <varlistentry os="bf1">
129 <term><parameter>--enable-languages=c,c++</parameter></term>
130 <listitem>
131 <para>This option ensures that only the C and C++ compilers is built.</para>
132 </listitem>
133 </varlistentry>
134
135 <varlistentry os="bf2">
136 <term><parameter>--enable-__cxa_atexit</parameter></term>
137 <listitem>
138 <para>This option allows use of __cxa_atexit, rather than atexit,
139 to register C++ destructors for local statics and global objects
140 and is essential for fully standards-compliant handling of destructors.
141 It also affects the C++ ABI and therefore results in C++ shared libraries
142 and C++ programs that are interoperable with other Linux distributions.</para>
143 </listitem>
144 </varlistentry>
145
146 <varlistentry os="bf3">
147 <term><parameter>--enable-c99</parameter></term>
148 <listitem>
149 <para>Enable C99 support for C programs.</para>
150 </listitem>
151 </varlistentry>
152
153 <varlistentry os="bf4">
154 <term><parameter>--enable-long-long</parameter></term>
155 <listitem>
156 <para>Enables long long support in the compiler.</para>
157 </listitem>
158 </varlistentry>
159
160 <varlistentry os="bf5">
161 <term><parameter>--enable-threads=posix</parameter></term>
162 <listitem>
163 <para>This enables C++ exception handling for multi-threaded code.</para>
164 </listitem>
165 </varlistentry>
166
167 </variablelist>
168
169 <para>Continue with compiling the package:</para>
170
171<screen><userinput>make AS_FOR_TARGET="/cross-tools/bin/${LFS_TARGET}-as" \
172LD_FOR_TARGET="/cross-tools/bin/${LFS_TARGET}-ld"</userinput></screen>
173
174 <para>Install the package:</para>
175
176<screen><userinput>make install</userinput></screen>
177
178 </sect2>
179
180 <sect2 role="content">
181 <title/>
182
183 <para>Details on this package are located in <xref
184 linkend="contents-gcc" role="."/></para>
185
186 </sect2>
187
188</sect1>
Note: See TracBrowser for help on using the repository browser.