[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
|
---|
[1f0a9c9] | 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}
|
---|
| 31 | sed -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" > config.cache
|
---|
| 54 | echo "libc_cv_c_cleanup=yes" >> config.cache
|
---|
| 55 | echo "libc_cv_arm_tls=yes" >> 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 \
|
---|
| 70 | --host=${LFS_TARGET} --build=${LFS_HOST} \
|
---|
| 71 | --with-headers=${LFS}/usr/include --cache-file=config.cache</userinput></screen>
|
---|
| 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>
|
---|
| 79 | <para>Tells GLIBC to use the hosts GCC compiler.</para>
|
---|
| 80 | </listitem>
|
---|
| 81 | </varlistentry>
|
---|
| 82 |
|
---|
| 83 | <varlistentry os="dj2">
|
---|
[f6c417f] | 84 | <term><parameter>--with-headers=${LFS}/usr/include</parameter></term>
|
---|
[4b6ae47] | 85 | <listitem>
|
---|
| 86 | <para>This tells Glibc to compile itself against the headers
|
---|
[f6c417f] | 87 | recently installed to the <filename class="directory">${LFS}/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 |
|
---|
| 99 | <para os="m">Some files aren't installed by the above command, then
|
---|
| 100 | we will copy the header files we need:</para>
|
---|
| 101 |
|
---|
| 102 | <para os="n">First we will copy a common file over to <filename
|
---|
[1f0a9c9] | 103 | class="directory">${LFS}/usr/include</filename>:</para>
|
---|
[4b6ae47] | 104 |
|
---|
| 105 | <screen os="o"><userinput>install -dv ${LFS}/usr/include/bits
|
---|
| 106 | cp -v bits/stdio_lim.h ${LFS}/usr/include/bits</userinput></screen>
|
---|
| 107 |
|
---|
| 108 | <para os="p">Now we will create a blank stub file:</para>
|
---|
| 109 |
|
---|
| 110 | <screen os="q"><userinput>touch ${LFS}/usr/include/gnu/stubs.h</userinput></screen>
|
---|
| 111 |
|
---|
| 112 | <para os="r">For NPTL we use the following command:</para>
|
---|
| 113 |
|
---|
[3a6b2ea] | 114 | <screen os="s"><userinput>cp -v ../glibc-&glibc-version;/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h \
|
---|
[4b6ae47] | 115 | ${LFS}/usr/include/bits</userinput></screen>
|
---|
| 116 |
|
---|
| 117 | </sect2>
|
---|
| 118 |
|
---|
| 119 | <sect2 role="content">
|
---|
| 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>
|
---|