vlc | branch: master | Tristan Matthews <tma...@videolan.org> | Tue Jan 21 18:06:20 2020 -0500| [b932973a906848c4b4eeb4f4a52ef50ed0b5d06d] | committer: Thomas Guillem
contrib: update libvpx to 1.8.2 Co-authored-by: Felix Paul Kühne <fkue...@videolan.org> Co-authored-by: Thomas Guillem <tho...@gllm.fr> Signed-off-by: Thomas Guillem <tho...@gllm.fr> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b932973a906848c4b4eeb4f4a52ef50ed0b5d06d --- contrib/src/vpx/SHA512SUMS | 2 +- .../src/vpx/libvpx-android-toolchain_path.patch | 19 ----- contrib/src/vpx/libvpx-android.patch | 95 +++------------------- contrib/src/vpx/libvpx-ios.patch | 46 ++++------- contrib/src/vpx/rules.mak | 15 ++-- 5 files changed, 35 insertions(+), 142 deletions(-) diff --git a/contrib/src/vpx/SHA512SUMS b/contrib/src/vpx/SHA512SUMS index 4837909c27..d9ee76c002 100644 --- a/contrib/src/vpx/SHA512SUMS +++ b/contrib/src/vpx/SHA512SUMS @@ -1 +1 @@ -77477ec7059de1d90f048c10783b4adce463a84c9c828f125686e533f5bc8c9eeab8a1747df5c928e0869ccf855a9af5608199c8c376a75d35659f719ee870ef libvpx-1.8.0.tar.gz +da2ab0775a28ddd78654bbe46886e833d4ef7ba91867fc1427dceced735b6177eff06b24f204c075c50c3a5cadc5be6a1fb213c44df189218a543b52554f3a38 libvpx-1.8.2.tar.gz diff --git a/contrib/src/vpx/libvpx-android-toolchain_path.patch b/contrib/src/vpx/libvpx-android-toolchain_path.patch deleted file mode 100644 index 66c5b0f149..0000000000 --- a/contrib/src/vpx/libvpx-android-toolchain_path.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- libvpx-1.8.0/build/make/configure.sh.orig 2019-05-09 08:39:28.062680326 -0400 -+++ libvpx-1.8.0/build/make/configure.sh 2019-05-09 08:40:19.974415124 -0400 -@@ -1031,9 +1031,14 @@ - android*) - if [ -n "${sdk_path}" ]; then - SDK_PATH=${sdk_path} -+ if [ ${tgt_isa} != "arm64" ]; then -+ tools_prefix=arm-linux-androideabi- -+ else -+ tools_prefix=aarch64-linux-android- -+ fi - COMPILER_LOCATION=`find "${SDK_PATH}" \ -- -name "arm-linux-androideabi-gcc*" -print -quit` -- TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/arm-linux-androideabi- -+ -name "${tools_prefix}gcc*" -print -quit` -+ TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/${tools_prefix} - CC=clang - CXX=clang++ - AR=llvm-ar diff --git a/contrib/src/vpx/libvpx-android.patch b/contrib/src/vpx/libvpx-android.patch index 7f9445fa5f..325fd53bf8 100644 --- a/contrib/src/vpx/libvpx-android.patch +++ b/contrib/src/vpx/libvpx-android.patch @@ -1,92 +1,17 @@ -We don't use Android.mk to build libvpx. Then we have to force the build of -cpu-features.c. Additionally, we don't need to link with pthread. - ---- libvpx/build/make/configure.sh.orig 2019-05-08 15:33:05.038238914 -0400 -+++ libvpx/build/make/configure.sh 2019-05-08 15:52:29.424209219 -0400 -@@ -689,8 +689,8 @@ - } - - setup_gnu_toolchain() { -- CC=${CC:-${CROSS}gcc} -- CXX=${CXX:-${CROSS}g++} -+ CC=clang -+ CXX=clang++ - AR=${AR:-${CROSS}ar} - LD=${LD:-${CROSS}${link_with_cc:-ld}} - AS=${AS:-${CROSS}as} -@@ -1110,9 +1110,9 @@ - COMPILER_LOCATION=`find "${SDK_PATH}" \ - -name "arm-linux-androideabi-gcc*" -print -quit` - TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/arm-linux-androideabi- -- CC=${TOOLCHAIN_PATH}gcc -- CXX=${TOOLCHAIN_PATH}g++ -- AR=${TOOLCHAIN_PATH}ar -+ CC=clang -+ CXX=clang++ -+ AR=llvm-ar - LD=${TOOLCHAIN_PATH}gcc - AS=${TOOLCHAIN_PATH}as - STRIP=${TOOLCHAIN_PATH}strip -@@ -1132,17 +1132,17 @@ - add_ldflags "--sysroot=${alt_libc}" - fi - -- # linker flag that routes around a CPU bug in some -- # Cortex-A8 implementations (NDK Dev Guide) -- add_ldflags "-Wl,--fix-cortex-a8" -- - enable_feature pic - soft_enable realtime_only - if [ ${tgt_isa} = "armv7" ]; then -+ # linker flag that routes around a CPU bug in some -+ # Cortex-A8 implementations (NDK Dev Guide) -+ add_ldflags "-Wl,--fix-cortex-a8" - soft_enable runtime_cpu_detect - fi - if enabled runtime_cpu_detect; then -- add_cflags "-I${SDK_PATH}/sources/android/cpufeatures" -+ cp "${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c" vpx_ports -+ add_cflags "-I${ANDROID_NDK}/sources/android/cpufeatures" - fi - else - echo "Assuming standalone build with NDK toolchain." -@@ -1546,13 +1546,6 @@ - *-android-gcc) - # bionic includes basic pthread functionality, obviating -lpthread. - ;; -- *) -- check_header pthread.h && check_lib -lpthread <<EOF && add_extralibs -lpthread || disable_feature pthread_h --#include <pthread.h> --#include <stddef.h> --int main(void) { return pthread_create(NULL, NULL, NULL, NULL); } --EOF -- ;; - esac - fi - ---- libvpx/libs.mk.orig 2019-05-08 15:46:19.034127288 -0400 -+++ libvpx/libs.mk 2019-05-08 15:52:00.152360798 -0400 -@@ -323,7 +323,7 @@ - $(qexec)echo 'Conflicts:' >> $@ - $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@ - ifeq ($(HAVE_PTHREAD_H),yes) -- $(qexec)echo 'Libs.private: -lm -lpthread' >> $@ -+ $(qexec)echo 'Libs.private: -lm' >> $@ - else - $(qexec)echo 'Libs.private: -lm' >> $@ - endif ---- libvpx/vpx_ports/vpx_ports.mk.orig 2019-05-08 15:47:31.609751458 -0400 -+++ libvpx/vpx_ports/vpx_ports.mk 2019-05-08 15:47:52.945640970 -0400 +diff -Naur libvpx-1.8.2.orig/vpx_ports/vpx_ports.mk libvpx-1.8.2/vpx_ports/vpx_ports.mk +--- libvpx-1.8.2.orig/vpx_ports/vpx_ports.mk 2019-12-10 00:09:20.000000000 +0100 ++++ libvpx-1.8.2/vpx_ports/vpx_ports.mk 2020-01-22 14:06:41.478331277 +0100 @@ -35,6 +35,7 @@ endif - PORTS_SRCS-$(ARCH_ARM) += arm_cpudetect.c -+PORTS_SRCS-$(ARCH_ARM) += cpu-features.c - PORTS_SRCS-$(ARCH_ARM) += arm.h + PORTS_SRCS-$(VPX_ARCH_ARM) += arm_cpudetect.c ++PORTS_SRCS-$(VPX_ARCH_ARM) += cpu-features.c + PORTS_SRCS-$(VPX_ARCH_ARM) += arm.h - PORTS_SRCS-$(ARCH_PPC) += ppc_cpudetect.c ---- libvpx/vpx_ports/x86_abi_support.asm.orig 2019-05-08 15:50:53.016708446 -0400 -+++ libvpx/vpx_ports/x86_abi_support.asm 2019-05-08 15:51:24.152547214 -0400 + PORTS_SRCS-$(VPX_ARCH_PPC) += ppc_cpudetect.c +diff -Naur libvpx-1.8.2.orig/vpx_ports/x86_abi_support.asm libvpx-1.8.2/vpx_ports/x86_abi_support.asm +--- libvpx-1.8.2.orig/vpx_ports/x86_abi_support.asm 2019-12-10 00:09:20.000000000 +0100 ++++ libvpx-1.8.2/vpx_ports/x86_abi_support.asm 2020-01-22 14:07:11.774877937 +0100 @@ -393,6 +393,7 @@ ; On Android platforms use lrand48 when building postproc routines. Prior to L diff --git a/contrib/src/vpx/libvpx-ios.patch b/contrib/src/vpx/libvpx-ios.patch index 299fe5b05a..06a28d9293 100644 --- a/contrib/src/vpx/libvpx-ios.patch +++ b/contrib/src/vpx/libvpx-ios.patch @@ -1,6 +1,6 @@ ---- libvpx/build/make/configure.sh.orig 2019-05-08 15:33:05.038238914 -0400 -+++ libvpx/build/make/configure.sh 2019-05-08 15:34:46.909711375 -0400 -@@ -863,88 +863,6 @@ +--- libvpx/build/make/configure.sh.orig 2020-01-21 18:01:06.103409182 -0500 ++++ libvpx/build/make/configure.sh 2020-01-21 18:01:33.395259084 -0500 +@@ -832,92 +832,6 @@ # PIC is probably what we want when building shared libs enabled shared && soft_enable pic @@ -75,6 +75,10 @@ - add_cflags "-mmacosx-version-min=10.13" - add_ldflags "-mmacosx-version-min=10.13" - ;; +- *-darwin18-*) +- add_cflags "-mmacosx-version-min=10.14" +- add_ldflags "-mmacosx-version-min=10.14" +- ;; - *-iphonesimulator-*) - add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" - add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}" @@ -89,30 +93,16 @@ # Handle Solaris variants. Solaris 10 needs -lposix4 case ${toolchain} in sparc-solaris-*) -@@ -1177,12 +1095,6 @@ - add_cflags -isysroot ${alt_libc} - fi +@@ -1106,12 +1020,6 @@ + add_cflags -isysroot ${alt_libc} + fi -- if [ "${LD}" = "${CXX}" ]; then -- add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}" -- else -- add_ldflags -ios_version_min "${IOS_VERSION_MIN}" -- fi +- if [ "${LD}" = "${CXX}" ]; then +- add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}" +- else +- add_ldflags -ios_version_min "${IOS_VERSION_MIN}" +- fi - - for d in lib usr/lib usr/lib/system; do - try_dir="${alt_libc}/${d}" - [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}" -@@ -1372,6 +1284,13 @@ - case ${tgt_cc} in - gcc*) - add_cflags -m${bits} -+ case ${tgt_os} in -+ darwin*) -+ ;; -+ *) -+ add_ldflags -m${bits} -+ ;; -+ esac - add_ldflags -m${bits} - ;; - esac + for d in lib usr/lib usr/lib/system; do + try_dir="${alt_libc}/${d}" + [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}" diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak index 630f4abdf2..23841bb28c 100644 --- a/contrib/src/vpx/rules.mak +++ b/contrib/src/vpx/rules.mak @@ -1,6 +1,6 @@ # libvpx -VPX_VERSION := 1.8.0 +VPX_VERSION := 1.8.2 VPX_URL := http://github.com/webmproject/libvpx/archive/v${VPX_VERSION}.tar.gz PKGS += vpx @@ -18,7 +18,8 @@ libvpx: libvpx-$(VPX_VERSION).tar.gz .sum-vpx $(APPLY) $(SRC)/vpx/libvpx-ios.patch ifdef HAVE_ANDROID $(APPLY) $(SRC)/vpx/libvpx-android.patch - $(APPLY) $(SRC)/vpx/libvpx-android-toolchain_path.patch + cp "${ANDROID_NDK}"/sources/android/cpufeatures/cpu-features.c $(UNPACK_DIR)/vpx_ports + cp "${ANDROID_NDK}"/sources/android/cpufeatures/cpu-features.h $(UNPACK_DIR) endif $(MOVE) @@ -126,10 +127,11 @@ else VPX_CONF += --extra-cflags="-mstackrealign" endif ifdef HAVE_MACOSX -VPX_CONF += --sdk-path=$(MACOSX_SDK) --extra-cflags="$(EXTRA_CFLAGS)" +VPX_CONF += --extra-cflags="$(CFLAGS) $(EXTRA_CFLAGS)" endif ifdef HAVE_IOS -VPX_CONF += --sdk-path=$(IOS_SDK) --enable-vp8-decoder +VPX_CONF += --enable-vp8-decoder --disable-tools +VPX_CONF += --extra-cflags="$(CFLAGS) $(EXTRA_CFLAGS)" ifdef HAVE_TVOS VPX_LDFLAGS := -L$(IOS_SDK)/usr/lib -isysroot $(IOS_SDK) -mtvos-version-min=9.0 else @@ -143,11 +145,6 @@ VPX_LDFLAGS += -arch $(ARCH) endif endif endif -ifdef HAVE_ANDROID -# vpx configure.sh overrides our sysroot and it looks for it itself, and -# uses that path to look for the compiler (which we already know) -VPX_CONF += --sdk-path=$(shell dirname $(shell which $(HOST)-clang)) -endif ifneq ($(filter i386 x86_64,$(ARCH)),) # broken text relocations or invalid register for .seh_savexmm with gcc8 _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits