1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY llvm-download-http "http://llvm.org/releases/&llvm-version;/llvm-&llvm-version;.tar.gz">
|
---|
8 | <!ENTITY llvm-download-ftp " ">
|
---|
9 | <!ENTITY llvm-md5sum "a8e5f5f1c1adebae7b4a654c376a6005">
|
---|
10 | <!ENTITY llvm-size "9.9 MB">
|
---|
11 | <!ENTITY llvm-buildsize "265 MB">
|
---|
12 | <!ENTITY llvm-time "13.2 SBU (add about 7 SBU for clang)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="llvm" xreflabel="llvm-&llvm-version;">
|
---|
16 | <?dbhtml filename="llvm.html" ?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>LLVM-&llvm-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="llvm">
|
---|
26 | <primary sortas="a-LLVM">LLVM</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to LLVM</title>
|
---|
31 |
|
---|
32 | <para>The <application>llvm</application> package contains a collection of
|
---|
33 | modular and reusable compiler and toolchain technologies. The Low Level
|
---|
34 | Virtual MAchine (LLVM) Core libraries provide a modern source- and
|
---|
35 | target-independent optimizer, along with code generation support for many
|
---|
36 | popular CPUs (as well as some less common ones!) These libraries are built
|
---|
37 | around a well specified code representation known as the LLVM intermediate
|
---|
38 | representation ("LLVM IR").</para>
|
---|
39 |
|
---|
40 | <para>The optional <application>clang</application> package provides a
|
---|
41 | new C, C++, Objective C and Objective C++ front-end for the LLVM compiler.</para>
|
---|
42 |
|
---|
43 | &lfs71_checked;
|
---|
44 |
|
---|
45 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
46 | <itemizedlist spacing="compact">
|
---|
47 | <listitem>
|
---|
48 | <para>Download (HTTP): <ulink url="&llvm-download-http;"/></para>
|
---|
49 | </listitem>
|
---|
50 | <listitem>
|
---|
51 | <para>Download (FTP): <ulink url="&llvm-download-ftp;"/></para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>Download MD5 sum: &llvm-md5sum;</para>
|
---|
55 | </listitem>
|
---|
56 | <listitem>
|
---|
57 | <para>Download size: &llvm-size;</para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>Estimated disk space required: &llvm-buildsize;</para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>Estimated build time: &llvm-time;</para>
|
---|
64 | </listitem>
|
---|
65 | </itemizedlist>
|
---|
66 |
|
---|
67 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
68 | <itemizedlist spacing='compact'>
|
---|
69 | <listitem>
|
---|
70 | <para>Optional package:
|
---|
71 | <ulink url="http://llvm.org/releases/&llvm-version;/clang-&llvm-version;.tar.gz"/>
|
---|
72 | </para>
|
---|
73 | </listitem>
|
---|
74 | </itemizedlist>
|
---|
75 |
|
---|
76 | <bridgehead renderas="sect3">LLVM Dependencies</bridgehead>
|
---|
77 |
|
---|
78 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
79 | <para role="recommended">
|
---|
80 | <xref linkend="libffi"/>
|
---|
81 | </para>
|
---|
82 |
|
---|
83 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
84 | <para role="optional">
|
---|
85 | <xref linkend="doxygen"/> and
|
---|
86 | <xref linkend="graphviz"/>
|
---|
87 | </para>
|
---|
88 |
|
---|
89 | <para condition="html" role="usernotes">User Notes:
|
---|
90 | <ulink url="&blfs-wiki;/llvm"/></para>
|
---|
91 |
|
---|
92 | </sect2>
|
---|
93 |
|
---|
94 | <sect2 role="installation">
|
---|
95 | <title>Installation of LLVM</title>
|
---|
96 |
|
---|
97 | <para>If you downloaded the optional <application>clang</application> package,
|
---|
98 | install it into the source tree:</para>
|
---|
99 |
|
---|
100 | <screen><userinput>tar -xf ../clang-3.0.tar.gz -C tools &&
|
---|
101 | mv tools/clang-3.0.src tools/clang</userinput></screen>
|
---|
102 |
|
---|
103 | <para>Install <application>llvm</application> by running the following
|
---|
104 | commands:</para>
|
---|
105 |
|
---|
106 | <screen><userinput>touch tools/edis/EnhancedDisassembly.exports &&
|
---|
107 |
|
---|
108 | CFLAGS="$CFLAGS -fno-tree-pre" &&
|
---|
109 | CXXFLAGS="$CXXFLAGS -fno-tree-pre" &&
|
---|
110 |
|
---|
111 | sed -i -e 's:\$(PROJ_prefix)/etc/llvm:/etc/llvm:' \
|
---|
112 | -e 's:\$(PROJ_prefix)/lib:$(PROJ_prefix)/lib/llvm:' \
|
---|
113 | -e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
|
---|
114 | Makefile.config.in &&
|
---|
115 |
|
---|
116 | sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules &&
|
---|
117 |
|
---|
118 | export CPPFLAGS="$CPPFLAGS $(pkg-config --cflags libffi)" &&
|
---|
119 |
|
---|
120 | CC=gcc \
|
---|
121 | CXX=g++ \
|
---|
122 | ./configure --prefix=/usr \
|
---|
123 | --libdir=/usr/lib/llvm \
|
---|
124 | --sysconfdir=/etc \
|
---|
125 | --enable-shared \
|
---|
126 | --enable-libffi \
|
---|
127 | --enable-targets=all \
|
---|
128 | --disable-expensive-checks \
|
---|
129 | --disable-debug-runtime \
|
---|
130 | --disable-assertions \
|
---|
131 | --enable-optimized &&
|
---|
132 |
|
---|
133 | make</userinput></screen>
|
---|
134 |
|
---|
135 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
136 |
|
---|
137 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
138 |
|
---|
139 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
140 |
|
---|
141 | </sect2>
|
---|
142 |
|
---|
143 | <sect2 role="commands">
|
---|
144 | <title>Command Explanations</title>
|
---|
145 |
|
---|
146 | <para><userinput>CFLAGS=... CXXFLAGS=...</userinput>: Build without
|
---|
147 | -ftree-pre as a workaround for clang segfaulting on x86_64 systems.</para>
|
---|
148 |
|
---|
149 | <para><userinput>sed ... Makefile.config.in</userinput>: This fixes
|
---|
150 | installation directories.</para>
|
---|
151 |
|
---|
152 | <para><userinput>sed ... Makefile.rules</userinput>: This fixes an insecure
|
---|
153 | rpath that points ot the build directory.</para>
|
---|
154 |
|
---|
155 | </sect2>
|
---|
156 |
|
---|
157 | <sect2 role="content">
|
---|
158 | <title>Contents</title>
|
---|
159 |
|
---|
160 | <segmentedlist>
|
---|
161 | <segtitle>Installed Programs</segtitle>
|
---|
162 | <segtitle>Installed Libraries</segtitle>
|
---|
163 | <segtitle>Installed Directories</segtitle>
|
---|
164 |
|
---|
165 | <seglistitem>
|
---|
166 | <seg>clang, clang++, and numerous llvm-* build tools</seg>
|
---|
167 | <seg>numerous custom libraries to support llvm and clang programs</seg>
|
---|
168 | <seg>/usr/lib/{clang,llvm}, /usr/share/doc/llvm</seg>
|
---|
169 | </seglistitem>
|
---|
170 | </segmentedlist>
|
---|
171 | <!--
|
---|
172 | <variablelist>
|
---|
173 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
174 | <?dbfo list-presentation="list"?>
|
---|
175 | <?dbhtml list-presentation="table"?>
|
---|
176 |
|
---|
177 | <varlistentry id="rep">
|
---|
178 | <term><command>rep</command></term>
|
---|
179 | <listitem>
|
---|
180 | <para>is the Lisp interpreter.</para>
|
---|
181 | <indexterm zone="llvm rep">
|
---|
182 | <primary sortas="b-rep">rep</primary>
|
---|
183 | </indexterm>
|
---|
184 | </listitem>
|
---|
185 | </varlistentry>
|
---|
186 |
|
---|
187 | <varlistentry id="llvm-lib">
|
---|
188 | <term><filename class='libraryfile'>llvm.so</filename></term>
|
---|
189 | <listitem>
|
---|
190 | <para> contains the functions necessary for the Lisp interpreter.</para>
|
---|
191 | <indexterm zone="llvm llvm-lib">
|
---|
192 | <primary sortas="c-llvm">llvm.so</primary>
|
---|
193 | </indexterm>
|
---|
194 | </listitem>
|
---|
195 | </varlistentry>
|
---|
196 |
|
---|
197 | </variablelist>
|
---|
198 | -->
|
---|
199 | </sect2>
|
---|
200 |
|
---|
201 | </sect1>
|
---|
202 |
|
---|