[vlc-commits] [Git][videolan/vlc][master] contrib: protobuf: don't use pthread on Win32
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Thu Feb 24 16:20:01 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
c51b8568 by Steve Lhomme at 2022-02-24T15:26:36+00:00
contrib: protobuf: don't use pthread on Win32
It has its own internal Win32 threads support. No need to rebuild this (heavy)
contrib when pthread changes.
No need to use winpthread from mingw either in the native protoc build when it
can use the Win32 threading API. And thus the codebase is the same in both
case.
- - - - -
2 changed files:
- + contrib/src/protobuf/protobuf-no-mingw-pthread.patch
- contrib/src/protobuf/rules.mak
Changes:
=====================================
contrib/src/protobuf/protobuf-no-mingw-pthread.patch
=====================================
@@ -0,0 +1,13 @@
+--- protobuf/m4/acx_pthread.m4.orig 2022-02-23 11:15:51.818483000 +0100
++++ protobuf/m4/acx_pthread.m4 2022-02-23 11:16:06.148340600 +0100
+@@ -134,6 +134,10 @@ case "${host_cpu}-${host_os}" in
+
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
++ *mingw*)
++ # Do not use pthread, fallback to the win32 threading API
++ acx_pthread_flags=""
++ ;;
+ esac
+
+ if test x"$acx_pthread_ok" = xno; then
=====================================
contrib/src/protobuf/rules.mak
=====================================
@@ -24,9 +24,6 @@ $(TARBALLS)/protoc-$(PROTOBUF_VERSION)-cpp.tar.gz: $(TARBALLS)/protobuf-$(PROTOB
.sum-protobuf: protobuf-$(PROTOBUF_VERSION)-cpp.tar.gz
DEPS_protobuf = zlib $(DEPS_zlib)
-ifdef HAVE_WIN32
-DEPS_protobuf += pthreads $(DEPS_pthreads)
-endif
PROTOBUFVARS := DIST_LANG="cpp"
PROTOCVARS := DIST_LANG="cpp"
@@ -42,6 +39,7 @@ protoc: protoc-$(PROTOBUF_VERSION)-cpp.tar.gz .sum-protoc
$(APPLY) $(SRC)/protobuf/protobuf-disable-gmock.patch
$(APPLY) $(SRC)/protobuf/protobuf-fix-build.patch
$(APPLY) $(SRC)/protobuf/include-algorithm.patch
+ $(APPLY) $(SRC)/protobuf/protobuf-no-mingw-pthread.patch
$(MOVE)
.protoc: protoc
@@ -57,6 +55,7 @@ protobuf: protobuf-$(PROTOBUF_VERSION)-cpp.tar.gz .sum-protobuf
$(APPLY) $(SRC)/protobuf/dont-build-protoc.patch
$(APPLY) $(SRC)/protobuf/protobuf-fix-build.patch
$(APPLY) $(SRC)/protobuf/include-algorithm.patch
+ $(APPLY) $(SRC)/protobuf/protobuf-no-mingw-pthread.patch
$(MOVE)
.protobuf: protobuf
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c51b856827fc2551db13920a26a369fe7b3b476c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c51b856827fc2551db13920a26a369fe7b3b476c
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list