46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
# Description: LLVM + clang compiler
|
|
# URL: http://llvm.org/
|
|
# Maintainer: Thomas Penteker, tek at serverop dot de
|
|
# Packager: Tilman Sauerbeck, tilman at crux dot nu
|
|
# Depends on: python, llvm
|
|
|
|
name=clang
|
|
version=3.8.0
|
|
release=1
|
|
source=(http://llvm.org/releases/$version/{llvm,cfe}-$version.src.tar.xz \
|
|
config.h llvm-config.h)
|
|
|
|
build() {
|
|
mv cfe-$version.src llvm-$version.src/tools/clang
|
|
|
|
cd llvm-$version.src
|
|
mkdir build
|
|
cd build
|
|
|
|
../configure --prefix=/usr \
|
|
--without-oprofile \
|
|
--enable-cxx11 \
|
|
--enable-targets=x86,x86_64,r600 \
|
|
--enable-shared
|
|
|
|
make DISABLE_ASSERTIONS=1 $MAKEFLAGS
|
|
make DISABLE_ASSERTIONS=1 DESTDIR=$PKG install
|
|
|
|
find $PKG -name .dir -delete
|
|
rm -rf $PKG/usr/docs
|
|
|
|
# multilib stubs
|
|
mv $PKG/usr/include/llvm/Config/config{,-64}.h
|
|
mv $PKG/usr/include/llvm/Config/llvm-config{,-64}.h
|
|
install -m 0644 $SRC/config.h $PKG/usr/include/llvm/Config/
|
|
install -m 0644 $SRC/llvm-config.h $PKG/usr/include/llvm/Config/
|
|
|
|
# only clang may be left, remove llvm
|
|
rm -r $PKG/usr/include/llvm{,-c}
|
|
rm $PKG/usr/bin/{bugpoint,ll*,opt,FileCheck,count,not,obj2yaml,sancov,verify-uselistorder,yaml2obj}
|
|
rm $PKG/usr/lib/{LLVMHello.so,BugpointPasses.so,libLTO.*,libLLVM*}
|
|
# avoid conflicts with opt/llvm
|
|
rm -r $PKG/usr/share/llvm
|
|
|
|
}
|