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

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f3266b2 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
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/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/2001/XInclude"
19 href="../../final-system/common/glibc.xml"
20 xpointer="xpointer(//*[@role='package'])"/>
21
22 <sect2 role="installation">
23 <title>Installation of GLIBC Headers</title>
24
25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
26 href="../common/glibc.xml"
27 xpointer="xpointer(//*[@os='da'])"/>
28
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
31 will use the GCC that will be installed into
32 <filename class="directory">/cross-tools</filename> in the next step.
33 However, in this step only the GLIBC headers are being installed - no
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>
36
37<screen os="s2"><userinput>cp -v configure{,.orig}
38sed -e 's/3.4/3.[0-9]/g' configure.orig &gt; configure</userinput></screen>
39
40 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
41 href="../../final-system/common/glibc.xml"
42 xpointer="xpointer(//*[@os='s1'])"/>
43
44 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
45 href="../../final-system/common/glibc.xml"
46 xpointer="xpointer(//*[@os='s2'])"/>
47
48 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
49 href="../../final-system/common/glibc.xml"
50 xpointer="xpointer(//*[@os='e'])"/>
51
52 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
53 href="../../final-system/common/glibc.xml"
54 xpointer="xpointer(//*[@os='f'])"/>
55
56 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
57 href="../common/glibc.xml"
58 xpointer="xpointer(//*[@os='dd'])"/>
59
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
65libc_cv_gnu89_inline=yes
66libc_cv_ssp=no
67EOF</userinput></screen>
68
69 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
70 href="../../final-system/common/glibc.xml"
71 xpointer="xpointer(//*[@os='g'])"/>
72
73<screen os="s3"><userinput>CC=gcc ../glibc-&glibc-version;/configure --prefix=/tools \
74 --host=${CLFS_TARGET} --build=${CLFS_HOST} \
75 --disable-sanity-checks --enable-kernel=2.6.32 \
76 --with-headers=/tools/include --enable-obsolete-rpc \
77 --cache-file=config.cache \
78 --with-binutils=/cross-tools/${CLFS_TARGET}/bin</userinput></screen>
79
80 <note os="e1">
81 <para><emphasis>Any</emphasis> error message you see about nptl at this point
82 can safely be ignored.</para>
83 </note>
84
85 <variablelist os="ca">
86 <title>The meaning of the configure options:</title>
87
88 <varlistentry os="ca1">
89 <term><parameter>CC=gcc</parameter></term>
90 <listitem>
91 <para>Tells GLIBC to use the host's GCC compiler.</para>
92 </listitem>
93 </varlistentry>
94
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
99 package in the <filename class="directory">/tools</filename>
100 directory.</para>
101 </listitem>
102 </varlistentry>
103
104 <varlistentry os="ca3">
105 <term><parameter>--build=${CLFS_HOST}</parameter></term>
106 <listitem>
107 <para>When used with --host, this creates a cross-architecture
108 executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para>
109 </listitem>
110 </varlistentry>
111
112 <varlistentry os="ca4">
113 <term><parameter>--host=${CLFS_TARGET}</parameter></term>
114 <listitem>
115 <para>When used with --build, this creates a cross-architecture
116 executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para>
117 </listitem>
118 </varlistentry>
119
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>
126
127 <varlistentry os="ca6">
128 <term><parameter>--enable-kernel=2.6.32</parameter></term>
129 <listitem>
130 <para>This tells GLIBC to compile the library with support
131 for 2.6.32 and later Linux kernels.</para>
132 </listitem>
133 </varlistentry>
134
135 <varlistentry os="ca7">
136 <term><parameter>--with-headers=/tools/include</parameter></term>
137 <listitem>
138 <para>This tells GLIBC to compile itself against the headers
139 recently installed to the <filename class="directory">/tools</filename>
140 directory, so that it knows exactly what features the kernel has
141 and can optimize itself accordingly.</para>
142 </listitem>
143 </varlistentry>
144
145 <varlistentry os="ca8">
146 <term><parameter>--with-binutils=/cross-tools/${CLFS_TARGET}/bin</parameter></term>
147 <listitem>
148 <para>This tells GLIBC to use the Binutils for our specific target architecture.</para>
149 </listitem>
150 </varlistentry>
151
152 </variablelist>
153
154 <para os="cb">Now, install the headers:</para>
155
156<screen os="cd"><userinput>make install-headers</userinput></screen>
157
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>
160
161 <para os="cf">First we will copy a common file over to <filename
162 class="directory">/tools/include</filename>:</para>
163
164<screen os="cg"><userinput>install -dv /tools/include/bits
165cp -v bits/stdio_lim.h /tools/include/bits</userinput></screen>
166
167 <para os="ch">Now we will create a blank stub file:</para>
168
169<screen os="ci"><userinput>touch /tools/include/gnu/stubs.h</userinput></screen>
170
171 <para os="cj">Another header is needed for NPTL:</para>
172
173<screen><userinput>cp -v ../glibc-&glibc-version;/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h \
174 /tools/include/bits/</userinput></screen>
175
176 </sect2>
177
178 <sect2 role="content">
179 <title/>
180
181 <para>Details on this package are located in <xref
182 linkend="contents-glibc" role="."/></para>
183
184 </sect2>
185
186</sect1>
Note: See TracBrowser for help on using the repository browser.