source: clfs-sysroot/BOOK/cross-tools/arm/glibc-headers.xml@ bcc3c76

Last change on this file since bcc3c76 was 823185c, checked in by Joe Ciccone <jciccone@…>, 18 years ago

Text Updates.

  • Property mode set to 100644
File size: 4.5 KB
RevLine 
[4b6ae47]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="../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
[823185c]28 next Glibc chapter, we use the GCC that's built right after this chapter.</para>
[4b6ae47]29
30<screen os="s2"><userinput>cp configure{,.orig}
31sed -e 's/3.4/3.[0-9]/g' configure.orig > configure</userinput></screen>
32
[1f0a9c9]33 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
34 href="glibc.xml"
35 xpointer="xpointer(//*[@os='u1'])"/>
36
37 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
38 href="glibc.xml"
39 xpointer="xpointer(//*[@os='u2'])"/>
40
[4b6ae47]41 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
42 href="../common/glibc.xml"
43 xpointer="xpointer(//*[@os='b'])"/>
44
45 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
46 href="../common/glibc.xml"
47 xpointer="xpointer(//*[@os='c'])"/>
48
49 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
50 href="../common/glibc.xml"
51 xpointer="xpointer(//*[@os='d'])"/>
52
53<screen os="e"><userinput>echo "libc_cv_forced_unwind=yes" &gt; config.cache
54echo "libc_cv_c_cleanup=yes" &gt;&gt; config.cache
55echo "libc_cv_arm_tls=yes" &gt;&gt; config.cache</userinput></screen>
56
57 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
58 href="../common/glibc.xml"
59 xpointer="xpointer(//*[@os='f'])"/>
60
61 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
62 href="../common/glibc.xml"
63 xpointer="xpointer(//*[@os='g'])"/>
64
65 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
66 href="../common/glibc.xml"
67 xpointer="xpointer(//*[@os='h'])"/>
68
69<screen os="i"><userinput>CC=gcc ../glibc-&glibc-version;/configure --prefix=/usr \
[586feb7]70 --host=${CLFS_TARGET} --build=${CLFS_HOST} \
71 --with-headers=${CLFS}/usr/include --cache-file=config.cache</userinput></screen>
[4b6ae47]72
73 <variablelist os="dj">
74 <title>The meaning of the configure options:</title>
75
76 <varlistentry os="dj1">
77 <term><parameter>CC=gcc</parameter></term>
78 <listitem>
[823185c]79 <para>Tells Glibc to use the hosts GCC compiler.</para>
[4b6ae47]80 </listitem>
81 </varlistentry>
82
83 <varlistentry os="dj2">
[586feb7]84 <term><parameter>--with-headers=${CLFS}/usr/include</parameter></term>
[4b6ae47]85 <listitem>
86 <para>This tells Glibc to compile itself against the headers
[586feb7]87 recently installed to the <filename class="directory">${CLFS}/usr/include</filename>
[4b6ae47]88 directory, so that it knows exactly what features the kernel has
89 and can optimize itself accordingly.</para>
90 </listitem>
91 </varlistentry>
92
93 </variablelist>
94
95 <para os="k">Now, install the headers:</para>
96
97<screen os="l"><userinput>make install-headers</userinput></screen>
98
[823185c]99 <para os="m">Some files aren't installed by the above command, so
100 we will copy the additional header files we need.</para>
[4b6ae47]101
102 <para os="n">First we will copy a common file over to <filename
[586feb7]103 class="directory">${CLFS}/usr/include</filename>:</para>
[4b6ae47]104
[586feb7]105<screen os="o"><userinput>install -dv ${CLFS}/usr/include/bits
106cp -v bits/stdio_lim.h ${CLFS}/usr/include/bits</userinput></screen>
[4b6ae47]107
108 <para os="p">Now we will create a blank stub file:</para>
109
[586feb7]110<screen os="q"><userinput>touch ${CLFS}/usr/include/gnu/stubs.h</userinput></screen>
[4b6ae47]111
[823185c]112 <para os="r">Another header is needed for NPTL:</para>
[4b6ae47]113
[3a6b2ea]114<screen os="s"><userinput>cp -v ../glibc-&glibc-version;/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h \
[586feb7]115 ${CLFS}/usr/include/bits</userinput></screen>
[4b6ae47]116
117 </sect2>
118
[da9613e]119 <sect2 role="content" id="contents-glibc-headers">
[4b6ae47]120 <title/>
121
122 <para>Details on this package are located in <xref
123 linkend="contents-glibc" role="."/></para>
124
125 </sect2>
126
127</sect1>
Note: See TracBrowser for help on using the repository browser.