source: general/prog/llvm.xml@ c10e2d2

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

Update to colord-1.2.8.
Update to llvm-3.5.1.
Update to vala-0.26.2.
Update to sqlite-3.8.8.0.
Update to gtk+3-3.14.7.
Update to seamonkey-2.32.
Update to cups-filters-1.0.62.

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

  • Property mode set to 100644
File size: 19.0 KB
RevLine 
[7b74537e]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
[a6221fd]7 <!ENTITY llvm-download-http "http://llvm.org/releases/&llvm-version;/llvm-&llvm-version;.src.tar.xz">
[abdc2e6]8 <!ENTITY llvm-download-ftp " ">
[c10e2d2]9 <!ENTITY llvm-md5sum "2d3d8004f38852aa679e5945b8ce0b14">
[a6221fd]10 <!ENTITY llvm-size "12 MB">
[c10e2d2]11 <!ENTITY llvm-buildsize "618 MB (1.2 GB with Clang) and 78 MB for the tests">
12 <!ENTITY llvm-time "6.5 SBU - using parallelism=4 (12 SBU with Clang - using parallelism=4) and 0.3 for tests">
[a6221fd]13
14 <!ENTITY clang-download-http "http://llvm.org/releases/&llvm-version;/cfe-&llvm-version;.src.tar.xz">
[c10e2d2]15 <!ENTITY clang-md5sum "93f9532f8f7e6f1d8e5c1116907051cb">
[a6221fd]16 <!ENTITY clang-size "7.9 MB">
17
18 <!ENTITY rt-version "&llvm-version;">
19 <!ENTITY compiler-rt-download-http "http://llvm.org/releases/&rt-version;/compiler-rt-&rt-version;.src.tar.xz">
[c10e2d2]20 <!ENTITY compiler-rt-md5sum "d626cfb8a9712cb92b820798ab5bc1f8">
[a6221fd]21 <!ENTITY compiler-rt-size "1.1 MB">
[7b74537e]22]>
23
[abdc2e6]24<sect1 id="llvm" xreflabel="LLVM-&llvm-version;">
[7b74537e]25 <?dbhtml filename="llvm.html" ?>
26
27 <sect1info>
28 <othername>$LastChangedBy$</othername>
29 <date>$Date$</date>
30 </sect1info>
31
32 <title>LLVM-&llvm-version;</title>
33
34 <indexterm zone="llvm">
35 <primary sortas="a-LLVM">LLVM</primary>
36 </indexterm>
37
38 <sect2 role="package">
39 <title>Introduction to LLVM</title>
40
[abdc2e6]41 <para>
[a6221fd]42 The <application>LLVM</application> package contains a collection of
43 modular and reusable compiler and toolchain technologies. The Low Level
44 Virtual Machine (LLVM) Core libraries provide a modern source and
45 target-independent optimizer, along with code generation support for many
46 popular CPUs (as well as some less common ones!). These libraries are
47 built around a well specified code representation known as the LLVM
48 intermediate representation ("LLVM IR").
[abdc2e6]49 </para>
[f36bebcd]50
[abdc2e6]51 <para>
[a6221fd]52 The optional <application>Clang</application> and <application>Compiler
53 RT</application> packages provide a new C, C++, Objective C and Objective
54 C++ front-ends and runtime libraries for the
55 <application>LLVM</application>.
[abdc2e6]56 </para>
[7b74537e]57
[efe8031e]58 <note>
59 <para>
60 This package hits a bug in gcc-4.9.0 or an unpatched gcc-4.9.1.
61 To build this package, gcc needs to be updated if you have one of
62 these versions. See <xref linkend="gcc"/>
63 for <application>gcc</application> installation instructions.
64 </para>
65 </note>
66
[59d9079]67 &lfs76_checked;
[7b74537e]68
69 <bridgehead renderas="sect3">Package Information</bridgehead>
70 <itemizedlist spacing="compact">
71 <listitem>
[abdc2e6]72 <para>
73 Download (HTTP): <ulink url="&llvm-download-http;"/>
74 </para>
[7b74537e]75 </listitem>
76 <listitem>
[abdc2e6]77 <para>
78 Download (FTP): <ulink url="&llvm-download-ftp;"/>
79 </para>
[7b74537e]80 </listitem>
81 <listitem>
[abdc2e6]82 <para>
83 Download MD5 sum: &llvm-md5sum;
84 </para>
[7b74537e]85 </listitem>
86 <listitem>
[abdc2e6]87 <para>
88 Download size: &llvm-size;
89 </para>
[7b74537e]90 </listitem>
91 <listitem>
[abdc2e6]92 <para>
93 Estimated disk space required: &llvm-buildsize;
94 </para>
[7b74537e]95 </listitem>
96 <listitem>
[abdc2e6]97 <para>
98 Estimated build time: &llvm-time;
99 </para>
[7b74537e]100 </listitem>
101 </itemizedlist>
102
[abdc2e6]103 <bridgehead renderas="sect3">Optional Downloads</bridgehead>
[f36bebcd]104
[70251fc]105 <bridgehead renderas="sect4">Clang</bridgehead>
106 <itemizedlist spacing="compact">
107 <listitem>
108 <para>
109 Download: <ulink url="&clang-download-http;"/>
110 </para>
111 </listitem>
112 <listitem>
113 <para>
114 Download MD5 sum: &clang-md5sum;
115 </para>
116 </listitem>
117 <listitem>
118 <para>
119 Download size: &clang-size;
120 </para>
121 </listitem>
122 </itemizedlist>
123
124 <bridgehead renderas="sect4">Compiler RT</bridgehead>
125 <itemizedlist spacing="compact">
126 <listitem>
127 <para>
128 Download: <ulink url="&compiler-rt-download-http;"/>
129 </para>
130 </listitem>
131 <listitem>
132 <para>
133 Download MD5 sum: &compiler-rt-md5sum;
134 </para>
135 </listitem>
136 <listitem>
137 <para>
138 Download size: &compiler-rt-size;
139 </para>
140 </listitem>
141 </itemizedlist>
[1f44775e]142
[7b74537e]143 <bridgehead renderas="sect3">LLVM Dependencies</bridgehead>
144
[f36bebcd]145 <bridgehead renderas="sect4">Recommended</bridgehead>
146 <para role="recommended">
[70251fc]147 <xref linkend="libffi"/> and
148 <xref linkend="python2"/>
[f36bebcd]149 </para>
150
[7b74537e]151 <bridgehead renderas="sect4">Optional</bridgehead>
152 <para role="optional">
[a6221fd]153 <xref linkend="cmake"/>,
[abdc2e6]154 <xref linkend="doxygen"/>,
155 <xref linkend="graphviz"/>,
156 <xref linkend="libxml2"/>,
[2d98031c]157 <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>),
[a6221fd]158 <xref linkend="valgrind"/>,
[abdc2e6]159 <xref linkend="zip"/>,
[a6221fd]160 <ulink url="http://www.ocaml.org/">OCaml</ulink>, and
161 <ulink url="http://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
[7b74537e]162 </para>
163
164 <para condition="html" role="usernotes">User Notes:
[abdc2e6]165 <ulink url="&blfs-wiki;/llvm"/>
166 </para>
[7b74537e]167 </sect2>
168
169 <sect2 role="installation">
170 <title>Installation of LLVM</title>
171
[abdc2e6]172 <para>
173 If you have downloaded the optional packages, install them into
174 the source tree by running the following commands:
175 </para>
[f36bebcd]176
[097fd436]177<screen><userinput>tar -xf ../cfe-&llvm-version;.src.tar.xz -C tools &amp;&amp;
178tar -xf ../compiler-rt-&rt-version;.src.tar.xz -C projects &amp;&amp;
[f36bebcd]179
[7e16699b]180mv tools/cfe-&llvm-version;.src tools/clang &amp;&amp;
[a6221fd]181mv projects/compiler-rt-&rt-version;.src projects/compiler-rt</userinput></screen>
[5889b252]182
[abdc2e6]183 <para>
184 Install <application>LLVM</application> by running the following
185 commands:
186 </para>
187
[5d4a086a]188<screen><userinput>sed -e "s:/docs/llvm:/share/doc/llvm-&llvm-version;:" \
[70251fc]189 -i Makefile.config.in &amp;&amp;
[7e16699b]190
[abdc2e6]191CC=gcc CXX=g++ \
[f36bebcd]192./configure --prefix=/usr \
193 --sysconfdir=/etc \
194 --enable-libffi \
[abdc2e6]195 --enable-optimized \
196 --enable-shared \
[e4026c0]197 --disable-assertions &amp;&amp;
[7b74537e]198make</userinput></screen>
199
[abdc2e6]200 <para>
201 If you have installed <application>Sphinx</application> and wish
202 to generate manual pages, issue the following command:
203 </para>
[7b74537e]204
[abdc2e6]205<screen><userinput>make -C docs -f Makefile.sphinx man</userinput></screen>
[7b74537e]206
[abdc2e6]207 <para>
208 To test the results, issue: <command>make check</command>.
209 </para>
[7b74537e]210
[abdc2e6]211 <para>
212 Now, as the <systemitem class="username">root</systemitem> user:
213 </para>
[7b74537e]214
[abdc2e6]215<screen role="root"><userinput>make install &amp;&amp;
[7e16699b]216
[62c6b643]217for file in /usr/lib/lib{clang,LLVM,LTO}*.a
[70251fc]218do
219 test -f $file &amp;&amp; chmod -v 644 $file
220done</userinput></screen>
221
222 <para>
223 If you had <xref linkend="python2"/> installed and you have
224 built <application>Clang</application>, install the
225 <application>Clang Analyzer</application> by running the
226 following command as the
227 <systemitem class="username">root</systemitem> user:
228 </para>
229
230<screen role="root"><userinput>install -v -dm755 /usr/lib/clang-analyzer &amp;&amp;
231for prog in scan-build scan-view
232do
233 cp -rfv tools/clang/tools/$prog /usr/lib/clang-analyzer/
234 ln -sfv ../lib/clang-analyzer/$prog/$prog /usr/bin/
235done &amp;&amp;
236ln -sfv /usr/bin/clang /usr/lib/clang-analyzer/scan-build/ &amp;&amp;
237mv -v /usr/lib/clang-analyzer/scan-build/scan-build.1 /usr/share/man/man1/</userinput></screen>
[7b74537e]238
[abdc2e6]239 <para>
240 If you have built manual pages, install them by running the
241 following command as the
242 <systemitem class="username">root</systemitem> user:
243 </para>
244
[70251fc]245<screen role="root"><userinput>install -v -m644 docs/_build/man/* /usr/share/man/man1/</userinput></screen>
[7b74537e]246
247 </sect2>
[abdc2e6]248
[5889b252]249 <sect2 role="commands">
250 <title>Command Explanations</title>
251
[70251fc]252 <para>
[a6221fd]253 <command>sed -e ... Makefile.config.in</command>: This sed fixes
254 location of the installed documentation.
255 </para>
256
[5889b252]257 <para>
258 <parameter>--enable-libffi</parameter>: This switch enables
259 <application>LLVM</application> to use
260 <application>libffi</application>. Remove if you did not
261 install <application>libffi</application>.
262 </para>
263
264 <para>
265 <parameter>--enable-optimized</parameter>: This switch enables
266 compiler optimizations in order to speed up the code and reduce
267 its size.
268 </para>
269
270 <para>
271 <parameter>--enable-shared</parameter>: This switch enables
272 building of the <application>LLVM</application> shared
273 library which contains all of static libraries linked into
274 single library.
275 </para>
276
277 <para>
[62c6b643]278 <parameter>--disable-assertions</parameter>: Disable some compile checks,
279 not necessary on a production system.
[5889b252]280 </para>
281
282 </sect2>
283
[7b74537e]284 <sect2 role="content">
285 <title>Contents</title>
286
287 <segmentedlist>
288 <segtitle>Installed Programs</segtitle>
289 <segtitle>Installed Libraries</segtitle>
290 <segtitle>Installed Directories</segtitle>
291
292 <seglistitem>
[abdc2e6]293 <seg>
[a6221fd]294 bugpoint, c-index-test, clang, clang++ (symlink), count, FileCheck,
295 clang-check, clang-format, clang-tblgen, llc, lli, lli-child-target,
296 llvm-ar, llvm-as, llvm-bcanalyzer, llvm-config, llvm-cov, llvm-diff,
297 llvm-dis, llvm-dwarfdump, llvm-extract, llvm-link, llvm-mc,
298 llvm-mcmarkup, llvm-nm, llvm-objdump, llvm-profdata, llvm-ranlib
299 (symlink), llvm-readobj, llvm-rtdyld, llvm-size, llvm-stress,
300 llvm-symbolizer, llvm-tblgen, macho-dump, not, opt, scan-build
301 (symlink), and scan-view (symlink)
[abdc2e6]302 </seg>
303 <seg>
[70251fc]304 BugpointPasses.so, libclang.so, libLLVM-&llvm-version;.so,
[0f5ca44]305 libLTO.so,<!-- libprofile_rt.so,--> LLVMHello.so and numerous
[70251fc]306 static libraries in /usr/lib
[abdc2e6]307 </seg>
308 <seg>
[a6221fd]309 /usr/include/{clang,clang-c,llvm,llvm-c},
310 /usr/lib/{clang,clang-analyzer},
311 /usr/share/doc/llvm-&llvm-version;,
312 and /usr/share/llvm
[abdc2e6]313 </seg>
[7b74537e]314 </seglistitem>
315 </segmentedlist>
[abdc2e6]316
[7b74537e]317 <variablelist>
318 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
319 <?dbfo list-presentation="list"?>
320 <?dbhtml list-presentation="table"?>
321
[abdc2e6]322 <varlistentry id="bugpoint">
323 <term><command>bugpoint</command></term>
324 <listitem>
325 <para>
326 is the automatic test case reduction tool.
327 </para>
328 <indexterm zone="llvm bugpoint">
329 <primary sortas="b-bugpoint">bugpoint</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="clang">
335 <term><command>clang</command></term>
[7b74537e]336 <listitem>
[abdc2e6]337 <para>
338 is the <application>Clang</application> C, C++,
339 and Objective-C compiler.
340 </para>
341 <indexterm zone="llvm clang">
342 <primary sortas="b-clang">clang</primary>
[7b74537e]343 </indexterm>
344 </listitem>
345 </varlistentry>
346
[abdc2e6]347 <varlistentry id="llc">
348 <term><command>llc</command></term>
[7b74537e]349 <listitem>
[abdc2e6]350 <para>
351 is the <application>LLVM</application> static compiler.
352 </para>
353 <indexterm zone="llvm llc">
354 <primary sortas="b-llc">llc</primary>
355 </indexterm>
356 </listitem>
357 </varlistentry>
358
359 <varlistentry id="lli">
360 <term><command>lli</command></term>
361 <listitem>
362 <para>
363 is used to directly execute programs from
364 <application>LLVM</application> bitcode.
365 </para>
366 <indexterm zone="llvm lli">
367 <primary sortas="b-lli">lli</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
372 <varlistentry id="llvm-ar">
373 <term><command>llvm-ar</command></term>
374 <listitem>
375 <para>
376 is the <application>LLVM</application> archiver.
377 </para>
378 <indexterm zone="llvm llvm-ar">
379 <primary sortas="b-llvm-ar">llvm-ar</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="llvm-as">
385 <term><command>llvm-as</command></term>
386 <listitem>
387 <para>
388 is the <application>LLVM</application> assembler.
389 </para>
390 <indexterm zone="llvm llvm-as">
391 <primary sortas="b-llvm-as">llvm-as</primary>
392 </indexterm>
393 </listitem>
394 </varlistentry>
395
396 <varlistentry id="llvm-bcanalyzer">
397 <term><command>llvm-bcanalyzer</command></term>
398 <listitem>
399 <para>
400 is the <application>LLVM</application> bitcode analyzer.
401 </para>
402 <indexterm zone="llvm llvm-bcanalyzer">
403 <primary sortas="b-llvm-bcanalyzer">llvm-bcanalyzer</primary>
404 </indexterm>
405 </listitem>
406 </varlistentry>
407
408 <varlistentry id="llvm-config">
409 <term><command>llvm-config</command></term>
410 <listitem>
411 <para>
412 Prints <application>LLVM</application> compilation options.
413 </para>
414 <indexterm zone="llvm llvm-config">
415 <primary sortas="b-llvm-config">llvm-config</primary>
416 </indexterm>
417 </listitem>
418 </varlistentry>
419
420 <varlistentry id="llvm-cov">
421 <term><command>llvm-cov</command></term>
422 <listitem>
423 <para>
424 is used to emit coverage information.
425 </para>
426 <indexterm zone="llvm llvm-cov">
427 <primary sortas="b-llvm-cov">llvm-cov</primary>
428 </indexterm>
429 </listitem>
430 </varlistentry>
431
432 <varlistentry id="llvm-diff">
433 <term><command>llvm-diff</command></term>
434 <listitem>
435 <para>
436 is the <application>LLVM</application> structural
437 '<command>diff</command>'.
438 </para>
439 <indexterm zone="llvm llvm-diff">
440 <primary sortas="b-llvm-diff">llvm-diff</primary>
441 </indexterm>
442 </listitem>
443 </varlistentry>
444
445 <varlistentry id="llvm-dis">
446 <term><command>llvm-dis</command></term>
447 <listitem>
448 <para>
449 is the <application>LLVM</application> disassembler.
450 </para>
451 <indexterm zone="llvm llvm-dis">
452 <primary sortas="b-llvm-dis">llvm-dis</primary>
453 </indexterm>
454 </listitem>
455 </varlistentry>
456
457 <varlistentry id="llvm-extract">
458 <term><command>llvm-extract</command></term>
459 <listitem>
460 <para>
461 is used to extract a function from an
462 <application>LLVM</application> module.
463 </para>
464 <indexterm zone="llvm llvm-extract">
465 <primary sortas="b-llvm-extract">llvm-extract</primary>
466 </indexterm>
467 </listitem>
468 </varlistentry>
469
470 <varlistentry id="llvm-link">
471 <term><command>llvm-link</command></term>
472 <listitem>
473 <para>
474 is the <application>LLVM</application> linker.
475 </para>
476 <indexterm zone="llvm llvm-link">
477 <primary sortas="b-llvm-link">llvm-link</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="llvm-nm">
483 <term><command>llvm-nm</command></term>
484 <listitem>
485 <para>
486 is used to list <application>LLVM</application> bitcode
487 and object file's symbol table.
488 </para>
489 <indexterm zone="llvm llvm-nm">
490 <primary sortas="b-llvm-nm">llvm-nm</primary>
491 </indexterm>
492 </listitem>
493 </varlistentry>
[bb57c4f9]494<!--
[abdc2e6]495 <varlistentry id="llvm-prof">
496 <term><command>llvm-prof</command></term>
497 <listitem>
498 <para>
499 is used to print execution profile of
500 <application>LLVM</application> program.
501 </para>
502 <indexterm zone="llvm llvm-prof">
503 <primary sortas="b-llvm-prof">llvm-prof</primary>
504 </indexterm>
505 </listitem>
[bb57c4f9]506 </varlistentry>-->
[abdc2e6]507
508 <varlistentry id="llvm-ranlib">
509 <term><command>llvm-ranlib</command></term>
510 <listitem>
511 <para>
512 is used to generate index for <application>LLVM</application>
513 archive.
514 </para>
515 <indexterm zone="llvm llvm-ranlib">
516 <primary sortas="b-llvm-ranlib">llvm-ranlib</primary>
517 </indexterm>
518 </listitem>
519 </varlistentry>
520
521 <varlistentry id="llvm-stress">
522 <term><command>llvm-stress</command></term>
523 <listitem>
524 <para>
525 is used to generate random
526 <filename class="extension">.ll</filename> files.
527 </para>
528 <indexterm zone="llvm llvm-stress">
529 <primary sortas="b-llvm-stress">llvm-stress</primary>
530 </indexterm>
531 </listitem>
532 </varlistentry>
533
534 <varlistentry id="llvm-tblgen">
535 <term><command>llvm-tblgen</command></term>
536 <listitem>
537 <para>
538 is the <application>LLVM</application> Target Description
539 To C++ Code Generator.
540 </para>
541 <indexterm zone="llvm llvm-tblgen">
542 <primary sortas="b-llvm-tblgen">llvm-tblgen</primary>
543 </indexterm>
544 </listitem>
545 </varlistentry>
546
547 <varlistentry id="opt">
548 <term><command>opt</command></term>
549 <listitem>
550 <para>
551 is the <application>LLVM</application> optimizer.
552 </para>
553 <indexterm zone="llvm opt">
554 <primary sortas="b-opt">opt</primary>
555 </indexterm>
556 </listitem>
557 </varlistentry>
558
[70251fc]559 <varlistentry id="scan-build">
560 <term><command>scan-build</command></term>
561 <listitem>
562 <para>
563 is a <application>Perl</application> script that invokes the
564 <application>Clang</application> static analyzer.
565 </para>
566 <indexterm zone="llvm scan-build">
567 <primary sortas="b-scan-build">scan-build</primary>
568 </indexterm>
569 </listitem>
570 </varlistentry>
571
[abdc2e6]572 <varlistentry id="libllvm">
573 <term><filename class="libraryfile">libLLVM-&llvm-version;.so</filename></term>
574 <listitem>
575 <para>
576 contains the <application>LLVM</application> API functions.
577 </para>
578 <indexterm zone="llvm libllvm">
579 <primary sortas="c-libllvm">libLLVM-&llvm-version;.so</primary>
580 </indexterm>
581 </listitem>
582 </varlistentry>
[0f5ca44]583<!--
[abdc2e6]584 <varlistentry id="libprofile_rt">
585 <term><filename class="libraryfile">libprofile_rt.so</filename></term>
586 <listitem>
587 <para>
588 is the C, C++ and Objective-C runtime library for
589 <application>Clang</application>.
590 </para>
591 <indexterm zone="llvm libprofile_rt">
592 <primary sortas="c-libprofile_rt">libprofile_rt.so</primary>
[7b74537e]593 </indexterm>
594 </listitem>
[0f5ca44]595 </varlistentry>-->
[7b74537e]596
597 </variablelist>
[abdc2e6]598
[7b74537e]599 </sect2>
600
601</sect1>
Note: See TracBrowser for help on using the repository browser.