All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors
@ 2015-11-07 12:20 Max Krummenacher
  2015-11-07 12:20 ` [meta-browser][PATCH v2 1/5] chromium: fix gcc5 compile issues Max Krummenacher
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Max Krummenacher @ 2015-11-07 12:20 UTC (permalink / raw)
  To: openembedded-devel

v2:
Review Zoltan Kuscsik:
- prefer #pragma silencing of error over code refactoring
- add link to upstream discussion

Review Martin Jansa:
- port fixes to cef3 also

Max Krummenacher (5):
  chromium: fix gcc5 compile issues
  cef3_280796.bb: change indent to 4 spaces
  cef3: fix gcc5 compile issues
  cef3: fix build of x86-64
  cef3: fix build with gcc 4.9.4

 ...0001-bignum.cc-disable-warning-from-gcc-5.patch | 39 ++++++++++++++++++++
 ...-image_util.cc-disable-warning-from-gcc-5.patch | 40 ++++++++++++++++++++
 ...-test.h-disable-warning-unused-definition.patch | 43 ++++++++++++++++++++++
 ...ithmetic.h-put-parentheses-to-silence-war.patch | 39 ++++++++++++++++++++
 recipes-browser/chromium/cef3_280796.bb            | 33 ++++++++++++-----
 ...0001-bignum.cc-disable-warning-from-gcc-5.patch | 39 ++++++++++++++++++++
 ...-image_util.cc-disable-warning-from-gcc-5.patch | 40 ++++++++++++++++++++
 recipes-browser/chromium/chromium_40.0.2214.91.bb  |  3 ++
 8 files changed, 266 insertions(+), 10 deletions(-)
 create mode 100644 recipes-browser/chromium/cef3/0001-bignum.cc-disable-warning-from-gcc-5.patch
 create mode 100644 recipes-browser/chromium/cef3/0002-image_util.cc-disable-warning-from-gcc-5.patch
 create mode 100644 recipes-browser/chromium/cef3/0003-gtest-typed-test.h-disable-warning-unused-definition.patch
 create mode 100644 recipes-browser/chromium/cef3/0004-SaturatedArithmetic.h-put-parentheses-to-silence-war.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch

-- 
1.8.4.5



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [meta-browser][PATCH v2 1/5] chromium: fix gcc5 compile issues
  2015-11-07 12:20 [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Max Krummenacher
@ 2015-11-07 12:20 ` Max Krummenacher
  2015-11-07 12:20 ` [meta-browser][PATCH v2 2/5] cef3_280796.bb: change indent to 4 spaces Max Krummenacher
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Max Krummenacher @ 2015-11-07 12:20 UTC (permalink / raw)
  To: openembedded-devel

A chromium build with gcc5 fails with warnings treated as errors.

bignum.cc, image_util.cc: strict-overflow warning

Compiles and runs on qemux86-64 with gcc 5.2.0 and still compiles on
armv7a with gcc linaro-4.9.4.

Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
---
 ...0001-bignum.cc-disable-warning-from-gcc-5.patch | 39 +++++++++++++++++++++
 ...-image_util.cc-disable-warning-from-gcc-5.patch | 40 ++++++++++++++++++++++
 recipes-browser/chromium/chromium_40.0.2214.91.bb  |  3 ++
 3 files changed, 82 insertions(+)
 create mode 100644 recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch

diff --git a/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
new file mode 100644
index 0000000..4a28bda
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
@@ -0,0 +1,39 @@
+From 5b8c53a6bb11c8aa9b575b5a8155c25c5085f349 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.oss.09@gmail.com>
+Date: Fri, 6 Nov 2015 12:22:35 +0100
+Subject: [PATCH] bignum.cc: disable warning from gcc 5
+
+addresses:
+  ../../third_party/WebKit/Source/wtf/dtoa/bignum.cc:105:10: error: assuming
+  signed overflow does not occur when assuming that (X + c) < X is always
+  false [-Werror=strict-overflow]
+      void Bignum::AssignDecimalString(Vector<const char> value) {
+           ^
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+
+Upstream-Status: Pending
+See the discussion on the issue in Chromium upstream:
+https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/3uwBwunIa7g
+---
+ third_party/WebKit/Source/wtf/dtoa/bignum.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/third_party/WebKit/Source/wtf/dtoa/bignum.cc b/third_party/WebKit/Source/wtf/dtoa/bignum.cc
+index a000b46..6c6d336 100644
+--- a/third_party/WebKit/Source/wtf/dtoa/bignum.cc
++++ b/third_party/WebKit/Source/wtf/dtoa/bignum.cc
+@@ -109,7 +109,10 @@ namespace double_conversion {
+         int length = value.length();
+         int pos = 0;
+         // Let's just say that each digit needs 4 bits.
++#pragma GCC diagnostic push
++#pragma GCC diagnostic warning "-Wstrict-overflow"
+         while (length >= kMaxUint64DecimalDigits) {
++#pragma GCC diagnostic pop
+             uint64_t digits = ReadUInt64(value, pos, kMaxUint64DecimalDigits);
+             pos += kMaxUint64DecimalDigits;
+             length -= kMaxUint64DecimalDigits;
+-- 
+1.8.4.5
+
diff --git a/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch
new file mode 100644
index 0000000..7023233
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch
@@ -0,0 +1,40 @@
+From 2f674d980a116075dc7123a3e243b1451e4a732d Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.oss.09@gmail.com>
+Date: Tue, 3 Nov 2015 22:13:40 +0100
+Subject: [PATCH] image_util.cc: disable warning from gcc 5
+
+addresses:
+  ../../ui/gfx/image/image_util.cc:50:6: error: assuming signed overflow does
+  not occur when assuming that (X - c) <= X is always true
+  [-Werror=strict-overflow]
+  bool VisibleMargins(const ImageSkia& image, int* leading, int* trailing) {
+       ^
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+
+Upstream-Status: Pending
+See the discussion on the issue in Chromium upstream:
+https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/3uwBwunIa7g
+
+---
+ ui/gfx/image/image_util.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ui/gfx/image/image_util.cc b/ui/gfx/image/image_util.cc
+index 89a3f8c..d595da3 100644
+--- a/ui/gfx/image/image_util.cc
++++ b/ui/gfx/image/image_util.cc
+@@ -68,7 +68,10 @@ bool VisibleMargins(const ImageSkia& image, int* leading, int* trailing) {
+   int inner_min = bitmap.width();
+   for (int x = 0; x < bitmap.width(); ++x) {
+     for (int y = 0; y < bitmap.height(); ++y) {
++#pragma GCC diagnostic push
++#pragma GCC diagnostic warning "-Wstrict-overflow"
+       if (SkColorGetA(bitmap.getColor(x, y)) > kMinimumVisibleOpacity) {
++#pragma GCC diagnostic pop
+         inner_min = x;
+         break;
+       }
+-- 
+1.8.4.5
+
diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb
index 8bc05ee..a9635cd 100644
--- a/recipes-browser/chromium/chromium_40.0.2214.91.bb
+++ b/recipes-browser/chromium/chromium_40.0.2214.91.bb
@@ -28,7 +28,10 @@ SRC_URI = "\
         file://google-chrome.desktop \
         file://chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch \
         file://chromium-40/add_missing_stat_h_include.patch \
+        file://chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch \
+        file://chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch \
 "
+
 #
 # * use-egl : Without this packageconfig, the Chromium build will use GLX for creating an OpenGL context in X11,
 #             and regular OpenGL for painting operations. Neither are desirable on embedded platforms. With this
-- 
1.8.4.5



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-browser][PATCH v2 2/5] cef3_280796.bb: change indent to 4 spaces
  2015-11-07 12:20 [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Max Krummenacher
  2015-11-07 12:20 ` [meta-browser][PATCH v2 1/5] chromium: fix gcc5 compile issues Max Krummenacher
