[lfs] 01/01: Merge remote-tracking branch 'origin/trunk' into xry111/arm64

"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]>
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 xry111/arm64
in repository lfs.

commit ff1799e0e440db9a0bbdac296cd0391f42fec7e7
Merge: 82198bf24 7eb51d812
Author: Xi Ruoyao <[email protected]>
AuthorDate: Thu Jun 5 12:38:54 2025 +0800

    Merge remote-tracking branch 'origin/trunk' into xry111/arm64

 appendices/dependencies.xml                |  93 +++--
 chapter01/changelog.xml                    | 568 ++++++++---------------------
 chapter01/whatsnew.xml                     | 134 +++----
 chapter03/packages.xml                     |  18 +-
 chapter03/patches.xml                      |  40 +-
 chapter05/glibc.xml                        | 118 ++++--
 chapter05/libstdc++.xml                    |  14 +-
 chapter06/bash.xml                         |   4 +
 chapter06/diffutils.xml                    |  28 ++
 chapter06/gcc-pass2.xml                    |  36 +-
 chapter06/make.xml                         |  14 -
 chapter06/tar.xml                          |   4 +-
 chapter07/changingowner.xml                |   2 +-
 chapter07/python.xml                       |  14 +-
 chapter08/acl.xml                          |   4 +-
 chapter08/bc.xml                           |   6 +-
 chapter08/chapter08.xml                    |   2 +-
 chapter08/check.xml                        | 109 ------
 chapter08/coreutils.xml                    |   4 +
 chapter08/e2fsprogs.xml                    |  12 +-
 chapter08/expect.xml                       |   4 +-
 chapter08/gcc.xml                          |   5 +-
 chapter08/glibc.xml                        |  27 +-
 chapter08/gmp.xml                          |   4 +
 chapter08/gperf.xml                        |   6 +-
 chapter08/grub.xml                         |   6 +-
 chapter08/kbd.xml                          |   9 +-
 chapter08/kmod.xml                         |   1 -
 chapter08/libelf.xml                       |   7 +-
 chapter08/libffi.xml                       |  11 +-
 chapter08/libpipeline.xml                  |   5 +-
 chapter08/ncurses.xml                      |   6 +-
 chapter08/packaging.xml                    |  75 ++++
 chapter08/perl.xml                         |   4 +
 chapter08/pkgconf.xml                      |   4 +-
 chapter08/pkgmgt.xml                       |  33 +-
 chapter08/python.xml                       |  13 +-
 chapter08/stripping.xml                    |  28 +-
 chapter08/systemd.xml                      |   2 +-
 chapter08/tcl.xml                          |   6 +-
 chapter10/fstab.xml                        |   4 +-
 chapter11/reboot.xml                       |   9 +-
 general.ent                                |  12 +-
 lfs-latest-git.php                         |   5 +-
 packages.ent                               | 309 ++++++++--------
 part3intro/toolchaintechnotes.xml          | 194 ++++++----
 patches.ent                                |  44 ++-
 stylesheets/lfs-xsl/chunk-master.xsl       |   8 +-
 stylesheets/lfs-xsl/pdf/lfs-mixed.xsl      |  10 +
 stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl    |  10 +
 stylesheets/lfs-xsl/xhtml/lfs-sections.xsl |   2 +-
 51 files changed, 1012 insertions(+), 1075 deletions(-)

diff --cc chapter05/glibc.xml
index 7111ceb90,def63edf0..43aa5f1c8
--- a/chapter05/glibc.xml
+++ b/chapter05/glibc.xml
@@@ -178,32 -189,98 +167,101 @@@ cd       build</userinput></screen
  
  <screen><userinput remap="install">sed '/RTLDLIST=/s@/usr@@g' -i $LFS/usr/bin/ldd</userinput></screen>
  
-     <caution>
-       <para>At this point, it is imperative to stop and ensure that the basic
-       functions (compiling and linking) of the new toolchain are working as
-       expected. To perform a sanity check, run the following commands:</para>
+     <para>Now that our cross toolchain is in place, it is important to ensure
+     that compiling and linking will work as expected. We do this by performing
+     some sanity checks:</para>
  
- <screen><userinput>echo 'int main(){}' | $LFS_TGT-gcc -xc -
- readelf -l a.out | grep ld-linux</userinput></screen>
+ <screen><userinput>echo 'int main(){}' | $LFS_TGT-gcc -x c - -v -Wl,--verbose &amp;&gt; dummy.log
+ readelf -l a.out | grep ': /lib'</userinput></screen>
  
-       <para>If everything is working correctly, there should be no errors,
-       and the output of the last command will be of the form:</para>
+   <para>There should be no errors,
+   and the output of the last command will be (allowing for
+   platform-specific differences in the dynamic linker name):</para>
  
 -<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
 +<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]</computeroutput></screen>
 +
 +      <para>Note that for big-endian machines, the interpreter name will be
- 	  <filename>/lib/ld-linux-aarch64_be.so.1</filename>.</para>
++      <filename>/lib/ld-linux-aarch64_be.so.1</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 &lt;...&gt; 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
diff --cc chapter07/changingowner.xml
index 1e1a0ea1e,f29932694..6126c74bf
--- a/chapter07/changingowner.xml
+++ b/chapter07/changingowner.xml
@@@ -33,6 -33,9 +33,6 @@@
    user <systemitem class="username">root</systemitem> by running the following
    command:</para>
  
- <screen><userinput>chown -R --from &lfs-username; root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}</userinput></screen>
 -<screen><userinput>chown --from &lfs-username; -R root:root $LFS/{usr,var,etc,tools}
 -case $(uname -m) in
 -  x86_64) chown --from &lfs-username; -R root:root $LFS/lib64 ;;
 -esac</userinput></screen>
++<screen><userinput>chown -R --from &lfs-username; root:root $LFS/{usr,var,etc,tools}</userinput></screen>
  
  </sect1>
diff --cc chapter08/expect.xml
index 51fd20460,f23e7d8c4..2be9f65c7
--- a/chapter08/expect.xml
+++ b/chapter08/expect.xml
@@@ -67,15 -67,9 +67,15 @@@
      GDBM, and of course Expect itself) will fail catastrophically, and other
      subtle breakages may also happen.</para>
  
 +    <para>Update two config scripts to allow building this package for
 +    AArch64:</para>
 +
 +<screen><userinput remap="pre">tar -C tclconfig -xf ../autoconf-&autoconf-version;.tar.xz --strip-components=2 \
 +    autoconf-&autoconf-version;/build-aux/config.{guess,sub}</userinput></screen>
 +
-     <para>Now, make some changes to allow the package with gcc-14.1 or later:</para>
+     <para>Now, make some changes to allow the package with gcc-15.1 or later:</para>
  
- <screen><userinput remap="pre">patch -Np1 -i ../expect-&expect-version;-gcc14-1.patch</userinput></screen>
+ <screen><userinput remap="pre">patch -Np1 -i ../&expect-gcc15-patch;</userinput></screen>
  
      <para>Prepare Expect for compilation:</para>
  

-- 
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.