source: BOOK/cross-tools/x86/glibc-headers.xml @ 3f8be484

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 3f8be484 was 3f8be484, checked in by Jim Gifford <clfs@…>, 18 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

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