msgid "" msgstr "" "X-Pootle-Revision: 9999999\n" "X-Pootle-Path: /zh_CN/lfs/chapter06/gcc-pass2.po\n" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2020-08-19 23:33+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Translate Toolkit 2.2.5\n" #. type: Content of:
#, no-wrap msgid "&gcc-url;" msgstr "&gcc-url;" #. type: Content of: msgid "" "gcc-pass2 &gcc-version; " msgstr "" "gcc-pass2 &gcc-version; " #. type: Content of: msgid "GCC-&gcc-version; - Pass 2" msgstr "GCC-&gcc-version; - 第二遍" #. type: Content of: <sect1><indexterm><primary> msgid "GCC" msgstr "GCC" #. type: Content of: <sect1><indexterm><secondary> msgid "tools, pass 2" msgstr "工具,第二遍" #. type: Content of: <sect1><sect2><segmentedlist><segtitle> msgid "&buildtime;" msgstr "&buildtime;" #. type: Content of: <sect1><sect2><segmentedlist><segtitle> msgid "&diskspace;" msgstr "&diskspace;" #. type: Content of: <sect1><sect2><segmentedlist><seglistitem><seg> msgid "&gcc-tmpp2-sbu;" msgstr "&gcc-tmpp2-sbu;" #. type: Content of: <sect1><sect2><segmentedlist><seglistitem><seg> msgid "&gcc-tmpp2-du;" msgstr "&gcc-tmpp2-du;" #. type: Content of: <sect1><sect2><title> msgid "Installation of GCC" msgstr "安装 GCC" #. type: Content of: <sect1><sect2><para> msgid "" "As in the first build of GCC, the GMP, MPFR, and MPC packages are required. " "Unpack the tarballs and move them into the required directory names:" msgstr "" "就像第一次构建 GCC 时一样,它需要 GMP、MPFR 和 MPC 三个包。解压它们的源码包," "并将它们移动到 GCC 要求的目录名:" #. type: Content of: <sect1><sect2><screen> #, no-wrap msgid "" "<userinput remap=\"pre\">tar -xf ../mpfr-&mpfr-version;.tar.xz\n" "mv -v mpfr-&mpfr-version; mpfr\n" "tar -xf ../gmp-&gmp-version;.tar.xz\n" "mv -v gmp-&gmp-version; gmp\n" "tar -xf ../mpc-&mpc-version;.tar.gz\n" "mv -v mpc-&mpc-version; mpc</userinput>" msgstr "" "<userinput remap=\"pre\">tar -xf ../mpfr-&mpfr-version;.tar.xz\n" "mv -v mpfr-&mpfr-version; mpfr\n" "tar -xf ../gmp-&gmp-version;.tar.xz\n" "mv -v gmp-&gmp-version; gmp\n" "tar -xf ../mpc-&mpc-version;.tar.gz\n" "mv -v mpc-&mpc-version; mpc</userinput>" #. type: Content of: <sect1><sect2><para> msgid "" "If building on x86_64, change the default directory name for 64-bit " "libraries to <quote>lib</quote>:" msgstr "" "如果是在 x86_64 上构建,修改 64 位库文件的默认目录名为 <quote>lib</quote>:" #. type: Content of: <sect1><sect2><screen> #, no-wrap msgid "" "<userinput remap=\"pre\">case $(uname -m) in\n" " x86_64)\n" " sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64\n" " ;;\n" "esac</userinput>" msgstr "" "<userinput remap=\"pre\">case $(uname -m) in\n" " x86_64)\n" " sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64\n" " ;;\n" "esac</userinput>" #. type: Content of: <sect1><sect2><para> msgid "Create a separate build directory again:" msgstr "再次创建一个独立的构建目录:" #. type: Content of: <sect1><sect2><screen> #, no-wrap msgid "" "<userinput remap=\"pre\">mkdir -v build\n" "cd build</userinput>" msgstr "" "<userinput remap=\"pre\">mkdir -v build\n" "cd build</userinput>" #. type: Content of: <sect1><sect2><para> msgid "" "Create a symlink that allows libgcc to be built with posix threads support:" msgstr "创建一个符号链接,以允许 libgcc 在构建时启用 POSIX 线程支持:" #. type: Content of: <sect1><sect2><screen> #, no-wrap msgid "" "<userinput remap=\"pre\">mkdir -pv $LFS_TGT/libgcc\n" "ln -s ../../../libgcc/gthr-posix.h $LFS_TGT/libgcc/gthr-default.h</userinput>" msgstr "" "<userinput remap=\"pre\">mkdir -pv $LFS_TGT/libgcc\n" "ln -s ../../../libgcc/gthr-posix.h $LFS_TGT/libgcc/gthr-default.h</userinput>" #. type: Content of: <sect1><sect2><para> msgid "" "Before starting to build GCC, remember to unset any environment variables " "that override the default optimization flags." msgstr "在开始构建 GCC 前,记得清除所有覆盖默认优化开关的环境变量。" #. type: Content of: <sect1><sect2><para> msgid "Now prepare GCC for compilation:" msgstr "现在准备编译 GCC:" #. type: Content of: <sect1><sect2><screen> #, no-wrap msgid "" "<userinput remap=\"configure\">../configure \\\n" " --build=$(../config.guess) \\\n" " --host=$LFS_TGT \\\n" " --prefix=/usr \\\n" " CC_FOR_TARGET=$LFS_TGT-gcc \\\n" " --with-build-sysroot=$LFS \\\n" " --enable-initfini-array \\\n" " --disable-nls \\\n" " --disable-multilib \\\n" " --disable-decimal-float \\\n" " --disable-libatomic \\\n" " --disable-libgomp \\\n" " --disable-libquadmath \\\n" " --disable-libssp \\\n" " --disable-libvtv \\\n" " --disable-libstdcxx \\\n" " --enable-languages=c,c++</userinput>" msgstr "" "<userinput remap=\"configure\">../configure \\\n" " --build=$(../config.guess) \\\n" " --host=$LFS_TGT \\\n" " --prefix=/usr \\\n" " CC_FOR_TARGET=$LFS_TGT-gcc \\\n" " --with-build-sysroot=$LFS \\\n" " --enable-initfini-array \\\n" " --disable-nls \\\n" " --disable-multilib \\\n" " --disable-decimal-float \\\n" " --disable-libatomic \\\n" " --disable-libgomp \\\n" " --disable-libquadmath \\\n" " --disable-libssp \\\n" " --disable-libvtv \\\n" " --disable-libstdcxx \\\n" " --enable-languages=c,c++</userinput>" #. type: Content of: <sect1><sect2><variablelist><title> msgid "The meaning of the new configure options:" msgstr "配置选项的含义:" #. type: Content of: <sect1><sect2><variablelist><varlistentry><term> msgid "<parameter>-with-build-sysroot=$LFS</parameter>" msgstr "<parameter>-with-build-sysroot=$LFS</parameter>" #. type: Content of: <sect1><sect2><variablelist><varlistentry><listitem><para> msgid "" "Normally, using <parameter>--host</parameter> ensures that a cross-compiler " "is used for building GCC, and that compiler knows that it has to look for " "headers and libraries in <filename class=\"directory\">$LFS</filename>. But " "the build system of GCC uses other tools, which are not aware of this " "location. This switch is needed to have them find the needed files in " "<filename class=\"directory\">$LFS</filename>, and not on the host." msgstr "" "通常,使用 <parameter>--host</parameter> 即可保证使用交叉编译器构建 GCC,这个" "交叉编译器知道它应该在 <filename class=\"directory\">$LFS</filename> 中查找头" "文件和库。但是,GCC 构建系统使用其他一些工具,它们不知道这个位置。因此需要该" "选项告诉它们在 <filename class=\"directory\">$LFS</filename> 中查找需要的文" "件,而不是在宿主系统中查找。" #. type: Content of: <sect1><sect2><variablelist><varlistentry><term> msgid "<parameter>--enable-initfini-array</parameter>" msgstr "<parameter>--enable-initfini-array</parameter>" #. type: Content of: <sect1><sect2><variablelist><varlistentry><listitem><para> msgid "" "This option is automatically enabled when building a native compiler with a " "native compiler on x86. But here, we build with a cross compiler, so we need " "to explicitly set this option." msgstr "" "该选项在使用 x86 本地编译器构建另一个本地编译器时自动启用。然而我们使用交叉编" "译器进行编译,因此必须显式启用它。" #. type: Content of: <sect1><sect2><para> msgid "Compile the package:" msgstr "编译该软件包:" #. type: Content of: <sect1><sect2><screen> #, no-wrap msgid "<userinput remap=\"make\">make</userinput>" msgstr "<userinput remap=\"make\">make</userinput>" #. type: Content of: <sect1><sect2><para> msgid "Install the package:" msgstr "安装该软件包:" #. type: Content of: <sect1><sect2><screen> #, no-wrap msgid "<userinput remap=\"install\">make DESTDIR=$LFS install</userinput>" msgstr "<userinput remap=\"install\">make DESTDIR=$LFS install</userinput>" #. type: Content of: <sect1><sect2><para> msgid "" "As a finishing touch, create a utility symlink. Many programs and scripts " "run <command>cc</command> instead of <command>gcc</command>, which is used " "to keep programs generic and therefore usable on all kinds of UNIX systems " "where the GNU C compiler is not always installed. Running <command>cc</" "command> leaves the system administrator free to decide which C compiler to " "install:" msgstr "" "最后,还需要创建一个符号链接。许多程序和脚本运行 <command>cc</command> 而不" "是 <command>gcc</command>,因为前者能够保证程序的通用性,使它可以在所有 UNIX " "系统上使用,无论是否安装了 GNU C 编译器。运行 <command>cc</command> 可以将安" "装哪种 C 编译器的选择权留给系统管理员:" #. type: Content of: <sect1><sect2><screen> #, no-wrap msgid "<userinput remap=\"install\">ln -sv gcc $LFS/usr/bin/cc</userinput>" msgstr "<userinput remap=\"install\">ln -sv gcc $LFS/usr/bin/cc</userinput>" #. type: Content of: <sect1><sect2><para> msgid "" "Details on this package are located in <xref linkend=\"contents-gcc\" role=" "\".\"/>" msgstr "关于本软件包的更多信息可以在<xref linkend=\"contents-gcc\"/>中找到。"