123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- # SOME DESCRIPTIVE TITLE
- # Copyright (C) YEAR Free Software Foundation, Inc.
- # This file is distributed under the same license as the PACKAGE package.
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
- #
- #, fuzzy
- msgid ""
- msgstr ""
- "Project-Id-Version: PACKAGE VERSION\n"
- "POT-Creation-Date: 2020-06-17 12:44+0800\n"
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
- "Language-Team: LANGUAGE <LL@li.org>\n"
- "Language: \n"
- "MIME-Version: 1.0\n"
- "Content-Type: text/plain; charset=UTF-8\n"
- "Content-Transfer-Encoding: 8bit\n"
- #. type: Content of: <sect1><title>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:11
- msgid "Adjusting the Toolchain"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:13
- msgid ""
- "Now that the final C libraries have been installed, it is time to adjust the "
- "toolchain so that it will link any newly compiled program against these new "
- "libraries."
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:17
- msgid ""
- "First, backup the <filename class=\"directory\">/tools</filename> linker, "
- "and replace it with the adjusted linker we made in chapter 5. We'll also "
- "create a link to its counterpart in <filename "
- "class=\"directory\">/tools/$(uname -m)-pc-linux-gnu/bin</filename>:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:22
- #, no-wrap
- msgid ""
- "<userinput>mv -v /tools/bin/{ld,ld-old}\n"
- "mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old}\n"
- "mv -v /tools/bin/{ld-new,ld}\n"
- "ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:27
- msgid ""
- "the next command amends the GCC specs file to achieve three goals: first "
- "point GCC to the new dynamic linker. Simply deleting all instances of "
- "<quote>/tools</quote> should leave us with the correct path to the dynamic "
- "linker. Second, let GCC know where to find the Glibc start files. Third, add "
- "the /usr/include directory at the end of the default search path, so that "
- "header files added in chapter 6 are found. A <command>sed</command> command "
- "accomplishes this:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:35
- #, no-wrap
- msgid ""
- "<userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \\\n"
- " -e '/\\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \\\n"
- " -e '/\\*cpp:/{n;s@$@ -idirafter /usr/include@}' > \\\n"
- " `dirname $(gcc --print-libgcc-file-name)`/specs</userinput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:40
- msgid ""
- "It is a good idea to visually inspect the specs file to verify the intended "
- "change was actually made."
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:43
- msgid ""
- "It is imperative at this point to ensure that the basic functions (compiling "
- "and linking) of the adjusted toolchain are working as expected. To do this, "
- "perform the following sanity checks:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:47
- #, no-wrap
- msgid ""
- "<userinput>echo 'int main(){}' > dummy.c\n"
- "cc dummy.c -v -Wl,--verbose &> dummy.log\n"
- "readelf -l a.out | grep ': /lib'</userinput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:51
- msgid ""
- "There should be no errors, and the output of the last command will be "
- "(allowing for platform-specific differences in the dynamic linker name):"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:55
- #, no-wrap
- msgid ""
- "<computeroutput>[Requesting program interpreter: "
- "/lib64/ld-linux-x86-64.so.2]</computeroutput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:57
- msgid ""
- "Note that on 64-bit systems <filename class=\"directory\">/lib</filename> is "
- "the location of our dynamic linker, but is accessed via a symbolic link in "
- "/lib64."
- msgstr ""
- #. type: Content of: <sect1><note><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:61
- msgid "On 32-bit systems the interpreter should be /lib/ld-linux.so.2."
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:64
- msgid "Now make sure that we're setup to use the correct start files:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:66
- #, no-wrap
- msgid "<userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:68
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:103
- msgid "The output of the last command should be:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:70
- #, no-wrap
- msgid ""
- "<computeroutput>/usr/lib/../lib/crt1.o succeeded\n"
- "/usr/lib/../lib/crti.o succeeded\n"
- "/usr/lib/../lib/crtn.o succeeded</computeroutput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:74
- msgid "Verify that the compiler is searching for the correct header files:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:77
- #, no-wrap
- msgid "<userinput>grep -B4 '^ /usr/include' dummy.log</userinput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:79
- msgid "This command should return the following output:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:81
- #, no-wrap
- msgid ""
- "<computeroutput>#include <...> search starts here:\n"
- " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include\n"
- " /tools/include\n"
- " /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed\n"
- " /usr/include</computeroutput>"
- msgstr ""
- #. type: Content of: <sect1><note><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:87
- msgid "On a 32 bit system, x86_64 is replaced with i686."
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:89
- msgid ""
- "Next, verify that the new linker is being used with the correct search "
- "paths:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:91
- #, no-wrap
- msgid "<userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\\n|g'</userinput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:93
- msgid ""
- "References to paths that have components with '-linux-gnu' should be "
- "ignored, but otherwise the output of the last command should be:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:96
- #, no-wrap
- msgid ""
- "<computeroutput>SEARCH_DIR(\"/usr/lib\")\n"
- "SEARCH_DIR(\"/lib\")</computeroutput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:99
- msgid "Next make sure that we're using the correct libc:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:101
- #, no-wrap
- msgid "<userinput>grep \"/lib.*/libc.so.6 \" dummy.log</userinput>"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:105
- #, no-wrap
- msgid "<computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:107
- msgid "Make sure GCC is using the correct dynamic linker:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:109
- #, no-wrap
- msgid "<userinput>grep found dummy.log</userinput>"
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:111
- msgid ""
- "The output of the last command should be (allowing for platform-specific "
- "differences in dynamic linker name):"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:114
- #, no-wrap
- msgid ""
- "<computeroutput>found ld-linux-x86-64.so.2 at "
- "/lib/ld-linux-x86-64.so.2</computeroutput>"
- msgstr ""
- #. The most likely
- #. reason is that something went wrong with the specs file adjustment.
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:116
- msgid ""
- "If the output does not appear as shown above or is not received at all, then "
- "something is seriously wrong. Investigate and retrace the steps to find out "
- "where the problem is and correct it. Any issues will need to be resolved "
- "before continuing with the process."
- msgstr ""
- #. type: Content of: <sect1><para>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:122
- msgid "Once everything is working correctly, clean up the test files:"
- msgstr ""
- #. type: Content of: <sect1><screen>
- #: /home/xry111/svn-repos/LFS-BOOK/chapter08/adjusting.xml:124
- #, no-wrap
- msgid "<userinput>rm -v dummy.c a.out dummy.log</userinput>"
- msgstr ""
|