diff --git a/chapter03/packages.xml b/chapter03/packages.xml index ceeb88b47..23029b540 100644 --- a/chapter03/packages.xml +++ b/chapter03/packages.xml @@ -477,15 +477,6 @@ - - LLVM-cmake Modules (&llvm-cmake-version;) - &llvm-cmake-size;: - - Home page: - Download: - MD5 sum: &llvm-cmake-md5; - - - LLVM (&llvm-version;) - &llvm-size;: @@ -495,6 +486,15 @@ + + LLVM CMake Modules (&llvm-version;) - &llvm-cmake-size;: + + Home page: + Download: + MD5 sum: &llvm-cmake-md5; + + + M4 (&m4-version;) - &m4-size;: 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 + diff --git a/packages.ent b/packages.ent index a4ddd10ca..49a789ec6 100644 --- a/packages.ent +++ b/packages.ent @@ -466,6 +466,12 @@ + + + + +