Changeset bb0652ca


Ignore:
Timestamp:
04/16/2018 01:00:07 AM (6 years ago)
Author:
Ken Moffat <ken@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
ed9ef43f
Parents:
314919e
Message:

Attempt to make rustc build agaisnt system llvm for everyone.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@20087 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • general/prog/llvm.xml

    r314919e rbb0652ca  
    55  %general-entities;
    66
     7  <!ENTITY llvm-majmin "6.0"> <!-- used in an explanation -->
    78  <!ENTITY llvm-download-http "http://llvm.org/releases/&llvm-version;/llvm-&llvm-version;.src.tar.xz">
    89  <!ENTITY llvm-download-ftp  " ">
     
    196197      -DCMAKE_BUILD_TYPE=Release            \
    197198      -DLLVM_BUILD_LLVM_DYLIB=ON            \
     199      -DLLVM_LINK_LLVM_DYLIB=ON             \
    198200      -DLLVM_TARGETS_TO_BUILD="host;AMDGPU" \
    199201      -Wno-dev ..                           &amp;&amp;
     
    281283
    282284    <para>
    283       <option>-DLLVM_LINK_LLVM_DYLIB=ON</option>: Used in conjunction with
     285      <parameter>-DLLVM_LINK_LLVM_DYLIB=ON</parameter>: Used in conjunction with
    284286      <parameter>-DLLVM_BUILD_LLVM_DYLIB=ON</parameter>, this switch enables
    285287      linking the tools against the shared library instead of the static ones.
     288      It also slightly reduces their size and also ensures that llvm-config
     289      will correctly use libLLVM-&llvm-majmin;.so.
    286290    </para>
    287291
    288292    <para>
    289293      <option>-DBUILD_SHARED_LIBS=ON</option>: if used instead of
    290       <parameter>-DLLVM_BUILD_LLVM_DYLIB=ON</parameter>, builds all the
     294      <parameter>-DLLVM_BUILD_LLVM_DYLIB=ON</parameter> and
     295      <parameter>-DLLVM_LINK_LLVM_DYLIB=ON</parameter>, builds all the
    291296      <application>LLVM</application> libraries (about 60) as shared
    292297      libraries instead of static.
  • general/prog/rust.xml

    r314919e rbb0652ca  
    6262      </para>
    6363      <para>
    64         Unusually, a DESTDIR method is being used to install this package. This
    65         is because running the install as root not only downloads all of the
     64        Unusually, a DESTDIR-style method is being used to install this package.
     65        This is because running the install as root not only downloads all of the
    6666        cargo files again (to <filename>/root/.cargo</filename>), it then spends
    67         a very long time recompiling. Using a DESTDIR method saves 30 SBU on the
     67        a very long time recompiling. Using this method saves 30 SBU on the
    6868        4-core machine where this was tested, at the cost of an extra 60MB of
    6969        disk space for the extra files.
     
    124124    <para role="recommended">
    125125      <package>clang</package> from <xref linkend="llvm"/>
     126      (built with -DLLVM_LINK_LLVM_DYLIB=ON)
    126127    </para>
    127128
     
    193194    </para>
    194195
    195 <screen><userinput>./x.py build</userinput></screen>
     196<screen><userinput>export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" &amp;&amp;
     197./x.py build</userinput></screen>
    196198
    197199    <para>
     
    257259    </para>
    258260
    259 <screen><userinput>mkdir -v /sources/RUST               &amp;&amp;
    260 DESTDIR=/sources/RUST ./x.py install</userinput></screen>
     261<screen><userinput>DESTDIR=${PWD}/install ./x.py install</userinput></screen>
    261262
    262263    <para>
     
    265266    </para>
    266267
    267 <screen role="root"><userinput>chown -R root:root /sources/RUST &amp;&amp;
    268 cp -a /sources/RUST/* /</userinput></screen>
     268<screen role="root"><userinput>chown -R root:root install &amp;&amp;
     269cp -a install/* /</userinput></screen>
    269270
    270271  </sect2>
     
    309310
    310311    <para>
     312      <command>export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi"</command>:
     313      This adds a link to libffi to any RUSTFLAGS you may already be passing
     314      to the build. On some systems, linking fails to include libffi unless
     315      this is used. The reason why this is needed is not clear.
     316    </para>
     317
     318    <para>
    311319      <command>--verbose</command>: this switch can sometimes provide more
    312320      information about a test which fails.
     
    319327
    320328    <para>
    321       <command>mkdir -v /sources/RUST</command>: this is not strictly necessary,
    322       but it confirms that your regular user can write there, and that there is
    323       not an existing directory of this name left over from a previous install.
    324       By convention, BLFS builds in <filename class="directory">/sources</filename>
    325       but you can change this to another location where you can write (and
    326       similarly change the commands used by
    327       <systemitem class="username">root</systemitem>). Note that DESTDIR installs
    328       need an absolute path, passing e.g. ../RUST will not work.
    329     </para>
    330 
    331     <para>
    332       <command>chown -R root:root /sources/RUST</command>: the DESTDIR install
     329      <command>DESTDIR=${PWD}/install ./x.py install</command>: This effects a
     330      DESTDIR-style install in the source tree,creating an <filename
     331      class="directory">install</filename> directory. Note that DESTDIR installs
     332      need an absolute path, passing 'install' will not work.
     333    </para>
     334
     335    <para>
     336      <command>chown -R root:root install</command>: the DESTDIR install
    333337      was run by a regular user, who owns the files. For security, change their
    334338      owner before doing a simple copy to install them.
  • introduction/welcome/changelog.xml

    r314919e rbb0652ca  
    4646      <itemizedlist>
    4747        <listitem>
     48          <para>[ken] Fixes for problems people have encountered with
     49          my rustc instructions. In particular, in llvm add
     50          -DLLVM_LINK_LLVM_DYLIB=ON which I have been using for ages
     51          but was not in the current book, and in rustc add RUSTFLAGS
     52          to ensure that libffi is linked.  Also simplify the rustc
     53          install. Particular thanks to 'balducci' for the RUSTFLAGS.
     54          </para>
     55        </listitem>
     56        <listitem>
    4857          <para>[bdubbs] - Update to subversion-1.10.0.  Fixes
    4958          <ulink url="&blfs-ticket-root;10658">#10658</ulink>.</para>
Note: See TracChangeset for help on using the changeset viewer.