adjusting.po 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. # SOME DESCRIPTIVE TITLE
  2. # Copyright (C) YEAR Free Software Foundation, Inc.
  3. # This file is distributed under the same license as the PACKAGE package.
  4. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5. #
  6. #, fuzzy
  7. msgid ""
  8. msgstr ""
  9. "Project-Id-Version: PACKAGE VERSION\n"
  10. "POT-Creation-Date: 2020-06-17 12:44+0800\n"
  11. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  12. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  13. "Language-Team: LANGUAGE <LL@li.org>\n"
  14. "Language: \n"
  15. "MIME-Version: 1.0\n"
  16. "Content-Type: text/plain; charset=UTF-8\n"
  17. "Content-Transfer-Encoding: 8bit\n"
  18. #. type: Content of: <sect1><title>
  19. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:11
  20. msgid "Adjusting the Toolchain"
  21. msgstr ""
  22. #. type: Content of: <sect1><para>
  23. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:13
  24. msgid ""
  25. "Now that the final C libraries have been installed, it is time to adjust the "
  26. "toolchain so that it will link any newly compiled program against these new "
  27. "libraries."
  28. msgstr ""
  29. #. type: Content of: <sect1><para>
  30. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:17
  31. msgid ""
  32. "First, backup the <filename class=\"directory\">/tools</filename> linker, "
  33. "and replace it with the adjusted linker we made in chapter 5. We'll also "
  34. "create a link to its counterpart in <filename "
  35. "class=\"directory\">/tools/$(uname -m)-pc-linux-gnu/bin</filename>:"
  36. msgstr ""
  37. #. type: Content of: <sect1><screen>
  38. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:22
  39. #, no-wrap
  40. msgid ""
  41. "<userinput>mv -v /tools/bin/{ld,ld-old}\n"
  42. "mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old}\n"
  43. "mv -v /tools/bin/{ld-new,ld}\n"
  44. "ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput>"
  45. msgstr ""
  46. #. type: Content of: <sect1><para>
  47. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:27
  48. msgid ""
  49. "the next command amends the GCC specs file to achieve three goals: first "
  50. "point GCC to the new dynamic linker. Simply deleting all instances of "
  51. "<quote>/tools</quote> should leave us with the correct path to the dynamic "
  52. "linker. Second, let GCC know where to find the Glibc start files. Third, add "
  53. "the /usr/include directory at the end of the default search path, so that "
  54. "header files added in chapter 6 are found. A <command>sed</command> command "
  55. "accomplishes this:"
  56. msgstr ""
  57. #. type: Content of: <sect1><screen>
  58. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:35
  59. #, no-wrap
  60. msgid ""
  61. "<userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \\\n"
  62. " -e '/\\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \\\n"
  63. " -e '/\\*cpp:/{n;s@$@ -idirafter /usr/include@}' &gt; \\\n"
  64. " `dirname $(gcc --print-libgcc-file-name)`/specs</userinput>"
  65. msgstr ""
  66. #. type: Content of: <sect1><para>
  67. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:40
  68. msgid ""
  69. "It is a good idea to visually inspect the specs file to verify the intended "
  70. "change was actually made."
  71. msgstr ""
  72. #. type: Content of: <sect1><para>
  73. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:43
  74. msgid ""
  75. "It is imperative at this point to ensure that the basic functions (compiling "
  76. "and linking) of the adjusted toolchain are working as expected. To do this, "
  77. "perform the following sanity checks:"
  78. msgstr ""
  79. #. type: Content of: <sect1><screen>
  80. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:47
  81. #, no-wrap
  82. msgid ""
  83. "<userinput>echo 'int main(){}' &gt; dummy.c\n"
  84. "cc dummy.c -v -Wl,--verbose &amp;&gt; dummy.log\n"
  85. "readelf -l a.out | grep ': /lib'</userinput>"
  86. msgstr ""
  87. #. type: Content of: <sect1><para>
  88. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:51
  89. msgid ""
  90. "There should be no errors, and the output of the last command will be "
  91. "(allowing for platform-specific differences in the dynamic linker name):"
  92. msgstr ""
  93. #. type: Content of: <sect1><screen>
  94. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:55
  95. #, no-wrap
  96. msgid ""
  97. "<computeroutput>[Requesting program interpreter: "
  98. "/lib64/ld-linux-x86-64.so.2]</computeroutput>"
  99. msgstr ""
  100. #. type: Content of: <sect1><para>
  101. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:57
  102. msgid ""
  103. "Note that on 64-bit systems <filename class=\"directory\">/lib</filename> is "
  104. "the location of our dynamic linker, but is accessed via a symbolic link in "
  105. "/lib64."
  106. msgstr ""
  107. #. type: Content of: <sect1><note><para>
  108. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:61
  109. msgid "On 32-bit systems the interpreter should be /lib/ld-linux.so.2."
  110. msgstr ""
  111. #. type: Content of: <sect1><para>
  112. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:64
  113. msgid "Now make sure that we're setup to use the correct start files:"
  114. msgstr ""
  115. #. type: Content of: <sect1><screen>
  116. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:66
  117. #, no-wrap
  118. msgid "<userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput>"
  119. msgstr ""
  120. #. type: Content of: <sect1><para>
  121. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:68
  122. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:103
  123. msgid "The output of the last command should be:"
  124. msgstr ""
  125. #. type: Content of: <sect1><screen>
  126. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:70
  127. #, no-wrap
  128. msgid ""
  129. "<computeroutput>/usr/lib/../lib/crt1.o succeeded\n"
  130. "/usr/lib/../lib/crti.o succeeded\n"
  131. "/usr/lib/../lib/crtn.o succeeded</computeroutput>"
  132. msgstr ""
  133. #. type: Content of: <sect1><para>
  134. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:74
  135. msgid "Verify that the compiler is searching for the correct header files:"
  136. msgstr ""
  137. #. type: Content of: <sect1><screen>
  138. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:77
  139. #, no-wrap
  140. msgid "<userinput>grep -B4 '^ /usr/include' dummy.log</userinput>"
  141. msgstr ""
  142. #. type: Content of: <sect1><para>
  143. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:79
  144. msgid "This command should return the following output:"
  145. msgstr ""
  146. #. type: Content of: <sect1><screen>
  147. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:81
  148. #, no-wrap
  149. msgid ""
  150. "<computeroutput>#include &lt;...&gt; search starts here:\n"
  151. " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include\n"
  152. " /tools/include\n"
  153. " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed\n"
  154. " /usr/include</computeroutput>"
  155. msgstr ""
  156. #. type: Content of: <sect1><note><para>
  157. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:87
  158. msgid "On a 32 bit system, x86_64 is replaced with i686."
  159. msgstr ""
  160. #. type: Content of: <sect1><para>
  161. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:89
  162. msgid ""
  163. "Next, verify that the new linker is being used with the correct search "
  164. "paths:"
  165. msgstr ""
  166. #. type: Content of: <sect1><screen>
  167. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:91
  168. #, no-wrap
  169. msgid "<userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\\n|g'</userinput>"
  170. msgstr ""
  171. #. type: Content of: <sect1><para>
  172. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:93
  173. msgid ""
  174. "References to paths that have components with '-linux-gnu' should be "
  175. "ignored, but otherwise the output of the last command should be:"
  176. msgstr ""
  177. #. type: Content of: <sect1><screen>
  178. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:96
  179. #, no-wrap
  180. msgid ""
  181. "<computeroutput>SEARCH_DIR(\"/usr/lib\")\n"
  182. "SEARCH_DIR(\"/lib\")</computeroutput>"
  183. msgstr ""
  184. #. type: Content of: <sect1><para>
  185. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:99
  186. msgid "Next make sure that we're using the correct libc:"
  187. msgstr ""
  188. #. type: Content of: <sect1><screen>
  189. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:101
  190. #, no-wrap
  191. msgid "<userinput>grep \"/lib.*/libc.so.6 \" dummy.log</userinput>"
  192. msgstr ""
  193. #. type: Content of: <sect1><screen>
  194. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:105
  195. #, no-wrap
  196. msgid "<computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput>"
  197. msgstr ""
  198. #. type: Content of: <sect1><para>
  199. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:107
  200. msgid "Make sure GCC is using the correct dynamic linker:"
  201. msgstr ""
  202. #. type: Content of: <sect1><screen>
  203. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:109
  204. #, no-wrap
  205. msgid "<userinput>grep found dummy.log</userinput>"
  206. msgstr ""
  207. #. type: Content of: <sect1><para>
  208. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:111
  209. msgid ""
  210. "The output of the last command should be (allowing for platform-specific "
  211. "differences in dynamic linker name):"
  212. msgstr ""
  213. #. type: Content of: <sect1><screen>
  214. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:114
  215. #, no-wrap
  216. msgid ""
  217. "<computeroutput>found ld-linux-x86-64.so.2 at "
  218. "/lib/ld-linux-x86-64.so.2</computeroutput>"
  219. msgstr ""
  220. #. The most likely
  221. #. reason is that something went wrong with the specs file adjustment.
  222. #. type: Content of: <sect1><para>
  223. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:116
  224. msgid ""
  225. "If the output does not appear as shown above or is not received at all, then "
  226. "something is seriously wrong. Investigate and retrace the steps to find out "
  227. "where the problem is and correct it. Any issues will need to be resolved "
  228. "before continuing with the process."
  229. msgstr ""
  230. #. type: Content of: <sect1><para>
  231. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:122
  232. msgid "Once everything is working correctly, clean up the test files:"
  233. msgstr ""
  234. #. type: Content of: <sect1><screen>
  235. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:124
  236. #, no-wrap
  237. msgid "<userinput>rm -v dummy.c a.out dummy.log</userinput>"
  238. msgstr ""