Index: chapter08/binutils.xml
===================================================================
--- chapter08/binutils.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/binutils.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -139,6 +139,6 @@
           ultimately be located) is set to <filename
           class="directory">$(exec_prefix)/$(target_alias)</filename>. For
-          example, x86_64 machines would expand that to <filename
-          class="directory">/usr/x86_64-pc-linux-gnu</filename>. Because this is
+          example, ARM64 machines would expand that to <filename
+          class="directory">/usr/aarch64-unknown-linux-gnu</filename>. Because this is
           a custom system, this target-specific directory in <filename
           class="directory">/usr</filename> is not required. <filename
@@ -165,7 +165,5 @@
 <screen><userinput remap="test">grep '^FAIL:' $(find -name '*.log')</userinput></screen>
 
-    <para>Twelve tests fail in the gold test suite when the
-    <option>--enable-default-pie</option> and
-    <option>--enable-default-ssp</option> options are passed to GCC.
+    <para>
     <!-- Caused by egrep deprecation.  Note that we don't "patch" temp grep.
          And it seems unworthy to add a sed into temp grep just for one test
@@ -173,5 +171,5 @@
          anyway.)
          Will be fixed in 2.40 (upstream commit 67d1991). -->
-    The test named <filename>ar with versioned solib</filename> is also
+    The test named <filename>ar with versioned solib</filename> is
     known to fail.
     <!-- https://sourceware.org/bugzilla/show_bug.cgi?id=29107 -->
Index: chapter08/expect.xml
===================================================================
--- chapter08/expect.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/expect.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -48,4 +48,10 @@
   <sect2 role="installation">
     <title>Installation of Expect</title>
+
+    <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>Prepare Expect for compilation:</para>
Index: chapter08/findutils.xml
===================================================================
--- chapter08/findutils.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/findutils.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -48,18 +48,8 @@
     <para>Prepare Findutils for compilation:</para>
 
-<screen><userinput remap="configure">case $(uname -m) in
-    i?86)   TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
-    x86_64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
-esac</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
-
-      <varlistentry>
-        <term><command>TIME_32_BIT_OK=yes</command></term>
-        <listitem>
-          <para>This setting is needed for building on a 32 bit system.</para>
-        </listitem>
-      </varlistentry>
 
       <varlistentry>
Index: chapter08/gcc.xml
===================================================================
--- chapter08/gcc.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/gcc.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -55,13 +55,9 @@
     <screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-fixes-patch;</userinput></screen>
 -->
-    <para>If building on x86_64, change the default directory name for 64-bit
-    libraries to <quote>lib</quote>:</para>
-
-<screen><userinput remap="pre">case $(uname -m) in
-  x86_64)
-    sed -e '/m64=/s/lib64/lib/' \
-        -i.orig gcc/config/i386/t-linux64
-  ;;
-esac</userinput></screen>
+    <para>On ARM64 hosts, set the default directory name for
+    64-bit libraries to <quote>lib</quote>:</para>
+
+<screen><userinput remap="pre">sed -e '/lp64=/s/lib64/lib/' \
+    -i.orig gcc/config/aarch64/t-aarch64-linux</userinput></screen>
 
     <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
@@ -161,11 +157,49 @@
     <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
 
-    <para>Eleven tests in the i386 test suite for the gcc compiler are known to FAIL.
-    It's because the test files do not account for the
+    <para>In gcc tests, the tests related to
+    <filename>fuse_adrp_add_1.c</filename>,
+    <filename>pr63304_1.c</filename>,
+    <filename>pr70120-2.c</filename>,
+    <filename>pr78733.c</filename>,
+    <filename>pr78796.c</filename>,
+    <filename>pr79041-2.c</filename>,
+    <filename>pr94530.c</filename>,
+    <filename>pr94577.c</filename>,
+    <filename>reload-valid-spoff.c</filename>, and
+    many <filename>aapcs64</filename> tests are known to fail.
+    They are because the test files do not account for the
     <parameter>--enable-default-pie</parameter> option.</para>
 
-    <para>Four tests related to PR100400 may be reported
-    as both XPASS and FAIL when testing the g++ compiler; the test file
+    <para>In gcc tests, the tests related to
+    <filename>pr104005.c</filename>,
+    <filename>pr103147-10.C</filename>,
+    <filename>shrink_wrap_1.c</filename>,
+    <filename>stack-check-cfa-1.c</filename>,
+    <filename>stack-check-cfa-2.c</filename>,
+    <filename>test_frame_17.c</filename>, and
+    many <filename>sve/pcs</filename> tests are known
+    to fail.  The g++ test related to <filename>pr103147-10.C</filename>
+    is known to fail.  They are because the test files do not account for
+    the <parameter>--enable-default-ssp</parameter> option.</para>
+
+    <para>In g++, four tests related to PR100400 are known to be reported
+    as both XPASS and FAIL.  It's because the test file for this known issue
     is not well written.</para>
