Przeglądaj źródła

chapter05: Translate libstdc++ instructions

Xi Ruoyao 7 lat temu
rodzic
commit
07326b7054
1 zmienionych plików z 36 dodań i 21 usunięć
  1. 36 21
      chapter05/libstdc++.xml

+ 36 - 21
chapter05/libstdc++.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
   <!ENTITY % general-entities SYSTEM "../general.ent">
@@ -24,8 +24,9 @@
   <sect2 role="package">
     <title/>
 
-    <para>Libstdc++ is the standard C++ library. It is needed for the correct
-    operation of the g++ compiler.</para>
+    <!--para>Libstdc++ is the standard C++ library. It is needed for the correct
+    operation of the g++ compiler.</para-->
+    <para>Libstdc++ 是 C++ 标准库,g++ 编译器的正常工作需要它。</para>
 
     <segmentedlist>
       <segtitle>&buildtime;</segtitle>
@@ -40,20 +41,24 @@
   </sect2>
 
   <sect2 role="installation">
-    <title>Installation of Target Libstdc++</title>
+    <title>安装目标系统的 Libstdc++</title>
 
     <note>
-      <para><application>Libstdc++</application> is part of the GCC sources.
+      <!--para><application>Libstdc++</application> is part of the GCC sources.
       You should first unpack the GCC tarball and change to the
-      <filename>gcc-&gcc-version;</filename> directory.</para>
+      <filename>gcc-&gcc-version;</filename> directory.</para-->
+      <para><application>Libstdc++</application> 是 GCC 源代码的一部分。
+		  您应该先解压 GCC 源码包并切换到解压出来的
+		  <filename>gcc-&gcc-version;</filename> 目录。</para>
     </note>
 
-    <para>Create a separate build directory for Libstdc++ and enter it:</para>
+    <!--para>Create a separate build directory for Libstdc++ and enter it:</para-->
+    <para>为 Libstdc++ 创建一个单独的构建目录,并进入它:</para>
 
 <screen><userinput remap="pre">mkdir -v build
 cd       build</userinput></screen>
 
-    <para>Prepare Libstdc++ for compilation:</para>
+    <para>准备编译 Libstdc++:</para>
 
 <screen><userinput remap="configure">../libstdc++-v3/configure           \
     --host=$LFS_TGT                 \
@@ -65,50 +70,60 @@ cd       build</userinput></screen>
     --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</userinput></screen>
 
     <variablelist>
-      <title>The meaning of the configure options:</title>
+      <title>配置选项的含义:</title>
 
       <varlistentry>
         <term><parameter>--host=...</parameter></term>
         <listitem>
-          <para>Indicates to use the cross compiler we have just built
-          instead of the one in <filename>/usr/bin</filename>.</para>
+          <!--para>Indicates to use the cross compiler we have just built
+          instead of the one in <filename>/usr/bin</filename>.</para-->
+	      <para>使用我们刚刚编译的交叉编译器,而不是
+			  <filename>/usr/bin</filename> 中的宿主系统编译器。</para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
         <term><parameter>--disable-libstdcxx-threads</parameter></term>
         <listitem>
-          <para>Since we have not yet built the C threads library, the C++
-          one cannot be built either.</para>
+          <!--para>Since we have not yet built the C threads library, the C++
+          one cannot be built either.</para-->
+	      <para>由于我们目前还没有构建 C 线程库,C++ 线程库也不能构建。
+		  </para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
         <term><parameter>--disable-libstdcxx-pch</parameter></term>
         <listitem>
-          <para>This switch prevents the installation of precompiled
-          include files, which are not needed at this stage.</para>
+          <!--para>This switch prevents the installation of precompiled
+          include files, which are not needed at this stage.</para-->
+          <para>这个开关防止安装预编译头文件,在这个阶段不需要它们。</para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
         <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term>
         <listitem>
-          <para>This is the location where the standard include files are
+          <!--para>This is the location where the standard include files are
           searched by the C++ compiler. In a normal build, this information
           is automatically passed to the Libstdc++ <command>configure</command>
           options from the top level directory. In our case, this information
-          must be explicitly given.</para>
+          must be explicitly given.</para-->
+          <para>这是 C++ 编译器搜索标准头文件的位置。在正常的构建过程中,
+			  这项信息被顶层目录构建系统自动传递给 Libstdc++
+			  <command>configure</command> 脚本。
+			  然而我们这里没有使用顶层构建系统,因此必须明确给出这项信息。
+		  </para>
         </listitem>
       </varlistentry>
 
     </variablelist>
 
-    <para>Compile libstdc++ by running:</para>
+    <para>运行下列命令编译 Libstdc++:</para>
 
 <screen><userinput remap="make">make</userinput></screen>
 
-    <para>Install the library:</para>
+    <para>安装这个库:</para>
 
 <screen><userinput remap="install">make install</userinput></screen>
 
@@ -117,8 +132,8 @@ cd       build</userinput></screen>
   <sect2 role="content">
     <title/>
 
-    <para>Details on this package are located in
-    <xref linkend="contents-gcc" role="."/></para>
+    <para>关于该软件包的详细信息可以在
+		<xref linkend="contents-gcc"/> 中找到。</para>
 
   </sect2>