[oe] [meta-browser][WIP][PATCH] chromium(-wayland): Fix build with gcc7

Martin Jansa martin.jansa at gmail.com
Fri Jun 16 14:06:11 UTC 2017


* add 2 patches to fix issues detected by gcc7

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 recipes-browser/chromium/chromium-browser.inc      |  2 ++
 .../files/0001-v8-fix-build-with-gcc7.patch        | 20 ++++++++++++++
 .../files/0002-WebKit-fix-build-with-gcc7.patch    | 31 ++++++++++++++++++++++
 3 files changed, 53 insertions(+)
 create mode 100644 recipes-browser/chromium/files/0001-v8-fix-build-with-gcc7.patch
 create mode 100644 recipes-browser/chromium/files/0002-WebKit-fix-build-with-gcc7.patch

diff --git a/recipes-browser/chromium/chromium-browser.inc b/recipes-browser/chromium/chromium-browser.inc
index ad8e497..08853b1 100644
--- a/recipes-browser/chromium/chromium-browser.inc
+++ b/recipes-browser/chromium/chromium-browser.inc
@@ -26,6 +26,8 @@ SRC_URI = "\
         ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://api-keys.patch;patchdir=${WORKDIR}', '', d)} \
         file://google-chrome.desktop \
         file://unset-madv-free.patch \
+        file://0001-v8-fix-build-with-gcc7.patch \
+        file://0002-WebKit-fix-build-with-gcc7.patch \
 "
 
 S = "${WORKDIR}/chromium-${PV}"
diff --git a/recipes-browser/chromium/files/0001-v8-fix-build-with-gcc7.patch b/recipes-browser/chromium/files/0001-v8-fix-build-with-gcc7.patch
new file mode 100644
index 0000000..0fc5bfb
--- /dev/null
+++ b/recipes-browser/chromium/files/0001-v8-fix-build-with-gcc7.patch
@@ -0,0 +1,20 @@
+Use the fix from nodejs:
+https://github.com/nodejs/node/commit/2a2a5565c298639b823250b571101f51210c50e8
+
+* fixes:
+| ../../git/src/v8/src/objects-body-descriptors.h: In static member function 'static void v8::internal::FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody(v8::internal::HeapObject*, int)':
+| ../../git/src/v8/src/objects-body-descriptors.h:102:20: error: no matching function for call to 'v8::internal::FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody(v8::internal::HeapObject*&)'
+|      IterateBody(obj);
+|                     ^
+
+--- chromium-54.0.2810.2.orig/v8/src/objects-body-descriptors.h	2016-07-28 12:17:37.000000000 -1000
++++ chromium-54.0.2810.2/v8/src/objects-body-descriptors.h	2017-06-16 01:20:50.026665439 -1000
+@@ -99,7 +99,7 @@
+ 
+   template <typename StaticVisitor>
+   static inline void IterateBody(HeapObject* obj, int object_size) {
+-    IterateBody(obj);
++    IterateBody<StaticVisitor>(obj);
+   }
+ };
+ 
diff --git a/recipes-browser/chromium/files/0002-WebKit-fix-build-with-gcc7.patch b/recipes-browser/chromium/files/0002-WebKit-fix-build-with-gcc7.patch
new file mode 100644
index 0000000..284a83c
--- /dev/null
+++ b/recipes-browser/chromium/files/0002-WebKit-fix-build-with-gcc7.patch
@@ -0,0 +1,31 @@
+Based on qtwebengine-opensource-src-5.8.0-wtf-gcc7.patch from
+http://git.net/ml/scm-fedora-commits/2017-03/msg15697.html
+
+* Fixes:
+In file included from ../../git/src/third_party/WebKit/Source/platform/heap/ThreadingTraits.h:14:0,
+                 from ../../git/src/third_party/WebKit/Source/platform/heap/ThreadState.h:37,
+                 from ../../git/src/third_party/WebKit/Source/platform/heap/GarbageCollected.h:8,
+                 from ../../git/src/third_party/WebKit/Source/platform/heap/Visitor.h:35,
+                 from ../../git/src/third_party/WebKit/Source/platform/heap/GCInfo.h:8,
+                 from ../../git/src/third_party/WebKit/Source/platform/heap/Heap.h:35,
+                 from ../../git/src/third_party/WebKit/Source/platform/heap/Handle.h:34,
+                 from ../../git/src/third_party/WebKit/public/platform/WebPrivatePtr.h:38,
+                 from ../../git/src/third_party/WebKit/public/platform/WebString.h:35,
+                 from ../../git/src/third_party/WebKit/Source/platform/exported/FilePathConversion.cpp:8:
+../../git/src/third_party/WebKit/Source/wtf/LinkedHashSet.h: In member function 'void WTF::LinkedHashSet<Value, HashFunctions, HashTraits, Allocator>::swap(WTF::LinkedHashSet<Value, HashFunctions, HashTraits, Allocator>&)':
+../../git/src/third_party/WebKit/Source/wtf/LinkedHashSet.h:549:5: error: there are no arguments to 'swapAnchor' that depend on a template parameter, so a declaration of 'swapAnchor' must be available [-fpermissive]
+     swapAnchor(m_anchor, other.m_anchor);
+     ^~~~~~~~~~
+../../git/src/third_party/WebKit/Source/wtf/LinkedHashSet.h:549:5: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
+
+--- chromium-54.0.2810.2.orig/third_party/WebKit/Source/wtf/LinkedHashSet.h	2016-07-28 12:16:12.000000000 -1000
++++ chromium-54.0.2810.2/third_party/WebKit/Source/wtf/LinkedHashSet.h	2017-06-16 02:19:37.928797121 -1000
+@@ -542,6 +542,8 @@
+     return *this;
+ }
+ 
++inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b);
++
+ template<typename T, typename U, typename V, typename W>
+ inline void LinkedHashSet<T, U, V, W>::swap(LinkedHashSet& other)
+ {
-- 
2.13.1




More information about the Openembedded-devel mailing list