[Android] build: add STDC defines hack due to old c++11 in ndk
Thomas Guillem
git at videolan.org
Thu Jun 18 13:24:39 CEST 2015
vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jun 18 13:23:23 2015 +0200| [d13d9296aaf8ced395d4572139085101f7e530dd] | 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=d13d9296aaf8ced395d4572139085101f7e530dd
---
compile-libvlc.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 7ef3268..fc7ee91 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