From 1415eb4333682a85af6e43ace628d0d97014fc395d7222d3e8c41e43b1c3334b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 27 May 2017 11:06:39 +0000 Subject: [PATCH] Accepting request 494963 from KDE:Qt5 - Add patch to fix build with gcc 7: * fix-chromium-gcc7.patch OBS-URL: https://build.opensuse.org/request/show/494963 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtwebengine?expand=0&rev=18 --- fix-chromium-gcc7.patch | 119 +++++++++++++++++++++++++++++++++++++ libqt5-qtwebengine.changes | 6 ++ libqt5-qtwebengine.spec | 3 + 3 files changed, 128 insertions(+) create mode 100644 fix-chromium-gcc7.patch diff --git a/fix-chromium-gcc7.patch b/fix-chromium-gcc7.patch new file mode 100644 index 0000000..c541f97 --- /dev/null +++ b/fix-chromium-gcc7.patch @@ -0,0 +1,119 @@ +From 64fdd317d4127142ad9e967197a2df6ac81ef55f Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Wed, 29 Mar 2017 17:42:18 +0200 +Subject: [PATCH] Fix build with GCC 7.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes some ambiguities and outright wrong code GCC 7 doesn't accept but +earlier compilers did. + +Task-number:QTBUG-59776 +Change-Id: I012f121842ac6cde49db0d571efc62aabe2115e3 +Reviewed-by: Michael BrĂ¼ning +--- + src/3rdparty/chromium/mojo/public/cpp/bindings/interface_ptr_info.h | 2 +- + src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h | 2 ++ + src/3rdparty/chromium/v8/src/objects-body-descriptors.h | 2 +- + src/3rdparty/chromium/v8/src/objects-inl.h | 19 +++++++++++++++++++ + src/3rdparty/chromium/v8/src/objects.h | 16 ++-------------- + 5 files changed, 25 insertions(+), 16 deletions(-) + +diff --git a/src/3rdparty/chromium/mojo/public/cpp/bindings/interface_ptr_info.h b/src/3rdparty/chromium/mojo/public/cpp/bindings/interface_ptr_info.h +index 5bd29d5..c94a5ac 100644 +--- a/src/3rdparty/chromium/mojo/public/cpp/bindings/interface_ptr_info.h ++++ b/src/3rdparty/chromium/mojo/public/cpp/bindings/interface_ptr_info.h +@@ -34,7 +34,7 @@ class InterfacePtrInfo { + + InterfacePtrInfo& operator=(InterfacePtrInfo&& other) { + if (this != &other) { +- handle_ = other.handle_.Pass(); ++ handle_ = std::move(other.handle_); + version_ = other.version_; + other.version_ = 0u; + } +diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h +index 58d97fb..839c7df 100644 +--- a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h +@@ -495,6 +495,8 @@ inline LinkedHashSet& LinkedHashSet::operator=(const Lin + return *this; + } + ++inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); ++ + template + inline void LinkedHashSet::swap(LinkedHashSet& other) + { +diff --git a/src/3rdparty/chromium/v8/src/objects-body-descriptors.h b/src/3rdparty/chromium/v8/src/objects-body-descriptors.h +index 91cb888..a1c3634 100644 +--- a/src/3rdparty/chromium/v8/src/objects-body-descriptors.h ++++ b/src/3rdparty/chromium/v8/src/objects-body-descriptors.h +@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase { + + template + static inline void IterateBody(HeapObject* obj, int object_size) { +- IterateBody(obj); ++ IterateBody(obj); + } + }; + +diff --git a/src/3rdparty/chromium/v8/src/objects-inl.h b/src/3rdparty/chromium/v8/src/objects-inl.h +index 177c029..baca18d 100644 +--- a/src/3rdparty/chromium/v8/src/objects-inl.h ++++ b/src/3rdparty/chromium/v8/src/objects-inl.h +@@ -3122,6 +3122,25 @@ void HashTableBase::SetNumberOfDeletedElements(int nod) { + + + template ++inline uint32_t HashTable::Hash(Key key) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHash(key, GetHeap()->HashSeed()); ++ } else { ++ return Shape::Hash(key); ++ } ++} ++ ++template ++inline uint32_t HashTable::HashForObject(Key key, Object* object) { ++ if (Shape::UsesSeed) { ++ return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); ++ } else { ++ return Shape::HashForObject(key, object); ++ } ++} ++ ++ ++template + int HashTable::FindEntry(Key key) { + return FindEntry(GetIsolate(), key); + } +diff --git a/src/3rdparty/chromium/v8/src/objects.h b/src/3rdparty/chromium/v8/src/objects.h +index 0111c71..d737a18 100644 +--- a/src/3rdparty/chromium/v8/src/objects.h ++++ b/src/3rdparty/chromium/v8/src/objects.h +@@ -3157,21 +3157,9 @@ template + class HashTable : public HashTableBase { + public: + // Wrapper methods +- inline uint32_t Hash(Key key) { +- if (Shape::UsesSeed) { +- return Shape::SeededHash(key, GetHeap()->HashSeed()); +- } else { +- return Shape::Hash(key); +- } +- } ++ inline uint32_t Hash(Key key); + +- inline uint32_t HashForObject(Key key, Object* object) { +- if (Shape::UsesSeed) { +- return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); +- } else { +- return Shape::HashForObject(key, object); +- } +- } ++ inline uint32_t HashForObject(Key key, Object* object); + + // Returns a new HashTable object. + MUST_USE_RESULT static Handle New( diff --git a/libqt5-qtwebengine.changes b/libqt5-qtwebengine.changes index f2aba60..2c92873 100644 --- a/libqt5-qtwebengine.changes +++ b/libqt5-qtwebengine.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 15 14:07:24 UTC 2017 - fabian@ritter-vogt.de + +- Add patch to fix build with gcc 7: + * fix-chromium-gcc7.patch + ------------------------------------------------------------------- Wed Dec 14 16:06:02 UTC 2016 - hrvoje.senjan@gmail.com diff --git a/libqt5-qtwebengine.spec b/libqt5-qtwebengine.spec index 750b45d..21955ca 100644 --- a/libqt5-qtwebengine.spec +++ b/libqt5-qtwebengine.spec @@ -39,6 +39,8 @@ Patch2: armv6-ffmpeg-no-thumb.patch Patch3: webrtc-build-with-neon.patch # PATCH-FIX-UPSTREAM disable-gpu-when-using-nouveau-boo-1005323.diff -- Detect nouveau opengl drivers and disable gpu usage to work around nouveau crashing Patch5: disable-gpu-when-using-nouveau-boo-1005323.diff +# PATCH-FIX-UPSTREAM fix-chromium-gcc7.patch -- Fix build failure with GCC 7 +Patch6: fix-chromium-gcc7.patch # http://www.chromium.org/blink not ported to PowerPC ExcludeArch: ppc ppc64 ppc64le s390 s390x # Try to fix i586 MemoryErrors with rpmlint @@ -149,6 +151,7 @@ sed -i 's|$(STRIP)|strip|g' src/core/core_module.pro %patch2 -p1 %patch3 -p1 %patch5 -p1 +%patch6 -p1 %package devel Summary: Qt Development Kit