[vlc-devel] [PATCH] contrib: update libvpx to 1.8.0

Tristan Matthews tmatth at videolan.org
Thu May 9 14:48:15 CEST 2019


This drops patches that have already been merged upstream.

---
 .../vpx/0001-ads2gas-Add-a-noelf-option.patch | 80 ----------------
 ...figure-Add-an-armv7-win32-gcc-target.patch | 66 -------------
 ...figure-Add-an-arm64-win64-gcc-target.patch | 29 ------
 contrib/src/vpx/SHA512SUMS                    |  2 +-
 .../vpx/libvpx-android-toolchain_path.patch   | 10 +-
 contrib/src/vpx/libvpx-android.patch          | 95 ++++++++++---------
 contrib/src/vpx/libvpx-ios.patch              | 16 ++--
 contrib/src/vpx/rules.mak                     |  5 +-
 8 files changed, 64 insertions(+), 239 deletions(-)
 delete mode 100644 contrib/src/vpx/0001-ads2gas-Add-a-noelf-option.patch
 delete mode 100644 contrib/src/vpx/0002-configure-Add-an-armv7-win32-gcc-target.patch
 delete mode 100644 contrib/src/vpx/0003-configure-Add-an-arm64-win64-gcc-target.patch

diff --git a/contrib/src/vpx/0001-ads2gas-Add-a-noelf-option.patch b/contrib/src/vpx/0001-ads2gas-Add-a-noelf-option.patch
deleted file mode 100644
index a7275238b9..0000000000
--- a/contrib/src/vpx/0001-ads2gas-Add-a-noelf-option.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From dcddec1e8b994e7bca90779a10e6654491e98fb8 Mon Sep 17 00:00:00 2001
-From: Martin Storsjo <martin at martin.st>
-Date: Wed, 21 Mar 2018 14:09:04 +0200
-Subject: [PATCH 1/3] ads2gas: Add a -noelf option
-
-This allows skipping elf specific features from the output.
-
-Change-Id: I739299ba41286ca10415e056b4ffd561be5e0350
----
- build/make/ads2gas.pl | 25 ++++++++++++++++++-------
- 1 file changed, 18 insertions(+), 7 deletions(-)
-
-diff --git a/build/make/ads2gas.pl b/build/make/ads2gas.pl
-index 029cc4a..91609da 100755
---- a/build/make/ads2gas.pl
-+++ b/build/make/ads2gas.pl
-@@ -23,9 +23,11 @@ use lib $FindBin::Bin;
- use thumb;
- 
- my $thumb = 0;
-+my $elf = 1;
- 
- foreach my $arg (@ARGV) {
-     $thumb = 1 if ($arg eq "-thumb");
-+    $elf = 0 if ($arg eq "-noelf");
- }
- 
- print "@ This file was created from a .asm file\n";
-@@ -140,7 +142,11 @@ while (<STDIN>)
- 
-     # Make function visible to linker, and make additional symbol with
-     # prepended underscore
--    s/EXPORT\s+\|([\$\w]*)\|/.global $1 \n\t.type $1, function/;
-+    if ($elf) {
-+        s/EXPORT\s+\|([\$\w]*)\|/.global $1 \n\t.type $1, function/;
-+    } else {
-+        s/EXPORT\s+\|([\$\w]*)\|/.global $1/;
-+    }
-     s/IMPORT\s+\|([\$\w]*)\|/.global $1/;
- 
-     s/EXPORT\s+([\$\w]*)/.global $1/;
-@@ -181,11 +187,16 @@ while (<STDIN>)
-     # eabi_attributes numerical equivalents can be found in the
-     # "ARM IHI 0045C" document.
- 
--    # REQUIRE8 Stack is required to be 8-byte aligned
--    s/\sREQUIRE8/.eabi_attribute 24, 1 \@Tag_ABI_align_needed/g;
-+    if ($elf) {
-+        # REQUIRE8 Stack is required to be 8-byte aligned
-+        s/\sREQUIRE8/.eabi_attribute 24, 1 \@Tag_ABI_align_needed/g;
- 
--    # PRESERVE8 Stack 8-byte align is preserved
--    s/\sPRESERVE8/.eabi_attribute 25, 1 \@Tag_ABI_align_preserved/g;
-+        # PRESERVE8 Stack 8-byte align is preserved
-+        s/\sPRESERVE8/.eabi_attribute 25, 1 \@Tag_ABI_align_preserved/g;
-+    } else {
-+        s/\sREQUIRE8//;
-+        s/\sPRESERVE8//;
-+    }
- 
-     # Use PROC and ENDP to give the symbols a .size directive.
-     # This makes them show up properly in debugging tools like gdb and valgrind.
-@@ -202,7 +213,7 @@ while (<STDIN>)
-         my $proc;
-         s/\bENDP\b/@ $&/;
-         $proc = pop(@proc_stack);
--        $_ = "\t.size $proc, .-$proc".$_ if ($proc);
-+        $_ = "\t.size $proc, .-$proc".$_ if ($proc and $elf);
-     }
- 
-     # EQU directive
-@@ -225,4 +236,4 @@ while (<STDIN>)
- }
- 
- # Mark that this object doesn't need an executable stack.
--printf ("\t.section\t.note.GNU-stack,\"\",\%\%progbits\n");
-+printf ("\t.section\t.note.GNU-stack,\"\",\%\%progbits\n") if $elf;
--- 
-2.7.4
-
diff --git a/contrib/src/vpx/0002-configure-Add-an-armv7-win32-gcc-target.patch b/contrib/src/vpx/0002-configure-Add-an-armv7-win32-gcc-target.patch
deleted file mode 100644
index 43c763f7ce..0000000000
--- a/contrib/src/vpx/0002-configure-Add-an-armv7-win32-gcc-target.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 6c6085eb50c2a1c44151a9a1f96c925cfe5e7e34 Mon Sep 17 00:00:00 2001
-From: Martin Storsjo <martin at martin.st>
-Date: Wed, 21 Mar 2018 14:12:04 +0200
-Subject: [PATCH 2/3] configure: Add an armv7-win32-gcc target
-
-This builds for windows on arm, with llvm-mingw. The target triplet
-is named -gcc since that's how similar existing targets are named,
-even though it technically runs clang (via frontends named
-"$CROSS-gcc").
-
-Assemble using $CC -c since there's no standalone assembler
-available (except perhaps llvm-mc).
-
-Change-Id: I2c9a319730afef73f811bad79f488dcdc244ab0d
----
- build/make/configure.sh | 14 +++++++++++++-
- configure               |  1 +
- 2 files changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/build/make/configure.sh b/build/make/configure.sh
-index 007e020..9aa4f1c 100644
---- a/build/make/configure.sh
-+++ b/build/make/configure.sh
-@@ -891,7 +891,6 @@ process_common_toolchain() {
-           setup_gnu_toolchain
-           arch_int=${tgt_isa##armv}
-           arch_int=${arch_int%%te}
--          check_add_asflags --defsym ARCHITECTURE=${arch_int}
-           tune_cflags="-mtune="
-           if [ ${tgt_isa} = "armv7" ] || [ ${tgt_isa} = "armv7s" ]; then
-             if [ -z "${float_abi}" ]; then
-@@ -918,6 +917,19 @@ EOF
- 
-           enabled debug && add_asflags -g
-           asm_conversion_cmd="${source_path}/build/make/ads2gas.pl"
-+
-+          case ${tgt_os} in
-+            win*)
-+              asm_conversion_cmd="$asm_conversion_cmd -noelf"
-+              AS="$CC -c"
-+              EXE_SFX=.exe
-+              enable_feature thumb
-+              ;;
-+            *)
-+              check_add_asflags --defsym ARCHITECTURE=${arch_int}
-+              ;;
-+          esac
-+
-           if enabled thumb; then
-             asm_conversion_cmd="$asm_conversion_cmd -thumb"
-             check_add_cflags -mthumb
-diff --git a/configure b/configure
-index fb732ac..16f301e 100755
---- a/configure
-+++ b/configure
-@@ -106,6 +106,7 @@ all_platforms="${all_platforms} armv7-darwin-gcc"    #neon Cortex-A8
- all_platforms="${all_platforms} armv7-linux-rvct"    #neon Cortex-A8
- all_platforms="${all_platforms} armv7-linux-gcc"     #neon Cortex-A8
- all_platforms="${all_platforms} armv7-none-rvct"     #neon Cortex-A8
-+all_platforms="${all_platforms} armv7-win32-gcc"
- all_platforms="${all_platforms} armv7-win32-vs11"
- all_platforms="${all_platforms} armv7-win32-vs12"
- all_platforms="${all_platforms} armv7-win32-vs14"
--- 
-2.7.4
-
diff --git a/contrib/src/vpx/0003-configure-Add-an-arm64-win64-gcc-target.patch b/contrib/src/vpx/0003-configure-Add-an-arm64-win64-gcc-target.patch
deleted file mode 100644
index 07051c8b2e..0000000000
--- a/contrib/src/vpx/0003-configure-Add-an-arm64-win64-gcc-target.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3392bb335ee58bc930da624834c74c1625afbb82 Mon Sep 17 00:00:00 2001
-From: Martin Storsjo <martin at martin.st>
-Date: Wed, 21 Mar 2018 14:15:13 +0200
-Subject: [PATCH 3/3] configure: Add an arm64-win64-gcc target
-
-This configuration doesn't require any extra custom settings, since
-it only uses neon intrinsics that are handled automatically by the
-compiler (no external assembly).
-
-Change-Id: I35415c68f483a430c0672e060a7bbd09a3469512
----
- configure | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/configure b/configure
-index 16f301e..1ba4c48 100755
---- a/configure
-+++ b/configure
-@@ -101,6 +101,7 @@ EOF
- all_platforms="${all_platforms} arm64-android-gcc"
- all_platforms="${all_platforms} arm64-darwin-gcc"
- all_platforms="${all_platforms} arm64-linux-gcc"
-+all_platforms="${all_platforms} arm64-win64-gcc"
- all_platforms="${all_platforms} armv7-android-gcc"   #neon Cortex-A8
- all_platforms="${all_platforms} armv7-darwin-gcc"    #neon Cortex-A8
- all_platforms="${all_platforms} armv7-linux-rvct"    #neon Cortex-A8
--- 
-2.7.4
-
diff --git a/contrib/src/vpx/SHA512SUMS b/contrib/src/vpx/SHA512SUMS
index bd1a8becbb..4837909c27 100644
--- a/contrib/src/vpx/SHA512SUMS
+++ b/contrib/src/vpx/SHA512SUMS
@@ -1 +1 @@
-8b3b766b550f8d86907628d7ed88035f9a2612aac21542e0fd5ad35b905eb82cbe1be02a1a24afce7a3bcc4766f62611971f72724761996b392136c40a1e7ff0  libvpx-1.7.0.tar.gz
+77477ec7059de1d90f048c10783b4adce463a84c9c828f125686e533f5bc8c9eeab8a1747df5c928e0869ccf855a9af5608199c8c376a75d35659f719ee870ef  libvpx-1.8.0.tar.gz
diff --git a/contrib/src/vpx/libvpx-android-toolchain_path.patch b/contrib/src/vpx/libvpx-android-toolchain_path.patch
index c6ef44ee9a..66c5b0f149 100644
--- a/contrib/src/vpx/libvpx-android-toolchain_path.patch
+++ b/contrib/src/vpx/libvpx-android-toolchain_path.patch
@@ -1,8 +1,6 @@
-diff --git a/build/make/configure.sh b/build/make/configure.sh
-index 2e0b239..8853d18 100644
---- a/build/make/configure.sh
-+++ b/build/make/configure.sh
-@@ -951,9 +951,14 @@ EOF
+--- 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}
@@ -18,4 +16,4 @@ index 2e0b239..8853d18 100644
 +            TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/${tools_prefix}
              CC=clang
              CXX=clang++