+
+    <!-- Already known via gcc-testresults@gcc.gnu.org -->
+    <para>On ARM64,
+    four g++ tests related to <filename>Waddress-5.C</filename>,
+    twelve g++ tests related to <filename>attrs-10.C</filename>,
+    four g++ tests related to <filename>declare-simd-8.C</filename>,
+    one gcc tests related to <filename>ssa-dom-thread-7.c</filename>,
+    one gcc tests related to <filename>fcsel_1.c</filename>,
+    one gcc tests related to <filename>mgeneral-regs_3.c</filename>, and
+    four gcc tests related to <filename>vqdmlalh_laneq*.c</filename>
+    are known to fail.</para>
+
+    <!-- Need further investigation -->
+    <para>Many gcc and g++ tests related to hwasan are known to fail.
+    And, two tests related to <filename>thread_leak1.c</filename> are known
+    to fail for both gcc and g++.</para>
 
     <para>A few unexpected failures cannot always be avoided. The GCC developers
@@ -224,5 +258,5 @@
   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>Now make sure that we're set up to use the correct start files:</para>
@@ -232,7 +266,7 @@
   <para>The output of the last command should be:</para>
 
-<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
-/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
-/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
+<screen><computeroutput>/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/Scrt1.o succeeded
+/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
+/usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
 
   <para>Depending on your machine architecture, the above may differ slightly.
@@ -251,7 +285,7 @@
 
 <screen><computeroutput>#include &lt;...&gt; search starts here:
- /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
+ /usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/include
  /usr/local/include
- /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
+ /usr/lib/gcc/aarch64-unknown-linux-gnu/&gcc-version;/include-fixed
  /usr/include</computeroutput></screen>
 
@@ -266,9 +300,9 @@
   be ignored, but otherwise the output of the last command should be:</para>
 
-<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
+<screen><computeroutput>SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib64")
 SEARCH_DIR("/usr/local/lib64")
 SEARCH_DIR("/lib64")
 SEARCH_DIR("/usr/lib64")
-SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
+SEARCH_DIR("/usr/aarch64-unknown-linux-gnu/lib")
 SEARCH_DIR("/usr/local/lib")
 SEARCH_DIR("/lib")
@@ -302,5 +336,5 @@
   platform-specific differences in dynamic linker name):</para>
 
-<screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
+<screen><computeroutput>found ld-linux-aarch64.so.1 at /usr/lib/ld-linux-aarch64.so.1</computeroutput></screen>
 
   <para>If the output does not appear as shown above or is not received
Index: chapter08/glibc.xml
===================================================================
--- chapter08/glibc.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/glibc.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -447,5 +447,5 @@
 
     <para>By default, the dynamic loader (<filename
-    class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
+    class="libraryfile">/lib/ld-linux-aarch64.so.1</filename>) searches through
     <filename class="directory">/usr/lib</filename> for dynamic libraries
     that are needed by programs as they are run. However, if there are
@@ -495,9 +495,9 @@
         <seg>gencat, getconf, getent, iconv, iconvconfig, ldconfig,
         ldd, lddlibc4,
-        ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2),
+        ld.so (symlink to ld-linux-aarch64[_be].so.1),
         locale, localedef, makedb, mtrace, nscd,
         pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
         zdump, and zic</seg>
-        <seg>ld-linux-x86-64.so.2, ld-linux.so.2,
+        <seg>ld-linux-aarch64[_be].so.1,
         libBrokenLocale.{a,so}, libanl.{a,so},
         libc.{a,so}, libc_nonshared.a, libc_malloc_debug.so,
Index: chapter08/gmp.xml
===================================================================
--- chapter08/gmp.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/gmp.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -41,13 +41,4 @@
   <sect2 role="installation">
     <title>Installation of GMP</title>
-
-    <note>
-      <para>If you are building for 32-bit x86, but you have a CPU which is
-      capable of running 64-bit code <emphasis>and</emphasis> you have specified
-      <envar>CFLAGS</envar> in the environment, the configure script will
-      attempt to configure for 64-bits and fail.
-      Avoid this by invoking the configure command below with
-<screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
-    </note>
 
     <note>
@@ -107,5 +98,5 @@
     applications using the gmp libraries with the message "Illegal
     instruction".  In this case, gmp should be reconfigured with the option
-    --build=x86_64-pc-linux-gnu and rebuilt.</para></caution>
+    --build=aarch64-unknown-linux-gnu and rebuilt.</para></caution>
 
     <para>Ensure that all 197 tests in the test suite passed.
Index: chapter08/grub.xml
===================================================================
--- chapter08/grub.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/grub.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -43,9 +43,20 @@
     <note>
       <para>
