blob: 29e7c88017395721fdc8af7ab06ed3bc356476fe (
plain)
1 # Description: LLVM
2 # URL: http://llvm.org
3 # Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
4 # Packager: Tilman Sauerbeck, tilman at crux dot nu
5 # Depends on: python-32 llvm
6
7 name=llvm-32
8 version=3.9.1
9 release=1
10 source=(http://llvm.org/releases/$version/llvm-$version.src.tar.xz
11 0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch)
12
13 build() {
14 cd llvm-$version.src
15
16 patch -p1 -i $SRC/0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch
17
18 install -d build $SRC/keep
19 cd build
20
21 cmake \
22 -DLLVM_ENABLE_CXX1Y=1 \
23 -DLLVM_INCLUDE_EXAMPLES=0 \
24 -DLLVM_INCLUDE_TESTS=0 \
25 -DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF' \
26 -DLLVM_BUILD_LLVM_DYLIB=1 \
27 -DCMAKE_BUILD_TYPE=Release \
28 -DCMAKE_INSTALL_PREFIX=/usr \
29 -DLLVM_LIBDIR_SUFFIX=32 \
30 -DLLVM_TARGET=i686-pc-linux-gnu ..
31
32 MAKEFLAGS="$MAKEFLAGS" make
33 make DESTDIR=$PKG install
34
35 # keep 32bit header and config
36 install -t $SRC/keep $PKG/usr/bin/llvm-config $PKG/usr/include/llvm/Config/llvm-config.h
37
38 # remove unneeded files
39 rm -r $PKG/usr/{bin,include}
40
41 # install 32bit header and config
42 install -m 0755 -D $SRC/keep/llvm-config $PKG/usr/bin/llvm-config-32
43 install -m 0644 -D $SRC/keep/llvm-config.h $PKG/usr/include/llvm/Config/llvm-config-32.h
44 }
|