[oe] [meta-browser][PATCH] chromium: Remove dependency on Linux 4.5

George McCollister george.mccollister at gmail.com
Tue Nov 29 22:19:12 UTC 2016


Add a patch adapted from qtwebengine to remove the dependency on Linux
4.5 when glibc >= 2.24 is used. This resolves the problem with tabs
always showing "Aw, snap!".

Signed-off-by: George McCollister <george.mccollister at gmail.com>
---
 .../chromium/Do-not-depend-on-Linux-4.5.patch      | 33 ++++++++++++++++++++++
 recipes-browser/chromium/chromium_52.0.2743.76.bb  |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 recipes-browser/chromium/chromium/chromium/Do-not-depend-on-Linux-4.5.patch

diff --git a/recipes-browser/chromium/chromium/chromium/Do-not-depend-on-Linux-4.5.patch b/recipes-browser/chromium/chromium/chromium/Do-not-depend-on-Linux-4.5.patch
new file mode 100644
index 0000000..fce37cd
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium/Do-not-depend-on-Linux-4.5.patch
@@ -0,0 +1,33 @@
+From 6e5f0405559780ee3c45825f065e216bf472c262 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <allan.jensen at theqtcompany.com>
+Date: Tue, 9 Aug 2016 16:21:29 +0200
+Subject: [PATCH] Do not depend on Linux 4.5
+
+Avoid using MADV_FREE that was only recently added to Linux. It will fail when
+run on older Linux kernels.
+
+Change-Id: I9b0369fb31402f088b2327c12f70dd39f5e4c8c0
+Reviewed-by: Peter Varga <pvarga at inf.u-szeged.hu>
+---
+ third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp b/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp
+index 12c9a7b..1639013 100644
+--- a/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp
++++ b/third_party/WebKit/Source/wtf/allocator/PageAllocator.cpp
+@@ -41,6 +41,11 @@
+ #include <errno.h>
+ #include <sys/mman.h>
+ 
++#if OS(LINUX) && defined(MADV_FREE)
++// Added in Linux 4.5, but we don't want to depend on 4.5 at runtime
++#undef MADV_FREE
++#endif
++
+ #ifndef MADV_FREE
+ #define MADV_FREE MADV_DONTNEED
+ #endif
+-- 
+2.9.3
+
diff --git a/recipes-browser/chromium/chromium_52.0.2743.76.bb b/recipes-browser/chromium/chromium_52.0.2743.76.bb
index 14b519c..d85d893 100644
--- a/recipes-browser/chromium/chromium_52.0.2743.76.bb
+++ b/recipes-browser/chromium/chromium_52.0.2743.76.bb
@@ -9,6 +9,7 @@ SRC_URI += "\
         file://0005-Override-root-filesystem-access-restriction.patch \
         file://chromium/0011-Replace-readdir_r-with-readdir.patch \
         file://chromium/remove-Werror.patch \
+        file://chromium/Do-not-depend-on-Linux-4.5.patch \
         ${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \
         ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
 "
-- 
2.9.3




More information about the Openembedded-devel mailing list