* [meta-browser][PATCH 1/3] chromium: Allow to build in Debug mode.
2015-09-15 12:49 [meta-browser][PATCH 0/3] chromium: make the build type configurable Carlos Alberto Lopez Perez
@ 2015-09-15 12:50 ` Carlos Alberto Lopez Perez
2015-09-15 15:03 ` Trevor Woerner
2015-09-15 12:50 ` [meta-browser][PATCH 2/3] chromium: Clean the definitions of some ozone-wayland variables Carlos Alberto Lopez Perez
2015-09-15 12:50 ` [meta-browser][PATCH 3/3] chromium: Rework the evaluation of the Wayland feature Carlos Alberto Lopez Perez
2 siblings, 1 reply; 10+ messages in thread
From: Carlos Alberto Lopez Perez @ 2015-09-15 12:50 UTC (permalink / raw)
To: openembedded-devel
* 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@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@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
^ permalink raw reply related [flat|nested] 10+ messages in thread* [meta-browser][PATCH 2/3] chromium: Clean the definitions of some ozone-wayland variables.
2015-09-15 12:49 [meta-browser][PATCH 0/3] chromium: make the build type configurable Carlos Alberto Lopez Perez
2015-09-15 12:50 ` [meta-browser][PATCH 1/3] chromium: Allow to build in Debug mode Carlos Alberto Lopez Perez
@ 2015-09-15 12:50 ` Carlos Alberto Lopez Perez
2015-09-15 12:50 ` [meta-browser][PATCH 3/3] chromium: Rework the evaluation of the Wayland feature Carlos Alberto Lopez Perez
2 siblings, 0 replies; 10+ messages in thread
From: Carlos Alberto Lopez Perez @ 2015-09-15 12:50 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
---
recipes-browser/chromium/chromium_40.0.2214.91.bb | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb
index 9d5bba9..195246d 100644
--- a/recipes-browser/chromium/chromium_40.0.2214.91.bb
+++ b/recipes-browser/chromium/chromium_40.0.2214.91.bb
@@ -64,15 +64,9 @@ ENABLE_WAYLAND = "${@base_contains('DISTRO_FEATURES', 'x11', '0', \
base_contains('DISTRO_FEATURES', 'wayland', '1', \
'0', d),d)}"
-# variable for extra ozone-wayland patches, typically extended by BSP layer .bbappends
-# IMPORTANT: do not simply add extra ozone-wayland patches to the SRC_URI in a
-# .bbappend, since the base ozone-wayland patches need to be applied first (see below)
-
-OZONE_WAYLAND_EXTRA_PATCHES = " "
-
OZONE_WAYLAND_GIT_DESTSUFFIX = "ozone-wayland-git"
-OZONE_WAYLAND_GIT_BRANCH = ""
-OZONE_WAYLAND_GIT_SRCREV = ""
+OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
+OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
SRC_URI += "${@base_conditional('ENABLE_WAYLAND', '1', 'git://github.com/01org/ozone-wayland.git;destsuffix=${OZONE_WAYLAND_GIT_DESTSUFFIX};branch=${OZONE_WAYLAND_GIT_BRANCH};rev=${OZONE_WAYLAND_GIT_SRCREV}', '', d)}"
OZONE_WAYLAND_PATCH_FILE_GLOB = "*.patch"
@@ -90,12 +84,13 @@ SRC_URI += "\
SRC_URI[md5sum] = "1f5093bd7e435fdebad070e74bfb3438"
SRC_URI[sha256sum] = "f72fda9ff1ea256ab911610ee532eadf8303137d431f2481d01d3d60e5e64149"
-OZONE_WAYLAND_EXTRA_PATCHES += " \
+# Variable for extra ozone-wayland patches, typically extended by BSP layer .bbappends
+# IMPORTANT: do not simply add extra ozone-wayland patches to the SRC_URI in a
+# .bbappend, since the base ozone-wayland patches need to be applied first (see below)
+OZONE_WAYLAND_EXTRA_PATCHES = " \
file://chromium-40/0005-Remove-X-libraries-from-GYP-files.patch \
file://chromium-40/0010-systemd-218.patch \
"
-OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
-OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
# using 00*.patch to skip the WebRTC patches in ozone-wayland
# the WebRTC patches remove X11 libraries from the linker flags, which is
# already done by another patch (see above). Furthermore, to be able to use
--
2.1.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [meta-browser][PATCH 3/3] chromium: Rework the evaluation of the Wayland feature.
2015-09-15 12:49 [meta-browser][PATCH 0/3] chromium: make the build type configurable Carlos Alberto Lopez Perez
2015-09-15 12:50 ` [meta-browser][PATCH 1/3] chromium: Allow to build in Debug mode Carlos Alberto Lopez Perez
2015-09-15 12:50 ` [meta-browser][PATCH 2/3] chromium: Clean the definitions of some ozone-wayland variables Carlos Alberto Lopez Perez
@ 2015-09-15 12:50 ` Carlos Alberto Lopez Perez
2015-09-15 16:56 ` Khem Raj
2 siblings, 1 reply; 10+ messages in thread
From: Carlos Alberto Lopez Perez @ 2015-09-15 12:50 UTC (permalink / raw)
To: openembedded-devel
* Remove the ENABLE_X11 variable and rename ENABLE_WAYLAND to
CHROMIUM_ENABLE_WAYLAND. Make the old ENABLE_X11 be just
"not CHROMIUM_ENABLE_WAYLAND".
* Allow configuring this in the local.conf file.
* Add a couple of sanity checks and two notes that will
let the user be sure if the ozone-wayland patches will
be applied or not. This will be checked before running
the do_fetch step of Chromium. That way we avoid printing
any warning or doing any check when parsing the recipe.
So we only warn or abort when Chromium is actually going
to be built.
Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
---
recipes-browser/chromium/chromium_40.0.2214.91.bb | 45 ++++++++++++++++-------
1 file changed, 32 insertions(+), 13 deletions(-)
diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb
index 195246d..44f8593 100644
--- a/recipes-browser/chromium/chromium_40.0.2214.91.bb
+++ b/recipes-browser/chromium/chromium_40.0.2214.91.bb
@@ -56,22 +56,41 @@ SRC_URI = "\
# See http://www.chromium.org/developers/design-documents/impl-side-painting for more.
# Off by default.
-# conditionally add ozone-wayland and its patches to the Chromium sources
-
-ENABLE_X11 = "${@base_contains('DISTRO_FEATURES', 'x11', '1', '0', d)}"
-# only enable Wayland if X11 isn't already enabled
-ENABLE_WAYLAND = "${@base_contains('DISTRO_FEATURES', 'x11', '0', \
+# Conditionally add ozone-wayland and its patches to the Chromium sources
+# You can override this by setting CHROMIUM_ENABLE_WAYLAND=1 or CHROMIUM_ENABLE_WAYLAND=0 in local.conf
+CHROMIUM_ENABLE_WAYLAND ??= "${@base_contains('DISTRO_FEATURES', 'x11', '0', \
base_contains('DISTRO_FEATURES', 'wayland', '1', \
'0', d),d)}"
+# Some sanity checks.
+python do_check_variables() {
+ CHROMIUM_BUILD_TYPE = d.getVar('CHROMIUM_BUILD_TYPE', True)
+ CHROMIUM_ENABLE_WAYLAND = d.getVar('CHROMIUM_ENABLE_WAYLAND', True)
+ DISTRO_FEATURES = d.getVar("DISTRO_FEATURES", True).split()
+ if CHROMIUM_BUILD_TYPE not in ['Release', 'Debug']:
+ bb.fatal("Wrong value for CHROMIUM_BUILD_TYPE. Please set it either to \'Release\' or to \'Debug\'")
+ if CHROMIUM_ENABLE_WAYLAND not in ['0', '1']:
+ bb.fatal("Wrong value for CHROMIUM_ENABLE_WAYLAND. Please set it to \'1\' to enable the feature or to \'0\' to disable it")
+ if ( (CHROMIUM_ENABLE_WAYLAND == '1') and ('wayland' not in DISTRO_FEATURES) ):
+ bb.warn("You have selected to build Chromium with Wayland support, but you have not enabled wayland in DISTRO_FEATURES")
+ if ( (CHROMIUM_ENABLE_WAYLAND != '1') and ('x11' not in DISTRO_FEATURES) ):
+ bb.warn("You have selected to build Chromium without Wayland support, but you have not enabled x11 in DISTRO_FEATURES")
+ # Print both on log.do_checkvariables and on the console the configuration that is selected.
+ # This useful both for throubleshooting and for checking how the build is finally configured.
+ if (CHROMIUM_ENABLE_WAYLAND == '1'):
+ bb.plain("INFO: Chromium has been configured with Wayland support (ozone-wayland). Build type is \'%s\'" %CHROMIUM_BUILD_TYPE)
+ else:
+ bb.plain("INFO: Chromium has been configured without Wayland support. Build type is \'%s\'" %CHROMIUM_BUILD_TYPE)
+}
+addtask check_variables before do_fetch
OZONE_WAYLAND_GIT_DESTSUFFIX = "ozone-wayland-git"
OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
-SRC_URI += "${@base_conditional('ENABLE_WAYLAND', '1', 'git://github.com/01org/ozone-wayland.git;destsuffix=${OZONE_WAYLAND_GIT_DESTSUFFIX};branch=${OZONE_WAYLAND_GIT_BRANCH};rev=${OZONE_WAYLAND_GIT_SRCREV}', '', d)}"
+SRC_URI += "${@base_conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'git://github.com/01org/ozone-wayland.git;destsuffix=${OZONE_WAYLAND_GIT_DESTSUFFIX};branch=${OZONE_WAYLAND_GIT_BRANCH};rev=${OZONE_WAYLAND_GIT_SRCREV}', '', d)}"
OZONE_WAYLAND_PATCH_FILE_GLOB = "*.patch"
-do_unpack[postfuncs] += "${@base_conditional('ENABLE_WAYLAND', '1', 'copy_ozone_wayland_files', '', d)}"
-do_patch[prefuncs] += "${@base_conditional('ENABLE_WAYLAND', '1', 'add_ozone_wayland_patches', '', d)}"
+do_unpack[postfuncs] += "${@base_conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'copy_ozone_wayland_files', '', d)}"
+do_patch[prefuncs] += "${@base_conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'add_ozone_wayland_patches', '', d)}"
LIC_FILES_CHKSUM = "file://LICENSE;md5=537e0b52077bf0a616d0a0c8a79bc9d5"
SRC_URI += "\
@@ -101,7 +120,7 @@ OZONE_WAYLAND_PATCH_FILE_GLOB = "00*.patch"
# Component build is broken in ozone-wayland for Chromium 40,
# and is not planned to work again before version 41
python() {
- if (d.getVar('ENABLE_X11', True) != '1') and (d.getVar('ENABLE_WAYLAND', True) == '1'):
+ if (d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1'):
if bb.utils.contains('PACKAGECONFIG', 'component-build', True, False, d):
bb.fatal("Chromium 40 Wayland version cannot be built in component-mode")
}
@@ -157,12 +176,12 @@ CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1"
python() {
- if d.getVar('ENABLE_X11', True) == '1':
- d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_X11_DEPENDS', True))
- d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_X11_GYP_DEFINES', True))
- if d.getVar('ENABLE_WAYLAND', True) == '1':
+ if d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1':
d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_WAYLAND_DEPENDS', True))
d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_WAYLAND_GYP_DEFINES', True))
+ else:
+ d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_X11_DEPENDS', True))
+ d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_X11_GYP_DEFINES', True))
}
do_configure_append() {
--
2.1.4
^ permalink raw reply related [flat|nested] 10+ messages in thread