opt/clang/Pkgfile

46 lines
1.3 KiB
Plaintext
Raw Normal View History

# 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
2016-03-09 23:15:53 +01:00
version=3.8.0
release=1
2015-02-23 16:23:29 +01:00
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
2015-11-30 01:36:04 +01:00
mkdir build
cd build
2015-11-30 01:36:04 +01:00
../configure --prefix=/usr \
--without-oprofile \
--enable-cxx11 \
--enable-targets=x86,x86_64,r600 \
2015-11-30 01:36:04 +01:00
--enable-shared
2015-08-19 14:30:55 +02:00
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}
2016-03-09 23:15:53 +01:00
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*}
2015-11-30 01:45:51 +01:00
# avoid conflicts with opt/llvm
rm -r $PKG/usr/share/llvm
}