@ 2015-11-07 12:20 ` Max Krummenacher
  2015-11-07 12:20 ` [meta-browser][PATCH v2 3/5] cef3: fix gcc5 compile issues Max Krummenacher
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Max Krummenacher @ 2015-11-07 12:20 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
---
 recipes-browser/chromium/cef3_280796.bb | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/recipes-browser/chromium/cef3_280796.bb b/recipes-browser/chromium/cef3_280796.bb
index b7b2de6..939602b 100644
--- a/recipes-browser/chromium/cef3_280796.bb
+++ b/recipes-browser/chromium/cef3_280796.bb
@@ -31,21 +31,21 @@ export BUILD_TARGET_ARCH="${TARGET_ARCH}"
 export GYP_DEFINES="${GYP_ARCH_DEFINES} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"
 
 do_configure_append() {
-	export PATH=${WORKDIR}/depot_tools:"$PATH"
-	# End of LD Workaround
-	#-----------------------
-	# Configure cef
-	#------------------------
-	cd cef
-	./cef_create_projects.sh -I ${BUILD_TARGET_ARCH}_ozone.gypi --depth ../
-	cd -
+    export PATH=${WORKDIR}/depot_tools:"$PATH"
+    # End of LD Workaround
+    #-----------------------
+    # Configure cef
+    #------------------------
+    cd cef
+    ./cef_create_projects.sh -I ${BUILD_TARGET_ARCH}_ozone.gypi --depth ../
+    cd -
 }
 
 # Workaround to disable qa_configure
 do_qa_configure() {
-	echo "do_qa_configure"
+    echo "do_qa_configure"
 }
 
 do_compile() {
-	ninja -C out/${CHROMIUM_BUILD_TYPE} -j${BB_NUMBER_THREADS} cefsimple
+    ninja -C out/${CHROMIUM_BUILD_TYPE} -j${BB_NUMBER_THREADS} cefsimple
 }
