diff --git a/chapter06/rustc.xml b/chapter06/rustc.xml
index 90f8b7a75..d1094e257 100644
--- a/chapter06/rustc.xml
+++ b/chapter06/rustc.xml
@@ -53,7 +53,13 @@ sed -i.orig compiler/rustc_target/src/spec/mod.rs \
-e '/targets!/a\ ("i586-lfs-linux-gnu", i586_lfs_linux_gnu),'
In the first pass, build Rustc as a cross compiler for
- $LFS_TGT. Create a suitable configuration:
+ $LFS_TGT. The cross compiler will link to LLVM Pass 1,
+ so we need to tell the dynamic linker of the host distro where to find
+ the LLVM Pass 1 dynamic library:
+
+export LD_LIBRARY_PATH=$LFS/tools/lib
+
+ Create a suitable configuration:
install -vm755 src/llvm-project/llvm/cmake/config.guess config.guess
cat > pass1.toml << EOF
@@ -163,6 +169,14 @@ python3 x.py install --keep-stage 0 \
--config pass2.toml
ln -sv rustc-&rustc-version; $LFS/opt/rustc
+
+ Clean up the environment:
+
+unset LD_LIBRARY_PATH
+