mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-07 17:57:47 +08:00
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
203 lines
6.6 KiB
XML
203 lines
6.6 KiB
XML
<?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 (add about 7 SBU for clang)">
|
|
]>
|
|
|
|
<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 Low Level
|
|
Virtual MAchine (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>
|
|
|
|
<para>The optional <application>clang</application> package provides a
|
|
new C, C++, Objective C and Objective C++ front-end for the LLVM compiler.</para>
|
|
|
|
&lfs71_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">Additional Downloads</bridgehead>
|
|
<itemizedlist spacing='compact'>
|
|
<listitem>
|
|
<para>Optional package:
|
|
<ulink url="http://llvm.org/releases/&llvm-version;/clang-&llvm-version;.tar.gz"/>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">LLVM Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
<para role="recommended">
|
|
<xref linkend="libffi"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="doxygen"/> and
|
|
<xref linkend="graphviz"/>
|
|
</para>
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
<ulink url="&blfs-wiki;/llvm"/></para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of LLVM</title>
|
|
|
|
<para>If you downloaded the optional <application>clang</application> package,
|
|
install it into the source tree:</para>
|
|
|
|
<screen><userinput>tar -xf ../clang-3.0.tar.gz -C tools &&
|
|
mv tools/clang-3.0.src tools/clang</userinput></screen>
|
|
|
|
<para>Install <application>llvm</application> by running the following
|
|
commands:</para>
|
|
|
|
<screen><userinput>touch tools/edis/EnhancedDisassembly.exports &&
|
|
|
|
CFLAGS="$CFLAGS -fno-tree-pre" &&
|
|
CXXFLAGS="$CXXFLAGS -fno-tree-pre" &&
|
|
|
|
sed -i -e 's:\$(PROJ_prefix)/etc/llvm:/etc/llvm:' \
|
|
-e 's:\$(PROJ_prefix)/lib:$(PROJ_prefix)/lib/llvm:' \
|
|
-e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
|
|
Makefile.config.in &&
|
|
|
|
sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' Makefile.rules &&
|
|
|
|
export CPPFLAGS="$CPPFLAGS $(pkg-config --cflags libffi)" &&
|
|
|
|
CC=gcc \
|
|
CXX=g++ \
|
|
./configure --prefix=/usr \
|
|
--libdir=/usr/lib/llvm \
|
|
--sysconfdir=/etc \
|
|
--enable-shared \
|
|
--enable-libffi \
|
|
--enable-targets=all \
|
|
--disable-expensive-checks \
|
|
--disable-debug-runtime \
|
|
--disable-assertions \
|
|
--enable-optimized &&
|
|
|
|
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</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para><userinput>CFLAGS=... CXXFLAGS=...</userinput>: Build without
|
|
-ftree-pre as a workaround for clang segfaulting on x86_64 systems.</para>
|
|
|
|
<para><userinput>sed ... Makefile.config.in</userinput>: This fixes
|
|
installation directories.</para>
|
|
|
|
<para><userinput>sed ... Makefile.rules</userinput>: This fixes an insecure
|
|
rpath that points ot the build directory.</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Libraries</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>clang, clang++, and numerous llvm-* build tools</seg>
|
|
<seg>numerous custom libraries to support llvm and clang programs</seg>
|
|
<seg>/usr/lib/{clang,llvm}, /usr/share/doc/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>
|
|
|