source: BOOK/cross-tools/common/glibc.xml@ 3e3a19a

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 3e3a19a was ca89969, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Updated Glibc to 2.8.

  • Property mode set to 100644
File size: 6.9 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-glibc" role="wrap">
9 <?dbhtml filename="glibc.html"?>
10
11 <title>Glibc-&glibc-version;</title>
12
13 <indexterm zone="ch-cross-tools-glibc">
14 <primary sortas="a-Glibc">Glibc</primary>
15 <secondary>cross tools</secondary>
16 </indexterm>
17
18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
19 href="../../final-system/common/glibc.xml"
20 xpointer="xpointer(//*[@role='package'])"/>
21
22 <sect2 role="installation">
23 <title>Installation of Glibc</title>
24
25 <para os="da">It should be noted that compiling Glibc in any way other than
26 the method suggested in this book puts the stability of the system at
27 risk.</para>
28
29 <para os="db">Disable linking to <filename>libgcc_eh</filename>:</para>
30
31<screen os="dc"><userinput>patch -Np1 -i ../&glibc-libgcc_eh-patch;</userinput></screen>
32
33 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
34 href="../../final-system/common/glibc.xml"
35 xpointer="xpointer(//*[@os='c'])"/>
36
37 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
38 href="../../final-system/common/glibc.xml"
39 xpointer="xpointer(//*[@os='d'])"/>
40
41 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
42 href="../../final-system/common/glibc.xml"
43 xpointer="xpointer(//*[@os='e'])"/>
44
45 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
46 href="../../final-system/common/glibc.xml"
47 xpointer="xpointer(//*[@os='f'])"/>
48
49 <para os="dd">The following lines need to be added to
50 <filename>config.cache</filename> for Glibc to support NPTL:</para>
51
52<screen os="de"><userinput>echo "libc_cv_forced_unwind=yes" &gt; config.cache
53echo "libc_cv_c_cleanup=yes" &gt;&gt; config.cache
54echo "libc_cv_gnu89_inline=yes" &gt;&gt; config.cache</userinput></screen>
55
56 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
57 href="../../final-system/common/glibc.xml"
58 xpointer="xpointer(//*[@os='g'])"/>
59
60<screen os="df"><userinput>BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
61 AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
62 ../glibc-&glibc-version;/configure --prefix=/tools \
63 --host=${CLFS_TARGET} --build=${CLFS_HOST} \
64 --disable-profile --enable-add-ons \
65 --with-tls --enable-kernel=2.6.0 --with-__thread \
66 --with-binutils=/cross-tools/bin --with-headers=/tools/include \
67 --cache-file=config.cache</userinput></screen>
68
69 <variablelist os="dg">
70 <title>The meaning of the new configure options:</title>
71
72 <varlistentry os="dg1">
73 <term><parameter>BUILD_CC="gcc"</parameter></term>
74 <listitem>
75 <para>This sets Glibc to use the current compiler on our system. This is
76 used to create the tools Glibc uses during its build.</para>
77 </listitem>
78 </varlistentry>
79
80 <varlistentry os="dg2">
81 <term><parameter>CC="${CLFS_TARGET}-gcc"</parameter></term>
82 <listitem>
83 <para>This forces Glibc to use the GCC compiler that we made for our target
84 architecture.</para>
85 </listitem>
86 </varlistentry>
87
88 <varlistentry os="dg3">
89 <term><parameter>AR="${CLFS_TARGET}-ar"</parameter></term>
90 <listitem>
91 <para>This forces Glibc to use the <command>ar</command> utility
92 we made for our target architecture.</para>
93 </listitem>
94 </varlistentry>
95
96 <varlistentry os="dg4">
97 <term><parameter>RANLIB="${CLFS_TARGET}-ranlib"</parameter></term>
98 <listitem>
99 <para>This forces Glibc to use the <command>ranlib</command> utility
100 we made for our target architecture.</para>
101 </listitem>
102 </varlistentry>
103
104 <varlistentry os="dg5">
105 <term><parameter>--disable-profile</parameter></term>
106 <listitem>
107 <para>This builds the libraries without profiling information.
108 Omit this option if profiling on the temporary tools is necessary.</para>
109 </listitem>
110 </varlistentry>
111
112 <varlistentry os="dg6">
113 <term><parameter>--enable-add-ons</parameter></term>
114 <listitem>
115 <para>This tells Glibc to utilize all add-ons that are
116 available.</para>
117 </listitem>
118 </varlistentry>
119
120 <varlistentry os="dg7">
121 <term><parameter>--with-tls</parameter></term>
122 <listitem>
123 <para>This tells Glibc to use Thread Local Storage.</para>
124 </listitem>
125 </varlistentry>
126
127 <varlistentry os="dg8">
128 <term><parameter>--enable-kernel=2.6.0</parameter></term>
129 <listitem>
130 <para>This tells Glibc to compile the library with support
131 for 2.6.x Linux kernels.</para>
132 </listitem>
133 </varlistentry>
134
135 <varlistentry os="dg9">
136 <term><parameter>--with-__thread</parameter></term>
137 <listitem>
138 <para>This tells Glibc to use use the __thread for libc and
139 libpthread builds.</para>
140 </listitem>
141 </varlistentry>
142
143 <varlistentry os="dg10">
144 <term><parameter>--with-binutils=/cross-tools/bin</parameter></term>
145 <listitem>
146 <para>This tells Glibc to use the Binutils that are specific to
147 our target architecture.</para>
148 </listitem>
149 </varlistentry>
150
151 <varlistentry os="dg11">
152 <term><parameter>--with-headers=/tools/include</parameter></term>
153 <listitem>
154 <para>This tells Glibc to compile itself against the headers
155 recently installed to the <filename class="directory">/tools</filename>
156 directory, so that it knows exactly what features the kernel has
157 and can optimize itself accordingly.</para>
158 </listitem>
159 </varlistentry>
160
161 <varlistentry os="dg12">
162 <term><parameter>--cache-file=config.cache</parameter></term>
163 <listitem>
164 <para>This tells Glibc to utilize a premade cache file.</para>
165 </listitem>
166 </varlistentry>
167
168 </variablelist>
169
170 <para os="dh">During this stage the following warning might appear:</para>
171
172<blockquote os="di"><screen><computeroutput>configure: WARNING:
173*** These auxiliary programs are missing or
174*** incompatible versions: msgfmt
175*** some features will be disabled.
176*** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
177
178 <para os="dj">The missing or incompatible <command>msgfmt</command> program is
179 generally harmless. This <command>msgfmt</command> program is part of the
180 Gettext package which the host distribution should provide.</para>
181
182 <para os="dk">Compile the package:</para>
183
184<screen os="dl"><userinput>make</userinput></screen>
185
186 <para os="dm">Install the package:</para>
187
188<screen os="dn"><userinput>make install</userinput></screen>
189
190 </sect2>
191
192 <sect2 role="content">
193 <title/>
194
195 <para>Details on this package are located in <xref
196 linkend="contents-glibc" role="."/></para>
197
198 </sect2>
199
200</sect1>
Note: See TracBrowser for help on using the repository browser.