-             AR=${TOOLCHAIN_PATH}ar
+             AR=llvm-ar
diff --git a/contrib/src/vpx/libvpx-android.patch b/contrib/src/vpx/libvpx-android.patch
index 62a989d2f1..7f9445fa5f 100644
--- a/contrib/src/vpx/libvpx-android.patch
+++ b/contrib/src/vpx/libvpx-android.patch
@@ -1,28 +1,9 @@
 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/libs.mk.orig	2016-05-20 12:24:16.635969371 +0200
-+++ libvpx/libs.mk	2016-05-20 12:25:01.275249347 +0200
-@@ -300,7 +300,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	2016-05-20 12:35:19.293271792 +0200
-+++ libvpx/vpx_ports/vpx_ports.mk	2016-05-20 12:35:06.857472718 +0200
-@@ -21,4 +21,5 @@
- endif
- 
- PORTS_SRCS-$(ARCH_ARM) += arm_cpudetect.c
-+PORTS_SRCS-$(ARCH_ARM) += cpu-features.c
- PORTS_SRCS-$(ARCH_ARM) += arm.h
---- libvpx/build/make/configure.sh.orig	2017-04-08 12:19:54.992242234 +0200
-+++ libvpx/build/make/configure.sh	2017-04-08 12:22:19.280235805 +0200
-@@ -628,8 +628,8 @@
+--- 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() {
@@ -33,7 +14,7 @@ cpu-features.c. Additionally, we don't need to link with pthread.
    AR=${AR:-${CROSS}ar}
    LD=${LD:-${CROSS}${link_with_cc:-ld}}
    AS=${AS:-${CROSS}as}
-@@ -916,8 +916,8 @@
+@@ -1110,9 +1110,9 @@
              COMPILER_LOCATION=`find "${SDK_PATH}" \
                -name "arm-linux-androideabi-gcc*" -print -quit`
              TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/arm-linux-androideabi-
@@ -45,7 +26,21 @@ cpu-features.c. Additionally, we don't need to link with pthread.
 +            AR=llvm-ar
              LD=${TOOLCHAIN_PATH}gcc
              AS=${TOOLCHAIN_PATH}as
-@@ -948,7 +948,8 @@
+             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
@@ -55,18 +50,43 @@ cpu-features.c. Additionally, we don't need to link with pthread.
              fi
            else
              echo "Assuming standalone build with NDK toolchain."
-@@ -1331,9 +1332,6 @@
+@@ -1546,13 +1546,6 @@
        *-android-gcc)
          # bionic includes basic pthread functionality, obviating -lpthread.
          ;;
 -      *)
