[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 |
---|
| 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} |
---|
| 31 | sed -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="../common/glibc.xml" |
---|
| 35 | xpointer="xpointer(//*[@os='b'])"/> |
---|
| 36 | |
---|
| 37 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 38 | href="../common/glibc.xml" |
---|
| 39 | xpointer="xpointer(//*[@os='c'])"/> |
---|
| 40 | |
---|
| 41 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 42 | href="../common/glibc.xml" |
---|
| 43 | xpointer="xpointer(//*[@os='d'])"/> |
---|
| 44 | |
---|
| 45 | <screen os="e"><userinput>echo "libc_cv_forced_unwind=yes" > config.cache |
---|
| 46 | echo "libc_cv_c_cleanup=yes" >> config.cache |
---|
| 47 | echo "libc_cv_arm_tls=yes" >> config.cache</userinput></screen> |
---|
| 48 | |
---|
| 49 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 50 | href="../common/glibc.xml" |
---|
| 51 | xpointer="xpointer(//*[@os='f'])"/> |
---|
| 52 | |
---|
| 53 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 54 | href="../common/glibc.xml" |
---|
| 55 | xpointer="xpointer(//*[@os='g'])"/> |
---|
| 56 | |
---|
| 57 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" |
---|
| 58 | href="../common/glibc.xml" |
---|
| 59 | xpointer="xpointer(//*[@os='h'])"/> |
---|
| 60 | |
---|
| 61 | <screen os="i"><userinput>CC=gcc ../glibc-&glibc-version;/configure --prefix=/usr \ |
---|
| 62 | --host=${LFS_TARGET} --build=${LFS_HOST} \ |
---|
| 63 | --with-headers=${LFS}/usr/include --cache-file=config.cache</userinput></screen> |
---|
| 64 | |
---|
| 65 | <variablelist os="dj"> |
---|
| 66 | <title>The meaning of the configure options:</title> |
---|
| 67 | |
---|
| 68 | <varlistentry os="dj1"> |
---|
| 69 | <term><parameter>CC=gcc</parameter></term> |
---|
| 70 | <listitem> |
---|
| 71 | <para>Tells GLIBC to use the hosts GCC compiler.</para> |
---|
| 72 | </listitem> |
---|
| 73 | </varlistentry> |
---|
| 74 | |
---|
| 75 | <varlistentry os="dj2"> |
---|
| 76 | <term><parameter>--with-headers=/tools/include</parameter></term> |
---|
| 77 | <listitem> |
---|
| 78 | <para>This tells Glibc to compile itself against the headers |
---|
| 79 | recently installed to the <filename class="directory">/tools</filename> |
---|
| 80 | directory, so that it knows exactly what features the kernel has |
---|
| 81 | and can optimize itself accordingly.</para> |
---|
| 82 | </listitem> |
---|
| 83 | </varlistentry> |
---|
| 84 | |
---|
| 85 | </variablelist> |
---|
| 86 | |
---|
| 87 | <para os="k">Now, install the headers:</para> |
---|
| 88 | |
---|
| 89 | <screen os="l"><userinput>make install-headers</userinput></screen> |
---|
| 90 | |
---|
| 91 | <para os="m">Some files aren't installed by the above command, then |
---|
| 92 | we will copy the header files we need:</para> |
---|
| 93 | |
---|
| 94 | <para os="n">First we will copy a common file over to <filename |
---|
| 95 | class="directory">/tools/include</filename>:</para> |
---|
| 96 | |
---|
| 97 | <screen os="o"><userinput>install -dv ${LFS}/usr/include/bits |
---|
| 98 | cp -v bits/stdio_lim.h ${LFS}/usr/include/bits</userinput></screen> |
---|
| 99 | |
---|
| 100 | <para os="p">Now we will create a blank stub file:</para> |
---|
| 101 | |
---|
| 102 | <screen os="q"><userinput>touch ${LFS}/usr/include/gnu/stubs.h</userinput></screen> |
---|
| 103 | |
---|
| 104 | <para os="r">For NPTL we use the following command:</para> |
---|
| 105 | |
---|
| 106 | <screen os="s"><userinput>cp -v ../glibc-&glibc-version;/../glibc-2.4/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h \ |
---|
| 107 | ${LFS}/usr/include/bits</userinput></screen> |
---|
| 108 | |
---|
| 109 | </sect2> |
---|
| 110 | |
---|
| 111 | <sect2 role="content"> |
---|
| 112 | <title/> |
---|
| 113 | |
---|
| 114 | <para>Details on this package are located in <xref |
---|
| 115 | linkend="contents-glibc" role="."/></para> |
---|
| 116 | |
---|
| 117 | </sect2> |
---|
| 118 | |
---|
| 119 | </sect1> |
---|