[vlc-devel] [PATCH 03/13] contrib: aom: fix lib pthread linkage

Steve Lhomme robux4 at ycbcr.xyz
Wed Oct 10 11:43:23 CEST 2018



On 02/10/2018 11:14, Victorien Le Couviour--Tuffet wrote:
> Fixes android NDK 17 build
> ---
>   contrib/src/aom/aom-android-pthreads.patch | 19 +++++++++++++++++++
>   contrib/src/aom/rules.mak                  |  3 +++
>   2 files changed, 22 insertions(+)
>   create mode 100644 contrib/src/aom/aom-android-pthreads.patch
>
> 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")

CONFIG_MULTITHREAD AND HAVE_PTHREAD_H are both true but you don't want to use pthread anyway ?



> + file(APPEND "${pkgconfig_file}" "Cflags: -I\${prefix}/include\n")
> diff --git a/contrib/src/aom/rules.mak b/contrib/src/aom/rules.mak
> index bc0bca9e65..e704862ca5 100644
> --- a/contrib/src/aom/rules.mak
> +++ b/contrib/src/aom/rules.mak
> @@ -22,6 +22,9 @@ aom: aom-$(AOM_VERSION).tar.gz .sum-aom
>   	$(APPLY) $(SRC)/aom/0001-film-grain-copy-user_priv-from-the-source-img.patch
>   ifdef HAVE_WINSTORE
>   	$(APPLY) $(SRC)/aom/aom-pthreads-win32.patch
> +endif
> +ifdef HAVE_ANDROID
> +	$(APPLY) $(SRC)/aom/aom-android-pthreads.patch
>   endif
>   	$(MOVE)
>   
> -- 
> 2.19.0
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list