diff options
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/0003-chromium-v8-fix-build-with-gcc7.patch')
-rw-r--r-- | recipes-qt/qt5/qtwebengine/0003-chromium-v8-fix-build-with-gcc7.patch | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/0003-chromium-v8-fix-build-with-gcc7.patch b/recipes-qt/qt5/qtwebengine/0003-chromium-v8-fix-build-with-gcc7.patch new file mode 100644 index 00000000..2acce2c5 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/0003-chromium-v8-fix-build-with-gcc7.patch | |||
@@ -0,0 +1,134 @@ | |||
1 | From 1a163c0cab05761f269fcb5adad5d40d71200d52 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Tue, 11 Jul 2017 10:15:41 +0200 | ||
4 | Subject: [PATCH 3/4] chromium: v8 fix build with gcc7 | ||
5 | |||
6 | Use the fix from nodejs: | ||
7 | https://github.com/nodejs/node/commit/2a2a5565c298639b823250b571101f51210c50e8 | ||
8 | |||
9 | * fixes: | ||
10 | | ../../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)': | ||
11 | | ../../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*&)' | ||
12 | | IterateBody(obj); | ||
13 | | ^ | ||
14 | |||
15 | and | ||
16 | |||
17 | | ../../v8/src/objects.h: In member function 'uint32_t v8::internal::HashTable<Derived, Shape, Key>::Hash(Key)': | ||
18 | | ../../v8/src/objects.h:3205:46: error: invalid use of incomplete type 'class v8::internal::Heap' [-Werror] | ||
19 | | return Shape::SeededHash(key, GetHeap()->HashSeed()); | ||
20 | | ^~ | ||
21 | |||
22 | and | ||
23 | |||
24 | ../../v8/src/heap/mark-compact.cc:3660:43: error: 'v8::internal::PointerUpdateJobTraits<direction>::UpdateTypedPointers(v8::internal::Heap*, v8::internal::MemoryChunk*)::<lambda(v8::internal::SlotType, v8::internal::Address, v8::internal::Address)> [with v8::internal::PointerDirection direction = (v8::internal::PointerDirection)1; v8::internal::Address = unsigned char*; v8::internal::byte = unsigned char]::<lambda(v8::internal::Object**)>' declared with greater visibility than the type of its field 'v8::internal::PointerUpdateJobTraits<direction>::UpdateTypedPointers(v8::internal::Heap*, v8::internal::MemoryChunk*)::<lambda(v8::internal::SlotType, v8::internal::Address, v8::internal::Address)> [with v8::internal::PointerDirection direction = (v8::internal::PointerDirection)1; v8::internal::Address = unsigned char*; v8::internal::byte = unsigned char]::<lambda(v8::internal::Object**)>::<heap capture>' [-Werror=attributes] | ||
25 | |||
26 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
27 | --- | ||
28 | chromium/v8/src/heap/mark-compact.cc | 5 +++++ | ||
29 | chromium/v8/src/objects-body-descriptors.h | 2 +- | ||
30 | chromium/v8/src/objects-inl.h | 20 ++++++++++++++++++++ | ||
31 | chromium/v8/src/objects.h | 20 ++++---------------- | ||
32 | 4 files changed, 30 insertions(+), 17 deletions(-) | ||
33 | |||
34 | diff --git a/chromium/v8/src/heap/mark-compact.cc b/chromium/v8/src/heap/mark-compact.cc | ||
35 | index f9a55dfc61..da46270aec 100644 | ||
36 | --- a/chromium/v8/src/heap/mark-compact.cc | ||
37 | +++ b/chromium/v8/src/heap/mark-compact.cc | ||
38 | @@ -3614,6 +3614,9 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() { | ||
39 | #endif | ||
40 | } | ||
41 | |||
42 | +#pragma GCC diagnostic push | ||
43 | +#pragma GCC diagnostic warning "-Wattributes" | ||
44 | + | ||
45 | template <PointerDirection direction> | ||
46 | class PointerUpdateJobTraits { | ||
47 | public: | ||
48 | @@ -3701,6 +3704,8 @@ class PointerUpdateJobTraits { | ||
49 | } | ||
50 | }; | ||
51 | |||
52 | +#pragma GCC diagnostic pop | ||
53 | + | ||
54 | int NumberOfPointerUpdateTasks(int pages) { | ||
55 | if (!FLAG_parallel_pointer_update) return 1; | ||
56 | const int kMaxTasks = 4; | ||
57 | diff --git a/chromium/v8/src/objects-body-descriptors.h b/chromium/v8/src/objects-body-descriptors.h | ||
58 | index 91cb8883be..a1c3634bd7 100644 | ||
59 | --- a/chromium/v8/src/objects-body-descriptors.h | ||
60 | +++ b/chromium/v8/src/objects-body-descriptors.h | ||
61 | @@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase { | ||
62 | |||
63 | template <typename StaticVisitor> | ||
64 | static inline void IterateBody(HeapObject* obj, int object_size) { | ||
65 | - IterateBody(obj); | ||
66 | + IterateBody<StaticVisitor>(obj); | ||
67 | } | ||
68 | }; | ||
69 | |||
70 | diff --git a/chromium/v8/src/objects-inl.h b/chromium/v8/src/objects-inl.h | ||
71 | index 58441d3853..e850fd787f 100644 | ||
72 | --- a/chromium/v8/src/objects-inl.h | ||
73 | +++ b/chromium/v8/src/objects-inl.h | ||
74 | @@ -38,6 +38,26 @@ | ||
75 | namespace v8 { | ||
76 | namespace internal { | ||
77 | |||
78 | +template <typename Derived, typename Shape, typename Key> | ||
79 | +uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) { | ||
80 | + if (Shape::UsesSeed) { | ||
81 | + return Shape::SeededHash(key, GetHeap()->HashSeed()); | ||
82 | + } else { | ||
83 | + return Shape::Hash(key); | ||
84 | + } | ||
85 | +} | ||
86 | + | ||
87 | + | ||
88 | +template <typename Derived, typename Shape, typename Key> | ||
89 | +uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key, | ||
90 | + Object* object) { | ||
91 | + if (Shape::UsesSeed) { | ||
92 | + return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); | ||
93 | + } else { | ||
94 | + return Shape::HashForObject(key, object); | ||
95 | + } | ||
96 | +} | ||
97 | + | ||
98 | PropertyDetails::PropertyDetails(Smi* smi) { | ||
99 | value_ = smi->value(); | ||
100 | } | ||
101 | diff --git a/chromium/v8/src/objects.h b/chromium/v8/src/objects.h | ||
102 | index 7d774beb5b..eda1478766 100644 | ||
103 | --- a/chromium/v8/src/objects.h | ||
104 | +++ b/chromium/v8/src/objects.h | ||
105 | @@ -3193,22 +3193,10 @@ class HashTable : public HashTableBase { | ||
106 | public: | ||
107 | typedef Shape ShapeT; | ||
108 | |||
109 | - // Wrapper methods | ||
110 | - inline uint32_t Hash(Key key) { | ||
111 | - if (Shape::UsesSeed) { | ||
112 | - return Shape::SeededHash(key, GetHeap()->HashSeed()); | ||
113 | - } else { | ||
114 | - return Shape::Hash(key); | ||
115 | - } | ||
116 | - } | ||
117 | - | ||
118 | - inline uint32_t HashForObject(Key key, Object* object) { | ||
119 | - if (Shape::UsesSeed) { | ||
120 | - return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); | ||
121 | - } else { | ||
122 | - return Shape::HashForObject(key, object); | ||
123 | - } | ||
124 | - } | ||
125 | + // Wrapper methods. Defined in src/objects-inl.h | ||
126 | + // to break a cycle with src/heap/heap.h. | ||
127 | + inline uint32_t Hash(Key key); | ||
128 | + inline uint32_t HashForObject(Key key, Object* object); | ||
129 | |||
130 | // Returns a new HashTable object. | ||
131 | MUST_USE_RESULT static Handle<Derived> New( | ||
132 | -- | ||
133 | 2.13.2 | ||
134 | |||