From 10526b174a75a7e636cab8781a4a490534aa47f0 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 5 Sep 2016 14:52:16 -0400 Subject: [PATCH] ndk-sysroot: Bundle libatomic.a Fixes #430. --- packages/ndk-sysroot/build.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/ndk-sysroot/build.sh b/packages/ndk-sysroot/build.sh index 6a68b7b1a..3b2ca55a0 100644 --- a/packages/ndk-sysroot/build.sh +++ b/packages/ndk-sysroot/build.sh @@ -1,10 +1,11 @@ TERMUX_PKG_HOMEPAGE=https://developer.android.com/tools/sdk/ndk/index.html TERMUX_PKG_DESCRIPTION="System header and library files from the Android NDK needed for compiling C programs" TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION -TERMUX_PKG_BUILD_REVISION=4 +TERMUX_PKG_BUILD_REVISION=5 TERMUX_PKG_NO_DEVELSPLIT=yes # Depend on libandroid-support-dev so that iconv.h and libintl.h are available: TERMUX_PKG_DEPENDS="libandroid-support-dev" +TERMUX_PKG_KEEP_STATIC_LIBRARIES="true" termux_step_extract_into_massagedir () { mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/pkgconfig $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include @@ -25,6 +26,12 @@ Libs: -L$TERMUX_PREFIX/lib -lz Cflags: -I$TERMUX_PREFIX/include HERE + local LIBATOMIC_PATH=$TERMUX_STANDALONE_TOOLCHAIN/$TERMUX_HOST_PLATFORM/lib + if [ $TERMUX_ARCH_BITS = 64 ]; then LIBATOMIC_PATH+="64"; fi + if [ $TERMUX_ARCH = "arm" ]; then LIBGCC_PATH+="/armv7-a"; fi + LIBATOMIC_PATH+="/libatomic.a" + cp $LIBATOMIC_PATH $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/libatomic.a + # librt and libpthread are built into libc on android, so setup them as symlinks # to libc for compatibility with programs that users try to build: local _SYSTEM_LIBDIR=/system/lib64