[3f8be484] | 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" role="wrap">
|
---|
| 9 | <?dbhtml filename="glibc.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Glibc-&glibc-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-cross-tools-glibc">
|
---|
| 14 | <primary sortas="a-Glibc">Glibc</primary>
|
---|
| 15 | <secondary>cross tools</secondary>
|
---|
| 16 | </indexterm>
|
---|
| 17 |
|
---|
[cf66ceae] | 18 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 19 | href="../../final-system/common/glibc.xml"
|
---|
| 20 | xpointer="xpointer(//*[@role='package'])"/>
|
---|
[3f8be484] | 21 |
|
---|
| 22 | <sect2 role="installation">
|
---|
| 23 | <title>Installation of Glibc</title>
|
---|
| 24 |
|
---|
| 25 | <para os="da">It should be noted that compiling Glibc in any way other than
|
---|
| 26 | the method suggested in this book puts the stability of the system at
|
---|
| 27 | risk.</para>
|
---|
| 28 |
|
---|
[6d4c909] | 29 | <para os="db">Disable linking to <filename>libgcc_eh</filename>:</para>
|
---|
[3f8be484] | 30 |
|
---|
| 31 | <screen os="dc"><userinput>patch -Np1 -i ../&glibc-libgcc_eh-patch;</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='c'])"/>
|
---|
| 36 |
|
---|
| 37 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 38 | href="../../final-system/common/glibc.xml"
|
---|
| 39 | xpointer="xpointer(//*[@os='d'])"/>
|
---|
| 40 |
|
---|
[dcc1eee2] | 41 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 42 | href="../../final-system/common/glibc.xml"
|
---|
| 43 | xpointer="xpointer(//*[@os='p1'])"/>
|
---|
| 44 |
|
---|
| 45 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 46 | href="../../final-system/common/glibc.xml"
|
---|
| 47 | xpointer="xpointer(//*[@os='p2'])"/>
|
---|
| 48 |
|
---|
[a33dbaa] | 49 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 50 | href="../../final-system/common/glibc.xml"
|
---|
| 51 | xpointer="xpointer(//*[@os='s1'])"/>
|
---|
| 52 |
|
---|
| 53 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 54 | href="../../final-system/common/glibc.xml"
|
---|
| 55 | xpointer="xpointer(//*[@os='s2'])"/>
|
---|
| 56 |
|
---|
[3f8be484] | 57 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 58 | href="../../final-system/common/glibc.xml"
|
---|
| 59 | xpointer="xpointer(//*[@os='e'])"/>
|
---|
| 60 |
|
---|
| 61 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 62 | href="../../final-system/common/glibc.xml"
|
---|
| 63 | xpointer="xpointer(//*[@os='f'])"/>
|
---|
| 64 |
|
---|
[0220731] | 65 | <para os="dd">The following lines need to be added to
|
---|
| 66 | <filename>config.cache</filename> for Glibc to support NPTL:</para>
|
---|
[3f8be484] | 67 |
|
---|
| 68 | <screen os="de"><userinput>echo "libc_cv_forced_unwind=yes" > config.cache
|
---|
| 69 | echo "libc_cv_c_cleanup=yes" >> config.cache</userinput></screen>
|
---|
| 70 |
|
---|
| 71 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 72 | href="../../final-system/common/glibc.xml"
|
---|
| 73 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
| 74 |
|
---|
[07114c98] | 75 | <screen os="df"><userinput>BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \
|
---|
| 76 | AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \
|
---|
[3f8be484] | 77 | ../glibc-&glibc-version;/configure --prefix=/tools \
|
---|
[07114c98] | 78 | --host=${CLFS_TARGET} --build=${CLFS_HOST} \
|
---|
[3f8be484] | 79 | --disable-profile --enable-add-ons \
|
---|
| 80 | --with-tls --enable-kernel=2.6.0 --with-__thread \
|
---|
| 81 | --with-binutils=/cross-tools/bin --with-headers=/tools/include \
|
---|
| 82 | --cache-file=config.cache</userinput></screen>
|
---|
| 83 |
|
---|
[d3a4fc0] | 84 | <variablelist os="dg">
|
---|
[3f8be484] | 85 | <title>The meaning of the new configure options:</title>
|
---|
| 86 |
|
---|
[d3a4fc0] | 87 | <varlistentry os="dg1">
|
---|
[3f8be484] | 88 | <term><parameter>BUILD_CC="gcc"</parameter></term>
|
---|
| 89 | <listitem>
|
---|
[6d4c909] | 90 | <para>This sets Glibc to use the current compiler on our system. This is
|
---|
[8a74dc5] | 91 | used to create the tools Glibc uses during its build.</para>
|
---|
[3f8be484] | 92 | </listitem>
|
---|
| 93 | </varlistentry>
|
---|
| 94 |
|
---|
[d3a4fc0] | 95 | <varlistentry os="dg2">
|
---|
[07114c98] | 96 | <term><parameter>CC="${CLFS_TARGET}-gcc"</parameter></term>
|
---|
[3f8be484] | 97 | <listitem>
|
---|
[df709be] | 98 | <para>This forces Glibc to use the GCC compiler that we made for our target
|
---|
[d3a4fc0] | 99 | architecture.</para>
|
---|
[3f8be484] | 100 | </listitem>
|
---|
| 101 | </varlistentry>
|
---|
| 102 |
|
---|
[d3a4fc0] | 103 | <varlistentry os="dg3">
|
---|
[07114c98] | 104 | <term><parameter>AR="${CLFS_TARGET}-ar"</parameter></term>
|
---|
[3f8be484] | 105 | <listitem>
|
---|
[df709be] | 106 | <para>This forces Glibc to use the <command>ar</command> utility
|
---|
| 107 | we made for our target architecture.</para>
|
---|
[3f8be484] | 108 | </listitem>
|
---|
| 109 | </varlistentry>
|
---|
| 110 |
|
---|
[d3a4fc0] | 111 | <varlistentry os="dg4">
|
---|
[07114c98] | 112 | <term><parameter>RANLIB="${CLFS_TARGET}-ranlib"</parameter></term>
|
---|
[3f8be484] | 113 | <listitem>
|
---|
[df709be] | 114 | <para>This forces Glibc to use the <command>ranlib</command> utility
|
---|
| 115 | we made for our target architecture.</para>
|
---|
[3f8be484] | 116 | </listitem>
|
---|
| 117 | </varlistentry>
|
---|
| 118 |
|
---|
[d3a4fc0] | 119 | <varlistentry os="dg5">
|
---|
[3f8be484] | 120 | <term><parameter>--disable-profile</parameter></term>
|
---|
| 121 | <listitem>
|
---|
[d3a4fc0] | 122 | <para>This builds the libraries without profiling information.
|
---|
| 123 | Omit this option if profiling on the temporary tools is necessary.</para>
|
---|
[3f8be484] | 124 | </listitem>
|
---|
| 125 | </varlistentry>
|
---|
| 126 |
|
---|
[d3a4fc0] | 127 | <varlistentry os="dg6">
|
---|
[3f8be484] | 128 | <term><parameter>--enable-add-ons</parameter></term>
|
---|
| 129 | <listitem>
|
---|
[e9e2255] | 130 | <para>This tells Glibc to utilize all add-ons that are
|
---|
| 131 | available.</para>
|
---|
[3f8be484] | 132 | </listitem>
|
---|
| 133 | </varlistentry>
|
---|
| 134 |
|
---|
[d3a4fc0] | 135 | <varlistentry os="dg7">
|
---|
[3f8be484] | 136 | <term><parameter>--with-tls</parameter></term>
|
---|
| 137 | <listitem>
|
---|
[6d4c909] | 138 | <para>This tells Glibc to use Thread Local Storage.</para>
|
---|
[3f8be484] | 139 | </listitem>
|
---|
| 140 | </varlistentry>
|
---|
| 141 |
|
---|
[d3a4fc0] | 142 | <varlistentry os="dg8">
|
---|
[3f8be484] | 143 | <term><parameter>--with-__thread</parameter></term>
|
---|
| 144 | <listitem>
|
---|
[6d4c909] | 145 | <para>This tells Glibc to use use the __thread for libc and
|
---|
[d3a4fc0] | 146 | libpthread builds.</para>
|
---|
[3f8be484] | 147 | </listitem>
|
---|
| 148 | </varlistentry>
|
---|
| 149 |
|
---|
[d3a4fc0] | 150 | <varlistentry os="dg9">
|
---|
[3f8be484] | 151 | <term><parameter>--with-binutils=/cross-tools/bin</parameter></term>
|
---|
| 152 | <listitem>
|
---|
[6d4c909] | 153 | <para>This tells Glibc to use the Binutils that are specific to
|
---|
[d3a4fc0] | 154 | our target architecture.</para>
|
---|
[3f8be484] | 155 | </listitem>
|
---|
| 156 | </varlistentry>
|
---|
| 157 |
|
---|
[d3a4fc0] | 158 | <varlistentry os="dg10">
|
---|
[3f8be484] | 159 | <term><parameter>--cache-file=config.cache</parameter></term>
|
---|
| 160 | <listitem>
|
---|
[6d4c909] | 161 | <para>This tells Glibc to utilize a premade cache file.</para>
|
---|
[3f8be484] | 162 | </listitem>
|
---|
| 163 | </varlistentry>
|
---|
| 164 |
|
---|
| 165 | </variablelist>
|
---|
| 166 |
|
---|
[d3a4fc0] | 167 | <para os="dh">During this stage the following warning might appear:</para>
|
---|
[3f8be484] | 168 |
|
---|
[d3a4fc0] | 169 | <blockquote os="di"><screen><computeroutput>configure: WARNING:
|
---|
[3f8be484] | 170 | *** These auxiliary programs are missing or
|
---|
| 171 | *** incompatible versions: msgfmt
|
---|
| 172 | *** some features will be disabled.
|
---|
| 173 | *** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
|
---|
| 174 |
|
---|
[d3a4fc0] | 175 | <para os="dj">The missing or incompatible <command>msgfmt</command> program is
|
---|
[3f8be484] | 176 | generally harmless. This <command>msgfmt</command> program is part of the
|
---|
| 177 | Gettext package which the host distribution should provide.</para>
|
---|
| 178 |
|
---|
[d3a4fc0] | 179 | <para os="dk">Compile the package:</para>
|
---|
[3f8be484] | 180 |
|
---|
[d3a4fc0] | 181 | <screen os="dl"><userinput>make</userinput></screen>
|
---|
[3f8be484] | 182 |
|
---|
[d3a4fc0] | 183 | <para os="dm">Install the package:</para>
|
---|
[3f8be484] | 184 |
|
---|
[d3a4fc0] | 185 | <screen os="dn"><userinput>make install</userinput></screen>
|
---|
[3f8be484] | 186 |
|
---|
| 187 | </sect2>
|
---|
| 188 |
|
---|
| 189 | <sect2 role="content">
|
---|
| 190 | <title/>
|
---|
| 191 |
|
---|
| 192 | <para>Details on this package are located in <xref
|
---|
| 193 | linkend="contents-glibc" role="."/></para>
|
---|
| 194 |
|
---|
| 195 | </sect2>
|
---|
| 196 |
|
---|
| 197 | </sect1>
|
---|