source: BOOK/cross-tools/common/glibc.xml@ 7cffba4

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 7cffba4 was 7d61e92, checked in by Jim Gifford <clfs@…>, 19 years ago

r2840@server: jim | 2006-04-12 18:11:01 -0700
Glibc 2.4 Part 2. Added mips patch

  • Property mode set to 100644
File size: 6.5 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 %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 <para os="s1">The following sed fixes a build issue with Glibc, this will prevent nscd from trying
34to link to libraries, that don't exist:</para>
35
36<screen os="s2"><userinput>cp nscd/Makefile{,.orig}
37sed -e "/nscd_stat.o: sysincludes = # nothing/d" nscd/Makefile.orig > nscd/Makefile</userinput></screen>
38
39 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
40 href="../../final-system/common/glibc.xml"
41 xpointer="xpointer(//*[@os='c'])"/>
42
43 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
44 href="../../final-system/common/glibc.xml"
45 xpointer="xpointer(//*[@os='d'])"/>
46
47 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
48 href="../../final-system/common/glibc.xml"
49 xpointer="xpointer(//*[@os='e'])"/>
50
51 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
52 href="../../final-system/common/glibc.xml"
53 xpointer="xpointer(//*[@os='f'])"/>
54
55 <para os="dd">For NPTL enabled systems the following lines need
56 to be added to <filename>config.cache</filename>:</para>
57
58<screen os="de"><userinput>echo "libc_cv_forced_unwind=yes" &gt; config.cache
59echo "libc_cv_c_cleanup=yes" &gt;&gt; config.cache</userinput></screen>
60
61 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
62 href="../../final-system/common/glibc.xml"
63 xpointer="xpointer(//*[@os='g'])"/>
64
65<screen os="df"><userinput>BUILD_CC="gcc" CC="${LFS_TARGET}-gcc" \
66 AR="${LFS_TARGET}-ar" RANLIB="${LFS_TARGET}-ranlib" \
67 ../glibc-&glibc-version;/configure --prefix=/tools \
68 --host=${LFS_TARGET} --build=${LFS_HOST} \
69 --disable-profile --enable-add-ons \
70 --with-tls --enable-kernel=2.6.0 --with-__thread \
71 --with-binutils=/cross-tools/bin --with-headers=/tools/include \
72 --cache-file=config.cache</userinput></screen>
73
74 <variablelist os="dg">
75 <title>The meaning of the new configure options:</title>
76
77 <varlistentry os="dg1">
78 <term><parameter>BUILD_CC="gcc"</parameter></term>
79 <listitem>
80 <para>This sets Glibc to use the current compiler on our system. This is
81 used to create the tools Glibc uses during its build.</para>
82 </listitem>
83 </varlistentry>
84
85 <varlistentry os="dg2">
86 <term><parameter>CC="${LFS_TARGET}-gcc"</parameter></term>
87 <listitem>
88 <para>This forces Glibc to use the GCC compiler that we made for our target
89 architecture.</para>
90 </listitem>
91 </varlistentry>
92
93 <varlistentry os="dg3">
94 <term><parameter>AR="${LFS_TARGET}-ar"</parameter></term>
95 <listitem>
96 <para>This forces Glibc to use the <command>ar</command> utility
97 we made for our target architecture.</para>
98 </listitem>
99 </varlistentry>
100
101 <varlistentry os="dg4">
102 <term><parameter>RANLIB="${LFS_TARGET}-ranlib"</parameter></term>
103 <listitem>
104 <para>This forces Glibc to use the <command>ranlib</command> utility
105 we made for our target architecture.</para>
106 </listitem>
107 </varlistentry>
108
109 <varlistentry os="dg5">
110 <term><parameter>--disable-profile</parameter></term>
111 <listitem>
112 <para>This builds the libraries without profiling information.
113 Omit this option if profiling on the temporary tools is necessary.</para>
114 </listitem>
115 </varlistentry>
116
117 <varlistentry os="dg6">
118 <term><parameter>--enable-add-ons</parameter></term>
119 <listitem>
120 <para>This tells Glibc to utilize all add-ons that are
121 available.</para>
122 </listitem>
123 </varlistentry>
124
125 <varlistentry os="dg7">
126 <term><parameter>--with-tls</parameter></term>
127 <listitem>
128 <para>This tells Glibc to use Thread Local Storage.</para>
129 </listitem>
130 </varlistentry>
131
132 <varlistentry os="dg8">
133 <term><parameter>--with-__thread</parameter></term>
134 <listitem>
135 <para>This tells Glibc to use use the __thread for libc and
136 libpthread builds.</para>
137 </listitem>
138 </varlistentry>
139
140 <varlistentry os="dg9">
141 <term><parameter>--with-binutils=/cross-tools/bin</parameter></term>
142 <listitem>
143 <para>This tells Glibc to use the Binutils that are specific to
144 our target architecture.</para>
145 </listitem>
146 </varlistentry>
147
148 <varlistentry os="dg10">
149 <term><parameter>--cache-file=config.cache</parameter></term>
150 <listitem>
151 <para>This tells Glibc to utilize a premade cache file.</para>
152 </listitem>
153 </varlistentry>
154
155 </variablelist>
156
157 <para os="dh">During this stage the following warning might appear:</para>
158
159<blockquote os="di"><screen><computeroutput>configure: WARNING:
160*** These auxiliary programs are missing or
161*** incompatible versions: msgfmt
162*** some features will be disabled.
163*** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
164
165 <para os="dj">The missing or incompatible <command>msgfmt</command> program is
166 generally harmless. This <command>msgfmt</command> program is part of the
167 Gettext package which the host distribution should provide.</para>
168
169 <para os="dk">Compile the package:</para>
170
171<screen os="dl"><userinput>make</userinput></screen>
172
173 <para os="dm">Install the package:</para>
174
175<screen os="dn"><userinput>make install</userinput></screen>
176
177 </sect2>
178
179 <sect2 role="content">
180 <title/>
181
182 <para>Details on this package are located in <xref
183 linkend="contents-glibc" role="."/></para>
184
185 </sect2>
186
187</sect1>
Note: See TracBrowser for help on using the repository browser.