1
0
Dominique Leuenberger 2019-03-21 08:41:52 +00:00 committed by Git OBS Bridge
parent 8b8d376cf5
commit a98a0f7394
7 changed files with 50 additions and 251 deletions

View File

@ -1,25 +0,0 @@
From: Fedora
Subject: Fix build for 32-bit platforms
Apparently not upstream, can't find this anywhere. So I assume Fedora is the actual source?
https://src.fedoraproject.org/cgit/rpms/chromium.git/tree/chromium-66.0.3359.170-gcc8-alignof.patch
Index: qtwebengine-everywhere-src-5.12.0-beta1/src/3rdparty/chromium/mojo/public/c/system/macros.h
===================================================================
--- qtwebengine-everywhere-src-5.12.0-beta1.orig/src/3rdparty/chromium/mojo/public/c/system/macros.h
+++ qtwebengine-everywhere-src-5.12.0-beta1/src/3rdparty/chromium/mojo/public/c/system/macros.h
@@ -27,7 +27,13 @@
(sizeof(void*) == 4 ? 32 : 0)
// Like the C++11 |alignof| operator.
-#if __cplusplus >= 201103L
+#if defined(__GNUC__) && __GNUC__ >= 8
+// GCC 8 has changed the alignof operator to return the minimal alignment
+// required by the target ABI, instead of the preferred alignment.
+// This means that on 32-bit x86, it will return 4 instead of 8.
+// Use __alignof__ instead to avoid this.
+#define MOJO_ALIGNOF(type) __alignof__(type)
+#elif __cplusplus >= 201103L
#define MOJO_ALIGNOF(type) alignof(type)
#elif defined(__GNUC__)
#define MOJO_ALIGNOF(type) __alignof__(type)

View File

