source: BOOK/cross-tools/alpha/glibc-headers.xml@ eca651f

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

Updated Glibc to 2.8.

  • Property mode set to 100644
File size: 6.2 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-headers" role="wrap">
9 <?dbhtml filename="glibc-headers.html"?>
10
11 <title>Glibc-&glibc-version; Headers</title>
12
13 <indexterm zone="ch-cross-tools-glibc-headers">
14 <primary sortas="a-Glibc">Glibc</primary>
15 <secondary>cross tools, headers</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 Headers</title>
24
[7482ad3]25 <para os="s1">The following sed removes a dependency of gcc 3.4.x from
26 the glibc we are using in cross-lfs. The reason we are changing it is
27 because this only installs the headers, no compiling takes place. In the
[42754a9]28 next Glibc installation, we use the GCC that's built right after this section:</para>
[d018b81]29
[661d1a4]30<screen os="s2"><userinput>cp -v configure{,.orig}
[7482ad3]31sed -e 's/3.4/3.[0-9]/g' configure.orig > configure</userinput></screen>
[3f8be484]32
33 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
34 href="../../final-system/common/glibc.xml"
35 xpointer="xpointer(//*[@os='e'])"/>
36
37 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
38 href="../../final-system/common/glibc.xml"
39 xpointer="xpointer(//*[@os='f'])"/>
40
[c4d5e29]41 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
42 href="../common/glibc.xml"
43 xpointer="xpointer(//*[@os='dd'])"/>
44
[7482ad3]45<screen os="de"><userinput>echo "libc_cv_forced_unwind=yes" &gt; config.cache
46echo "libc_cv_c_cleanup=yes" &gt;&gt; config.cache
47echo "libc_cv_mlong_double_128=yes" &gt;&gt; config.cache
[ca89969]48echo "libc_cv_alpha_tls=yes" &gt;&gt; config.cache
49echo "libc_cv_gnu89_inline=yes" &gt;&gt; config.cache</userinput></screen>
[f0ed7ed]50
[3f8be484]51 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
52 href="../../final-system/common/glibc.xml"
53 xpointer="xpointer(//*[@os='g'])"/>
54
[7482ad3]55<screen os="s3"><userinput>CC=gcc ../glibc-&glibc-version;/configure --prefix=/tools \
[07114c98]56 --host=${CLFS_TARGET} --build=${CLFS_HOST} \
[7482ad3]57 --disable-sanity-checks --enable-kernel=2.6.0 \
[bc2e3fa]58 --with-headers=/tools/include --cache-file=config.cache \
59 --with-binutils=/cross-tools/${CLFS_TARGET}/bin</userinput></screen>
[7482ad3]60
[040521bc]61 <note os="e1">
[7482ad3]62 <para><emphasis>Any</emphasis> error message you see about nptl at this point
63 can safely be ignored.</para>
[040521bc]64 </note>
[7482ad3]65
66 <variablelist os="ca">
67 <title>The meaning of the configure options:</title>
[d018b81]68
[7482ad3]69 <varlistentry os="ca1">
70 <term><parameter>CC=gcc</parameter></term>
71 <listitem>
[3c06a53]72 <para>Tells Glibc to use the host's GCC compiler.</para>
[7482ad3]73 </listitem>
74 </varlistentry>
[d018b81]75
[7482ad3]76 <varlistentry os="ca2">
77 <term><parameter>--prefix=/tools</parameter></term>
78 <listitem>
79 <para>This tells the configure script to prepare to install the
80 package in the <filename class="directory">/tools</filename>
81 directory.</para>
82 </listitem>
83 </varlistentry>
[d018b81]84
[7482ad3]85 <varlistentry os="ca3">
[07114c98]86 <term><parameter>--build=${CLFS_HOST}</parameter></term>
[7482ad3]87 <listitem>
88 <para>When used with --host, this creates a cross-architecture
[3c06a53]89 executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para>
[7482ad3]90 </listitem>
91 </varlistentry>
[d018b81]92
[7482ad3]93 <varlistentry os="ca4">
[07114c98]94 <term><parameter>--host=${CLFS_TARGET}</parameter></term>
[7482ad3]95 <listitem>
96 <para>When used with --build, this creates a cross-architecture
[3c06a53]97 executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para>
[7482ad3]98 </listitem>
99 </varlistentry>
[d018b81]100
[7482ad3]101 <varlistentry os="ca5">
102 <term><parameter>--disable-sanity-checks</parameter></term>
103 <listitem>
104 <para>This switch disables any checks that are in place.</para>
105 </listitem>
106 </varlistentry>
[d018b81]107
[7482ad3]108 <varlistentry os="ca6">
109 <term><parameter>--enable-kernel=2.6.0</parameter></term>
110 <listitem>
111 <para>This tells Glibc to compile the library with support
112 for 2.6.x Linux kernels.</para>
113 </listitem>
114 </varlistentry>
[d018b81]115
[7482ad3]116 <varlistentry os="ca7">
[bc2e3fa]117 <term><parameter>--with-headers=/tools/include</parameter></term>
[7482ad3]118 <listitem>
119 <para>This tells Glibc to compile itself against the headers
[bc2e3fa]120 recently installed to the <filename class="directory">/tools</filename>
[7482ad3]121 directory, so that it knows exactly what features the kernel has
122 and can optimize itself accordingly.</para>
123 </listitem>
124 </varlistentry>
[d018b81]125
[7482ad3]126 <varlistentry os="ca8">
[bc2e3fa]127 <term><parameter>--with-binutils=/cross-tools/${CLFS_TARGET}/bin</parameter></term>
[7482ad3]128 <listitem>
[3c06a53]129 <para>This tells Glibc to use the Binutils for our specific target architecture.</para>
[7482ad3]130 </listitem>
131 </varlistentry>
[d018b81]132
[7482ad3]133 </variablelist>
[d018b81]134
[7482ad3]135 <para os="cb">Now, install the headers:</para>
136
137<screen os="cd"><userinput>make install-headers</userinput></screen>
138
[42754a9]139 <para os="ce">Some files aren't installed by the above command, so
140 we will copy the additional header files we need.</para>
[7482ad3]141
[d018b81]142 <para os="cf">First we will copy a common file over to <filename
[bc2e3fa]143 class="directory">/tools/include</filename>:</para>
[7482ad3]144
[bc2e3fa]145<screen os="cg"><userinput>install -dv /tools/include/bits
146cp -v bits/stdio_lim.h /tools/include/bits</userinput></screen>
[7482ad3]147
148 <para os="ch">Now we will create a blank stub file:</para>
149
[bc2e3fa]150<screen os="ci"><userinput>touch /tools/include/gnu/stubs.h</userinput></screen>
[7482ad3]151
[42754a9]152 <para os="cj">Another header is needed for NPTL:</para>
[d018b81]153
154<screen><userinput>cp -v ../glibc-&glibc-version;/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h \
155 /tools/include/bits/</userinput></screen>
[3f8be484]156
157 </sect2>
158
159 <sect2 role="content">
160 <title/>
161
162 <para>Details on this package are located in <xref
163 linkend="contents-glibc" role="."/></para>
164
165 </sect2>
166
167</sect1>
Note: See TracBrowser for help on using the repository browser.