[3f8be484] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[aa18ac0] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[3f8be484] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
[093b0e8] | 8 | <sect1 id="ch-cross-tools-eglibc-headers" role="wrap">
|
---|
| 9 | <?dbhtml filename="eglibc-headers.html"?>
|
---|
[3f8be484] | 10 |
|
---|
[093b0e8] | 11 | <title>EGLIBC-&eglibc-version; Headers</title>
|
---|
[3f8be484] | 12 |
|
---|
[093b0e8] | 13 | <indexterm zone="ch-cross-tools-eglibc-headers">
|
---|
| 14 | <primary sortas="a-EGLIBC">EGLIBC</primary>
|
---|
[3f8be484] | 15 | <secondary>cross tools, headers</secondary>
|
---|
| 16 | </indexterm>
|
---|
| 17 |
|
---|
[cf66ceae] | 18 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[093b0e8] | 19 | href="../../final-system/common/eglibc.xml"
|
---|
[cf66ceae] | 20 | xpointer="xpointer(//*[@role='package'])"/>
|
---|
[3f8be484] | 21 |
|
---|
| 22 | <sect2 role="installation">
|
---|
[093b0e8] | 23 | <title>Installation of EGLIBC Headers</title>
|
---|
[3f8be484] | 24 |
|
---|
[c8d4414] | 25 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 26 | href="../../final-system/common/eglibc.xml"
|
---|
| 27 | xpointer="xpointer(//*[@os='mp1'])"/>
|
---|
| 28 |
|
---|
| 29 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 30 | href="../../final-system/common/eglibc.xml"
|
---|
| 31 | xpointer="xpointer(//*[@os='mp2'])"/>
|
---|
| 32 |
|
---|
[093b0e8] | 33 | <para os="s1">EGLIBC's <filename>configure</filename> script checks the
|
---|
| 34 | version of GCC, and will fail if it's less than 3.4. The next EGLIBC build
|
---|
[9f5a80a] | 35 | will use the GCC that will be installed into
|
---|
| 36 | <filename class="directory">/cross-tools</filename> in the next step.
|
---|
[093b0e8] | 37 | However, in this step only the EGLIBC headers are being installed - no
|
---|
[9f5a80a] | 38 | compiling is taking place - so the GCC version isn't important. The
|
---|
| 39 | following sed removes the dependency of GCC 3.4.x:</para>
|
---|
[d018b81] | 40 |
|
---|
[661d1a4] | 41 | <screen os="s2"><userinput>cp -v configure{,.orig}
|
---|
[1b274255] | 42 | sed -e 's/3.4/3.[0-9]/g' configure.orig > configure</userinput></screen>
|
---|
[3f8be484] | 43 |
|
---|
| 44 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[093b0e8] | 45 | href="../../final-system/common/eglibc.xml"
|
---|
[3f8be484] | 46 | xpointer="xpointer(//*[@os='e'])"/>
|
---|
| 47 |
|
---|
| 48 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[093b0e8] | 49 | href="../../final-system/common/eglibc.xml"
|
---|
[3f8be484] | 50 | xpointer="xpointer(//*[@os='f'])"/>
|
---|
| 51 |
|
---|
[c4d5e29] | 52 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[093b0e8] | 53 | href="../common/eglibc.xml"
|
---|
[c4d5e29] | 54 | xpointer="xpointer(//*[@os='dd'])"/>
|
---|
| 55 |
|
---|
[c768003] | 56 | <screen os="de"><userinput>cat > config.cache << "EOF"
|
---|
| 57 | libc_cv_forced_unwind=yes
|
---|
| 58 | libc_cv_c_cleanup=yes
|
---|
| 59 | libc_cv_mlong_double_128=yes
|
---|
| 60 | libc_cv_alpha_tls=yes
|
---|
[bd01f75] | 61 | libc_cv_gnu89_inline=yes
|
---|
[5e4b3b4] | 62 | libc_cv_ssp=no
|
---|
[c768003] | 63 | EOF</userinput></screen>
|
---|
[f0ed7ed] | 64 |
|
---|
[3f8be484] | 65 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[093b0e8] | 66 | href="../../final-system/common/eglibc.xml"
|
---|
[3f8be484] | 67 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
| 68 |
|
---|
[093b0e8] | 69 | <screen os="s3"><userinput>CC=gcc ../eglibc-&eglibc-version;/configure --prefix=/tools \
|
---|
[07114c98] | 70 | --host=${CLFS_TARGET} --build=${CLFS_HOST} \
|
---|
[7482ad3] | 71 | --disable-sanity-checks --enable-kernel=2.6.0 \
|
---|
[bc2e3fa] | 72 | --with-headers=/tools/include --cache-file=config.cache \
|
---|
| 73 | --with-binutils=/cross-tools/${CLFS_TARGET}/bin</userinput></screen>
|
---|
[7482ad3] | 74 |
|
---|
[040521bc] | 75 | <note os="e1">
|
---|
[7482ad3] | 76 | <para><emphasis>Any</emphasis> error message you see about nptl at this point
|
---|
| 77 | can safely be ignored.</para>
|
---|
[040521bc] | 78 | </note>
|
---|
[7482ad3] | 79 |
|
---|
| 80 | <variablelist os="ca">
|
---|
| 81 | <title>The meaning of the configure options:</title>
|
---|
[d018b81] | 82 |
|
---|
[7482ad3] | 83 | <varlistentry os="ca1">
|
---|
| 84 | <term><parameter>CC=gcc</parameter></term>
|
---|
| 85 | <listitem>
|
---|
[093b0e8] | 86 | <para>Tells EGLIBC to use the host's GCC compiler.</para>
|
---|
[7482ad3] | 87 | </listitem>
|
---|
| 88 | </varlistentry>
|
---|
[d018b81] | 89 |
|
---|
[7482ad3] | 90 | <varlistentry os="ca2">
|
---|
| 91 | <term><parameter>--prefix=/tools</parameter></term>
|
---|
| 92 | <listitem>
|
---|
| 93 | <para>This tells the configure script to prepare to install the
|
---|
[e3196bd] | 94 | package in the <filename class="directory">/tools</filename>
|
---|
| 95 | directory.</para>
|
---|
[7482ad3] | 96 | </listitem>
|
---|
| 97 | </varlistentry>
|
---|
[d018b81] | 98 |
|
---|
[7482ad3] | 99 | <varlistentry os="ca3">
|
---|
[07114c98] | 100 | <term><parameter>--build=${CLFS_HOST}</parameter></term>
|
---|
[7482ad3] | 101 | <listitem>
|
---|
| 102 | <para>When used with --host, this creates a cross-architecture
|
---|
[3c06a53] | 103 | executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para>
|
---|
[7482ad3] | 104 | </listitem>
|
---|
| 105 | </varlistentry>
|
---|
[d018b81] | 106 |
|
---|
[7482ad3] | 107 | <varlistentry os="ca4">
|
---|
[07114c98] | 108 | <term><parameter>--host=${CLFS_TARGET}</parameter></term>
|
---|
[7482ad3] | 109 | <listitem>
|
---|
| 110 | <para>When used with --build, this creates a cross-architecture
|
---|
[3c06a53] | 111 | executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para>
|
---|
[7482ad3] | 112 | </listitem>
|
---|
| 113 | </varlistentry>
|
---|
[d018b81] | 114 |
|
---|
[7482ad3] | 115 | <varlistentry os="ca5">
|
---|
| 116 | <term><parameter>--disable-sanity-checks</parameter></term>
|
---|
| 117 | <listitem>
|
---|
| 118 | <para>This switch disables any checks that are in place.</para>
|
---|
| 119 | </listitem>
|
---|
| 120 | </varlistentry>
|
---|
[d018b81] | 121 |
|
---|
[7482ad3] | 122 | <varlistentry os="ca6">
|
---|
| 123 | <term><parameter>--enable-kernel=2.6.0</parameter></term>
|
---|
| 124 | <listitem>
|
---|
[093b0e8] | 125 | <para>This tells EGLIBC to compile the library with support
|
---|
[7482ad3] | 126 | for 2.6.x Linux kernels.</para>
|
---|
| 127 | </listitem>
|
---|
| 128 | </varlistentry>
|
---|
[d018b81] | 129 |
|
---|
[7482ad3] | 130 | <varlistentry os="ca7">
|
---|
[bc2e3fa] | 131 | <term><parameter>--with-headers=/tools/include</parameter></term>
|
---|
[7482ad3] | 132 | <listitem>
|
---|
[093b0e8] | 133 | <para>This tells EGLIBC to compile itself against the headers
|
---|
[bc2e3fa] | 134 | recently installed to the <filename class="directory">/tools</filename>
|
---|
[7482ad3] | 135 | directory, so that it knows exactly what features the kernel has
|
---|
| 136 | and can optimize itself accordingly.</para>
|
---|
| 137 | </listitem>
|
---|
| 138 | </varlistentry>
|
---|
[d018b81] | 139 |
|
---|
[7482ad3] | 140 | <varlistentry os="ca8">
|
---|
[bc2e3fa] | 141 | <term><parameter>--with-binutils=/cross-tools/${CLFS_TARGET}/bin</parameter></term>
|
---|
[7482ad3] | 142 | <listitem>
|
---|
[093b0e8] | 143 | <para>This tells EGLIBC to use the Binutils for our specific target architecture.</para>
|
---|
[7482ad3] | 144 | </listitem>
|
---|
| 145 | </varlistentry>
|
---|
[d018b81] | 146 |
|
---|
[7482ad3] | 147 | </variablelist>
|
---|
[d018b81] | 148 |
|
---|
[7482ad3] | 149 | <para os="cb">Now, install the headers:</para>
|
---|
| 150 |
|
---|
| 151 | <screen os="cd"><userinput>make install-headers</userinput></screen>
|
---|
| 152 |
|
---|
[42754a9] | 153 | <para os="ce">Some files aren't installed by the above command, so
|
---|
| 154 | we will copy the additional header files we need.</para>
|
---|
[7482ad3] | 155 |
|
---|
[d018b81] | 156 | <para os="cf">First we will copy a common file over to <filename
|
---|
[bc2e3fa] | 157 | class="directory">/tools/include</filename>:</para>
|
---|
[7482ad3] | 158 |
|
---|
[bc2e3fa] | 159 | <screen os="cg"><userinput>install -dv /tools/include/bits
|
---|
| 160 | cp -v bits/stdio_lim.h /tools/include/bits</userinput></screen>
|
---|
[7482ad3] | 161 |
|
---|
| 162 | <para os="ch">Now we will create a blank stub file:</para>
|
---|
| 163 |
|
---|
[bc2e3fa] | 164 | <screen os="ci"><userinput>touch /tools/include/gnu/stubs.h</userinput></screen>
|
---|
[7482ad3] | 165 |
|
---|
[42754a9] | 166 | <para os="cj">Another header is needed for NPTL:</para>
|
---|
[d018b81] | 167 |
|
---|
[093b0e8] | 168 | <screen><userinput>cp -v ../eglibc-&eglibc-version;/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h \
|
---|
[d018b81] | 169 | /tools/include/bits/</userinput></screen>
|
---|
[3f8be484] | 170 |
|
---|
| 171 | </sect2>
|
---|
| 172 |
|
---|
| 173 | <sect2 role="content">
|
---|
| 174 | <title/>
|
---|
| 175 |
|
---|
| 176 | <para>Details on this package are located in <xref
|
---|
[093b0e8] | 177 | linkend="contents-eglibc" role="."/></para>
|
---|
[3f8be484] | 178 |
|
---|
| 179 | </sect2>
|
---|
| 180 |
|
---|
| 181 | </sect1>
|
---|