[Android] build: add STDC defines hack due to old c++11 in ndk
Thomas Guillem
git at videolan.org
Thu Jun 18 13:27:02 CEST 2015
vlc-ports/android | branch: 1.4.x | Thomas Guillem <thomas at gllm.fr> | Thu Jun 18 13:23:23 2015 +0200| [6e600d810be5e2ea1685a4114f743727cfa7a541] | committer: Thomas Guillem
build: add STDC defines hack due to old c++11 in ndk
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=6e600d810be5e2ea1685a4114f743727cfa7a541
---
compile-libvlc.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 3cae983..f3010cc 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -377,6 +377,9 @@ fi
EXTRA_CFLAGS="${EXTRA_CFLAGS} -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${GCCVER}/include"
EXTRA_CFLAGS="${EXTRA_CFLAGS} -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${GCCVER}/libs/${ANDROID_ABI}/include"
+# XXX: remove when ndk C++11 is updated
+EXTRA_CXXFLAGS="-D__STDC_FORMAT_MACROS=1 -D__STDC_CONSTANT_MACROS=1 -D__STDC_LIMIT_MACROS=1"
+
CPPFLAGS="-I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${GCCVER}/include -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${GCCVER}/libs/${ANDROID_ABI}/include"
#################
@@ -520,7 +523,7 @@ fi
if [ ! -e ./config.h -o "$RELEASE" = 1 ]; then
CPPFLAGS="$CPPFLAGS" \
CFLAGS="$CFLAGS ${EXTRA_CFLAGS}" \
-CXXFLAGS="$CFLAGS" \
+CXXFLAGS="$CFLAGS ${EXTRA_CXXFLAGS}" \
LDFLAGS="$LDFLAGS" \
CC="${CROSS_COMPILE}gcc --sysroot=${SYSROOT}" \
CXX="${CROSS_COMPILE}g++ --sysroot=${SYSROOT} -D__cpp_static_assert=200410" \
More information about the Android
mailing list