[Android] compile.sh: link with unwind.a on armv7

Thomas Guillem git at videolan.org
Thu Dec 22 13:20:46 CET 2016


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Dec 22 11:58:28 2016 +0100| [85bd147daa7025625f1461f860a2ef29e9f86cf5] | committer: Thomas Guillem

compile.sh: link with unwind.a on armv7

This fixes a SIGSEGV in _Unwind_Resume on some devices (Nexus 7).

> https://code.videolan.org/videolan/vlc-android/commit/85bd147daa7025625f1461f860a2ef29e9f86cf5
---

 compile-libvlc.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 3d816b1..72e0dd3 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -401,11 +401,13 @@ NDK_LIB_DIR="${NDK_TOOLCHAIN_DIR}/${TARGET_TUPLE}/lib"
 if [ "${PLATFORM_SHORT_ARCH}" = "x86_64" -o "${PLATFORM_SHORT_ARCH}" = "mips64" ];then
     NDK_LIB_DIR="${NDK_LIB_DIR}64"
 fi
+NDK_LIB_UNWIND=""
 if [ "${ANDROID_ABI}" = "armeabi-v7a" ];then
     NDK_LIB_DIR="${NDK_LIB_DIR}/armv7-a"
+    NDK_LIB_UNWIND="-lunwind"
 fi
 
-VLC_LDFLAGS="${VLC_LDFLAGS} -L${NDK_LIB_DIR} -lc++abi"
+VLC_LDFLAGS="${VLC_LDFLAGS} -L${NDK_LIB_DIR} -lc++abi ${NDK_LIB_UNWIND}"
 
 # Release or not?
 if [ "$RELEASE" = 1 ]; then
@@ -858,7 +860,8 @@ echo -e "ndk-build medialibrary"
 MEDIALIBRARY_LDLIBS="-L$SRC_DIR/libvlc/jni/libs/$ANDROID_ABI -lvlc \
 -L${MEDIALIBRARY_BUILD_DIR}/build-android-$ANDROID_ABI/.libs -lmedialibrary \
 -L$SRC_DIR/vlc/contrib/contrib-android-$TARGET_TUPLE/jpeg/.libs -ljpeg \
--L$MEDIALIBRARY_MODULE_DIR/$SQLITE_RELEASE/build-$ANDROID_ABI/.libs -lsqlite3"
+-L$MEDIALIBRARY_MODULE_DIR/$SQLITE_RELEASE/build-$ANDROID_ABI/.libs -lsqlite3 \
+-L${NDK_LIB_DIR} -lc++abi ${NDK_LIB_UNWIND}"
 
 $ANDROID_NDK/ndk-build -C medialibrary \
     APP_STL="c++_shared" \



More information about the Android mailing list