diff options
author | Xi Ruoyao <xry111@xry111.site> | 2022-10-08 15:10:09 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2022-10-09 13:36:17 +0800 |
commit | 3f6167ca9b1dec9e133f8e18bc91dd684f82e865 (patch) | |
tree | 15765b7cd0642b837e7651dc0f29859c85e88c7f | |
parent | 28ae5f031c1da22a5cce63078e0f1474c288983f (diff) |
rust: chapter05: add cmake as host tools
We'll need it to build LLVM pass 1 and 2 later.
-rw-r--r-- | chapter05/chapter05.xml | 1 | ||||
-rw-r--r-- | chapter05/cmake.xml | 84 | ||||
-rw-r--r-- | packages.ent | 9 |
3 files changed, 94 insertions, 0 deletions
diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index 467a02a36..00652debb 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -17,5 +17,6 @@ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-headers.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cmake.xml"/> </chapter> diff --git a/chapter05/cmake.xml b/chapter05/cmake.xml new file mode 100644 index 000000000..650a2ea5e --- /dev/null +++ b/chapter05/cmake.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-cmake" role="wrap"> + <?dbhtml filename="cmake.html"?> + + <sect1info condition="script"> + <productname>cmake</productname> + <productnumber>&cmake-version;</productnumber> + <address>&cmake-url;</address> + </sect1info> + + <title>CMake-&cmake-version;</title> + + <indexterm zone="ch-tools-cmake"> + <primary sortas="a-CMake">CMake</primary> + <secondary>tools</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The CMake package contains a modern toolset used for generating + Makefiles. It is a successor of the auto-generated configure script and + aims to be platform- and compiler-independent. A significant user of + CMake is LLVM.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&cmake-tmp-sbu;</seg> + <seg>&cmake-tmp-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of CMake</title> + + <para>Prevents applications using CMake from attempting to install files + into <filename class='directory'>lib64</filename>:</para> + +<screen><userinput remap="pre">sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake</userinput></screen> + + <para>Prepare CMake for compilation:</para> + +<screen><userinput remap="configure">./bootstrap --prefix=$LFS/tools --no-system-libs</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--no-system-libs</parameter></term> + <listitem> + <para>For several libraries, use the source code shipped in the CMake source tarball instead of the system library. This avoids + unnecessary host system requirements.</para> + </listitem> + </varlistentry> + </variablelist> + + <para>Compile CMake by running:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in TODO.</para> + </sect2> + +</sect1> diff --git a/packages.ent b/packages.ent index d7fb9fa2d..870a5e491 100644 --- a/packages.ent +++ b/packages.ent @@ -104,6 +104,15 @@ <!ENTITY check-fin-du "12 MB"> <!ENTITY check-fin-sbu "0.1 SBU (about 3.6 SBU with tests)"> +<!ENTITY cmake-majmin "3.24"> +<!ENTITY cmake-version "&cmake-majmin;.2"> +<!ENTITY cmake-size "10,156 KB"> +<!ENTITY cmake-url "https://cmake.org/files/v&cmake-majmin;/cmake-&cmake-version;.tar.gz"> +<!ENTITY cmake-md5 "84d08f30b110401d8178f0708c19f1fe"> +<!ENTITY cmake-home "https://cmake.org/"> +<!ENTITY cmake-tmp-sbu "3.0 SBU"> +<!ENTITY cmake-tmp-du "443 MB"> + <!ENTITY coreutils-version "9.1"> <!ENTITY coreutils-size "5,570 KB"> <!ENTITY coreutils-url "&gnu;coreutils/coreutils-&coreutils-version;.tar.xz"> |