--        check_header pthread.h && add_extralibs -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/vpx_ports/x86_abi_support.asm.orig	2017-12-22 14:13:01.624421364 +0100
-+++ libvpx/vpx_ports/x86_abi_support.asm	2017-12-22 14:12:32.152908813 +0100
+--- 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
+@@ -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-$(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
 @@ -393,6 +393,7 @@
  
  ; On Android platforms use lrand48 when building postproc routines. Prior to L
@@ -75,22 +95,3 @@ cpu-features.c. Additionally, we don't need to link with pthread.
  %if CONFIG_POSTPROC=1 || CONFIG_VP9_POSTPROC=1
  %ifdef __ANDROID__
  extern sym(lrand48)
---- libvpx/build/make/configure.sh.old	2018-12-06 14:15:31.119934158 +0100
-+++ libvpx/build/make/configure.sh	2018-12-06 14:15:45.883934102 +0100
-@@ -950,13 +950,12 @@
-               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
diff --git a/contrib/src/vpx/libvpx-ios.patch b/contrib/src/vpx/libvpx-ios.patch
index f63c60a184..299fe5b05a 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	2018-07-09 18:57:29.774826691 -0400
-+++ libvpx/build/make/configure.sh	2018-07-09 19:00:34.427868074 -0400
-@@ -818,84 +818,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 @@
    # PIC is probably what we want when building shared libs
    enabled shared && soft_enable pic
  
@@ -11,7 +11,7 @@
 -    IOS_VERSION_MIN="8.0"
 -  else
 -    IOS_VERSION_OPTIONS=""
--    IOS_VERSION_MIN="6.0"
+-    IOS_VERSION_MIN="7.0"
 -  fi
 -
 -  # Handle darwin variants. Newer SDKs allow targeting older
@@ -71,6 +71,10 @@
 -      add_cflags  "-mmacosx-version-min=10.12"
 -      add_ldflags "-mmacosx-version-min=10.12"
 -      ;;
+-    *-darwin17-*)
+-      add_cflags  "-mmacosx-version-min=10.13"
+-      add_ldflags "-mmacosx-version-min=10.13"
+-      ;;
 -    *-iphonesimulator-*)
 -      add_cflags  "-miphoneos-version-min=${IOS_VERSION_MIN}"
 -      add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
