diff mbox

[oe,meta-browser] chromium-wayland: Fix build on armv7ve/rpi3

Message ID 1491890799-4808-1-git-send-email-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj April 11, 2017, 6:06 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../chromium/chromium-wayland_53.0.2785.143.bb        |  1 +
 recipes-browser/chromium/chromium.inc                 |  1 +
 .../remove-armv7-a-from-options.patch                 | 19 +++++++++++++++++++
 recipes-browser/chromium/files/armv7ve/include.gypi   | 11 ++++++++++-
 4 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 recipes-browser/chromium/chromium/chromium-wayland/remove-armv7-a-from-options.patch

-- 
1.9.1

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox

Patch

diff --git a/recipes-browser/chromium/chromium-wayland_53.0.2785.143.bb b/recipes-browser/chromium/chromium-wayland_53.0.2785.143.bb
index ab52bc2..f31c509 100644
--- a/recipes-browser/chromium/chromium-wayland_53.0.2785.143.bb
+++ b/recipes-browser/chromium/chromium-wayland_53.0.2785.143.bb
@@ -9,6 +9,7 @@  SRC_URI += "\
         file://0003-Remove-hard-coded-values-for-CC-and-CXX.patch \
         file://0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch \
         file://0005-Override-root-filesystem-access-restriction.patch \
+        file://chromium-wayland/remove-armv7-a-from-options.patch \
 	file://chromium-wayland/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch \
         file://chromium-wayland/0011-Replace-readdir_r-with-readdir.patch \
         file://chromium-wayland/remove-Werror.patch \
diff --git a/recipes-browser/chromium/chromium.inc b/recipes-browser/chromium/chromium.inc
index cc390eb..f7e56eb 100644
--- a/recipes-browser/chromium/chromium.inc
+++ b/recipes-browser/chromium/chromium.inc
@@ -16,6 +16,7 @@  CHROMIUM_BUILD_TYPE ??= "Release"
 inherit gettext pythonnative
 
 ARMFPABI_armv7a = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'arm_float_abi=hard', 'arm_float_abi=softfp', d)}"
+ARMFPABI_armv7ve = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'arm_float_abi=hard', 'arm_float_abi=softfp', d)}"
 GYP_DEFINES += "${ARMFPABI} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot='' \
 	${@bb.utils.contains("AVAILTUNES", "mips", "", "release_extra_cflags='-fno-delete-null-pointer-checks'", d)}"
 GYP_DEFINES_append_x86 = " generate_character_data=0"
diff --git a/recipes-browser/chromium/chromium/chromium-wayland/remove-armv7-a-from-options.patch b/recipes-browser/chromium/chromium/chromium-wayland/remove-armv7-a-from-options.patch
new file mode 100644
index 0000000..9002945
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-wayland/remove-armv7-a-from-options.patch
@@ -0,0 +1,19 @@ 
+Fix build errors like
+| ../../v8/src/base/ieee754.cc:1:0: error: switch -mcpu=cortex-a7 conflicts with -march=armv7-a switch [-Werror]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: chromium-53.0.2785.143/v8/gypfiles/toolchain.gypi
+===================================================================
+--- chromium-53.0.2785.143.orig/v8/gypfiles/toolchain.gypi
++++ chromium-53.0.2785.143/v8/gypfiles/toolchain.gypi
+@@ -247,9 +247,6 @@
+               ['v8_target_arch==target_arch', {
+                 # Target built with an Arm CXX compiler.
+                 'conditions': [
+-                  [ 'arm_version==7', {
+-                    'cflags': ['-march=armv7-a',],
+-                  }],
+                   [ 'arm_version==7 or arm_version=="default"', {
+                     'conditions': [
+                       [ 'arm_fpu!="default"', {
diff --git a/recipes-browser/chromium/files/armv7ve/include.gypi b/recipes-browser/chromium/files/armv7ve/include.gypi
index 316cf48..9809078 100644
--- a/recipes-browser/chromium/files/armv7ve/include.gypi
+++ b/recipes-browser/chromium/files/armv7ve/include.gypi
@@ -3,7 +3,16 @@ 
     # Configure for armv7 compilation
     'target_arch': 'arm',
     'armv7': 1,
+    'arm_arch': 'armv7ve',
     'arm_thumb': 1,
     'arm_neon': 1,
-  }, 
+  'cflags!': [
+    # Some components in Chromium (e.g. v8, skia, ffmpeg)
+    # define their own cflags for arm builds that could
+    # conflict with the flags we set here (e.g.
+    # '-mcpu=cortex-a9'). Remove these flags explicitly.
+    '-march=armv7-a',
+    '-mtune=cortex-a8',
+  ],
+  },
 }