Merge branch 'xry111/rust-wip-20221008' of git.linuxfromscratch.org:lfs into xry111/rust-wip-20221008

This commit is contained in:
Thomas Trepl (Moody) 2022-10-11 14:08:40 +02:00
commit d7c5e6cb66
3 changed files with 30 additions and 10 deletions

View File

@ -477,15 +477,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>LLVM-cmake Modules (&llvm-cmake-version;) - <token>&llvm-cmake-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>
</listitem>
</varlistentry>
<varlistentry>
<term>LLVM (&llvm-version;) - <token>&llvm-size;</token>:</term>
<listitem>
@ -495,6 +486,15 @@
</listitem>
</varlistentry>
<varlistentry>
<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-cmake-url;"/></para>
<para>MD5 sum: <literal>&llvm-cmake-md5;</literal></para>
</listitem>
</varlistentry>
<varlistentry>
<term>M4 (&m4-version;) - <token>&m4-size;</token>:</term>
<listitem>

View File

@ -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">

View File

@ -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">