aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-04-04 02:52:55 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-04-04 02:52:55 +0200
commit5cc7669a630e42e0f0a5e2e132c34a3e067b7f4c (patch)
treeb149be9d6940b6ecc8af791b0b7b575844cd5499 /community
parent3de9a671f8d84445e92988c5cf19fdbfeffb0fb8 (diff)
community/llvm-libunwind: add support for cross compilation
Diffstat (limited to 'community')
-rw-r--r--community/llvm-libunwind/APKBUILD10
1 files changed, 8 insertions, 2 deletions
diff --git a/community/llvm-libunwind/APKBUILD b/community/llvm-libunwind/APKBUILD
index 300e72c017a..e750a816371 100644
--- a/community/llvm-libunwind/APKBUILD
+++ b/community/llvm-libunwind/APKBUILD
@@ -22,6 +22,12 @@ build() {
mkdir -p "$builddir/build"
cd "$builddir/build"
+ local crossopts=''
+ [ "$CBUILD" != "$CHOST" ] && crossopts="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_HOST_SYSTEM_NAME=Linux
+ -DLIBUNWIND_SYSROOT=$CBUILDROOT"
+
cmake .. \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
@@ -30,8 +36,8 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
\
-DLLVM_CONFIG_PATH="/usr/lib/llvm$_llvmver/bin/llvm-config" \
- -DLIBUNWIND_HAS_NODEFAULTLIBS_FLAG=OFF
-
+ -DLIBUNWIND_HAS_NODEFAULTLIBS_FLAG=OFF \
+ $crossopts
make
}