adjusting.po 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. msgid ""
  2. msgstr ""
  3. "Project-Id-Version: PACKAGE VERSION\n"
  4. "POT-Creation-Date: 2020-06-17 12:44+0800\n"
  5. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  6. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7. "Language-Team: LANGUAGE <LL@li.org>\n"
  8. "Language: zh_CN\n"
  9. "MIME-Version: 1.0\n"
  10. "Content-Type: text/plain; charset=UTF-8\n"
  11. "Content-Transfer-Encoding: 8bit\n"
  12. "X-Generator: Translate Toolkit 2.2.5\n"
  13. #. type: Content of: <sect1><title>
  14. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:11
  15. msgid "Adjusting the Toolchain"
  16. msgstr "调整工具链"
  17. #. type: Content of: <sect1><para>
  18. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:13
  19. msgid ""
  20. "Now that the final C libraries have been installed, it is time to adjust the "
  21. "toolchain so that it will link any newly compiled program against these new "
  22. "libraries."
  23. msgstr ""
  24. "现在最终的 C 运行库已经安装好了,这时就要调整工具链,以便将新编译的任何程序"
  25. "都链接到新的 C 运行库。"
  26. #. type: Content of: <sect1><para>
  27. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:17
  28. msgid ""
  29. "First, backup the <filename class=\"directory\">/tools</filename> linker, "
  30. "and replace it with the adjusted linker we made in chapter 5. We'll also "
  31. "create a link to its counterpart in <filename class=\"directory\">/tools/"
  32. "$(uname -m)-pc-linux-gnu/bin</filename>:"
  33. msgstr ""
  34. "首先,备份 <filename class=\"directory\">/tools</filename> 中的链接器,把它替"
  35. "换成第 5 章准备的调整好的链接器。我们也会把 <filename class=\"directory\">/"
  36. "tools/$(uname -m)-pc-linux-gnu/bin</filename> 中对应的链接器替换成一个符号链"
  37. "接:"
  38. #. type: Content of: <sect1><screen>
  39. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:22
  40. #, no-wrap
  41. msgid ""
  42. "<userinput>mv -v /tools/bin/{ld,ld-old}\n"
  43. "mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old}\n"
  44. "mv -v /tools/bin/{ld-new,ld}\n"
  45. "ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput>"
  46. msgstr ""
  47. "<userinput>mv -v /tools/bin/{ld,ld-old}\n"
  48. "mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old}\n"
  49. "mv -v /tools/bin/{ld-new,ld}\n"
  50. "ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput>"
  51. #. type: Content of: <sect1><para>
  52. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:27
  53. #, fuzzy
  54. msgid ""
  55. "the next command amends the GCC specs file to achieve three goals: first "
  56. "point GCC to the new dynamic linker. Simply deleting all instances of "
  57. "<quote>/tools</quote> should leave us with the correct path to the dynamic "
  58. "linker. Second, let GCC know where to find the Glibc start files. Third, add "
  59. "the /usr/include directory at the end of the default search path, so that "
  60. "header files added in chapter 6 are found. A <command>sed</command> command "
  61. "accomplishes this:"
  62. msgstr ""
  63. "下面修改 GCC 的 specs 文件,使其指向新的动态链接器。把所有的 <quote>/tools</"
  64. "quote> 删除掉就会留下正确的路径。另外,调整 specs 文件,使得 GCC 知道去哪里"
  65. "寻找正确的头文件和 Glibc 启动文件。一个 <command>sed</command> 命令即可完成以"
  66. "上工作:"
  67. #. type: Content of: <sect1><screen>
  68. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:35
  69. #, fuzzy, no-wrap
  70. msgid ""
  71. "<userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \\\n"
  72. " -e '/\\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \\\n"
  73. " -e '/\\*cpp:/{n;s@$@ -idirafter /usr/include@}' &gt; \\\n"
  74. " `dirname $(gcc --print-libgcc-file-name)`/specs</userinput>"
  75. msgstr ""
  76. "<userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \\\n"
  77. " -e '/\\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \\\n"
  78. " -e '/\\*cpp:/{n;s@$@ -isystem /usr/include@}' > \\\n"
  79. " `dirname $(gcc --print-libgcc-file-name)`/specs</userinput>"
  80. #. type: Content of: <sect1><para>
  81. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:40
  82. msgid ""
  83. "It is a good idea to visually inspect the specs file to verify the intended "
  84. "change was actually made."
  85. msgstr "这时最好浏览一下生成的 specs 文件,以确认确实进行了我们期望的修改。"
  86. #. type: Content of: <sect1><para>
  87. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:43
  88. msgid ""
  89. "It is imperative at this point to ensure that the basic functions (compiling "
  90. "and linking) of the adjusted toolchain are working as expected. To do this, "
  91. "perform the following sanity checks:"
  92. msgstr ""
  93. "现在的当务之急是保证调整过的工具链的基本功能(编译和链接) 能够像我们期望的那"
  94. "样工作。为此,进行下列完整性检查:"
  95. #. type: Content of: <sect1><screen>
  96. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:47
  97. #, no-wrap
  98. msgid ""
  99. "<userinput>echo 'int main(){}' &gt; dummy.c\n"
  100. "cc dummy.c -v -Wl,--verbose &amp;&gt; dummy.log\n"
  101. "readelf -l a.out | grep ': /lib'</userinput>"
  102. msgstr ""
  103. "<userinput>echo 'int main(){}' &gt; dummy.c\n"
  104. "cc dummy.c -v -Wl,--verbose &amp;&gt; dummy.log\n"
  105. "readelf -l a.out | grep ': /lib'</userinput>"
  106. #. type: Content of: <sect1><para>
  107. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:51
  108. #, fuzzy
  109. msgid ""
  110. "There should be no errors, and the output of the last command will be "
  111. "(allowing for platform-specific differences in the dynamic linker name):"
  112. msgstr ""
  113. "上述命令不应该出现错误,最后一行命令输出的结果应该 (不同平台的动态链接器名称"
  114. "可能不同)是:"
  115. #. type: Content of: <sect1><screen>
  116. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:55
  117. #, no-wrap
  118. msgid "<computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput>"
  119. msgstr "<computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput>"
  120. #. type: Content of: <sect1><para>
  121. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:57
  122. msgid ""
  123. "Note that on 64-bit systems <filename class=\"directory\">/lib</filename> is "
  124. "the location of our dynamic linker, but is accessed via a symbolic link in /"
  125. "lib64."
  126. msgstr ""
  127. "注意在 64 位系统上 <filename class=\"directory\">/lib</filename> 是动态链接器"
  128. "的位置,但通过 /lib64 中的符号链接访问。"
  129. #. type: Content of: <sect1><note><para>
  130. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:61
  131. msgid "On 32-bit systems the interpreter should be /lib/ld-linux.so.2."
  132. msgstr "在 32 位系统上,解释器是 /lib/ld-linux.so.2。"
  133. #. type: Content of: <sect1><para>
  134. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:64
  135. msgid "Now make sure that we're setup to use the correct start files:"
  136. msgstr "下面确认我们的设定能够使用正确的启动文件:"
  137. #. type: Content of: <sect1><screen>
  138. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:66
  139. #, no-wrap
  140. msgid "<userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput>"
  141. msgstr "<userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput>"
  142. #. type: Content of: <sect1><para>
  143. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:68
  144. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:103
  145. msgid "The output of the last command should be:"
  146. msgstr "以上命令应该输出:"
  147. #. type: Content of: <sect1><screen>
  148. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:70
  149. #, no-wrap
  150. msgid ""
  151. "<computeroutput>/usr/lib/../lib/crt1.o succeeded\n"
  152. "/usr/lib/../lib/crti.o succeeded\n"
  153. "/usr/lib/../lib/crtn.o succeeded</computeroutput>"
  154. msgstr ""
  155. "<computeroutput>/usr/lib/../lib/crt1.o succeeded\n"
  156. "/usr/lib/../lib/crti.o succeeded\n"
  157. "/usr/lib/../lib/crtn.o succeeded</computeroutput>"
  158. #. type: Content of: <sect1><para>
  159. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:74
  160. msgid "Verify that the compiler is searching for the correct header files:"
  161. msgstr "确认编译器能正确查找头文件:"
  162. #. type: Content of: <sect1><screen>
  163. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:77
  164. #, fuzzy, no-wrap
  165. msgid "<userinput>grep -B4 '^ /usr/include' dummy.log</userinput>"
  166. msgstr "<userinput>grep -B1 '^ /usr/include' dummy.log</userinput>"
  167. #. type: Content of: <sect1><para>
  168. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:79
  169. msgid "This command should return the following output:"
  170. msgstr "该命令应当输出:"
  171. #. type: Content of: <sect1><screen>
  172. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:81
  173. #, no-wrap
  174. msgid ""
  175. "<computeroutput>#include &lt;...&gt; search starts here:\n"
  176. " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include\n"
  177. " /tools/include\n"
  178. " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed\n"
  179. " /usr/include</computeroutput>"
  180. msgstr ""
  181. #. type: Content of: <sect1><note><para>
  182. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:87
  183. msgid "On a 32 bit system, x86_64 is replaced with i686."
  184. msgstr ""
  185. #. type: Content of: <sect1><para>
  186. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:89
  187. msgid ""
  188. "Next, verify that the new linker is being used with the correct search paths:"
  189. msgstr "下一步确认新的链接器使用了正确的搜索路径:"
  190. #. type: Content of: <sect1><screen>
  191. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:91
  192. #, no-wrap
  193. msgid "<userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\\n|g'</userinput>"
  194. msgstr "<userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\\n|g'</userinput>"
  195. #. type: Content of: <sect1><para>
  196. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:93
  197. msgid ""
  198. "References to paths that have components with '-linux-gnu' should be "
  199. "ignored, but otherwise the output of the last command should be:"
  200. msgstr "那些包含 '-linux-gnu' 的路径应该忽略,除此之外,以上命令应该输出:"
  201. #. type: Content of: <sect1><screen>
  202. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:96
  203. #, no-wrap
  204. msgid ""
  205. "<computeroutput>SEARCH_DIR(\"/usr/lib\")\n"
  206. "SEARCH_DIR(\"/lib\")</computeroutput>"
  207. msgstr ""
  208. "<computeroutput>SEARCH_DIR(\"/usr/lib\")\n"
  209. "SEARCH_DIR(\"/lib\")</computeroutput>"
  210. #. type: Content of: <sect1><para>
  211. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:99
  212. msgid "Next make sure that we're using the correct libc:"
  213. msgstr "之后确认我们使用了正确的 libc:"
  214. #. type: Content of: <sect1><screen>
  215. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:101
  216. #, no-wrap
  217. msgid "<userinput>grep \"/lib.*/libc.so.6 \" dummy.log</userinput>"
  218. msgstr "<userinput>grep \"/lib.*/libc.so.6 \" dummy.log</userinput>"
  219. #. type: Content of: <sect1><screen>
  220. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:105
  221. #, no-wrap
  222. msgid "<computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput>"
  223. msgstr "<computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput>"
  224. #. type: Content of: <sect1><para>
  225. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:107
  226. #, fuzzy
  227. msgid "Make sure GCC is using the correct dynamic linker:"
  228. msgstr "最后,确认 GCC 使用了正确的动态链接器:"
  229. #. type: Content of: <sect1><screen>
  230. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:109
  231. #, no-wrap
  232. msgid "<userinput>grep found dummy.log</userinput>"
  233. msgstr "<userinput>grep found dummy.log</userinput>"
  234. #. type: Content of: <sect1><para>
  235. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:111
  236. msgid ""
  237. "The output of the last command should be (allowing for platform-specific "
  238. "differences in dynamic linker name):"
  239. msgstr "以上命令应该输出(不同平台的动态链接器名称可能不同):"
  240. #. type: Content of: <sect1><screen>
  241. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:114
  242. #, no-wrap
  243. msgid "<computeroutput>found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2</computeroutput>"
  244. msgstr "<computeroutput>found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2</computeroutput>"
  245. #. The most likely
  246. #. reason is that something went wrong with the specs file adjustment.
  247. #. type: Content of: <sect1><para>
  248. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:116
  249. #, fuzzy
  250. msgid ""
  251. "If the output does not appear as shown above or is not received at all, then "
  252. "something is seriously wrong. Investigate and retrace the steps to find out "
  253. "where the problem is and correct it. Any issues will need to be resolved "
  254. "before continuing with the process."
  255. msgstr ""
  256. "如果输出和以上描述不符,或者根本没有输出,那么必然有什么地方出了严重错误。检"
  257. "查并重新跟踪以上步骤,找到问题的原因,并修复它。最可能的原因是修改 specs 文"
  258. "件的时候出了错误。这里出现的任何问题在继续构建前都必须解决。"
  259. #. type: Content of: <sect1><para>
  260. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:122
  261. msgid "Once everything is working correctly, clean up the test files:"
  262. msgstr "在确认一切工作良好后,删除测试文件:"
  263. #. type: Content of: <sect1><screen>
  264. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:124
  265. #, no-wrap
  266. msgid "<userinput>rm -v dummy.c a.out dummy.log</userinput>"
  267. msgstr "<userinput>rm -v dummy.c a.out dummy.log</userinput>"
  268. #~ msgid ""
  269. #~ "<computeroutput>#include &lt;...&gt; search starts here:\n"
  270. #~ " /usr/include</computeroutput>"
  271. #~ msgstr ""
  272. #~ "<computeroutput>#include &lt;...&gt; search starts here:\n"
  273. #~ " /usr/include</computeroutput>"