mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 11:49:20 +01:00
rust: temporary rustc: export LD_LIBRARY_PATH for LLVM Pass 1
Rustc Pass 1 links to LLVM Pass 1, but the building system does not set rpath for LLVM shared library (even if rpath = true is used). Explicitly tell the host dynamic linker to search $LFS/tools/lib so LLVM Pass 1 can be found. Thanks Moody for report.
This commit is contained in:
parent
44cb325aa2
commit
4621dcbd90
@ -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>
|
-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
|
<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
|
<screen><userinput remap="pre">install -vm755 src/llvm-project/llvm/cmake/config.guess config.guess
|
||||||
cat > pass1.toml << EOF<literal>
|
cat > pass1.toml << EOF<literal>
|
||||||
@ -163,6 +169,14 @@ python3 x.py install --keep-stage 0 \
|
|||||||
--config pass2.toml
|
--config pass2.toml
|
||||||
ln -sv rustc-&rustc-version; $LFS/opt/rustc</userinput></screen>
|
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>
|
||||||
|
|
||||||
<sect2 role="content">
|
<sect2 role="content">
|
||||||
|
Loading…
Reference in New Issue
Block a user