This commit is contained in:
@@ -129,7 +129,7 @@ function check_packages() {
|
||||
# }
|
||||
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
# unwind for musl cross toolchains
|
||||
# set_current_arch
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
|
||||
function set_current_arch() {
|
||||
@@ -188,6 +188,10 @@ function set_current_arch() {
|
||||
export MAKEFLAGS="-j${JOBS}"
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
# unwind for musl cross toolchains
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
|
||||
function install_unwind_musl() {
|
||||
set_current_arch "$1"
|
||||
|
||||
@@ -219,6 +223,84 @@ function install_unwind_musl() {
|
||||
rm -rf "$BUILD_DIR"
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
# libassert for musl cross toolchains
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
function install_libassert_musl() {
|
||||
local TOOLCHAIN="$1"
|
||||
set_current_arch "$TOOLCHAIN"
|
||||
|
||||
echo "Installing libassert for ${ARCH}"
|
||||
|
||||
local BUILD_DIR="/tmp/libassert-build-${ARCH}"
|
||||
rm -rf "${BUILD_DIR}"
|
||||
mkdir -p "${BUILD_DIR}"
|
||||
pushd "${BUILD_DIR}"
|
||||
|
||||
git clone --depth 1 --branch v2.1.5 https://github.com/jeremy-rifkin/libassert.git .
|
||||
mkdir build && cd build
|
||||
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_SYSROOT="${ARCH_SYSROOT}" \
|
||||
-DCMAKE_C_COMPILER="${CC}" \
|
||||
-DCMAKE_CXX_COMPILER="${CXX}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${ARCH_SYSROOT}/usr" \
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
popd
|
||||
rm -rf "${BUILD_DIR}"
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
# cpptrace for musl cross toolchains
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
|
||||
function install_cpptrace_musl() {
|
||||
local TOOLCHAIN="$1"
|
||||
set_current_arch "$TOOLCHAIN"
|
||||
|
||||
echo "Installing cpptrace for ${ARCH}"
|
||||
|
||||
local BUILD_DIR="/tmp/cpptrace-build-${ARCH}"
|
||||
rm -rf "${BUILD_DIR}"
|
||||
mkdir -p "${BUILD_DIR}"
|
||||
pushd "${BUILD_DIR}"
|
||||
|
||||
git clone --depth 1 --branch v0.8.3 https://github.com/jeremy-rifkin/cpptrace.git .
|
||||
mkdir build && cd build
|
||||
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_SYSROOT="${ARCH_SYSROOT}" \
|
||||
-DCMAKE_C_COMPILER="${CC}" \
|
||||
-DCMAKE_CXX_COMPILER="${CXX}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${ARCH_SYSROOT}/usr" \
|
||||
-DCPPTRACE_UNWIND_WITH_LIBUNWIND=ON \
|
||||
-DCPPTRACE_UNWIND_WITH_UNWIND=OFF \
|
||||
-DCPPTRACE_UNWIND_WITH_EXECINFO=OFF \
|
||||
-DCPPTRACE_UNWIND_WITH_WINAPI=OFF \
|
||||
-DCPPTRACE_UNWIND_WITH_DBGHELP=OFF \
|
||||
-DCPPTRACE_UNWIND_WITH_NOTHING=OFF \
|
||||
-DCPPTRACE_NO_AUTO_CONFIG=ON \
|
||||
-DLibUnwind_INCLUDE_DIR="${ARCH_SYSROOT}/usr/include" \
|
||||
-DLibUnwind_LIBRARY="${ARCH_SYSROOT}/usr/lib/libunwind.a" \
|
||||
-DLibUnwind_FOUND=TRUE \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCPPTRACE_STATIC_DEFINE=ON
|
||||
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
popd
|
||||
rm -rf "${BUILD_DIR}"
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
# OpenSSL for musl cross toolchains
|
||||
#----------------------------------------------------------------------------------------------------------
|
||||
@@ -330,6 +412,8 @@ function install_musl() {
|
||||
|
||||
install_openssl_musl "$TOOLCHAIN"
|
||||
install_unwind_musl "$TOOLCHAIN"
|
||||
install_libassert_musl "$TOOLCHAIN"
|
||||
install_cpptrace_musl "$TOOLCHAIN"
|
||||
done
|
||||
|
||||
# Clean up
|
||||
|
Reference in New Issue
Block a user