[vlc-commits] contrib: libvpx: fix for NDK21
Thomas Guillem
git at videolan.org
Thu Jan 23 14:11:32 CET 2020
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 22 15:04:16 2020 +0100| [69730443d57c2ffe46e60e57162da4a2007b9d53] | committer: Thomas Guillem
contrib: libvpx: fix for NDK21
cf. # comment.
This gcc test is only needed during the NDK 18 -> 21 transtion.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=69730443d57c2ffe46e60e57162da4a2007b9d53
---
contrib/src/vpx/rules.mak | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index 8dd9f6305c..a461c61d59 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -147,8 +147,18 @@ ifndef WITH_OPTIMIZATION
VPX_CONF += --enable-debug --disable-optimizations
endif
+ifdef HAVE_ANDROID
+# Starting NDK19, standalone toolchains are deprecated and gcc is not shipped.
+# The presence of gcc can be used to detect if we are using an old standalone
+# toolchain. Unfortunately, libvpx buildsystem only work with standalone
+# toolchains, therefore pass the HOSTVARS directly to bypass any detection.
+ifneq ($(shell $(VPX_CROSS)gcc -v >/dev/null 2>&1 || echo FAIL),)
+VPX_HOSTVARS = $(HOSTVARS)
+endif
+endif
+
.vpx: libvpx
- cd $< && LDFLAGS="$(VPX_LDFLAGS)" CROSS=$(VPX_CROSS) ./configure --target=$(VPX_TARGET) \
+ cd $< && LDFLAGS="$(VPX_LDFLAGS)" CROSS=$(VPX_CROSS) $(VPX_HOSTVARS) ./configure --target=$(VPX_TARGET) \
$(VPX_CONF) --prefix=$(PREFIX)
cd $< && $(MAKE)
$(call pkg_static,"vpx.pc")
More information about the vlc-commits
mailing list