compat-32/llvm-32/Pkgfile

50 lines
1.2 KiB
Plaintext
Raw Normal View History

2014-03-19 13:00:18 +11:00
# Description: LLVM
2013-05-14 12:36:56 +10:00
# URL: http://llvm.org
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
2019-05-26 20:39:19 +10:00
# Depends on: libffi-32 llvm
2013-05-14 12:36:56 +10:00
name=llvm-32
2019-05-26 20:39:19 +10:00
version=8.0.0
2019-02-16 02:04:20 +11:00
release=1
2018-07-28 14:40:08 +10:00
source=(https://llvm.org/releases/$version/llvm-$version.src.tar.xz)
2013-05-14 12:36:56 +10:00
build() {
2018-12-17 00:18:26 +11:00
export CC=gcc
export CXX=g++
2013-05-14 12:36:56 +10:00
cd llvm-$version.src
2018-12-17 00:18:26 +11:00
mkdir -p build $SRC/keep
2015-11-28 12:23:20 -06:00
cd build
2018-07-28 14:40:08 +10:00
cmake .. -G Ninja \
-DLLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
2016-11-10 20:10:10 +11:00
-DLLVM_ENABLE_CXX1Y=1 \
-DLLVM_INCLUDE_EXAMPLES=0 \
2017-03-15 17:36:02 +11:00
-DLLVM_ENABLE_OCAMLDOC=0 \
2016-11-10 20:10:10 +11:00
-DLLVM_INCLUDE_TESTS=0 \
2017-07-09 14:09:59 +10:00
-DLLVM_ENABLE_FFI=1 \
2019-05-26 20:39:19 +10:00
-DLLVM_ENABLE_RTTI=1 \
-DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF' \
-DLLVM_BUILD_LLVM_DYLIB=1 \
2018-12-17 00:18:26 +11:00
-DLLVM_LINK_LLVM_DYLIB=1 \
2016-11-10 20:10:10 +11:00
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_LIBDIR_SUFFIX=32 \
2019-05-26 20:39:19 +10:00
-DLLVM_DEFAULT_TARGET_TRIPLE="i686-pc-linux-gnu" \
2018-07-28 14:40:08 +10:00
-Wno-dev
2016-11-10 20:10:10 +11:00
2018-07-28 14:40:08 +10:00
ninja
DESTDIR=$PKG ninja install
2013-05-14 12:36:56 +10:00
2016-11-10 20:10:10 +11:00
# keep 32bit header and config
install -t $SRC/keep $PKG/usr/bin/llvm-config $PKG/usr/include/llvm/Config/llvm-config.h
2013-05-14 12:36:56 +10:00
2016-11-10 20:10:10 +11:00
# remove unneeded files
2017-10-23 19:31:59 +11:00
rm -r $PKG/usr/{bin,include,share/opt-viewer}
2013-05-14 12:36:56 +10:00
2016-11-10 20:10:10 +11:00
# 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
2013-05-14 12:36:56 +10:00
}