@@ -85,7 +89,7 @@
    # Handle Solaris variants. Solaris 10 needs -lposix4
    case ${toolchain} in
      sparc-solaris-*)
-@@ -1086,12 +1012,6 @@
+@@ -1177,12 +1095,6 @@
              add_cflags -isysroot ${alt_libc}
            fi
  
@@ -98,7 +102,7 @@
            for d in lib usr/lib usr/lib/system; do
              try_dir="${alt_libc}/${d}"
              [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
-@@ -1264,6 +1184,13 @@
+@@ -1372,6 +1284,13 @@
        case ${tgt_cc} in
          gcc*)
            add_cflags -m${bits}
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index 722552b5f4..6e411b140f 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -1,6 +1,6 @@
 # libvpx
 
-VPX_VERSION := 1.7.0
+VPX_VERSION := 1.8.0
 VPX_URL := http://github.com/webmproject/libvpx/archive/v${VPX_VERSION}.tar.gz
 
 PKGS += vpx
@@ -21,9 +21,6 @@ ifdef HAVE_ANDROID
 	$(APPLY) $(SRC)/vpx/libvpx-android.patch
 	$(APPLY) $(SRC)/vpx/libvpx-android-toolchain_path.patch
 endif
-	$(APPLY) $(SRC)/vpx/0001-ads2gas-Add-a-noelf-option.patch
-	$(APPLY) $(SRC)/vpx/0002-configure-Add-an-armv7-win32-gcc-target.patch
-	$(APPLY) $(SRC)/vpx/0003-configure-Add-an-arm64-win64-gcc-target.patch
 	$(MOVE)
 
 DEPS_vpx =
-- 
2.19.1



More information about the vlc-devel mailing list