source: BOOK/cross-tools/common/glibc.xml @ 1026afb

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 1026afb was 1026afb, checked in by Joe Ciccone <jciccone@…>, 17 years ago

glibc changed for sysroot build.

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