[vlc-commits] contrib: aom: fix lib pthread linkage

Victorien Le Couviour--Tuffet git at videolan.org
Tue Oct 23 17:25:10 CEST 2018


vlc/vlc-3.0 | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Tue Sep 18 14:42:07 2018 +0200| [5303c5d4b14f32b0902920fd9126bb5b54157dc8] | committer: Thomas Guillem

contrib: aom: fix lib pthread linkage

Fixes android NDK 17 build

(cherry picked from commit 65be347f2fc40f08037bbdcc6726aea21e01abf7)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=5303c5d4b14f32b0902920fd9126bb5b54157dc8
---

 contrib/src/aom/aom-android-pthreads.patch | 19 +++++++++++++++++++
 contrib/src/aom/rules.mak                  |  3 +++
 2 files changed, 22 insertions(+)

diff --git a/contrib/src/aom/aom-android-pthreads.patch b/contrib/src/aom/aom-android-pthreads.patch
new file mode 100644
index 0000000000..8b414772e6
--- /dev/null
+++ b/contrib/src/aom/aom-android-pthreads.patch
@@ -0,0 +1,19 @@
+diff --git a/build/cmake/pkg_config.cmake b/build/cmake/pkg_config.cmake
+index 64e2021..1cab2a3 100644
+--- a/build/cmake/pkg_config.cmake
++++ b/build/cmake/pkg_config.cmake
+@@ -47,12 +47,6 @@ file(APPEND "${pkgconfig_file}"
+ file(APPEND "${pkgconfig_file}" "Version: ${package_version}\n")
+ file(APPEND "${pkgconfig_file}" "Requires:\n")
+ file(APPEND "${pkgconfig_file}" "Conflicts:\n")
+-if(CONFIG_MULTITHREAD AND HAVE_PTHREAD_H)
+-  file(APPEND "${pkgconfig_file}"
+-              "Libs: -L\${prefix}/lib -l${pkg_name} -lm -lpthread\n")
+-  file(APPEND "${pkgconfig_file}" "Libs.private: -lm -lpthread\n")
+-else()
+-  file(APPEND "${pkgconfig_file}" "Libs: -L\${prefix}/lib -l${pkg_name} -lm\n")
+-  file(APPEND "${pkgconfig_file}" "Libs.private: -lm\n")
+-endif()
++file(APPEND "${pkgconfig_file}" "Libs: -L\${prefix}/lib -l${pkg_name} -lm\n")
++file(APPEND "${pkgconfig_file}" "Libs.private: -lm\n")
+ file(APPEND "${pkgconfig_file}" "Cflags: -I\${prefix}/include\n")
diff --git a/contrib/src/aom/rules.mak b/contrib/src/aom/rules.mak
index d5c18b52d9..53d94f3d21 100644
--- a/contrib/src/aom/rules.mak
+++ b/contrib/src/aom/rules.mak
@@ -23,6 +23,9 @@ aom: aom-$(AOM_VERSION).tar.gz .sum-aom
 ifdef HAVE_WINSTORE
 	$(APPLY) $(SRC)/aom/aom-pthreads-win32.patch
 endif
+ifdef HAVE_ANDROID
+	$(APPLY) $(SRC)/aom/aom-android-pthreads.patch
+endif
 	$(MOVE)
 
 DEPS_aom =



More information about the vlc-commits mailing list