[oe] [meta-browser][PATCH 1/3] chromium: Allow to build in Debug mode.

Carlos Alberto Lopez Perez clopez at igalia.com
Tue Sep 15 12:50:00 UTC 2015


  * Add also a patch that workarounds a build error when building
    in Debug mode and using GCC. This patch has no effect when
    building in Release mode because is guarded within ifdef(debug)
    blocks.

Signed-off-by: Carlos Alberto Lopez Perez <clopez at igalia.com>
---
 recipes-browser/chromium/chromium.inc              |  4 ++-
 .../fix-build-error-with-GCC-in-Debug-mode.patch   | 32 ++++++++++++++++++++++
 recipes-browser/chromium/chromium_40.0.2214.91.bb  |  1 +
 3 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch

diff --git a/recipes-browser/chromium/chromium.inc b/recipes-browser/chromium/chromium.inc
index 8221779..03141db 100644
--- a/recipes-browser/chromium/chromium.inc
+++ b/recipes-browser/chromium/chromium.inc
@@ -7,7 +7,9 @@ COMPATIBLE_MACHINE_x86-64 = "(.*)"
 COMPATIBLE_MACHINE_armv6 = "(.*)"
 COMPATIBLE_MACHINE_armv7a = "(.*)"
 
-CHROMIUM_BUILD_TYPE = "Release"
+# The build type defaults to Release. If you want a Debug build, you can set
+# the variable CHROMIUM_BUILD_TYPE to "Debug" in your conf/local.conf file.
+CHROMIUM_BUILD_TYPE ??= "Release"
 
 inherit gettext pythonnative
 
diff --git a/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch b/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
new file mode 100644
index 0000000..c05598a
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
@@ -0,0 +1,32 @@
+From bfe80ed5227fccf8ab13df714702fc77e5e3d657 Mon Sep 17 00:00:00 2001
+From: Carlos Alberto Lopez Perez <clopez at igalia.com>
+Date: Thu, 27 Aug 2015 09:54:06 +0200
+Subject: [PATCH] Fix build error with GCC in Debug mode:
+
+  http://code.google.com/p/chromium/issues/detail?id=525428
+---
+ components/invalidation/invalidator_storage.cc | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/components/invalidation/invalidator_storage.cc b/components/invalidation/invalidator_storage.cc
+index 13ba4b1..3d567c1 100644
+--- a/components/invalidation/invalidator_storage.cc
++++ b/components/invalidation/invalidator_storage.cc
+@@ -2,7 +2,14 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
++#if !defined(NDEBUG)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
++#endif // !defined(NDEBUG)
+ #include "components/invalidation/invalidator_storage.h"
++#if !defined(NDEBUG)
++#pragma GCC diagnostic pop
++#endif // !defined(NDEBUG)
+ 
+ #include <string>
+ #include <utility>
+-- 
+2.1.4
+
diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb
index e795e14..9d5bba9 100644
--- a/recipes-browser/chromium/chromium_40.0.2214.91.bb
+++ b/recipes-browser/chromium/chromium_40.0.2214.91.bb
@@ -26,6 +26,7 @@ SRC_URI = "\
         ${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \
         file://google-chrome \
         file://google-chrome.desktop \
+        file://chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch \
 "
 #
 # * use-egl : Without this packageconfig, the Chromium build will use GLX for creating an OpenGL context in X11,
-- 
2.1.4




More information about the Openembedded-devel mailing list