Changeset 4621dcb


Ignore:
Timestamp:
10/11/2022 11:39:08 AM (19 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/rust-wip-20221008
Children:
d7c5e6c
Parents:
44cb325a
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/rustc.xml

    r44cb325a r4621dcb  
    5454
    5555    <para>In the first pass, build Rustc as a cross compiler for
    56     <envar>$LFS_TGT</envar>.  Create a suitable configuration:</para>
     56    <envar>$LFS_TGT</envar>.  The cross compiler will link to LLVM Pass 1,
     57    so we need to tell the dynamic linker of the host distro where to find
     58    the LLVM Pass 1 dynamic library:</para>
     59
     60<screen><userinput remap="pre">export LD_LIBRARY_PATH=$LFS/tools/lib</userinput></screen>
     61
     62    <para>Create a suitable configuration:</para>
    5763
    5864<screen><userinput remap="pre">install -vm755 src/llvm-project/llvm/cmake/config.guess config.guess
     
    164170ln -sv rustc-&rustc-version; $LFS/opt/rustc</userinput></screen>
    165171
     172    <!-- Maybe we should just set LD_LIBRARY_PATH=$LFS/tools
     173         during the entire chapter 5 and 6.  But doing so will need to
     174         modify .bashrc of lfs user.  For now just unset it, so the manual
     175         build is consistent with jhalfs.  -->
     176    <para>Clean up the environment:</para>
     177
     178<screen><userinput remap="make">unset LD_LIBRARY_PATH</userinput></screen>
     179
    166180  </sect2>
    167181
Note: See TracChangeset for help on using the changeset viewer.