⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glibc-n32.html

📁 CLFS(Cross-Compiled Linux From Scratch)的文档 Version CLFS-SVN-20060417
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">  <head>    <meta http-equiv="Content-Type" content=    "application/xhtml+xml; charset=iso-8859-1" />    <title>      10.7.&nbsp;Glibc-2.4 N32    </title>    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />    <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" />    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=    "text/css" media="print" />  </head>  <body id="lfs" class="CLFS-SVN-20060417-MIPS64-Multilib">    <div class="navheader">      <div class="headertitles">        <h4>          Cross-Compiled Linux From Scratch - Version          CLFS-SVN-20060417-MIPS64-Multilib        </h4>        <h3>          Chapter&nbsp;10.&nbsp;Installing Basic System Software        </h3>      </div>      <ul class="headerlinks">        <li class="prev">          <a accesskey="p" href="glibc.html" title=          "Glibc-2.4 32 Bit Libraries">Prev</a>          <p>            Glibc-2.4 32 Bit Libraries          </p>        </li>        <li class="next">          <a accesskey="n" href="glibc-64bit.html" title=          "Glibc-2.4 64-Bit">Next</a>          <p>            Glibc-2.4 64-Bit          </p>        </li>        <li class="up">          <a accesskey="u" href="chapter.html" title=          "Chapter&nbsp;10.&nbsp;Installing Basic System Software">Up</a>.        </li>        <li class="home">          <a accesskey="h" href="../index.html" title=          "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS64-Multilib">          Home</a>        </li>      </ul>    </div>    <div class="wrap" lang="en" xml:lang="en">      <div class="titlepage">        <h1 class="sect1">          10.7. Glibc-2.4 N32        </h1>      </div>      <div class="package" lang="en" xml:lang="en">        <p>          The Glibc package contains the main C library. This library          provides the basic routines for allocating memory, searching          directories, opening and closing files, reading and writing files,          string handling, pattern matching, arithmetic, and so on.        </p>        <div class="segmentedlist">          <div class="seglistitem">            <div class="seg">              <strong><span class="segtitle">Installation depends              on:</span></strong> <span class="seg">Bash, Binutils,              Coreutils, Diffutils, Gawk, GCC, Gettext, Grep, Make, Patch,              Perl, Sed, and Texinfo</span>            </div>          </div>        </div>      </div>      <div class="installation" lang="en" xml:lang="en">        <div class="titlepage">          <h2 class="sect2">            10.7.1. Installation of Glibc          </h2>        </div>        <p>          The Glibc build system is self-contained and will install          perfectly, even though the compiler specs file and linker are still          pointing at <tt class="filename">/tools</tt>. The specs and linker          cannot be adjusted before the Glibc install because the Glibc          autoconf tests would give false results and defeat the goal of          achieving a clean build.        </p>        <p>          MIPS is no longer supported in the main glibc tree, so we have to          extract the glibc-ports-2.4 into our glibc-2.4 directory. Then we          move ports to the location expected by our build and patches.        </p>        <pre class="userinput"><kbd class="command">tar -jxvf glibc-ports-2.4.tar.bz2mv -v glibc-ports-2.4 ports</kbd></pre>        <p>          The following patch fixes a link issues when building MIPS glibc:        </p>        <pre class="userinput"><kbd class="command">patch -Np1 -i ../glibc-2.4-mips_fixes-1.patch</kbd></pre>        <p>          The following patch removes the potential of localdef segfaulting:        </p>        <pre class="userinput"><kbd class="command">patch -Np1 -i ../glibc-2.4-localedef_segfault-1.patch</kbd></pre>        <p>          The following sed fixes a build issue with Glibc. This will prevent          nscd from trying to link to libraries that don't exist:        </p>        <pre class="userinput"><kbd class="command">cp nscd/Makefile{,.orig}sed -e "/nscd_stat.o: sysincludes = # nothing/d" nscd/Makefile.orig &gt; \nscd/Makefile</kbd></pre>        <p>          The Glibc documentation recommends building Glibc outside of the          source directory in a dedicated build directory:        </p>        <pre class="userinput"><kbd class="command">mkdir -v ../glibc-buildcd ../glibc-build</kbd></pre>        <p>          Now we make sure the Glibc goes into <tt class=          "filename">/lib32</tt>:        </p>        <pre class="userinput"><kbd class="command">echo "slibdir=/lib32" &gt;&gt; configparms</kbd></pre>        <p>          Prepare Glibc for compilation:        </p>        <pre class="userinput"><kbd class="command">CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" \    ../glibc-2.4/configure --prefix=/usr \    --disable-profile --enable-add-ons --enable-kernel=2.6.0 \    --libexecdir=/usr/lib32/glibc --libdir=/usr/lib32</kbd></pre>        <div class="variablelist">          <p class="title">            <b>The meaning of the new configure option:</b>          </p>          <dl>            <dt>              <span class="term"><em class=              "parameter"><tt>--libexecdir=/usr/lib32/glibc</tt></em></span>            </dt>            <dd>              <p>                This changes the location of the <span><strong class=                "command">pt_chown</strong></span> program from its default                of <tt class="filename">/usr/libexec</tt> to <tt class=                "filename">/usr/lib32/glibc</tt>.              </p>            </dd>          </dl>        </div>        <p>          Compile the package:        </p>        <pre class="userinput"><kbd class="command">make</kbd></pre>        <div class="important">          <div class="admonhead">            <img alt="[Important]" src="../images/important.png" />            <h3 class="admontitle">              Important            </h3>          </div>          <div class="admonbody">            <p>              In this section, the test suite for Glibc is considered              critical. Do not skip it under any circumstance.            </p>          </div>        </div>        <p>          Test the results:        </p>        <pre class="userinput"><kbd class="command">make check</kbd></pre>        <p>          The Glibc test suite is highly dependent on certain functions of          the host system, in particular the kernel. In general, the Glibc          test suite is always expected to pass. However, in certain          circumstances, some failures are unavoidable. This is a list of the          most common issues:        </p>        <div class="itemizedlist">          <ul>            <li>              <p>                The <span class="emphasis"><em>math</em></span> tests                sometimes fail. Certain optimization settings are known to be                a factor here.              </p>            </li>            <li>              <p>                The <span class="emphasis"><em>gettext</em></span> test                sometimes fails due to host system issues. The exact reasons                are not yet clear.              </p>            </li>            <li>              <p>                If you have mounted the LFS partition with the <em class=                "parameter"><tt>noatime</tt></em> option, the <span class=                "emphasis"><em>atime</em></span> test will fail. As mentioned                in <a href="../partitioning/mounting.html" title=                "2.4.&nbsp;Mounting the New Partition">Section&nbsp;2.4,                &ldquo;Mounting the New Partition&rdquo;</a>, do not use the                <em class="parameter"><tt>noatime</tt></em> option while                building LFS.              </p>            </li>            <li>              <p>                When running on older and slower hardware, some tests can                fail because of test timeouts being exceeded.              </p>            </li>          </ul>        </div>        <p>          Install the package:        </p>        <pre class="userinput"><kbd class="command">make install</kbd></pre>      </div>      <div class="content" lang="en" xml:lang="en">        <p>          Details on this package are located in <a href=          "glibc-64bit.html#contents-glibc" title=          "10.8.5.&nbsp;Contents of Glibc">Section&nbsp;10.8.5,          &ldquo;Contents of Glibc.&rdquo;</a>        </p>      </div>    </div>    <div class="navfooter">      <ul>        <li class="prev">          <a accesskey="p" href="glibc.html" title=          "Glibc-2.4 32 Bit Libraries">Prev</a>          <p>            Glibc-2.4 32 Bit Libraries          </p>        </li>        <li class="next">          <a accesskey="n" href="glibc-64bit.html" title=          "Glibc-2.4 64-Bit">Next</a>          <p>            Glibc-2.4 64-Bit          </p>        </li>        <li class="up">          <a accesskey="u" href="chapter.html" title=          "Chapter&nbsp;10.&nbsp;Installing Basic System Software">Up</a>.        </li>        <li class="home">          <a accesskey="h" href="../index.html" title=          "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS64-Multilib">          Home</a>.        </li>      </ul>    </div>  </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -