42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
# Description: LLVM
|
|
# URL: http://llvm.org
|
|
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
|
|
# Packager: Tilman Sauerbeck, tilman at crux dot nu
|
|
# Depends on: python-32 llvm
|
|
|
|
name=llvm-32
|
|
version=3.9.0
|
|
release=2
|
|
source=(http://llvm.org/releases/$version/llvm-$version.src.tar.xz)
|
|
|
|
build() {
|
|
cd llvm-$version.src
|
|
|
|
install -d build $SRC/keep
|
|
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 \
|
|
-DLLVM_LIBDIR_SUFFIX=32 \
|
|
-DLLVM_TARGET=i686-pc-linux-gnu ..
|
|
|
|
MAKEFLAGS="$MAKEFLAGS" make
|
|
make DESTDIR=$PKG install
|
|
|
|
# keep 32bit header and config
|
|
install -t $SRC/keep $PKG/usr/bin/llvm-config $PKG/usr/include/llvm/Config/llvm-config.h
|
|
|
|
# remove unneeded files
|
|
rm -r $PKG/usr/{bin,include}
|
|
|
|
# install 32bit header and config
|
|
install -m 0755 -D $SRC/keep/llvm-config $PKG/usr/bin/llvm-config-32
|
|
install -m 0644 -D $SRC/keep/llvm-config.h $PKG/usr/include/llvm/Config/llvm-config-32.h
|
|
}
|