diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml index 00652debb..417b9b1b7 100644 --- a/chapter05/chapter05.xml +++ b/chapter05/chapter05.xml @@ -18,5 +18,6 @@ + diff --git a/chapter05/llvm-pass1.xml b/chapter05/llvm-pass1.xml new file mode 100644 index 000000000..04d33f9a9 --- /dev/null +++ b/chapter05/llvm-pass1.xml @@ -0,0 +1,103 @@ + + + %general-entities; +]> + + + + + + LLVM + &llvm-version; +
&llvm-url;
+
+ + LLVM-&llvm-version; - Pass 1 + + + LLVM + tools, pass 1 + + + + + + <para>The LLVM package contains a collection of modular and reusable + compiler and toolchain technologies.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&llvm-tmpp1-sbu;</seg> + <seg>&llvm-tmpp1-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of LLVM + + Prepare some CMake modules needed by LLVM building system: + +tar -xf ../llvm-cmake-&llvm-version;.src.tar.xz +mv cmake-&llvm-version;.src ../cmake + + The LLVM documentation recommends building LLVM in a dedicated + build directory: + +mkdir -v build +cd build + + Prepare LLVM for compilation: + +CC=gcc CXX=g++ cmake \ + -DCMAKE_INSTALL_PREFIX=$LFS/tools \ + -DLLVM_ENABLE_FFI=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_BUILD_LLVM_DYLIB=ON \ + -DLLVM_LINK_LLVM_DYLIB=ON \ + -DLLVM_ENABLE_RTTI=ON \ + -DLLVM_TARGETS_TO_BUILD=host \ + -DLLVM_INCLUDE_BENCHMARKS=OFF \ + -Wno-dev .. + + + The meaning of the configure options: + + + -DLLVM_ENABLE_FFI=OFF + + Allow building LLVM without libffi installed on the host + distro. + + + + + For the meaning of other CMake options, see TODO. + + Compile LLVM by running: + +make + + Install the package: + +make install + + Clean up the source directory: + +rm -rf ../../cmake + + + + + + + <para>Details on this package are located in TODO.</para> + </sect2> + +</sect1> diff --git a/packages.ent b/packages.ent index 870a5e491..c8c81745d 100644 --- a/packages.ent +++ b/packages.ent @@ -452,6 +452,14 @@ <!ENTITY linux-headers-fin-du "1 GB"> <!ENTITY linux-headers-fin-sbu "0.1 SBU">--> +<!ENTITY llvm-version "15.0.1"> +<!ENTITY llvm-size "52,272 KB"> +<!ENTITY llvm-url "https://github.com/llvm/llvm-project/releases/download/llvmorg-&llvm-version;/llvm-&llvm-version;.src.tar.xz"> +<!ENTITY llvm-md5 "f517bb2708fe68907bd48642c4fac5fe"> +<!ENTITY llvm-home "https://llvm.org/"> +<!ENTITY llvm-tmpp1-sbu "20 SBU"> +<!ENTITY llvm-tmpp1-du "3,800 MB"> + <!ENTITY m4-version "1.4.19"> <!ENTITY m4-size "1,617 KB"> <!ENTITY m4-url "&gnu;m4/m4-&m4-version;.tar.xz">