-- 
1.8.4.5



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-browser][PATCH v2 3/5] cef3: fix gcc5 compile issues
  2015-11-07 12:20 [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Max Krummenacher
  2015-11-07 12:20 ` [meta-browser][PATCH v2 1/5] chromium: fix gcc5 compile issues Max Krummenacher
  2015-11-07 12:20 ` [meta-browser][PATCH v2 2/5] cef3_280796.bb: change indent to 4 spaces Max Krummenacher
@ 2015-11-07 12:20 ` Max Krummenacher
  2015-11-07 12:20 ` [meta-browser][PATCH v2 4/5] cef3: fix build of x86-64 Max Krummenacher
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Max Krummenacher @ 2015-11-07 12:20 UTC (permalink / raw)
  To: openembedded-devel

A cef3 build with gcc5 fails with warnings treated as errors.

bignum.cc, image_util.cc: strict-overflow warning
gtest-typed-test.h: unused-variable warning
SaturatedArithmetic.h: parentheses warning

Compiles for qemux86 with gcc 5.2.0 and still compiles on
armv7a with gcc linaro-4.9.4.
Note that the resulting binary has not been tested on a target.

Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
---
 ...0001-bignum.cc-disable-warning-from-gcc-5.patch | 39 ++++++++++++++++++++
 ...-image_util.cc-disable-warning-from-gcc-5.patch | 40 ++++++++++++++++++++
 ...-test.h-disable-warning-unused-definition.patch | 43 ++++++++++++++++++++++
 ...ithmetic.h-put-parentheses-to-silence-war.patch | 39 ++++++++++++++++++++
 recipes-browser/chromium/cef3_280796.bb            |  4 ++
 5 files changed, 165 insertions(+)
 create mode 100644 recipes-browser/chromium/cef3/0001-bignum.cc-disable-warning-from-gcc-5.patch
 create mode 100644 recipes-browser/chromium/cef3/0002-image_util.cc-disable-warning-from-gcc-5.patch
 create mode 100644 recipes-browser/chromium/cef3/0003-gtest-typed-test.h-disable-warning-unused-definition.patch
 create mode 100644 recipes-browser/chromium/cef3/0004-SaturatedArithmetic.h-put-parentheses-to-silence-war.patch

diff --git a/recipes-browser/chromium/cef3/0001-bignum.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/cef3/0001-bignum.cc-disable-warning-from-gcc-5.patch
new file mode 100644
index 0000000..4a28bda
--- /dev/null
+++ b/recipes-browser/chromium/cef3/0001-bignum.cc-disable-warning-from-gcc-5.patch
@@ -0,0 +1,39 @@
+From 5b8c53a6bb11c8aa9b575b5a8155c25c5085f349 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.oss.09@gmail.com>
+Date: Fri, 6 Nov 2015 12:22:35 +0100
+Subject: [PATCH] bignum.cc: disable warning from gcc 5
+
+addresses:
+  ../../third_party/WebKit/Source/wtf/dtoa/bignum.cc:105:10: error: assuming
+  signed overflow does not occur when assuming that (X + c) < X is always
+  false [-Werror=strict-overflow]
+      void Bignum::AssignDecimalString(Vector<const char> value) {
+           ^
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+
+Upstream-Status: Pending
+See the discussion on the issue in Chromium upstream:
+https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/3uwBwunIa7g
+---
+ third_party/WebKit/Source/wtf/dtoa/bignum.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/third_party/WebKit/Source/wtf/dtoa/bignum.cc b/third_party/WebKit/Source/wtf/dtoa/bignum.cc
+index a000b46..6c6d336 100644
+--- a/third_party/WebKit/Source/wtf/dtoa/bignum.cc
++++ b/third_party/WebKit/Source/wtf/dtoa/bignum.cc
+@@ -109,7 +109,10 @@ namespace double_conversion {
+         int length = value.length();
+         int pos = 0;
+         // Let's just say that each digit needs 4 bits.
++#pragma GCC diagnostic push
++#pragma GCC diagnostic warning "-Wstrict-overflow"
+         while (length >= kMaxUint64DecimalDigits) {
++#pragma GCC diagnostic pop
+             uint64_t digits = ReadUInt64(value, pos, kMaxUint64DecimalDigits);
+             pos += kMaxUint64DecimalDigits;
+             length -= kMaxUint64DecimalDigits;
+-- 
+1.8.4.5
+
diff --git a/recipes-browser/chromium/cef3/0002-image_util.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/cef3/0002-image_util.cc-disable-warning-from-gcc-5.patch
new file mode 100644
index 0000000..7023233
--- /dev/null
+++ b/recipes-browser/chromium/cef3/0002-image_util.cc-disable-warning-from-gcc-5.patch
@@ -0,0 +1,40 @@
+From 2f674d980a116075dc7123a3e243b1451e4a732d Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.oss.09@gmail.com>
+Date: Tue, 3 Nov 2015 22:13:40 +0100
+Subject: [PATCH] image_util.cc: disable warning from gcc 5
+
+addresses:
+  ../../ui/gfx/image/image_util.cc:50:6: error: assuming signed overflow does
+  not occur when assuming that (X - c) <= X is always true
+  [-Werror=strict-overflow]
+  bool VisibleMargins(const ImageSkia& image, int* leading, int* trailing) {
+       ^
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+
+Upstream-Status: Pending
+See the discussion on the issue in Chromium upstream:
+https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/3uwBwunIa7g
+
+---
+ ui/gfx/image/image_util.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ui/gfx/image/image_util.cc b/ui/gfx/image/image_util.cc
+index 89a3f8c..d595da3 100644
+--- a/ui/gfx/image/image_util.cc
++++ b/ui/gfx/image/image_util.cc
+@@ -68,7 +68,10 @@ bool VisibleMargins(const ImageSkia& image, int* leading, int* trailing) {
+   int inner_min = bitmap.width();
+   for (int x = 0; x < bitmap.width(); ++x) {
+     for (int y = 0; y < bitmap.height(); ++y) {
++#pragma GCC diagnostic push
++#pragma GCC diagnostic warning "-Wstrict-overflow"
+       if (SkColorGetA(bitmap.getColor(x, y)) > kMinimumVisibleOpacity) {
++#pragma GCC diagnostic pop
+         inner_min = x;
+         break;
+       }
+-- 
+1.8.4.5
+
diff --git a/recipes-browser/chromium/cef3/0003-gtest-typed-test.h-disable-warning-unused-definition.patch b/recipes-browser/chromium/cef3/0003-gtest-typed-test.h-disable-warning-unused-definition.patch
new file mode 100644
index 0000000..97a6116
--- /dev/null
+++ b/recipes-browser/chromium/cef3/0003-gtest-typed-test.h-disable-warning-unused-definition.patch
@@ -0,0 +1,43 @@
+From 1dac3072a62d1bb40db8c2f63f2729e658307761 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.oss.09@gmail.com>
+Date: Sat, 7 Nov 2015 00:45:46 +0100
+Subject: [PATCH] gtest-typed-test.h: disable warning unused definitions
+
+In file included from ../../testing/gtest/include/gtest/gtest.h:66:0,
+                 from ../../base/test/task_runner_test_template.h:62,
+                 from ../../base/test/task_runner_test_template.cc:5:
+../../testing/gtest/include/gtest/gtest-typed-test.h:214:3: error: 'base::gtest_registered_test_names_TaskRunnerTest_' defined but not used [-Werror=unused-variable]
+   gtest_registered_test_names_##TestCaseName##_
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+
+Upstream-Status: Pending
+Seems to be fixed in current chromium sources.
+---
+ testing/gtest/include/gtest/gtest-typed-test.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/testing/gtest/include/gtest/gtest-typed-test.h b/testing/gtest/include/gtest/gtest-typed-test.h
+index fe1e83b..5053bbe 100644
+--- a/testing/gtest/include/gtest/gtest-typed-test.h
++++ b/testing/gtest/include/gtest/gtest-typed-test.h
+@@ -32,6 +32,9 @@
+ #ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
+ #define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
+ 
++#pragma GCC diagnostic push
++#pragma GCC diagnostic warning "-Wunused"
++
+ // This header implements typed tests and type-parameterized tests.
+ 
+ // Typed (aka type-driven) tests repeat the same test for types in a
+@@ -256,4 +259,6 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, FooTest, MyTypes);
+ 
+ #endif  // GTEST_HAS_TYPED_TEST_P
+ 
++#pragma GCC diagnostic pop
++
+ #endif  // GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
+-- 
+1.8.4.5
+
diff --git a/recipes-browser/chromium/cef3/0004-SaturatedArithmetic.h-put-parentheses-to-silence-war.patch b/recipes-browser/chromium/cef3/0004-SaturatedArithmetic.h-put-parentheses-to-silence-war.patch
new file mode 100644
index 0000000..82fc58f
--- /dev/null
+++ b/recipes-browser/chromium/cef3/0004-SaturatedArithmetic.h-put-parentheses-to-silence-war.patch
@@ -0,0 +1,39 @@
+From 947380c31305163b3cea2c7352c6a9f38922749c Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.oss.09@gmail.com>
+Date: Sat, 7 Nov 2015 00:52:23 +0100
+Subject: [PATCH] SaturatedArithmetic.h: put parentheses to silence warning
+
+In file included from ../../third_party/WebKit/Source/platform/LayoutUnit.h:36:0,
+                 from ../../third_party/WebKit/Source/platform/animation/AnimationUtilities.h:29,
+                 from ../../third_party/WebKit/Source/platform/graphics/Color.h:29,
+                 from ../../third_party/WebKit/Source/platform/ColorSuggestion.h:34,
+                 from ../../third_party/WebKit/Source/platform/ColorChooserClient.h:34,
+                 from ../../third_party/WebKit/Source/platform/ColorChooserClient.cpp:32:
+../../third_party/WebKit/Source/wtf/SaturatedArithmetic.h: In function 'int32_t saturatedAddition(int32_t, int32_t)':
+../../third_party/WebKit/Source/wtf/SaturatedArithmetic.h:45:26: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
+     if (!((ua ^ ub) >> 31) & (result ^ ua) >> 31)
+
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+
+Upstream-Status: Pending
+Seems to be fixed in current chromium sources.
+---
+ third_party/WebKit/Source/wtf/SaturatedArithmetic.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/third_party/WebKit/Source/wtf/SaturatedArithmetic.h b/third_party/WebKit/Source/wtf/SaturatedArithmetic.h
+index 981276f..19c6157 100644
+--- a/third_party/WebKit/Source/wtf/SaturatedArithmetic.h
++++ b/third_party/WebKit/Source/wtf/SaturatedArithmetic.h
+@@ -42,7 +42,7 @@ ALWAYS_INLINE int32_t saturatedAddition(int32_t a, int32_t b)
+ 
+     // Can only overflow if the signed bit of the two values match. If the signed
+     // bit of the result and one of the values differ it did overflow.
+-    if (!((ua ^ ub) >> 31) & (result ^ ua) >> 31)
++    if ((!((ua ^ ub) >> 31)) & (result ^ ua) >> 31)
+         result = std::numeric_limits<int>::max() + (ua >> 31);
+ 
+     return result;
+-- 
+1.8.4.5
+
diff --git a/recipes-browser/chromium/cef3_280796.bb b/recipes-browser/chromium/cef3_280796.bb
index 939602b..c141b94 100644
--- a/recipes-browser/chromium/cef3_280796.bb
+++ b/recipes-browser/chromium/cef3_280796.bb
@@ -15,6 +15,10 @@ SRC_URI = "http://people.linaro.org/~zoltan.kuscsik/chromium-browser/chromium_re
            git://chromium.googlesource.com/chromium/tools/depot_tools.git;protocol=https;destsuffix=depot_tools;branch=master;name=tools \
            file://01_get_svn_version_from_LASTCHANGE.patch \
 	   file://cef-simple \
+	   file://0001-bignum.cc-disable-warning-from-gcc-5.patch \
+	   file://0002-image_util.cc-disable-warning-from-gcc-5.patch \
+	   file://0003-gtest-typed-test.h-disable-warning-unused-definition.patch \
+	   file://0004-SaturatedArithmetic.h-put-parentheses-to-silence-war.patch \
 	  "
 SRC_URI[md5sum] = "9efbb50283b731042e62b9bd5e312b2f"
 SRC_URI[sha256sum] = "f608e97dadf6ea4d885b24fd876896d46840fa39bf743ea2025075aee9fb348d"
-- 
1.8.4.5



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-browser][PATCH v2 4/5] cef3: fix build of x86-64
  2015-11-07 12:20 [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Max Krummenacher
                   ` (2 preceding siblings ...)
  2015-11-07 12:20 ` [meta-browser][PATCH v2 3/5] cef3: fix gcc5 compile issues Max Krummenacher
@ 2015-11-07 12:20 ` Max Krummenacher
  2015-11-07 12:20 ` [meta-browser][PATCH v2 5/5] cef3: fix build with gcc 4.9.4 Max Krummenacher
  2015-11-09 10:51 ` [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Martin Jansa
  5 siblings, 0 replies; 10+ messages in thread
From: Max Krummenacher @ 2015-11-07 12:20 UTC (permalink / raw)
  To: openembedded-devel

Use gypi file for i586 to create the configuration for the x86-64 architecture.

Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>

Upstream-Status: Inappropriate configuration
Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
---
 recipes-browser/chromium/cef3_280796.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/recipes-browser/chromium/cef3_280796.bb b/recipes-browser/chromium/cef3_280796.bb
index c141b94..df4a80f 100644
--- a/recipes-browser/chromium/cef3_280796.bb
+++ b/recipes-browser/chromium/cef3_280796.bb
@@ -34,6 +34,11 @@ export GYP_GENERATORS="ninja"
 export BUILD_TARGET_ARCH="${TARGET_ARCH}"
 export GYP_DEFINES="${GYP_ARCH_DEFINES} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"
 
+do_configure_prepend() {
+    # there is no rule for the x86-64 architecture, recycle the i586 one
+    cp  cef/i586_ozone.gypi  cef/x86_64_ozone.gypi
+}
+
 do_configure_append() {
     export PATH=${WORKDIR}/depot_tools:"$PATH"
     # End of LD Workaround
-- 
1.8.4.5



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [meta-browser][PATCH v2 5/5] cef3: fix build with gcc 4.9.4
  2015-11-07 12:20 [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Max Krummenacher
                   ` (3 preceding siblings ...)
  2015-11-07 12:20 ` [meta-browser][PATCH v2 4/5] cef3: fix build of x86-64 Max Krummenacher
@ 2015-11-07 12:20 ` Max Krummenacher
  2015-11-07 19:52   ` Khem Raj
  2015-11-09 10:51 ` [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Martin Jansa
  5 siblings, 1 reply; 10+ messages in thread
From: Max Krummenacher @ 2015-11-07 12:20 UTC (permalink / raw)
  To: openembedded-devel

During the final link we get errors like this:
.../4.9.4/ld: warning: hidden symbol 'sqlite3_temp_directory' in obj/.../sqlite.sqlite3.o) is referenced by DSO .../usr/lib/libsoftokn3.so
.../4.9.4/ld: error: treating warnings as errors
collect2: error: ld returned 1 exit status

Use chromium.bb solution to not treat linker warnings as errors.

Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>

Upstream-Status: Inappropriate configuration
Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
---
 recipes-browser/chromium/cef3_280796.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/recipes-browser/chromium/cef3_280796.bb b/recipes-browser/chromium/cef3_280796.bb
index df4a80f..828605b 100644
--- a/recipes-browser/chromium/cef3_280796.bb
+++ b/recipes-browser/chromium/cef3_280796.bb
@@ -34,6 +34,10 @@ export GYP_GENERATORS="ninja"
 export BUILD_TARGET_ARCH="${TARGET_ARCH}"
 export GYP_DEFINES="${GYP_ARCH_DEFINES} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"
 
+EXTRA_OEGYP =	" \
+    -Ddisable_fatal_linker_warnings=1 \
+"
+
 do_configure_prepend() {
     # there is no rule for the x86-64 architecture, recycle the i586 one
     cp  cef/i586_ozone.gypi  cef/x86_64_ozone.gypi
@@ -46,7 +50,7 @@ do_configure_append() {
     # Configure cef
     #------------------------
     cd cef
-    ./cef_create_projects.sh -I ${BUILD_TARGET_ARCH}_ozone.gypi --depth ../
+    ./cef_create_projects.sh -I ${BUILD_TARGET_ARCH}_ozone.gypi --depth ../ ${EXTRA_OEGYP}
     cd -
 }
 
-- 
1.8.4.5



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [meta-browser][PATCH v2 5/5] cef3: fix build with gcc 4.9.4
  2015-11-07 12:20 ` [meta-browser][PATCH v2 5/5] cef3: fix build with gcc 4.9.4 Max Krummenacher
@ 2015-11-07 19:52   ` Khem Raj
  2015-11-09 10:51     ` Otavio Salvador
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2015-11-07 19:52 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2121 bytes --]


> On Nov 7, 2015, at 4:20 AM, Max Krummenacher <max.oss.09@gmail.com> wrote:
> 
> During the final link we get errors like this:
> .../4.9.4/ld: warning: hidden symbol 'sqlite3_temp_directory' in obj/.../sqlite.sqlite3.o) is referenced by DSO .../usr/lib/libsoftokn3.so
> .../4.9.4/ld: error: treating warnings as errors
> collect2: error: ld returned 1 exit status
> 

This is gold linker specific so you should disable these warning when ld-is-gold is in DISTRO_FEATURES. Its a big broad brush so lets
try to make it small as we can.

> Use chromium.bb solution to not treat linker warnings as errors.
> 
> Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
> 
> Upstream-Status: Inappropriate configuration
> Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
> ---
> recipes-browser/chromium/cef3_280796.bb | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/recipes-browser/chromium/cef3_280796.bb b/recipes-browser/chromium/cef3_280796.bb
> index df4a80f..828605b 100644
> --- a/recipes-browser/chromium/cef3_280796.bb
> +++ b/recipes-browser/chromium/cef3_280796.bb
> @@ -34,6 +34,10 @@ export GYP_GENERATORS="ninja"
> export BUILD_TARGET_ARCH="${TARGET_ARCH}"
> export GYP_DEFINES="${GYP_ARCH_DEFINES} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"
> 
> +EXTRA_OEGYP =	" \
> +    -Ddisable_fatal_linker_warnings=1 \
> +"
> +
> do_configure_prepend() {
>     # there is no rule for the x86-64 architecture, recycle the i586 one
>     cp  cef/i586_ozone.gypi  cef/x86_64_ozone.gypi
> @@ -46,7 +50,7 @@ do_configure_append() {
>     # Configure cef
>     #------------------------
>     cd cef
> -    ./cef_create_projects.sh -I ${BUILD_TARGET_ARCH}_ozone.gypi --depth ../
> +    ./cef_create_projects.sh -I ${BUILD_TARGET_ARCH}_ozone.gypi --depth ../ ${EXTRA_OEGYP}
>     cd -
> }
> 
> --
> 1.8.4.5
> 
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors
  2015-11-07 12:20 [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Max Krummenacher
                   ` (4 preceding siblings ...)
  2015-11-07 12:20 ` [meta-browser][PATCH v2 5/5] cef3: fix build with gcc 4.9.4 Max Krummenacher
@ 2015-11-09 10:51 ` Martin Jansa
  5 siblings, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2015-11-09 10:51 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2391 bytes --]

On Sat, Nov 07, 2015 at 01:20:24PM +0100, Max Krummenacher wrote:
> v2:
> Review Zoltan Kuscsik:
> - prefer #pragma silencing of error over code refactoring
> - add link to upstream discussion
> 
> Review Martin Jansa:
> - port fixes to cef3 also
> 
> Max Krummenacher (5):
>   chromium: fix gcc5 compile issues
>   cef3_280796.bb: change indent to 4 spaces
>   cef3: fix gcc5 compile issues
>   cef3: fix build of x86-64
>   cef3: fix build with gcc 4.9.4

Fixed both issues for qemux86 as well as qemux86-64.

They built in "bitbake world" probably for first time since they were
introduced, Thanks!

Acked-by: Martin Jansa <Martin.Jansa@gmail.com>

Lets get this merged before jethro branch is created.

>  ...0001-bignum.cc-disable-warning-from-gcc-5.patch | 39 ++++++++++++++++++++
>  ...-image_util.cc-disable-warning-from-gcc-5.patch | 40 ++++++++++++++++++++
>  ...-test.h-disable-warning-unused-definition.patch | 43 ++++++++++++++++++++++
>  ...ithmetic.h-put-parentheses-to-silence-war.patch | 39 ++++++++++++++++++++
>  recipes-browser/chromium/cef3_280796.bb            | 33 ++++++++++++-----
>  ...0001-bignum.cc-disable-warning-from-gcc-5.patch | 39 ++++++++++++++++++++
>  ...-image_util.cc-disable-warning-from-gcc-5.patch | 40 ++++++++++++++++++++
>  recipes-browser/chromium/chromium_40.0.2214.91.bb  |  3 ++
>  8 files changed, 266 insertions(+), 10 deletions(-)
>  create mode 100644 recipes-browser/chromium/cef3/0001-bignum.cc-disable-warning-from-gcc-5.patch
>  create mode 100644 recipes-browser/chromium/cef3/0002-image_util.cc-disable-warning-from-gcc-5.patch
>  create mode 100644 recipes-browser/chromium/cef3/0003-gtest-typed-test.h-disable-warning-unused-definition.patch
>  create mode 100644 recipes-browser/chromium/cef3/0004-SaturatedArithmetic.h-put-parentheses-to-silence-war.patch
>  create mode 100644 recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
>  create mode 100644 recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch
> 
> -- 
> 1.8.4.5
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-browser][PATCH v2 5/5] cef3: fix build with gcc 4.9.4
  2015-11-07 19:52   ` Khem Raj
@ 2015-11-09 10:51     ` Otavio Salvador
  2015-11-09 11:55       ` Max Krummenacher
  0 siblings, 1 reply; 10+ messages in thread
From: Otavio Salvador @ 2015-11-09 10:51 UTC (permalink / raw)
  To: OpenEmbedded Devel List

Max,

On Sat, Nov 7, 2015 at 5:52 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> On Nov 7, 2015, at 4:20 AM, Max Krummenacher <max.oss.09@gmail.com> wrote:
>>
>> During the final link we get errors like this:
>> .../4.9.4/ld: warning: hidden symbol 'sqlite3_temp_directory' in obj/.../sqlite.sqlite3.o) is referenced by DSO .../usr/lib/libsoftokn3.so
>> .../4.9.4/ld: error: treating warnings as errors
>> collect2: error: ld returned 1 exit status
>
> This is gold linker specific so you should disable these warning when ld-is-gold is in DISTRO_FEATURES. Its a big broad brush so lets
> try to make it small as we can.

I ended applying it before seeing Khem's comment; can you make the
change as he proposes and send a new patch?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-browser][PATCH v2 5/5] cef3: fix build with gcc 4.9.4
  2015-11-09 10:51     ` Otavio Salvador
@ 2015-11-09 11:55       ` Max Krummenacher
  0 siblings, 0 replies; 10+ messages in thread
From: Max Krummenacher @ 2015-11-09 11:55 UTC (permalink / raw)
  To: OpenEmbedded Devel List

Hi Otavio,


2015-11-09 11:51 GMT+01:00 Otavio Salvador <otavio.salvador@ossystems.com.br>:
> Max,
>
> On Sat, Nov 7, 2015 at 5:52 PM, Khem Raj <raj.khem@gmail.com> wrote:
>>> On Nov 7, 2015, at 4:20 AM, Max Krummenacher <max.oss.09@gmail.com> wrote:
>>>
>>> During the final link we get errors like this:
>>> .../4.9.4/ld: warning: hidden symbol 'sqlite3_temp_directory' in obj/.../sqlite.sqlite3.o) is referenced by DSO .../usr/lib/libsoftokn3.so
>>> .../4.9.4/ld: error: treating warnings as errors
>>> collect2: error: ld returned 1 exit status
>>
>> This is gold linker specific so you should disable these warning when ld-is-gold is in DISTRO_FEATURES. Its a big broad brush so lets
>> try to make it small as we can.
>
> I ended applying it before seeing Khem's comment; can you make the
> change as he proposes and send a new patch?

sure, I will put up a patch tonight and send a new patch just for that issue.

Max


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-11-09 11:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-07 12:20 [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Max Krummenacher
2015-11-07 12:20 ` [meta-browser][PATCH v2 1/5] chromium: fix gcc5 compile issues Max Krummenacher
2015-11-07 12:20 ` [meta-browser][PATCH v2 2/5] cef3_280796.bb: change indent to 4 spaces Max Krummenacher
2015-11-07 12:20 ` [meta-browser][PATCH v2 3/5] cef3: fix gcc5 compile issues Max Krummenacher
2015-11-07 12:20 ` [meta-browser][PATCH v2 4/5] cef3: fix build of x86-64 Max Krummenacher
2015-11-07 12:20 ` [meta-browser][PATCH v2 5/5] cef3: fix build with gcc 4.9.4 Max Krummenacher
2015-11-07 19:52   ` Khem Raj
2015-11-09 10:51     ` Otavio Salvador
2015-11-09 11:55       ` Max Krummenacher
2015-11-09 10:51 ` [meta-browser][PATCH v2 0/5] chromium/cef3: fix gcc build errors Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.