source: cross-tools/x86/glibc-headers.xml@ 65d82b0

Last change on this file since 65d82b0 was 48f8316, checked in by Jim Gifford <clfs@…>, 19 years ago

r656@server (orig r654): manuel | 2005-11-08 12:18:58 -0800
Preparations to remove SBUs and DUs. Chapter cross-tools.

  • Property mode set to 100644
File size: 5.4 KB
RevLine 
[bf8c11f]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 <!ENTITY % patches-entities SYSTEM "../../patches.ent">
6 %general-entities;
7 %patches-entities;
8]>
9
10<sect1 id="ch-cross-tools-glibc-headers" role="wrap">
11 <?dbhtml filename="glibc-headers.html"?>
12
13 <title>Glibc-&glibc-version; Headers</title>
14
15 <indexterm zone="ch-cross-tools-glibc-headers">
16 <primary sortas="a-Glibc">Glibc</primary>
17 <secondary>cross tools, headers</secondary>
18 </indexterm>
19
[48f8316]20 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
21 href="../../final-system/common/glibc.xml"
22 xpointer="xpointer(//*[@role='package'])"/>
[bf8c11f]23
24 <sect2 role="installation">
25 <title>Installation of Glibc Headers</title>
26
27 <para os="s1">The following sed removes a dependency of gcc 3.4.x from
28 the glibc we are using in cross-lfs. The reason we are changing it is
29 because this only installs the headers, no compiling takes place. In the
30 next glibc chapter, we use the gcc that's build right after this chapter.</para>
31
32<screen os="s2"><userinput>cp configure{,.orig}
33sed -e 's/3.4/3.[0-9]/g' configure.orig > configure</userinput></screen>
34
35 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
36 href="../../final-system/common/glibc.xml"
37 xpointer="xpointer(//*[@os='e'])"/>
38
39 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
40 href="../../final-system/common/glibc.xml"
41 xpointer="xpointer(//*[@os='f'])"/>
42
43 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
44 href="../../final-system/common/glibc.xml"
45 xpointer="xpointer(//*[@os='g'])"/>
46
47<screen><userinput>CC=gcc ../glibc-&glibc-version;/configure --prefix=/tools \
48 --host=${LFS_TARGET} --build=${LFS_HOST} \
49 --disable-sanity-checks --enable-kernel=2.6.0 \
50 --with-headers=/tools/include \
51 --with-binutils=/cross-tools/${LFS_TARGET}/bin</userinput></screen>
52
53 <warning os="e1">
54 <para><emphasis>Any</emphasis> error message you see about nptl at this point\
55 can safely be ignored.</para>
56 </warning>
57
58 <variablelist os="ca">
59 <title>The meaning of the configure options:</title>
60
61 <varlistentry>
62 <term><parameter>CC=gcc</parameter></term>
63 <listitem>
64 <para>This do ...</para>
65 </listitem>
66 </varlistentry>
67
68 <varlistentry os="ca1">
69 <term><parameter>--prefix=/tools</parameter></term>
70 <listitem>
71 <para>This tells the configure script to prepare to install the
72 package in the <filename class="directory">/tools</filename>
73 directory.</para>
74 </listitem>
75 </varlistentry>
76
77 <varlistentry os="ca2">
78 <term><parameter>--host=${LFS_TARGET}</parameter></term>
79 <listitem>
80 <para>This do ...</para>
81 </listitem>
82 </varlistentry>
83
84 <varlistentry os="ca3">
85 <term><parameter>--build=${LFS_HOST}</parameter></term>
86 <listitem>
87 <para>This do ...</para>
88 </listitem>
89 </varlistentry>
90
91 <varlistentry>
92 <term><parameter>--disable-sanity-checks</parameter></term>
93 <listitem>
94 <para>This switch do ... .</para>
95 </listitem>
96 </varlistentry>
97
98 <varlistentry os="ca4">
99 <term><parameter>--enable-kernel=2.6.0</parameter></term>
100 <listitem>
101 <para>This tells Glibc to compile the library with support
102 for 2.6.x Linux kernels.</para>
103 </listitem>
104 </varlistentry>
105
106 <varlistentry os="ca5">
107 <term><parameter>--with-headers=/tools/include</parameter></term>
108 <listitem>
109 <para>This tells Glibc to compile itself against the headers
110 recently installed to the <filename class="directory">/tools</filename>
111 directory, so that it knows exactly what features the kernel has
112 and can optimize itself accordingly.</para>
113 </listitem>
114 </varlistentry>
115
116 <varlistentry>
117 <term><parameter>--with-binutils=/cross-tools/${LFS_TARGET}/bin</parameter></term>
118 <listitem>
119 <para>This switch do ... .</para>
120 </listitem>
121 </varlistentry>
122
123 </variablelist>
124
125 <para os="cb">Now, install the headers:</para>
126
127<screen os="cd"><userinput>make install-headers</userinput></screen>
128
129 <para os="ce">Some files aren't installed by the above command, then
130 we will copy the header files we need:</para>
131
132 <para os="cf">First we will copy a common file over to <filename
133 class="directory">/tools/include</filename>:</para>
134
135<screen os="cg"><userinput>install -d /tools/include/bits
136cp bits/stdio_lim.h /tools/include/bits</userinput></screen>
137
138 <para os="ch">Now we will create a blank stub file:</para>
139
140<screen os="ci"><userinput>touch /tools/include/gnu/stubs.h</userinput></screen>
141
142 <para os="cj">For NPTL we use the following command:</para>
143
144<screen os="ck"><userinput>cp ../glibc-&glibc-version;/nptl/sysdeps/pthread/pthread.h /tools/include/</userinput></screen>
145
146 <para os="cl">Now we copy the architecture specific header over:</para>
147
148<screen><userinput>cp ../glibc-&glibc-version;/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h /tools/include/bits/</userinput></screen>
149
150 </sect2>
151
152 <sect2 role="content">
153 <title/>
154
155 <para>Details on this package are located in <xref
156 linkend="contents-glibc" role="."/></para>
157
158 </sect2>
159
160</sect1>
Note: See TracBrowser for help on using the repository browser.