contrib: qt: fix crosscompilation for GCC 6.4
authorPierre Lamot <pierre@videolabs.io>
Fri, 22 Mar 2019 14:26:45 +0000 (15:26 +0100)
committerThomas Guillem <thomas@gllm.fr>
Wed, 10 Apr 2019 12:11:43 +0000 (14:11 +0200)
This provides work arounds for:

- incomplete std::future support
- unhandled constexpr evaluation

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
contrib/src/qt/0007-ANGLE-remove-static-assert-that-can-t-be-evaluated-b.patch [new file with mode: 0644]
contrib/src/qt/0008-ANGLE-disable-ANGLE_STD_ASYNC_WORKERS-when-compiling.patch [new file with mode: 0644]
contrib/src/qt/rules.mak

diff --git a/contrib/src/qt/0007-ANGLE-remove-static-assert-that-can-t-be-evaluated-b.patch b/contrib/src/qt/0007-ANGLE-remove-static-assert-that-can-t-be-evaluated-b.patch
new file mode 100644 (file)
index 0000000..d2edb14
--- /dev/null
@@ -0,0 +1,28 @@
+From 5de8d0bf9fb22d8a2f1b648bcbf9fc5b247dbf41 Mon Sep 17 00:00:00 2001
+From: Pierre Lamot <pierre@videolabs.io>
+Date: Thu, 21 Mar 2019 14:26:17 +0100
+Subject: [PATCH 2/2] ANGLE: remove static assert that can't be evaluated by
+ gcc 6.4
+
+---
+ .../angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp        | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
+index 3d73b2c..12a809f 100644
+--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
++++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
+@@ -379,8 +379,8 @@ const gl::AttachmentList &FramebufferD3D::getColorAttachmentsForRender(const gl:
+     if (mRenderer->getWorkarounds().addDummyTextureNoRenderTarget &&
+         colorAttachmentsForRender.empty())
+     {
+-        static_assert(static_cast<size_t>(activeProgramOutputs.size()) <= 32,
+-                      "Size of active program outputs should less or equal than 32.");
++        //static_assert(static_cast<size_t>(activeProgramOutputs.size()) <= 32,
++        //"Size of active program outputs should less or equal than 32.");
+         GLenum i = static_cast<GLenum>(
+             gl::ScanForward(static_cast<uint32_t>(activeProgramOutputs.bits())));
+-- 
+2.19.1
+
diff --git a/contrib/src/qt/0008-ANGLE-disable-ANGLE_STD_ASYNC_WORKERS-when-compiling.patch b/contrib/src/qt/0008-ANGLE-disable-ANGLE_STD_ASYNC_WORKERS-when-compiling.patch
new file mode 100644 (file)
index 0000000..f9b4e43
--- /dev/null
@@ -0,0 +1,27 @@
+From 0b5fc908a3d8e24c28e72f61bf8c6242cb85ba3e Mon Sep 17 00:00:00 2001
+From: Pierre Lamot <pierre@videolabs.io>
+Date: Thu, 21 Mar 2019 16:39:41 +0100
+Subject: [PATCH] ANGLE: disable ANGLE_STD_ASYNC_WORKERS when compiling with
+ gcc/mingw as std::future<void> is not supported
+
+---
+ src/angle/src/config.pri | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri
+index 5c52128..23109cd 100644
+--- a/src/angle/src/config.pri
++++ b/src/angle/src/config.pri
+@@ -95,6 +95,9 @@ gcc {
+                             -Wno-strict-aliasing -Wno-type-limits -Wno-unused-local-typedefs
+     QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -Wno-reorder -Wno-conversion-null -Wno-delete-non-virtual-dtor
++      !clang {
++                 DEFINES += ANGLE_STD_ASYNC_WORKERS=ANGLE_DISABLED
++      }
+ }
+ QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+-- 
+2.19.1
+
index d219c49..7fbd680 100644 (file)
@@ -35,6 +35,8 @@ ifdef HAVE_WIN32
 ifndef HAVE_WIN64
        $(APPLY) $(SRC)/qt/0001-disable-qt_random_cpu.patch
 endif
+       $(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
 
 ifdef HAVE_CROSS_COMPILE
        $(APPLY) $(SRC)/qt/0003-allow-cross-compilation-of-angle-with-wine.patch