source: BOOK/cross-tools/common/glibc.xml@ 5412eda

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

Remove more tabs and replace with 8 spaces.

  • Property mode set to 100644
File size: 6.9 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[3f8be484]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
[cf66ceae]18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
19 href="../../final-system/common/glibc.xml"
20 xpointer="xpointer(//*[@role='package'])"/>
[3f8be484]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
[6d4c909]29 <para os="db">Disable linking to <filename>libgcc_eh</filename>:</para>
[3f8be484]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
[0220731]49 <para os="dd">The following lines need to be added to
50 <filename>config.cache</filename> for Glibc to support NPTL:</para>
[3f8be484]51
[c768003]52<screen os="de"><userinput>cat &gt; config.cache &lt;&lt; "EOF"
[5a5e71f]53libc_cv_forced_unwind=yes
54libc_cv_c_cleanup=yes
55libc_cv_gnu99_inline=yes
56EOF</userinput></screen>
[3f8be484]57
58 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
59 href="../../final-system/common/glibc.xml"
60 xpointer="xpointer(//*[@os='g'])"/>
61
[07114c98]62<screen os="df"><userinput>BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
63 AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
[3f8be484]64 ../glibc-&glibc-version;/configure --prefix=/tools \
[07114c98]65 --host=${CLFS_TARGET} --build=${CLFS_HOST} \
[3f8be484]66 --disable-profile --enable-add-ons \
67 --with-tls --enable-kernel=2.6.0 --with-__thread \
[bc2e3fa]68 --with-binutils=/cross-tools/bin --with-headers=/tools/include \
[3f8be484]69 --cache-file=config.cache</userinput></screen>
70
[d3a4fc0]71 <variablelist os="dg">
[3f8be484]72 <title>The meaning of the new configure options:</title>
73
[d3a4fc0]74 <varlistentry os="dg1">
[3f8be484]75 <term><parameter>BUILD_CC="gcc"</parameter></term>
76 <listitem>
[6d4c909]77 <para>This sets Glibc to use the current compiler on our system. This is
[8a74dc5]78 used to create the tools Glibc uses during its build.</para>
[3f8be484]79 </listitem>
80 </varlistentry>
81
[d3a4fc0]82 <varlistentry os="dg2">
[07114c98]83 <term><parameter>CC="${CLFS_TARGET}-gcc"</parameter></term>
[3f8be484]84 <listitem>
[df709be]85 <para>This forces Glibc to use the GCC compiler that we made for our target
[d3a4fc0]86 architecture.</para>
[3f8be484]87 </listitem>
88 </varlistentry>
89
[d3a4fc0]90 <varlistentry os="dg3">
[07114c98]91 <term><parameter>AR="${CLFS_TARGET}-ar"</parameter></term>
[3f8be484]92 <listitem>
[df709be]93 <para>This forces Glibc to use the <command>ar</command> utility
94 we made for our target architecture.</para>
[3f8be484]95 </listitem>
96 </varlistentry>
97
[d3a4fc0]98 <varlistentry os="dg4">
[07114c98]99 <term><parameter>RANLIB="${CLFS_TARGET}-ranlib"</parameter></term>
[3f8be484]100 <listitem>
[df709be]101 <para>This forces Glibc to use the <command>ranlib</command> utility
102 we made for our target architecture.</para>
[3f8be484]103 </listitem>
104 </varlistentry>
105
[d3a4fc0]106 <varlistentry os="dg5">
[3f8be484]107 <term><parameter>--disable-profile</parameter></term>
108 <listitem>
[d3a4fc0]109 <para>This builds the libraries without profiling information.
[e3196bd]110 Omit this option if profiling on the temporary tools is necessary.</para>
[3f8be484]111 </listitem>
112 </varlistentry>
113
[d3a4fc0]114 <varlistentry os="dg6">
[3f8be484]115 <term><parameter>--enable-add-ons</parameter></term>
116 <listitem>
[e9e2255]117 <para>This tells Glibc to utilize all add-ons that are
118 available.</para>
[3f8be484]119 </listitem>
120 </varlistentry>
121
[d3a4fc0]122 <varlistentry os="dg7">
[3f8be484]123 <term><parameter>--with-tls</parameter></term>
124 <listitem>
[6d4c909]125 <para>This tells Glibc to use Thread Local Storage.</para>
[3f8be484]126 </listitem>
127 </varlistentry>
128
[d3a4fc0]129 <varlistentry os="dg8">
[c814e64]130 <term><parameter>--enable-kernel=2.6.0</parameter></term>
131 <listitem>
132 <para>This tells Glibc to compile the library with support
133 for 2.6.x Linux kernels.</para>
134 </listitem>
135 </varlistentry>
136
137 <varlistentry os="dg9">
[3f8be484]138 <term><parameter>--with-__thread</parameter></term>
139 <listitem>
[6d4c909]140 <para>This tells Glibc to use use the __thread for libc and
[d3a4fc0]141 libpthread builds.</para>
[3f8be484]142 </listitem>
143 </varlistentry>
144
[c814e64]145 <varlistentry os="dg10">
[bc2e3fa]146 <term><parameter>--with-binutils=/cross-tools/bin</parameter></term>
[3f8be484]147 <listitem>
[6d4c909]148 <para>This tells Glibc to use the Binutils that are specific to
[d3a4fc0]149 our target architecture.</para>
[3f8be484]150 </listitem>
151 </varlistentry>
152
[c814e64]153 <varlistentry os="dg11">
154 <term><parameter>--with-headers=/tools/include</parameter></term>
155 <listitem>
156 <para>This tells Glibc to compile itself against the headers
157 recently installed to the <filename class="directory">/tools</filename>
158 directory, so that it knows exactly what features the kernel has
159 and can optimize itself accordingly.</para>
160 </listitem>
161 </varlistentry>
162
163 <varlistentry os="dg12">
[3f8be484]164 <term><parameter>--cache-file=config.cache</parameter></term>
165 <listitem>
[6d4c909]166 <para>This tells Glibc to utilize a premade cache file.</para>
[3f8be484]167 </listitem>
168 </varlistentry>
169
170 </variablelist>
171
[d3a4fc0]172 <para os="dh">During this stage the following warning might appear:</para>
[3f8be484]173
[d3a4fc0]174<blockquote os="di"><screen><computeroutput>configure: WARNING:
[3f8be484]175*** These auxiliary programs are missing or
176*** incompatible versions: msgfmt
177*** some features will be disabled.
178*** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
179
[d3a4fc0]180 <para os="dj">The missing or incompatible <command>msgfmt</command> program is
[3f8be484]181 generally harmless. This <command>msgfmt</command> program is part of the
182 Gettext package which the host distribution should provide.</para>
183
[d3a4fc0]184 <para os="dk">Compile the package:</para>
[3f8be484]185
[d3a4fc0]186<screen os="dl"><userinput>make</userinput></screen>
[3f8be484]187
[d3a4fc0]188 <para os="dm">Install the package:</para>
[3f8be484]189
[d3a4fc0]190<screen os="dn"><userinput>make install</userinput></screen>
[3f8be484]191
192 </sect2>
193
194 <sect2 role="content">
195 <title/>
196
197 <para>Details on this package are located in <xref
198 linkend="contents-glibc" role="."/></para>
199
200 </sect2>
201
202</sect1>
Note: See TracBrowser for help on using the repository browser.