[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" role="wrap"> |
---|
| 9 | <?dbhtml filename="glibc.html"?> |
---|
[3f8be484] | 10 | |
---|
[d785e9d] | 11 | <title>Glibc-&glibc-version;</title> |
---|
[3f8be484] | 12 | |
---|
[cbbd1e4] | 13 | <indexterm zone="ch-cross-tools-glibc"> |
---|
[d785e9d] | 14 | <primary sortas="a-Glibc">Glibc</primary> |
---|
[3f8be484] | 15 | <secondary>cross tools</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"> |
---|
[d785e9d] | 23 | <title>Installation of Glibc</title> |
---|
[3f8be484] | 24 | |
---|
[d785e9d] | 25 | <para os="da">It should be noted that compiling Glibc in any way other than |
---|
[3f8be484] | 26 | the method suggested in this book puts the stability of the system at |
---|
| 27 | risk.</para> |
---|
| 28 | |
---|
[dabbced] | 29 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
[cbbd1e4] | 30 | href="../../final-system/common/glibc.xml" |
---|
[3f8be484] | 31 | xpointer="xpointer(//*[@os='e'])"/> |
---|
| 32 | |
---|
[dabbced] | 33 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
[cbbd1e4] | 34 | href="../../final-system/common/glibc.xml" |
---|
[3f8be484] | 35 | xpointer="xpointer(//*[@os='f'])"/> |
---|
| 36 | |
---|
[1863ad6] | 37 | <para os="dd">Add the following to <filename>config.cache</filename> |
---|
[d785e9d] | 38 | to disable ssp when building Glibc:</para> |
---|
[3f8be484] | 39 | |
---|
[1863ad6] | 40 | <screen os="de"><userinput>echo "libc_cv_ssp=no" > config.cache</userinput></screen> |
---|
[3f8be484] | 41 | |
---|
[dabbced] | 42 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" |
---|
[cbbd1e4] | 43 | href="../../final-system/common/glibc.xml" |
---|
[3f8be484] | 44 | xpointer="xpointer(//*[@os='g'])"/> |
---|
| 45 | |
---|
[07114c98] | 46 | <screen os="df"><userinput>BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" \ |
---|
| 47 | AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" \ |
---|
[cbbd1e4] | 48 | ../glibc-&glibc-version;/configure --prefix=/tools \ |
---|
[07114c98] | 49 | --host=${CLFS_TARGET} --build=${CLFS_HOST} \ |
---|
[782b8809] | 50 | --disable-profile --enable-kernel=&glibc-kernel-version; \ |
---|
| 51 | --with-binutils=/cross-tools/bin --with-headers=/tools/include \ |
---|
| 52 | --enable-obsolete-rpc --cache-file=config.cache</userinput></screen> |
---|
[3f8be484] | 53 | |
---|
[d3a4fc0] | 54 | <variablelist os="dg"> |
---|
[3f8be484] | 55 | <title>The meaning of the new configure options:</title> |
---|
| 56 | |
---|
[d3a4fc0] | 57 | <varlistentry os="dg1"> |
---|
[3f8be484] | 58 | <term><parameter>BUILD_CC="gcc"</parameter></term> |
---|
| 59 | <listitem> |
---|
[d785e9d] | 60 | <para>This sets Glibc to use the current compiler on our system. This is |
---|
| 61 | used to create the tools Glibc uses during its build.</para> |
---|
[3f8be484] | 62 | </listitem> |
---|
| 63 | </varlistentry> |
---|
| 64 | |
---|
[d3a4fc0] | 65 | <varlistentry os="dg2"> |
---|
[07114c98] | 66 | <term><parameter>CC="${CLFS_TARGET}-gcc"</parameter></term> |
---|
[3f8be484] | 67 | <listitem> |
---|
[d785e9d] | 68 | <para>This forces Glibc to use the GCC compiler that we made for our target |
---|
[d3a4fc0] | 69 | architecture.</para> |
---|
[3f8be484] | 70 | </listitem> |
---|
| 71 | </varlistentry> |
---|
| 72 | |
---|
[d3a4fc0] | 73 | <varlistentry os="dg3"> |
---|
[07114c98] | 74 | <term><parameter>AR="${CLFS_TARGET}-ar"</parameter></term> |
---|
[3f8be484] | 75 | <listitem> |
---|
[d785e9d] | 76 | <para>This forces Glibc to use the <command>ar</command> utility |
---|
[df709be] | 77 | we made for our target architecture.</para> |
---|
[3f8be484] | 78 | </listitem> |
---|
| 79 | </varlistentry> |
---|
| 80 | |
---|
[d3a4fc0] | 81 | <varlistentry os="dg4"> |
---|
[07114c98] | 82 | <term><parameter>RANLIB="${CLFS_TARGET}-ranlib"</parameter></term> |
---|
[3f8be484] | 83 | <listitem> |
---|
[d785e9d] | 84 | <para>This forces Glibc to use the <command>ranlib</command> utility |
---|
[df709be] | 85 | we made for our target architecture.</para> |
---|
[3f8be484] | 86 | </listitem> |
---|
| 87 | </varlistentry> |
---|
| 88 | |
---|
[d3a4fc0] | 89 | <varlistentry os="dg5"> |
---|
[3f8be484] | 90 | <term><parameter>--disable-profile</parameter></term> |
---|
| 91 | <listitem> |
---|
[24b004c] | 92 | <para>This builds the libraries without profiling information. |
---|
[e3196bd] | 93 | Omit this option if profiling on the temporary tools is necessary.</para> |
---|
[3f8be484] | 94 | </listitem> |
---|
| 95 | </varlistentry> |
---|
| 96 | |
---|
[d3a4fc0] | 97 | <varlistentry os="dg6"> |
---|
[11e2d29] | 98 | <term><parameter>--enable-kernel=&glibc-kernel-version;</parameter></term> |
---|
[c814e64] | 99 | <listitem> |
---|
[d785e9d] | 100 | <para>This tells Glibc to compile the library with support |
---|
[11e2d29] | 101 | for &glibc-kernel-version; and later Linux kernels.</para> |
---|
[c814e64] | 102 | </listitem> |
---|
| 103 | </varlistentry> |
---|
| 104 | |
---|
[782b8809] | 105 | <varlistentry os="dg7"> |
---|
[bc2e3fa] | 106 | <term><parameter>--with-binutils=/cross-tools/bin</parameter></term> |
---|
[3f8be484] | 107 | <listitem> |
---|
[d785e9d] | 108 | <para>This tells Glibc to use the Binutils that are specific to |
---|
[d3a4fc0] | 109 | our target architecture.</para> |
---|
[3f8be484] | 110 | </listitem> |
---|
| 111 | </varlistentry> |
---|
| 112 | |
---|
[782b8809] | 113 | <varlistentry os="dg8"> |
---|
[c814e64] | 114 | <term><parameter>--with-headers=/tools/include</parameter></term> |
---|
| 115 | <listitem> |
---|
[d785e9d] | 116 | <para>This tells Glibc to compile itself against the headers |
---|
[c814e64] | 117 | recently installed to the <filename class="directory">/tools</filename> |
---|
| 118 | directory, so that it knows exactly what features the kernel has |
---|
| 119 | and can optimize itself accordingly.</para> |
---|
| 120 | </listitem> |
---|
| 121 | </varlistentry> |
---|
| 122 | |
---|
[782b8809] | 123 | <varlistentry os="dg9"> |
---|
[e8a4711] | 124 | <term><parameter>--enable-obsolete-rpc</parameter></term> |
---|
| 125 | <listitem> |
---|
[d785e9d] | 126 | <para>This tells Glibc to install rpc headers that are not installed |
---|
[e8a4711] | 127 | by default but may be needed by other packages.</para> |
---|
| 128 | </listitem> |
---|
| 129 | </varlistentry> |
---|
| 130 | |
---|
[782b8809] | 131 | <varlistentry os="dg10"> |
---|
[3f8be484] | 132 | <term><parameter>--cache-file=config.cache</parameter></term> |
---|
| 133 | <listitem> |
---|
[d785e9d] | 134 | <para>This tells Glibc to utilize a premade cache file.</para> |
---|
[3f8be484] | 135 | </listitem> |
---|
| 136 | </varlistentry> |
---|
| 137 | |
---|
| 138 | </variablelist> |
---|
| 139 | |
---|
[d3a4fc0] | 140 | <para os="dh">During this stage the following warning might appear:</para> |
---|
[3f8be484] | 141 | |
---|
[d3a4fc0] | 142 | <blockquote os="di"><screen><computeroutput>configure: WARNING: |
---|
[3f8be484] | 143 | *** These auxiliary programs are missing or |
---|
| 144 | *** incompatible versions: msgfmt |
---|
| 145 | *** some features will be disabled. |
---|
| 146 | *** Check the INSTALL file for required versions.</computeroutput></screen></blockquote> |
---|
| 147 | |
---|
[d3a4fc0] | 148 | <para os="dj">The missing or incompatible <command>msgfmt</command> program is |
---|
[3f8be484] | 149 | generally harmless. This <command>msgfmt</command> program is part of the |
---|
[f8a80b5] | 150 | Gettext package which the host distribution should provide. You might also |
---|
| 151 | see a similar (also harmless) message about missing |
---|
| 152 | <command>autoconf</command>.</para> |
---|
[3f8be484] | 153 | |
---|
[d3a4fc0] | 154 | <para os="dk">Compile the package:</para> |
---|
[3f8be484] | 155 | |
---|
[d3a4fc0] | 156 | <screen os="dl"><userinput>make</userinput></screen> |
---|
[3f8be484] | 157 | |
---|
[d3a4fc0] | 158 | <para os="dm">Install the package:</para> |
---|
[3f8be484] | 159 | |
---|
[f5706e7] | 160 | <screen os="dn"><userinput>make install</userinput></screen> |
---|
[3f8be484] | 161 | |
---|
| 162 | </sect2> |
---|
| 163 | |
---|
| 164 | <sect2 role="content"> |
---|
| 165 | <title/> |
---|
| 166 | |
---|
| 167 | <para>Details on this package are located in <xref |
---|
[cbbd1e4] | 168 | linkend="contents-glibc" role="."/></para> |
---|
[3f8be484] | 169 | |
---|
| 170 | </sect2> |
---|
| 171 | |
---|
| 172 | </sect1> |
---|