diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-04 02:52:55 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-04 02:52:55 +0200 |
commit | 5cc7669a630e42e0f0a5e2e132c34a3e067b7f4c (patch) | |
tree | b149be9d6940b6ecc8af791b0b7b575844cd5499 /community/llvm-libunwind/APKBUILD | |
parent | 3de9a671f8d84445e92988c5cf19fdbfeffb0fb8 (diff) | |
download | aports-5cc7669a630e42e0f0a5e2e132c34a3e067b7f4c.tar.bz2 aports-5cc7669a630e42e0f0a5e2e132c34a3e067b7f4c.tar.xz |
community/llvm-libunwind: add support for cross compilation
Diffstat (limited to 'community/llvm-libunwind/APKBUILD')
-rw-r--r-- | community/llvm-libunwind/APKBUILD | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/community/llvm-libunwind/APKBUILD b/community/llvm-libunwind/APKBUILD index 300e72c017..e750a81637 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 } |