[Android] [PATCH] Build: add gnu-libstdc++ in EXTRA_LDFLAGS

Thomas Guillem thomas.guillem at gmail.com
Wed Oct 1 18:42:06 CEST 2014


fix protobuf build.
---
 compile.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/compile.sh b/compile.sh
index de5c7e6..e30210d 100755
--- a/compile.sh
+++ b/compile.sh
@@ -165,6 +165,9 @@ EXTRA_CFLAGS="${EXTRA_CFLAGS} -O2"
 EXTRA_CFLAGS="${EXTRA_CFLAGS} -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++${CXXSTL}/include"
 EXTRA_CFLAGS="${EXTRA_CFLAGS} -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++${CXXSTL}/libs/${ANDROID_ABI}/include"
 
+# Setup LDFLAGS
+EXTRA_LDFLAGS="-l${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++${CXXSTL}/libs/${ANDROID_ABI}/libgnustl_static.a"
+
 # Make in //
 UNAMES=$(uname -s)
 MAKEFLAGS=
@@ -248,7 +251,9 @@ else
 fi
 
 echo "EXTRA_CFLAGS= -g ${EXTRA_CFLAGS}" >> config.mak
+echo "EXTRA_LDFLAGS= ${EXTRA_LDFLAGS}" >> config.mak
 export VLC_EXTRA_CFLAGS="${EXTRA_CFLAGS}"
+export VLC_EXTRA_LDFLAGS="${EXTRA_LDFLAGS}"
 
 make fetch
 # We already have zlib available
-- 
2.1.0



More information about the Android mailing list