libcxxabi: fix cross

This commit is contained in:
Rasmus Thomsen 2018-12-26 15:55:27 +01:00 committed by maxice8
parent cb2e875386
commit 434c03bce5
1 changed files with 8 additions and 4 deletions

View File

@ -5,7 +5,8 @@ revision=1
wrksrc="${pkgname}-${version}.src"
build_style=cmake
configure_args="-DLIBCXXABI_LIBCXX_INCLUDES=../libcxx/include
-DLIBCXXABI_USE_LLVM_UNWINDER=1"
-DLIBCXXABI_USE_LLVM_UNWINDER=1
-DLLVM_DEFAULT_TARGET_TRIPLE=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}"
make_build_args="VERBOSE=1"
hostmakedepends="llvm7"
makedepends="llvm7 llvm-libunwind-devel"
@ -17,18 +18,21 @@ distfiles="https://www.llvm.org/releases/${version}/${pkgname}-${version}.src.ta
https://www.llvm.org/releases/${version}/libcxx-${version}.src.tar.xz"
checksum="8168903a157ca7ab8423d3b974eaa497230b1564ceb57260be2bd14412e8ded8
020002618b319dc2a8ba1f2cba88b8cc6a209005ed8ad29f9de0c562c6ebb9f1"
nocross="error: invalid operands of types 'char [8]' and 'const uint64_t'"
# Aarch64 fails to build with gcc
case "$XBPS_TARGET_MACHINE" in
armv7l)
broken="invalid operands of types 'char [8]' and 'const uint64_t' to binary 'operator&'"
;;
aarch64*)
hostmakedepends+=" clang"
configure_args+=" -DLIBCXXABI_TARGET_TRIPLE=${XBPS_CROSS_TRIPLET}"
pre_configure() {
export CC="clang"
export CXX="clang++"
CFLAGS+=" --target=$XBPS_CROSS_TRIPLET --sysroot=${XBPS_CROSS_BASE}"
CXXFLAGS+=" --target=${XBPS_CROSS_TRIPLET} --sysroot=${XBPS_CROSS_BASE}"
CFLAGS+=" --target=${XBPS_CROSS_TRIPLET} --sysroot=${XBPS_CROSS_BASE}"
CXXFLAGS+=" --target=${XBPS_CROSS_TRIPLET} --sysroot=${XBPS_CROSS_BASE} -I$(ls -d ${XBPS_CROSS_BASE}/usr/include/c++/*/${XBPS_CROSS_TRIPLET} | head -n1)"
}
;;
esac