41 lines
1023 B
Plaintext
41 lines
1023 B
Plaintext
# Description: LLVM compiler backend
|
|
# URL: http://llvm.org/
|
|
# Maintainer: Thomas Penteker, tek at serverop dot de
|
|
# Packager: Tilman Sauerbeck, tilman at crux dot nu
|
|
# Depends on: python cmake
|
|
|
|
name=llvm
|
|
version=3.9.1
|
|
release=3
|
|
source=(http://llvm.org/releases/$version/$name-$version.src.tar.xz \
|
|
llvm-config.h 0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch)
|
|
|
|
build() {
|
|
export CC=gcc
|
|
export CXX=g++
|
|
|
|
cd $name-$version.src
|
|
|
|
patch -p1 -i $SRC/0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch
|
|
|
|
mkdir build
|
|
cd build
|
|
|
|
cmake -DLLVM_ENABLE_CXX1Y=1 \
|
|
-DLLVM_INCLUDE_EXAMPLES=0 \
|
|
-DLLVM_INCLUDE_TESTS=0 \
|
|
-DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF' \
|
|
-DLLVM_BUILD_LLVM_DYLIB=1 \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr ..
|
|
|
|
MAKEFLAGS="$MAKEFLAGS" make
|
|
make DESTDIR=$PKG install
|
|
|
|
# multilib stub
|
|
mv $PKG/usr/include/llvm/Config/llvm-config{,-64}.h
|
|
|
|
install -m 0644 $SRC/llvm-config.h $PKG/usr/include/llvm/Config/
|
|
|
|
}
|