Bug 1176730 - Don't use pthread for libvpx in mingw builds. r=rillian, a=lmandel
authorJan Gerber <j@mailb.org>
Tue, 23 Jun 2015 02:19:00 -0700
changeset 273769 b92f62aa66438661802f88027bb0e3a7fb7b7f48
parent 273768 c9bccf82e82cadd01e05f5a2a21ec82fe612d515
child 273770 5ebea3f7befc9ca7227af8ca52b431617f41a36a
push id4860
push userryanvm@gmail.com
push dateThu, 09 Jul 2015 13:04:39 +0000
treeherdermozilla-beta@e64d63dd4b4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian, lmandel
bugs1176730
milestone40.0
Bug 1176730 - Don't use pthread for libvpx in mingw builds. r=rillian, a=lmandel Based on a patch by Jacek Caban.
media/libvpx/disable_pthread_on_mingw.patch
media/libvpx/update.py
media/libvpx/vpx_config_x86-win32-gcc.h
media/libvpx/vpx_config_x86_64-win64-gcc.h
new file mode 100644
--- /dev/null
+++ b/media/libvpx/disable_pthread_on_mingw.patch
@@ -0,0 +1,52 @@
+From: Jacek Caban <jacek@codeweavers.com>
+Don't use pthread for libvpx in mingw builds.
+
+
+diff --git a/media/libvpx/vpx_config_x86-win32-gcc.h b/media/libvpx/vpx_config_x86-win32-gcc.h
+index c5452c0..12b5c84 100644
+--- a/media/libvpx/vpx_config_x86-win32-gcc.h
++++ b/media/libvpx/vpx_config_x86-win32-gcc.h
+@@ -30,17 +30,18 @@
+ #define HAVE_SSSE3 1
+ #define HAVE_SSE4_1 1
+ #define HAVE_AVX 1
+ #define HAVE_AVX2 1
+ #define HAVE_ALTIVEC 0
+ #define HAVE_VPX_PORTS 1
+ #define HAVE_STDINT_H 1
+ #define HAVE_ALT_TREE_LAYOUT 0
+-#define HAVE_PTHREAD_H 1
++#undef HAVE_PTHREAD_H
++#define HAVE_PTHREAD_H 0
+ #define HAVE_SYS_MMAN_H 1
+ #define HAVE_UNISTD_H 1
+ #define CONFIG_DEPENDENCY_TRACKING 1
+ #define CONFIG_EXTERNAL_BUILD 0
+ #define CONFIG_INSTALL_DOCS 0
+ #define CONFIG_INSTALL_BINS 1
+ #define CONFIG_INSTALL_LIBS 1
+ #define CONFIG_INSTALL_SRCS 0
+diff --git a/media/libvpx/vpx_config_x86_64-win64-gcc.h b/media/libvpx/vpx_config_x86_64-win64-gcc.h
+index 04f382b..4d75a4b 100644
+--- a/media/libvpx/vpx_config_x86_64-win64-gcc.h
++++ b/media/libvpx/vpx_config_x86_64-win64-gcc.h
+@@ -30,17 +30,18 @@
+ #define HAVE_SSSE3 1
+ #define HAVE_SSE4_1 1
+ #define HAVE_AVX 1
+ #define HAVE_AVX2 1
+ #define HAVE_ALTIVEC 0
+ #define HAVE_VPX_PORTS 1
+ #define HAVE_STDINT_H 1
+ #define HAVE_ALT_TREE_LAYOUT 0
+-#define HAVE_PTHREAD_H 1
++#undef HAVE_PTHREAD_H
++#define HAVE_PTHREAD_H 0
+ #define HAVE_SYS_MMAN_H 1
+ #define HAVE_UNISTD_H 1
+ #define CONFIG_DEPENDENCY_TRACKING 1
+ #define CONFIG_EXTERNAL_BUILD 0
+ #define CONFIG_INSTALL_DOCS 0
+ #define CONFIG_INSTALL_BINS 1
+ #define CONFIG_INSTALL_LIBS 1
+ #define CONFIG_INSTALL_SRCS 0
--- a/media/libvpx/update.py
+++ b/media/libvpx/update.py
@@ -551,16 +551,18 @@ def update_and_remove_files(prefix, libv
 
 def apply_patches():
     # Patch to permit vpx users to specify their own <stdint.h> types.
     os.system("patch -p0 < stdint.patch")
     # Patch to allow MSVC 2015 to compile libvpx
     os.system("patch -p1 < msvc2015.patch")
     # Patch to fix a crash caused by MSVC 2013
     os.system("patch -p3 < bug1137614.patch")
+    # Bug 1176730 - Don't use pthread for libvpx in mingw builds.
+    os.system("patch -p3 < disable_pthread_on_mingw.patch")
 
 def update_readme(commit):
     with open('README_MOZILLA') as f:
         readme = f.read()
 
     if 'The git commit ID used was' in readme:
         new_readme = re.sub('The git commit ID used was [a-f0-9]+',
             'The git commit ID used was %s' % commit, readme)
--- a/media/libvpx/vpx_config_x86-win32-gcc.h
+++ b/media/libvpx/vpx_config_x86-win32-gcc.h
@@ -30,17 +30,18 @@
 #define HAVE_SSSE3 1
 #define HAVE_SSE4_1 1
 #define HAVE_AVX 1
 #define HAVE_AVX2 1
 #define HAVE_ALTIVEC 0
 #define HAVE_VPX_PORTS 1
 #define HAVE_STDINT_H 1
 #define HAVE_ALT_TREE_LAYOUT 0
-#define HAVE_PTHREAD_H 1
+#undef HAVE_PTHREAD_H
+#define HAVE_PTHREAD_H 0
 #define HAVE_SYS_MMAN_H 1
 #define HAVE_UNISTD_H 1
 #define CONFIG_DEPENDENCY_TRACKING 1
 #define CONFIG_EXTERNAL_BUILD 0
 #define CONFIG_INSTALL_DOCS 0
 #define CONFIG_INSTALL_BINS 1
 #define CONFIG_INSTALL_LIBS 1
 #define CONFIG_INSTALL_SRCS 0
--- a/media/libvpx/vpx_config_x86_64-win64-gcc.h
+++ b/media/libvpx/vpx_config_x86_64-win64-gcc.h
@@ -30,17 +30,18 @@
 #define HAVE_SSSE3 1
 #define HAVE_SSE4_1 1
 #define HAVE_AVX 1
 #define HAVE_AVX2 1
 #define HAVE_ALTIVEC 0
 #define HAVE_VPX_PORTS 1
 #define HAVE_STDINT_H 1
 #define HAVE_ALT_TREE_LAYOUT 0
-#define HAVE_PTHREAD_H 1
+#undef HAVE_PTHREAD_H
+#define HAVE_PTHREAD_H 0
 #define HAVE_SYS_MMAN_H 1
 #define HAVE_UNISTD_H 1
 #define CONFIG_DEPENDENCY_TRACKING 1
 #define CONFIG_EXTERNAL_BUILD 0
 #define CONFIG_INSTALL_DOCS 0
 #define CONFIG_INSTALL_BINS 1
 #define CONFIG_INSTALL_LIBS 1
 #define CONFIG_INSTALL_SRCS 0