contrib: qt: add missing ANGLE patch
authorThomas Guillem <thomas@gllm.fr>
Wed, 10 Apr 2019 15:17:54 +0000 (17:17 +0200)
committerThomas Guillem <thomas@gllm.fr>
Wed, 10 Apr 2019 15:21:34 +0000 (17:21 +0200)
Was removed inadvertently from 07fb07360e2afbf42e4b96cc5a7e319fb354ad4d

contrib/src/qt/0006-ANGLE-don-t-use-msvc-intrinsics-when-crosscompiling-.patch [new file with mode: 0644]
contrib/src/qt/rules.mak

diff --git a/contrib/src/qt/0006-ANGLE-don-t-use-msvc-intrinsics-when-crosscompiling-.patch b/contrib/src/qt/0006-ANGLE-don-t-use-msvc-intrinsics-when-crosscompiling-.patch
new file mode 100644 (file)
index 0000000..05e0b6d
--- /dev/null
@@ -0,0 +1,35 @@
+From 209447aba5fa2e6f0b60ce9baa11a2fd23b5ee8f Mon Sep 17 00:00:00 2001
+From: Pierre Lamot <pierre@videolabs.io>
+Date: Thu, 21 Mar 2019 15:46:27 +0100
+Subject: [PATCH 1/2] ANGLE: don't use msvc intrinsics when crosscompiling with
+ GCC
+
+---
+ src/3rdparty/angle/src/common/mathutil.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/common/mathutil.h b/src/3rdparty/angle/src/common/mathutil.h
+index 372e432..7e8cdfe 100644
+--- a/src/3rdparty/angle/src/common/mathutil.h
++++ b/src/3rdparty/angle/src/common/mathutil.h
+@@ -883,7 +883,7 @@
+ }
+ // Count the 1 bits.
+-#if defined(ANGLE_PLATFORM_WINDOWS)
++#if defined(_MSC_VER)
+ #if defined(_M_ARM) || defined(_M_ARM64)
+ inline int BitCount(uint32_t bits)
+ {
+@@ -905,7 +905,7 @@
+ #endif  // defined(ANGLE_IS_64_BIT_CPU)
+ #endif  // defined(ANGLE_PLATFORM_WINDOWS)
+-#if defined(ANGLE_PLATFORM_POSIX)
++#if defined(__GNUC__) || defined(__clang__)
+ inline int BitCount(uint32_t bits)
+ {
+     return __builtin_popcount(bits);
+-- 
+2.19.1
+
index 7fbd680..c709817 100644 (file)
@@ -35,6 +35,7 @@ ifdef HAVE_WIN32
 ifndef HAVE_WIN64
        $(APPLY) $(SRC)/qt/0001-disable-qt_random_cpu.patch
 endif
+       $(APPLY) $(SRC)/qt/0006-ANGLE-don-t-use-msvc-intrinsics-when-crosscompiling-.patch
        $(APPLY) $(SRC)/qt/0007-ANGLE-remove-static-assert-that-can-t-be-evaluated-b.patch
        $(APPLY) $(SRC)/qt/0008-ANGLE-disable-ANGLE_STD_ASYNC_WORKERS-when-compiling.patch