+        On ARM64 systems, the following instruction builds GRUB for UEFI.
+        But the built GRUB lacks some features because a few optional
+        dependencies of GRUB for UEFI is beyond the scope of LFS and not
+        installed yet.
+      </para>
+      <para>
+        If your system firmware does not support UEFI, you need to skip the
+        content of this page and try to figure out how to boot your system.
+      </para>
+      <para>
         If your system has UEFI support and you wish to boot LFS with UEFI,
         you can skip this package in LFS,
         and install GRUB with UEFI support (and its dependencies) by following
         the instructions on
-        <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>.
+        <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS page</ulink>
+        (with <parameter>--target=x86_64</parameter> removed).
       </para>
     </note>
Index: chapter08/kbd.xml
===================================================================
--- chapter08/kbd.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/kbd.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -45,4 +45,12 @@
     across the keymaps in the Kbd package. The following patch fixes this
     issue for i386 keymaps:</para>
+
+    <note>
+      <para>
+        Don't skip the patch just because it mentions "i386".  The keymaps
+        for the keyboards most common on the market (qwerty or dvorak) are
+        in "i386" catagory.
+      </para>
+    </note>
 
 <screen><userinput remap="pre">patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen>
Index: chapter08/libcap.xml
===================================================================
--- chapter08/libcap.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/libcap.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -60,6 +60,5 @@
           <para>This parameter sets the library directory to
           <filename>/usr/lib</filename> rather than
-          <filename>/usr/lib64</filename> on x86_64. It has no effect on
-          x86.</para>
+          <filename>/usr/lib64</filename> on ARM64.</para>
         </listitem>
       </varlistentry>
Index: chapter08/libelf.xml
===================================================================
--- chapter08/libelf.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/libelf.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -60,5 +60,5 @@
 
     <para>One test named <filename>run-low_high_pc.sh</filename> is known to
-    fail on 32-bit x86 systems.</para>
+    fail on ARM64 systems.</para>
 
     <para>Install only Libelf:</para>
Index: chapter08/libffi.xml
===================================================================
--- chapter08/libffi.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/libffi.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -78,6 +78,6 @@
           system, use the less capable system as a parameter. For details
           about alternative system types, see <ulink
-          url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'>
-          the x86 options in the GCC manual</ulink>.</para>
+          url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/AArch64-Options.html'>
+          the AArch64 options in the GCC manual</ulink>.</para>
         </listitem>
       </varlistentry>
@@ -102,4 +102,7 @@
 
 <screen><userinput remap="test">make check</userinput></screen>
+
+    <!-- https://github.com/libffi/libffi/actions/runs/3084390461/jobs/4986488117 -->
+    <para>90 tests are known to fail on ARM64.</para>
 
     <para>Install the package:</para>
Index: chapter08/stripping.xml
===================================================================
--- chapter08/stripping.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/stripping.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -47,6 +47,7 @@
   rationale to use the <command>install</command> command here.</para>
 
-  <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems
-  and ld-linux.so.2 on 32-bit systems.  The construct below selects the
+  <note><para>The ELF loader's name is ld-linux-aarch64.so.1 on
+  little-endian systems and ld-linux-aarch64_be.so.1 on big-endian systems.
+  The construct below selects the
   correct name for the current architecture, excluding anything ending
   with <quote>g</quote>, in case the commands below have already been
Index: chapter08/util-linux.xml
===================================================================
--- chapter08/util-linux.xml	(revision c8e374b510336132931a766bc07dc535cd9e775a)
+++ chapter08/util-linux.xml	(revision ed7a3952ff1c2457a2f870e6909eff8701f2c086)
@@ -127,5 +127,5 @@
         eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck,
         fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hexdump, hwclock,
-        i386, ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, lastb (link to
+        ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, lastb (link to
         last), ldattach, linux32, linux64, logger, look, losetup, lsblk, lscpu,
         lsipc, lsirq, lslocks, lslogins, lsmem, lsns, mcookie, mesg, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap,
@@ -135,5 +135,5 @@
         swapoff (link to swapon), swapon, switch_root, taskset, uclampset, ul,
         umount, uname26, unshare, utmpdump, uuidd, uuidgen, uuidparse, wall, wdctl, whereis,
-        wipefs, x86_64, and zramctl</seg>
+        wipefs, and zramctl</seg>
         <seg>libblkid.so, libfdisk.so, libmount.so,
         libsmartcols.so, and libuuid.so</seg>
@@ -507,14 +507,4 @@
       </varlistentry>
 
-      <varlistentry id="i386">
-        <term><command>i386</command></term>
-        <listitem>
-          <para>A symbolic link to setarch</para>
-          <indexterm zone="ch-system-util-linux i386">
-            <primary sortas="b-i386">i386</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="ionice">
         <term><command>ionice</command></term>
@@ -1255,14 +1245,4 @@
       </varlistentry>
 
-      <varlistentry id="x86_64">
-        <term><command>x86_64</command></term>
-        <listitem>
-          <para>A symbolic link to setarch</para>
-          <indexterm zone="ch-system-util-linux x86_64">
-            <primary sortas="b-x86_64">x86_64</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="zramctl">
         <term><command>zramctl</command></term>