@ -7,11 +7,11 @@ It also crashes when running on wayland, the cause is not yet known.
Work around these issues by not doing GPU-accelerated rendering in such Work around these issues by not doing GPU-accelerated rendering in such
cases. cases.
Index: qtwebengine-everywhere-src-5.12.0-alpha/src/core/web_engine_context.cpp Index: qtwebengine-everywhere-src-5.12.1/src/core/web_engine_context.cpp
=================================================================== ===================================================================
--- qtwebengine-everywhere-src-5.12.0-alpha.orig/src/core/web_engine_context.cpp --- qtwebengine-everywhere-src-5.12.1.orig/src/core/web_engine_context.cpp
+++ qtwebengine-everywhere-src-5.12.0-alpha/src/core/web_engine_context.cpp +++ qtwebengine-everywhere-src-5.12.1/src/core/web_engine_context.cpp
@@ -101,6 +101,7 @@ @@ -102,6 +102,7 @@
#include <QOffscreenSurface> #include <QOffscreenSurface>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
# include <QOpenGLContext> # include <QOpenGLContext>
@ -19,7 +19,7 @@ Index: qtwebengine-everywhere-src-5.12.0-alpha/src/core/web_engine_context.cpp
#endif #endif
#include <QQuickWindow> #include <QQuickWindow>
#include <QStringList> #include <QStringList>
@@ -162,6 +163,39 @@ void dummyGetPluginCallback(const std::v @@ -161,6 +162,39 @@ void dummyGetPluginCallback(const std::v
} }
#endif #endif
@ -59,7 +59,7 @@ Index: qtwebengine-everywhere-src-5.12.0-alpha/src/core/web_engine_context.cpp
} // namespace } // namespace
namespace QtWebEngineCore { namespace QtWebEngineCore {
@@ -440,6 +474,27 @@ WebEngineContext::WebEngineContext() @@ -449,6 +483,27 @@ WebEngineContext::WebEngineContext()
const char *glType = 0; const char *glType = 0;
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
@ -87,9 +87,9 @@ Index: qtwebengine-everywhere-src-5.12.0-alpha/src/core/web_engine_context.cpp
bool tryGL = bool tryGL =
!usingANGLE() !usingANGLE()
&& (!usingSoftwareDynamicGL() && (!usingSoftwareDynamicGL()
@@ -450,7 +505,7 @@ WebEngineContext::WebEngineContext() @@ -457,7 +512,7 @@ WebEngineContext::WebEngineContext()
// performant, but at least provides WebGL support.
|| enableWebGLSoftwareRendering || enableWebGLSoftwareRendering
#endif
) )
- && !usingQtQuick2DRenderer(); - && !usingQtQuick2DRenderer();
+ && !usingQtQuick2DRenderer() && !disableGpu; + && !usingQtQuick2DRenderer() && !disableGpu;

View File

@ -1,207 +0,0 @@
From bf9a9d0532d7749901082ffce976d182672c2d36 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Mon, 10 Dec 2018 14:35:22 +0100
Subject: [PATCH 1/1] Fix building gn on arm
Two arm header files were missing.
Change-Id: I3d9cd03c682b9de6b38e75085bcda9deef81b5fa
Fixes: QTBUG-72393
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
---
PATH updated by guillaume@opensuse.org to match qt path
src/3rdparty/gn/base/numerics/safe_conversions_arm_impl.h | 51 +++++++++++
src/3rdparty/gn/base/numerics/safe_math_arm_impl.h | 122 +++++++++++++++++++++++++++
2 files changed, 173 insertions(+)
create mode 100644 src/3rdparty/gn/base/numerics/safe_conversions_arm_impl.h
create mode 100644 src/3rdparty/gn/base/numerics/safe_math_arm_impl.h
diff --git a/src/3rdparty/gn/base/numerics/safe_conversions_arm_impl.h b/src/3rdparty/gn/base/numerics/safe_conversions_arm_impl.h
new file mode 100644
index 0000000000..da5813f65e
--- /dev/null
+++ b/src/3rdparty/gn/base/numerics/safe_conversions_arm_impl.h
@@ -0,0 +1,51 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_NUMERICS_SAFE_CONVERSIONS_ARM_IMPL_H_
+#define BASE_NUMERICS_SAFE_CONVERSIONS_ARM_IMPL_H_
+
+#include <cassert>
+#include <limits>
+#include <type_traits>
+
+#include "base/numerics/safe_conversions_impl.h"
+
+namespace base {
+namespace internal {
+
+// Fast saturation to a destination type.
+template <typename Dst, typename Src>
+struct SaturateFastAsmOp {
+ static const bool is_supported =
+ std::is_signed<Src>::value && std::is_integral<Dst>::value &&
+ std::is_integral<Src>::value &&
+ IntegerBitsPlusSign<Src>::value <= IntegerBitsPlusSign<int32_t>::value &&
+ IntegerBitsPlusSign<Dst>::value <= IntegerBitsPlusSign<int32_t>::value &&
+ !IsTypeInRangeForNumericType<Dst, Src>::value;
+
+ __attribute__((always_inline)) static Dst Do(Src value) {
+ int32_t src = value;
+ typename std::conditional<std::is_signed<Dst>::value, int32_t,
+ uint32_t>::type result;
+ if (std::is_signed<Dst>::value) {
+ asm("ssat %[dst], %[shift], %[src]"
+ : [dst] "=r"(result)
+ : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value <= 32
+ ? IntegerBitsPlusSign<Dst>::value
+ : 32));
+ } else {
+ asm("usat %[dst], %[shift], %[src]"
+ : [dst] "=r"(result)
+ : [src] "r"(src), [shift] "n"(IntegerBitsPlusSign<Dst>::value < 32
+ ? IntegerBitsPlusSign<Dst>::value
+ : 31));
+ }
+ return static_cast<Dst>(result);
+ }
+};
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_NUMERICS_SAFE_CONVERSIONS_ARM_IMPL_H_
diff --git a/src/3rdparty/gn/base/numerics/safe_math_arm_impl.h b/src/3rdparty/gn/base/numerics/safe_math_arm_impl.h
new file mode 100644
index 0000000000..a7cda1bb23
--- /dev/null
+++ b/src/3rdparty/gn/base/numerics/safe_math_arm_impl.h
@@ -0,0 +1,122 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_
+#define BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_
+
+#include <cassert>
+#include <limits>
+#include <type_traits>
+
+#include "base/numerics/safe_conversions.h"
+
+namespace base {
+namespace internal {
+
+template <typename T, typename U>
+struct CheckedMulFastAsmOp {
+ static const bool is_supported =
+ FastIntegerArithmeticPromotion<T, U>::is_contained;
+
+ // The following is much more efficient than the Clang and GCC builtins for
+ // performing overflow-checked multiplication when a twice wider type is
+ // available. The below compiles down to 2-3 instructions, depending on the
+ // width of the types in use.
+ // As an example, an int32_t multiply compiles to:
+ // smull r0, r1, r0, r1
+ // cmp r1, r1, asr #31
+ // And an int16_t multiply compiles to:
+ // smulbb r1, r1, r0
+ // asr r2, r1, #16
+ // cmp r2, r1, asr #15
+ template <typename V>
+ __attribute__((always_inline)) static bool Do(T x, U y, V* result) {
+ using Promotion = typename FastIntegerArithmeticPromotion<T, U>::type;
+ Promotion presult;
+
+ presult = static_cast<Promotion>(x) * static_cast<Promotion>(y);
+ *result = static_cast<V>(presult);
+ return IsValueInRangeForNumericType<V>(presult);
+ }
+};
+
+template <typename T, typename U>
+struct ClampedAddFastAsmOp {
+ static const bool is_supported =
+ BigEnoughPromotion<T, U>::is_contained &&
+ IsTypeInRangeForNumericType<
+ int32_t,
+ typename BigEnoughPromotion<T, U>::type>::value;
+
+ template <typename V>
+ __attribute__((always_inline)) static V Do(T x, U y) {
+ // This will get promoted to an int, so let the compiler do whatever is
+ // clever and rely on the saturated cast to bounds check.
+ if (IsIntegerArithmeticSafe<int, T, U>::value)
+ return saturated_cast<V>(x + y);
+
+ int32_t result;
+ int32_t x_i32 = x;
+ int32_t y_i32 = y;
+
+ asm("qadd %[result], %[first], %[second]"
+ : [result] "=r"(result)
+ : [first] "r"(x_i32), [second] "r"(y_i32));
+ return saturated_cast<V>(result);
+ }
+};
+
+template <typename T, typename U>
+struct ClampedSubFastAsmOp {
+ static const bool is_supported =
+ BigEnoughPromotion<T, U>::is_contained &&
+ IsTypeInRangeForNumericType<
+ int32_t,
+ typename BigEnoughPromotion<T, U>::type>::value;
+
+ template <typename V>
+ __attribute__((always_inline)) static V Do(T x, U y) {
+ // This will get promoted to an int, so let the compiler do whatever is
+ // clever and rely on the saturated cast to bounds check.
+ if (IsIntegerArithmeticSafe<int, T, U>::value)
+ return saturated_cast<V>(x - y);
+
+ int32_t result;
+ int32_t x_i32 = x;
+ int32_t y_i32 = y;
+
+ asm("qsub %[result], %[first], %[second]"
+ : [result] "=r"(result)
+ : [first] "r"(x_i32), [second] "r"(y_i32));
+ return saturated_cast<V>(result);
+ }
+};
+
+template <typename T, typename U>
+struct ClampedMulFastAsmOp {
+ static const bool is_supported = CheckedMulFastAsmOp<T, U>::is_supported;
+
+ template <typename V>
+ __attribute__((always_inline)) static V Do(T x, U y) {
+ // Use the CheckedMulFastAsmOp for full-width 32-bit values, because
+ // it's fewer instructions than promoting and then saturating.
+ if (!IsIntegerArithmeticSafe<int32_t, T, U>::value &&
+ !IsIntegerArithmeticSafe<uint32_t, T, U>::value) {
+ V result;
+ if (CheckedMulFastAsmOp<T, U>::Do(x, y, &result))
+ return result;
+ return CommonMaxOrMin<V>(IsValueNegative(x) ^ IsValueNegative(y));
+ }
+
+ assert((FastIntegerArithmeticPromotion<T, U>::is_contained));
+ using Promotion = typename FastIntegerArithmeticPromotion<T, U>::type;
+ return saturated_cast<V>(static_cast<Promotion>(x) *
+ static_cast<Promotion>(y));
+ }
+};
+
+} // namespace internal
+} // namespace base
+
+#endif // BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_
--
2.16.3

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Thu Mar 14 08:52:25 UTC 2019 - fabian@ritter-vogt.de
- Update to 5.12.2:
* New bugfix release
* For more details please see:
* http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.12.2/?h=5.12.2
- Remove patches, now upstream:
* cve-2019-5786.patch
-------------------------------------------------------------------
Mon Mar 11 16:14:07 UTC 2019 - Martin Herkt <9+suse@cirno.systems>
- Add cve-2019-5786.patch
Backport fix for CVE-2019-5786
https://bugreports.qt.io/browse/QTBUG-74254
-------------------------------------------------------------------
Mon Feb 4 14:16:08 UTC 2019 - wbauer@tmo.at
- Fix build on Leap 42.3 by adding c++14 to QT_CONFIG
-------------------------------------------------------------------
Fri Feb 1 08:40:35 UTC 2019 - fabian@ritter-vogt.de
- Update to 5.12.1:
* New bugfix release
* For more details please see:
* http://code.qt.io/cgit/qt/qtwebengine.git/plain/dist/changes-5.12.1/?h=v5.12.1
- Refresh disable-gpu-when-using-nouveau-boo-1005323.diff
- Remove patches, now upstream:
* gn-fix_arm.patch
* chromium-66.0.3359.170-gcc8-alignof.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 21 14:14:56 UTC 2019 - Bernhard Wiedemann <bwiedemann@suse.com> Mon Jan 21 14:14:56 UTC 2019 - Bernhard Wiedemann <bwiedemann@suse.com>

View File

@ -52,16 +52,16 @@
%global _qtwebengine_dictionaries_dir %{_libqt5_datadir}/qtwebengine_dictionaries %global _qtwebengine_dictionaries_dir %{_libqt5_datadir}/qtwebengine_dictionaries
Name: libqt5-qtwebengine Name: libqt5-qtwebengine
Version: 5.12.0 Version: 5.12.2
Release: 0 Release: 0
Summary: Qt 5 WebEngine Library Summary: Qt 5 WebEngine Library
License: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only License: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
Group: Development/Libraries/X11 Group: Development/Libraries/X11
Url: https://www.qt.io Url: https://www.qt.io
%define base_name libqt5 %define base_name libqt5
%define real_version 5.12.0 %define real_version 5.12.2
%define so_version 5.12.0 %define so_version 5.12.2
%define tar_version qtwebengine-everywhere-src-5.12.0 %define tar_version qtwebengine-everywhere-src-5.12.2
Source: https://download.qt.io/official_releases/qt/5.12/%{real_version}/submodules/%{tar_version}.tar.xz Source: https://download.qt.io/official_releases/qt/5.12/%{real_version}/submodules/%{tar_version}.tar.xz
Source1: baselibs.conf Source1: baselibs.conf
# PATCH-FIX-UPSTREAM armv6-ffmpeg-no-thumb.patch - Fix ffmpeg configuration for armv6 # PATCH-FIX-UPSTREAM armv6-ffmpeg-no-thumb.patch - Fix ffmpeg configuration for armv6
@ -70,10 +70,6 @@ Patch1: armv6-ffmpeg-no-thumb.patch
Patch2: disable-gpu-when-using-nouveau-boo-1005323.diff Patch2: disable-gpu-when-using-nouveau-boo-1005323.diff
# PATCH-FIX-UPSTREAM harmony-fix.diff -- Show the patent-free LCD rendering. Without this patch, only grayscale rendering is used. (for freetype-2.8.1) boo#1061344 # PATCH-FIX-UPSTREAM harmony-fix.diff -- Show the patent-free LCD rendering. Without this patch, only grayscale rendering is used. (for freetype-2.8.1) boo#1061344
Patch5: harmony-fix.diff Patch5: harmony-fix.diff
# PATCH-FIX-UPSTREAM gn-fix_arm.patch -- https://bugreports.qt.io/browse/QTBUG-72393
Patch6: gn-fix_arm.patch
# PATCH-FIX-UPSTREAM
Patch8: chromium-66.0.3359.170-gcc8-alignof.patch
# PATCH-FIX-OPENSUSE (copied from the chromium package) # PATCH-FIX-OPENSUSE (copied from the chromium package)
Patch9: chromium-non-void-return.patch Patch9: chromium-non-void-return.patch
# PATCH-FIX-UPSTREAM reproducible.patch -- https://bugs.chromium.org/p/chromium/issues/detail?id=740363 boo#1047218 # PATCH-FIX-UPSTREAM reproducible.patch -- https://bugs.chromium.org/p/chromium/issues/detail?id=740363 boo#1047218
@ -270,6 +266,7 @@ mkdir .git
# ARGH! # ARGH!
echo "QT_GCC_MAJOR_VERSION = 7" > qtwebengine_new.pro echo "QT_GCC_MAJOR_VERSION = 7" > qtwebengine_new.pro
echo "QT_GCC_MINOR_VERSION = 2" >> qtwebengine_new.pro echo "QT_GCC_MINOR_VERSION = 2" >> qtwebengine_new.pro
echo "QT_CONFIG += c++14" >> qtwebengine_new.pro
cat qtwebengine.pro >> qtwebengine_new.pro cat qtwebengine.pro >> qtwebengine_new.pro
mv qtwebengine{_new,}.pro mv qtwebengine{_new,}.pro
%endif %endif

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bd581e390a30e0f74d41b0e3334b3cf612dd4af23de36a3bf5931d5b4453687c
size 252044400

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:082b1d6e60c1be61881bc8533acc67d9688620d6b3a538417f62b27b34ead493
size 249240772