| Newsgroups |
gmane.linux.lfs.book |
| Message-ID |
<[email protected]> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch multilib
in repository lfs.
commit 9c1666c842a67d85ee264663a77df49402cd79d8
Merge: 7edc11e1e 8cd3ab533
Author: Thomas Trepl <[email protected]>
AuthorDate: Sat Mar 29 18:07:20 2025 +0100
Merge trunk
chapter05/glibc.xml | 116 +++++++++++++++++------
chapter08/gcc.xml | 5 +-
part3intro/toolchaintechnotes.xml | 194 +++++++++++++++++++++++++-------------
3 files changed, 220 insertions(+), 95 deletions(-)
diff --cc chapter05/glibc.xml
index 7b31f11ca,11d4cfce4..d84a8f57f
--- a/chapter05/glibc.xml
+++ b/chapter05/glibc.xml
@@@ -216,19 -202,85 +205,88 @@@ readelf -l a.out | grep ': /lib'</useri
<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
- <para arch="default">Note that for 32-bit machines, the interpreter name will be
- <filename>/lib/ld-linux.so.2</filename>.</para>
++ <para arch="default">Note that for 32-bit machines, the interpreter name will be
++ <filename>/lib/ld-linux.so.2</filename>.</para>
++
+ <para>Note that this path should not contain
+ <filename class='directory'>/mnt/lfs</filename> (or the value of
+ the <envar>LFS</envar> variable if you used a different one). The path is
+ resolved when the compiled program is executed, and that should only happen
+ after we enter the chroot environment where the kernel would consider
+ <filename class='directory'>$LFS</filename> as the root directory
+ (<filename class='directory'>/</filename>).</para>
+
+ <para>Now make sure that we're set up to use the correct start files:</para>
+
+ <screen><userinput>grep -E -o "$LFS/lib.*/S?crt[1in].*succeeded" dummy.log</userinput></screen>
+
+ <para>The output of the last command should be:</para>
+
+ <screen><computeroutput>/mnt/lfs/lib/../lib/Scrt1.o succeeded
+ /mnt/lfs/lib/../lib/crti.o succeeded
+ /mnt/lfs/lib/../lib/crtn.o succeeded</computeroutput></screen>
+
+ <para>Verify that the compiler is searching for the correct header
+ files:</para>
+
+ <screen><userinput>grep -B3 "^ $LFS/usr/include" dummy.log</userinput></screen>
+
+ <para>This command should return the following output:</para>
+
+ <screen><computeroutput>#include <...> search starts here:
+ /mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/&gcc-version;/include
+ /mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/&gcc-version;/include-fixed
+ /mnt/lfs/usr/include</computeroutput></screen>
+
+ <para>Again, the directory named after your target triplet may be
+ different than the above, depending on your system architecture.</para>
+
+ <para>Next, verify that the new linker is being used with the correct search paths:</para>
+
+ <screen><userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'</userinput></screen>
+
+ <para>References to paths that have components with '-linux-gnu' should
+ be ignored, but otherwise the output of the last command should be:</para>
+
+ <screen><computeroutput>SEARCH_DIR("=/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib64")
+ SEARCH_DIR("=/usr/local/lib64")
+ SEARCH_DIR("=/lib64")
+ SEARCH_DIR("=/usr/lib64")
+ SEARCH_DIR("=/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib")
+ SEARCH_DIR("=/usr/local/lib")
+ SEARCH_DIR("=/lib")
+ SEARCH_DIR("=/usr/lib");</computeroutput></screen>
+
+ <para>A 32-bit system may use a few other directories, but anyway
+ the important facet here is all the paths should begin with an equal sign
+ (<literal>=</literal>), which would be replaced with the sysroot
+ directory that we've configured for the linker.</para>
+
+ <para>Next make sure that we're using the correct libc:</para>
+
+ <screen><userinput>grep "/lib.*/libc.so.6 " dummy.log</userinput></screen>
+
+ <para>The output of the last command should be:</para>
+
+ <screen><computeroutput>attempt to open /mnt/lfs/usr/lib/libc.so.6 succeeded</computeroutput></screen>
+
+ <para>Make sure GCC is using the correct dynamic linker:</para>
+
+ <screen><userinput>grep found dummy.log</userinput></screen>
+
+ <para>The output of the last command should be (allowing for
+ platform-specific differences in dynamic linker name):</para>
- <para>If the output is not as shown above, or there is no output at all,
- then something is wrong. Investigate and retrace the steps to find out
- where the problem is and correct it. This issue must be resolved before
- continuing.</para>
+ <screen><computeroutput>found ld-linux-x86-64.so.2 at /mnt/lfs/usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
- <para>Once all is well, clean up the test file:</para>
+ <para>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 should be resolved before continuing with the process.</para>
- <screen><userinput>rm -v a.out</userinput></screen>
+ <para>Once everything is working correctly, clean up the test files:</para>
- </caution>
+ <screen><userinput>rm -v a.out dummy.log</userinput></screen>
<note><para>Building the packages in the next chapter will serve as an
additional check that the toolchain has been built properly. If some
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page