The llvm 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").
The optional clang package provides a new C, C++, Objective C and Objective C++ front-end for the LLVM compiler.
This package is known to build and work properly using an LFS-7.1 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 (add about 7 SBU for clang)
Optional package: http://llvm.org/releases/3.0/clang-3.0.tar.gz
Doxygen-1.7.5 and Graphviz-2.28.0
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/llvm
If you downloaded the optional clang package, install it into the source tree:
tar -xf ../clang-3.0.tar.gz -C tools && mv tools/clang-3.0.src tools/clang
Install llvm by running the following commands:
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
To test the results, issue: make check.
Now, as the root user:
make install
CFLAGS=...
CXXFLAGS=...: Build without -ftree-pre as a
workaround for clang segfaulting on x86_64 systems.
sed ...
Makefile.config.in: This fixes installation
directories.
sed ...
Makefile.rules: This fixes an insecure rpath that
points ot the build directory.
Last updated on 2012-05-12 19:33:22 +0000