source: general/prog/llvm.xml@ f36bebcd

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since f36bebcd was f36bebcd, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Add clang to llvm.
Add a note to screen about changing tty gid values.

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

  • Property mode set to 100644
File size: 6.6 KB
Line 
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 &amp;&amp;
101mv 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 &amp;&amp;
107
108CFLAGS="$CFLAGS -fno-tree-pre" &amp;&amp;
109CXXFLAGS="$CXXFLAGS -fno-tree-pre" &amp;&amp;
110
111sed -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 &amp;&amp;
115
116sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules &amp;&amp;
117
118export CPPFLAGS="$CPPFLAGS $(pkg-config --cflags libffi)" &amp;&amp;
119
120CC=gcc \
121CXX=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 &amp;&amp;
132
133make</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
Note: See TracBrowser for help on using the repository browser.