2011-12-10 09:21:48 +08:00
|
|
|
<?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;
|
|
|
|
|
|
|
|
<!ENTITY llvm-download-http "http://llvm.org/releases/&llvm-version;/llvm-&llvm-version;.tar.gz">
|
|
|
|
<!ENTITY llvm-download-ftp " ">
|
|
|
|
<!ENTITY llvm-md5sum "a8e5f5f1c1adebae7b4a654c376a6005">
|
|
|
|
<!ENTITY llvm-size "9.9 MB">
|
|
|
|
<!ENTITY llvm-buildsize "265 MB">
|
|
|
|
<!ENTITY llvm-time "13.2 SBU">
|
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="llvm" xreflabel="llvm-&llvm-version;">
|
|
|
|
<?dbhtml filename="llvm.html" ?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>LLVM-&llvm-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="llvm">
|
|
|
|
<primary sortas="a-LLVM">LLVM</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to LLVM</title>
|
|
|
|
|
|
|
|
<para>The <application>llvm</application> package contains a collection of
|
|
|
|
modular and reusable compiler and toolchain technologies. The LLVM Core
|
|
|
|
libraries provide a modern source- and target-independent optimizer, along
|
|
|
|
with code generation support for many popular CPUs (as well as some less
|
|
|
|
common ones!) These libraries are built around a well specified code
|
|
|
|
representation known as the LLVM intermediate representation ("LLVM
|
|
|
|
IR").</para>
|
|
|
|
|
|
|
|
&lfs70_checked;
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>Download (HTTP): <ulink url="&llvm-download-http;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download (FTP): <ulink url="&llvm-download-ftp;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download MD5 sum: &llvm-md5sum;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download size: &llvm-size;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated disk space required: &llvm-buildsize;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated build time: &llvm-time;</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">LLVM Dependencies</bridgehead>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional">
|
|
|
|
<xref linkend="doxygen"/>,
|
|
|
|
<xref linkend="graphviz"/>, and
|
|
|
|
<xref linkend="libffi"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
|
|
<ulink url="&blfs-wiki;/llvm"/></para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of LLVM</title>
|
|
|
|
|
|
|
|
<para>Install <application>llvm</application> by running the following
|
|
|
|
commands:</para>
|
|
|
|
|
2011-12-13 09:30:08 +08:00
|
|
|
<screen><userinput>touch tools/edis/EnhancedDisassembly.exports &&
|
|
|
|
./configure --prefix=/opt/llvm &&
|
|
|
|
find -name Makefile -exec \
|
2011-12-13 09:41:57 +08:00
|
|
|
sed -i -r -e '/^LIBRARYNAME/a SHARED_LIBRARY = 1' \
|
|
|
|
-e 's#BUILD_ARCHIVE :*= 1#NO_&#' \
|
|
|
|
-e '/^USEDLIBS/s# ([A-Za-z]*).a# -l\1#g' \
|
|
|
|
-e 's#^USEDLIBS#LDFLAGS#' {} \; &&
|
2011-12-13 09:30:08 +08:00
|
|
|
sed -i 's#BUILD_ARCHIVE = 1#NO_&#' Makefile.rules &&
|
|
|
|
sed -i 's#x)/docs#x)/share/doc#' Makefile.config &&
|
2011-12-10 09:21:48 +08:00
|
|
|
make</userinput></screen>
|
|
|
|
|
|
|
|
<para>To test the results, issue: <command>make check</command>.</para>
|
|
|
|
|
|
|
|
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>make install &&
|
|
|
|
echo "/opt/llvm/lib" >> /etc/ld.so.conf &&
|
|
|
|
ldconfig &&
|
|
|
|
echo "pathappend /usr/share/man MANPATH" >> /etc/profile.d/extrapaths.sh &&
|
|
|
|
echo "pathappend /opt/llvm/share/man MANPATH" >> /etc/profile.d/extrapaths.sh &&
|
|
|
|
echo "pathappend /opt/llvm/bin" >> /etc/profile.d/extrapaths.sh &&
|
|
|
|
ln -svf /opt/llvm/share/doc /usr/share/doc/llvm-&llvm-version;</userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
|
|
|
<para><parameter>--prefix=/opt/llvm</parameter>: This package has a large
|
|
|
|
number of libraries and executables. This option keeps them
|
|
|
|
separate.</para>
|
|
|
|
|
|
|
|
<para><userinput>find -name Makefile -exec sed ...</userinput>: This
|
|
|
|
command ensures that dynamic libraries are built.</para>
|
|
|
|
|
|
|
|
<para><userinput>sed ... Makefile.rules</userinput>: This
|
|
|
|
command disables building static libraries.</para>
|
|
|
|
|
|
|
|
<para><userinput>echo "pathappend ..." >>
|
|
|
|
/etc/profile.d/extrapaths.sh</userinput>: Set up the user paths properly to
|
|
|
|
find the program executables and man pages.</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>numerous programs installed in /opt/llvm/bin</seg>
|
|
|
|
<seg>numerous libraries installed in /opt/llvm/lib</seg>
|
|
|
|
<seg>/opt/llvm</seg>
|
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
<!--
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="rep">
|
|
|
|
<term><command>rep</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>is the Lisp interpreter.</para>
|
|
|
|
<indexterm zone="llvm rep">
|
|
|
|
<primary sortas="b-rep">rep</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="llvm-lib">
|
|
|
|
<term><filename class='libraryfile'>llvm.so</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para> contains the functions necessary for the Lisp interpreter.</para>
|
|
|
|
<indexterm zone="llvm llvm-lib">
|
|
|
|
<primary sortas="c-llvm">llvm.so</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
-->
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|