The llvm 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").
This package is known to build and work properly using an LFS-7.0 platform.
Download (HTTP): http://llvm.org/releases/3.0/llvm-3.0.tar.gz
Download MD5 sum: a8e5f5f1c1adebae7b4a654c376a6005
Download size: 9.9 MB
Estimated disk space required: 265 MB
Estimated build time: 13.2 SBU
Doxygen-1.7.5, Graphviz-2.26.3, and libffi-3.0.10
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/llvm
Install llvm by running the following commands:
touch tools/edis/EnhancedDisassembly.exports && ./configure --prefix=/opt/llvm && find -name Makefile -exec \ 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#' {} \; && sed -i 's#BUILD_ARCHIVE = 1#NO_&#' Makefile.rules && sed -i 's#x)/docs#x)/share/doc#' Makefile.config && make
To test the results, issue: make check.
Now, as the root
user:
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-3.0
--prefix=/opt/llvm
: This
package has a large number of libraries and executables. This
option keeps them separate.
find -name Makefile -exec sed
...
: This command ensures that dynamic libraries
are built.
sed ...
Makefile.rules
: This command disables building
static libraries.
echo "pathappend ..." >>
/etc/profile.d/extrapaths.sh
: Set up the user paths
properly to find the program executables and man pages.
Last updated on 2011-12-13 01:41:57 +0000