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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8473983 was a2e6cdb, checked in by Joe Ciccone <jciccone@…>, 18 years ago

Another /tools oversight in glibc-headers.

  • Property mode set to 100644
File size: 6.5 KB
Line 
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="../../final-system/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 installation, we use the GCC that's built right after this section:</para>
29
30<screen os="s2"><userinput>cp -v configure{,.orig}
31sed -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="../../final-system/common/glibc.xml"
35 xpointer="xpointer(//*[@os='e'])"/>
36
37 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
38 href="../../final-system/common/glibc.xml"
39 xpointer="xpointer(//*[@os='f'])"/>
40
41 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
42 href="../common/glibc.xml"
43 xpointer="xpointer(//*[@os='dd'])"/>
44
45<screen os="de"><userinput>echo "libc_cv_forced_unwind=yes" &gt; config.cache
46echo "libc_cv_c_cleanup=yes" &gt;&gt; config.cache
47echo "libc_cv_mlong_double_128=yes" &gt;&gt; config.cache
48echo "libc_cv_alpha_tls=yes" &gt;&gt; config.cache</userinput></screen>
49
50 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
51 href="../common/glibc.xml"
52 xpointer="xpointer(//*[@os='n1'])"/>
53
54 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
55 href="../common/glibc.xml"
56 xpointer="xpointer(//*[@os='n2'])"/>
57
58 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
59 href="../../final-system/common/glibc.xml"
60 xpointer="xpointer(//*[@os='g'])"/>
61
62<screen os="s3"><userinput>CC=gcc ../glibc-&glibc-version;/configure --prefix=/tools \
63 --host=${CLFS_TARGET} --build=${CLFS_HOST} \
64 --disable-sanity-checks --enable-kernel=2.6.0 \
65 --with-headers=${CLFS}/tools/include --cache-file=config.cache \
66 --with-binutils=${CLFS}/cross-tools/${CLFS_TARGET}/bin</userinput></screen>
67
68 <note os="e1">
69 <para><emphasis>Any</emphasis> error message you see about nptl at this point
70 can safely be ignored.</para>
71 </note>
72
73 <variablelist os="ca">
74 <title>The meaning of the configure options:</title>
75
76 <varlistentry os="ca1">
77 <term><parameter>CC=gcc</parameter></term>
78 <listitem>
79 <para>Tells Glibc to use the host's GCC compiler.</para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry os="ca2">
84 <term><parameter>--prefix=/tools</parameter></term>
85 <listitem>
86 <para>This tells the configure script to prepare to install the
87 package in the <filename class="directory">/tools</filename>
88 directory.</para>
89 </listitem>
90 </varlistentry>
91
92 <varlistentry os="ca3">
93 <term><parameter>--build=${CLFS_HOST}</parameter></term>
94 <listitem>
95 <para>When used with --host, this creates a cross-architecture
96 executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para>
97 </listitem>
98 </varlistentry>
99
100 <varlistentry os="ca4">
101 <term><parameter>--host=${CLFS_TARGET}</parameter></term>
102 <listitem>
103 <para>When used with --build, this creates a cross-architecture
104 executable that creates files for ${CLFS_TARGET} but runs on ${CLFS_HOST}.</para>
105 </listitem>
106 </varlistentry>
107
108 <varlistentry os="ca5">
109 <term><parameter>--disable-sanity-checks</parameter></term>
110 <listitem>
111 <para>This switch disables any checks that are in place.</para>
112 </listitem>
113 </varlistentry>
114
115 <varlistentry os="ca6">
116 <term><parameter>--enable-kernel=2.6.0</parameter></term>
117 <listitem>
118 <para>This tells Glibc to compile the library with support
119 for 2.6.x Linux kernels.</para>
120 </listitem>
121 </varlistentry>
122
123 <varlistentry os="ca7">
124 <term><parameter>--with-headers=${CLFS}/tools/include</parameter></term>
125 <listitem>
126 <para>This tells Glibc to compile itself against the headers
127 recently installed to the <filename class="directory">${CLFS}/tools</filename>
128 directory, so that it knows exactly what features the kernel has
129 and can optimize itself accordingly.</para>
130 </listitem>
131 </varlistentry>
132
133 <varlistentry os="ca8">
134 <term><parameter>--with-binutils=${CLFS}/cross-tools/${CLFS_TARGET}/bin</parameter></term>
135 <listitem>
136 <para>This tells Glibc to use the Binutils for our specific target architecture.</para>
137 </listitem>
138 </varlistentry>
139
140 </variablelist>
141
142 <para os="cb">Now, install the headers:</para>
143
144<screen os="cd"><userinput>make install-headers</userinput></screen>
145
146 <para os="ce">Some files aren't installed by the above command, so
147 we will copy the additional header files we need.</para>
148
149 <para os="cf">First we will copy a common file over to <filename
150 class="directory">${CLFS}/tools/include</filename>:</para>
151
152<screen os="cg"><userinput>install -dv ${CLFS}/tools/include/bits
153cp -v bits/stdio_lim.h ${CLFS}/tools/include/bits</userinput></screen>
154
155 <para os="ch">Now we will create a blank stub file:</para>
156
157<screen os="ci"><userinput>touch ${CLFS}/tools/include/gnu/stubs.h</userinput></screen>
158
159 <para os="cj">Another header is needed for NPTL:</para>
160
161<screen><userinput>cp -v ../glibc-&glibc-version;/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h \
162 ${CLFS}/tools/include/bits/</userinput></screen>
163
164 </sect2>
165
166 <sect2 role="content">
167 <title/>
168
169 <para>Details on this package are located in <xref
170 linkend="contents-glibc" role="."/></para>
171
172 </sect2>
173
174</sect1>
Note: See TracBrowser for help on using the repository browser.