[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 |
|
---|
| 41 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 42 | href="../../final-system/common/glibc.xml"
|
---|
| 43 | xpointer="xpointer(//*[@os='e'])"/>
|
---|
| 44 |
|
---|
| 45 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 46 | href="../../final-system/common/glibc.xml"
|
---|
| 47 | xpointer="xpointer(//*[@os='f'])"/>
|
---|
| 48 |
|
---|
[6d4c909] | 49 | <para os="dd">For NPTL enabled systems the following lines need
|
---|
| 50 | to be added to <filename>config.cache</filename>:</para>
|
---|
[3f8be484] | 51 |
|
---|
| 52 | <screen os="de"><userinput>echo "libc_cv_forced_unwind=yes" > config.cache
|
---|
| 53 | echo "libc_cv_c_cleanup=yes" >> config.cache</userinput></screen>
|
---|
| 54 |
|
---|
| 55 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 56 | href="../../final-system/common/glibc.xml"
|
---|
| 57 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
| 58 |
|
---|
[d3a4fc0] | 59 | <screen os="df"><userinput>BUILD_CC="gcc" CC="${LFS_TARGET}-gcc" \
|
---|
[3f8be484] | 60 | AR="${LFS_TARGET}-ar" RANLIB="${LFS_TARGET}-ranlib" \
|
---|
| 61 | ../glibc-&glibc-version;/configure --prefix=/tools \
|
---|
| 62 | --host=${LFS_TARGET} --build=${LFS_HOST} \
|
---|
| 63 | --disable-profile --enable-add-ons \
|
---|
| 64 | --with-tls --enable-kernel=2.6.0 --with-__thread \
|
---|
| 65 | --with-binutils=/cross-tools/bin --with-headers=/tools/include \
|
---|
| 66 | --cache-file=config.cache</userinput></screen>
|
---|
| 67 |
|
---|
[d3a4fc0] | 68 | <variablelist os="dg">
|
---|
[3f8be484] | 69 | <title>The meaning of the new configure options:</title>
|
---|
| 70 |
|
---|
[d3a4fc0] | 71 | <varlistentry os="dg1">
|
---|
[3f8be484] | 72 | <term><parameter>BUILD_CC="gcc"</parameter></term>
|
---|
| 73 | <listitem>
|
---|
[6d4c909] | 74 | <para>This sets Glibc to use the current compiler on our system. This is
|
---|
| 75 | used to create the tools Glibc uses durings it's build.</para>
|
---|
[3f8be484] | 76 | </listitem>
|
---|
| 77 | </varlistentry>
|
---|
| 78 |
|
---|
[d3a4fc0] | 79 | <varlistentry os="dg2">
|
---|
[3f8be484] | 80 | <term><parameter>CC="${LFS_TARGET}-gcc"</parameter></term>
|
---|
| 81 | <listitem>
|
---|
[6d4c909] | 82 | <para>This forces Glibc to use the GCC complier that we made for our target
|
---|
[d3a4fc0] | 83 | architecture.</para>
|
---|
[3f8be484] | 84 | </listitem>
|
---|
| 85 | </varlistentry>
|
---|
| 86 |
|
---|
[d3a4fc0] | 87 | <varlistentry os="dg3">
|
---|
[3f8be484] | 88 | <term><parameter>AR="${LFS_TARGET}-ar"</parameter></term>
|
---|
| 89 | <listitem>
|
---|
[6d4c909] | 90 | <para>This forces Glibc to use the AR utility we made for our target
|
---|
[d3a4fc0] | 91 | architecture.</para>
|
---|
[3f8be484] | 92 | </listitem>
|
---|
| 93 | </varlistentry>
|
---|
| 94 |
|
---|
[d3a4fc0] | 95 | <varlistentry os="dg4">
|
---|
[3f8be484] | 96 | <term><parameter>RANLIB="${LFS_TARGET}-ranlib"</parameter></term>
|
---|
| 97 | <listitem>
|
---|
[6d4c909] | 98 | <para>This forces Glibc to use the RANLIB utility we made for our target
|
---|
[d3a4fc0] | 99 | architecture.</para>
|
---|
[3f8be484] | 100 | </listitem>
|
---|
| 101 | </varlistentry>
|
---|
| 102 |
|
---|
[d3a4fc0] | 103 | <varlistentry os="dg5">
|
---|
[3f8be484] | 104 | <term><parameter>--disable-profile</parameter></term>
|
---|
| 105 | <listitem>
|
---|
[d3a4fc0] | 106 | <para>This builds the libraries without profiling information.
|
---|
| 107 | Omit this option if profiling on the temporary tools is necessary.</para>
|
---|
[3f8be484] | 108 | </listitem>
|
---|
| 109 | </varlistentry>
|
---|
| 110 |
|
---|
[d3a4fc0] | 111 | <varlistentry os="dg6">
|
---|
[3f8be484] | 112 | <term><parameter>--enable-add-ons</parameter></term>
|
---|
| 113 | <listitem>
|
---|
[6d4c909] | 114 | <para>This tells Glibc to utilize all add-ons that are avaialble.</para>
|
---|
[3f8be484] | 115 | </listitem>
|
---|
| 116 | </varlistentry>
|
---|
| 117 |
|
---|
[d3a4fc0] | 118 | <varlistentry os="dg7">
|
---|
[3f8be484] | 119 | <term><parameter>--with-tls</parameter></term>
|
---|
| 120 | <listitem>
|
---|
[6d4c909] | 121 | <para>This tells Glibc to use Thread Local Storage.</para>
|
---|
[3f8be484] | 122 | </listitem>
|
---|
| 123 | </varlistentry>
|
---|
| 124 |
|
---|
[d3a4fc0] | 125 | <varlistentry os="dg8">
|
---|
[3f8be484] | 126 | <term><parameter>--with-__thread</parameter></term>
|
---|
| 127 | <listitem>
|
---|
[6d4c909] | 128 | <para>This tells Glibc to use use the __thread for libc and
|
---|
[d3a4fc0] | 129 | libpthread builds.</para>
|
---|
[3f8be484] | 130 | </listitem>
|
---|
| 131 | </varlistentry>
|
---|
| 132 |
|
---|
[d3a4fc0] | 133 | <varlistentry os="dg9">
|
---|
[3f8be484] | 134 | <term><parameter>--with-binutils=/cross-tools/bin</parameter></term>
|
---|
| 135 | <listitem>
|
---|
[6d4c909] | 136 | <para>This tells Glibc to use the Binutils that are specific to
|
---|
[d3a4fc0] | 137 | our target architecture.</para>
|
---|
[3f8be484] | 138 | </listitem>
|
---|
| 139 | </varlistentry>
|
---|
| 140 |
|
---|
[d3a4fc0] | 141 | <varlistentry os="dg10">
|
---|
[3f8be484] | 142 | <term><parameter>--cache-file=config.cache</parameter></term>
|
---|
| 143 | <listitem>
|
---|
[6d4c909] | 144 | <para>This tells Glibc to utilize a premade cache file.</para>
|
---|
[3f8be484] | 145 | </listitem>
|
---|
| 146 | </varlistentry>
|
---|
| 147 |
|
---|
| 148 | </variablelist>
|
---|
| 149 |
|
---|
[d3a4fc0] | 150 | <para os="dh">During this stage the following warning might appear:</para>
|
---|
[3f8be484] | 151 |
|
---|
[d3a4fc0] | 152 | <blockquote os="di"><screen><computeroutput>configure: WARNING:
|
---|
[3f8be484] | 153 | *** These auxiliary programs are missing or
|
---|
| 154 | *** incompatible versions: msgfmt
|
---|
| 155 | *** some features will be disabled.
|
---|
| 156 | *** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
|
---|
| 157 |
|
---|
[d3a4fc0] | 158 | <para os="dj">The missing or incompatible <command>msgfmt</command> program is
|
---|
[3f8be484] | 159 | generally harmless. This <command>msgfmt</command> program is part of the
|
---|
| 160 | Gettext package which the host distribution should provide.</para>
|
---|
| 161 |
|
---|
[d3a4fc0] | 162 | <para os="dk">Compile the package:</para>
|
---|
[3f8be484] | 163 |
|
---|
[d3a4fc0] | 164 | <screen os="dl"><userinput>make</userinput></screen>
|
---|
[3f8be484] | 165 |
|
---|
[d3a4fc0] | 166 | <para os="dm">Install the package:</para>
|
---|
[3f8be484] | 167 |
|
---|
[d3a4fc0] | 168 | <screen os="dn"><userinput>make install</userinput></screen>
|
---|
[3f8be484] | 169 |
|
---|
| 170 | </sect2>
|
---|
| 171 |
|
---|
| 172 | <sect2 role="content">
|
---|
| 173 | <title/>
|
---|
| 174 |
|
---|
| 175 | <para>Details on this package are located in <xref
|
---|
| 176 | linkend="contents-glibc" role="."/></para>
|
---|
| 177 |
|
---|
| 178 | </sect2>
|
---|
| 179 |
|
---|
| 180 | </sect1>
|
---|