aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Trepl (Moody) <thomas@linuxfromscratch.org>2022-10-11 14:08:40 +0200
committerThomas Trepl (Moody) <thomas@linuxfromscratch.org>2022-10-11 14:08:40 +0200
commitd7c5e6cb66d4d7960d288782998a55764a6115fb (patch)
treef29c58aebea294d739f3dc493731c55999230da9
parent32f686fa8deae25846fa52914f37f091e9d41155 (diff)
parent4621dcbd904c67f2d261e4685d0723ad6652b775 (diff)
Merge branch 'xry111/rust-wip-20221008' of git.linuxfromscratch.org:lfs into xry111/rust-wip-20221008
-rw-r--r--chapter03/packages.xml14
-rw-r--r--chapter06/rustc.xml16
-rw-r--r--packages.ent6
3 files changed, 28 insertions, 8 deletions
diff --git a/chapter03/packages.xml b/chapter03/packages.xml
index ceeb88b47..23029b540 100644
--- a/chapter03/packages.xml
+++ b/chapter03/packages.xml
@@ -478,20 +478,20 @@
</varlistentry>
<varlistentry>
- <term>LLVM-cmake Modules (&llvm-cmake-version;) - <token>&llvm-cmake-size;</token>:</term>
+ <term>LLVM (&llvm-version;) - <token>&llvm-size;</token>:</term>
<listitem>
- <para>Home page: <ulink url="&llvm-cmake-home;"/></para>
- <para>Download: <ulink url="&llvm-cmake-url;"/></para>
- <para>MD5 sum: <literal>&llvm-cmake-md5;</literal></para>
+ <para>Home page: <ulink url="&llvm-home;"/></para>
+ <para>Download: <ulink url="&llvm-url;"/></para>
+ <para>MD5 sum: <literal>&llvm-md5;</literal></para>
</listitem>
</varlistentry>
<varlistentry>
- <term>LLVM (&llvm-version;) - <token>&llvm-size;</token>:</term>
+ <term>LLVM CMake Modules (&llvm-version;) - <token>&llvm-cmake-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&llvm-home;"/></para>
- <para>Download: <ulink url="&llvm-url;"/></para>
- <para>MD5 sum: <literal>&llvm-md5;</literal></para>
+ <para>Download: <ulink url="&llvm-cmake-url;"/></para>
+ <para>MD5 sum: <literal>&llvm-cmake-md5;</literal></para>
</listitem>
</varlistentry>
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),'</userinput></screen>
<para>In the first pass, build Rustc as a cross compiler for
- <envar>$LFS_TGT</envar>. Create a suitable configuration:</para>
+ <envar>$LFS_TGT</envar>. 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:</para>
+
+<screen><userinput remap="pre">export LD_LIBRARY_PATH=$LFS/tools/lib</userinput></screen>
+
+ <para>Create a suitable configuration:</para>
<screen><userinput remap="pre">install -vm755 src/llvm-project/llvm/cmake/config.guess config.guess
cat &gt; pass1.toml &lt;&lt; EOF<literal>
@@ -163,6 +169,14 @@ python3 x.py install --keep-stage 0 \
--config pass2.toml
ln -sv rustc-&rustc-version; $LFS/opt/rustc</userinput></screen>
+ <!-- Maybe we should just set LD_LIBRARY_PATH=$LFS/tools
+ during the entire chapter 5 and 6. But doing so will need to
+ modify .bashrc of lfs user. For now just unset it, so the manual
+ build is consistent with jhalfs. -->
+ <para>Clean up the environment:</para>
+
+<screen><userinput remap="make">unset LD_LIBRARY_PATH</userinput></screen>
+
</sect2>
<sect2 role="content">
diff --git a/packages.ent b/packages.ent
index a4ddd10ca..49a789ec6 100644
--- a/packages.ent
+++ b/packages.ent
@@ -466,6 +466,12 @@
<!ENTITY llvm-final-sbu "20 SBU">
<!ENTITY llvm-final-du "3,800 MB">
+<!-- TODO: if we merge Rust into trunk, create a symlink on anduin and
+ use &anduin-sources; instead -->
+<!ENTITY llvm-cmake-url "https://anduin.linuxfromscratch.org/BLFS/llvm/llvm-cmake-15.0.1.src.tar.xz">
+<!ENTITY llvm-cmake-md5 "8b768b6128baf4e6797ae54a10bc0ed2">
+<!ENTITY llvm-cmake-size "8 KB">
+
<!ENTITY m4-version "1.4.19">
<!ENTITY m4-size "1,617 KB">
<!ENTITY m4-url "&gnu;m4/m4-&m4-version;.tar.xz">