Index: chapter08/binutils.xml
===================================================================
--- chapter08/binutils.xml	(revision 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/binutils.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -110,6 +110,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
@@ -135,8 +135,4 @@
 
 <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>
 
  <!--    <para>Three tests in the gprofng suite are also known to fail.</para>-->
Index: chapter08/expect.xml
===================================================================
--- chapter08/expect.xml	(revision 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/expect.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -67,4 +67,10 @@
     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>Prepare Expect for compilation:</para>
Index: chapter08/gcc.xml
===================================================================
--- chapter08/gcc.xml	(revision 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/gcc.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -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>
@@ -174,4 +170,15 @@
 
     <para>
+    <!-- https://gcc.gnu.org/PR107915 and https://gcc.gnu.org/PR109353 -->
+    One test named <filename>contracts-tmpl-spec2.C</filename> is known to fail.
+    <!-- https://gcc.gnu.org/PR111224 -->
+    Some C++ module tests named <filename>xtreme-*</filename> are known to
+    fail.
+    </para>
+
+    <!-- Need further investigation -->
+    <para>Many gcc and g++ tests related to hwasan are known to fail.</para>
+
+    <para>
     Eight gcc tests (out of over 185,000):
     <!-- https://gcc.gnu.org/PR106375 --><filename>pr56837.c</filename>
@@ -187,8 +194,5 @@
     tests and 7 <filename>interception-malloc-test-1.C</filename> tests, are
     known to fail.
-
-    Additionally, several tests in the
-    <filename class='directory'>vect</filename> directory are known to fail
-    if the hardware does not support AVX.</para>
+    </para>
 
     <para>A few unexpected failures cannot always be avoided. The GCC developers
@@ -240,5 +244,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>
@@ -248,7 +252,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.
@@ -267,7 +271,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>
 
@@ -282,13 +286,13 @@
   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")
 SEARCH_DIR("/usr/lib");</computeroutput></screen>
-
+<!--
    <para>A 32-bit system may use a few other directories. For example, here
    is the output from an i686 machine:</para>
@@ -302,5 +306,5 @@
 SEARCH_DIR("/lib")
 SEARCH_DIR("/usr/lib");</computeroutput></screen>
-
+-->
   <para>Next make sure that we're using the correct libc:</para>
 
@@ -318,5 +322,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 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/glibc.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -574,5 +574,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
@@ -622,9 +622,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,
         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 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/gmp.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -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>
Index: chapter08/grub.xml
===================================================================
--- chapter08/grub.xml	(revision 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/grub.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -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 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/kbd.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -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 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/libcap.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -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/libffi.xml
===================================================================
--- chapter08/libffi.xml	(revision 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/libffi.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -77,6 +77,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>
Index: chapter08/stripping.xml
===================================================================
--- chapter08/stripping.xml	(revision 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/stripping.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -50,6 +50,7 @@
   rationale for using 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 <literal>g</literal>, in case the commands below have already been
Index: chapter08/util-linux.xml
===================================================================
--- chapter08/util-linux.xml	(revision 23f436750e4bf87e802b9b6015197db4ec2561cc)
+++ chapter08/util-linux.xml	(revision 328eb6f3bb69b85caef8d80aadbd486b9674c89e)
@@ -139,5 +139,5 @@
         eject, fallocate, fdisk, fincore, findfs, findmnt, flock, fsck,
         fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hardlink, hexdump, hwclock,
-        i386 (link to setarch), ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last, 
+        ionice, ipcmk, ipcrm, ipcs, irqtop, isosize, kill, last,
         lastb (link to last), ldattach, linux32 (link to setarch), linux64 (link to setarch),
         logger, look, losetup, lsblk, lscpu, lsipc, lsirq, lsfd, lslocks, lslogins,
@@ -148,5 +148,5 @@
         swapoff, swapon, switch_root, taskset, uclampset, ul,
         umount, uname26 (link to setarch), unshare, utmpdump, uuidd, uuidgen, uuidparse,
-        wall, wdctl, whereis, wipefs, x86_64 (link to setarch), and zramctl</seg>
+        wall, wdctl, whereis, wipefs, and zramctl</seg>
         <seg>libblkid.so, libfdisk.so, libmount.so,
         libsmartcols.so, and libuuid.so</seg>
@@ -531,14 +531,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>
@@ -1292,14 +1282,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>
