source: BOOK/cross-tools/x86/glibc-headers.xml@ 43daa01

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 43daa01 was 6aad380, checked in by Jim Gifford <clfs@…>, 19 years ago

r677@server (orig r675): manuel | 2005-11-10 03:13:57 -0800
Including patches.ent from general.ent

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