source: BOOK/cross-tools/alpha/glibc-headers.xml@ 24b004c

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 24b004c was cbbd1e4, checked in by William Harrington <kb0iic@…>, 11 years ago

Migrating EGLIBC to GLIBC since EGLIBC is end of life at 2_19 branch. Mailing list suggests using Glibc unless strict need of use from eglibc 2_19 branch. Trunk is frozen. Rename all EGLIBC and Eglibc and eglibc text to GLIBC Glibc and glibc.

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