summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-09-26 16:03:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-24 09:40:28 +0000
commit68da3901c9a778c30c174e85f029d27fc1c7b4ed (patch)
tree9231ac71eee1f3dd6bf8a7945651d63292c4f123 /meta/recipes-sato
parentda8163504d70de66381db50e5078794a1b61dad4 (diff)
downloadpoky-68da3901c9a778c30c174e85f029d27fc1c7b4ed.tar.gz
webkitgtk: Fix build with clang/musl
backtrace is glibc only feature on linux so check for glibc before using it Clangs clear_cache has different signature than gcc provided builtin make it compatible for both (From OE-Core rev: c3dc346d44c8c5485b3eb1a97f32ba2ed2e76ece) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato')
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch39
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch61
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/clang.patch25
-rw-r--r--meta/recipes-sato/webkit/webkitgtk_2.10.4.bb3
4 files changed, 128 insertions, 0 deletions
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
new file mode 100644
index 0000000000..d7e4ef6263
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
@@ -0,0 +1,39 @@
1From 0b68ad206d2d90df78d91cad4da19152084014cf Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 16 Sep 2015 05:15:04 +0000
4Subject: [PATCH] Enable backtrace on linux when using glibc
5
6We dont have backtrace() implemented on non-glibc libc's on linux
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10Upstream-Status: Accepted
11
12 Source/WTF/wtf/Assertions.cpp | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
16index 191d53f..a4d86b5 100644
17--- a/Source/WTF/wtf/Assertions.cpp
18+++ b/Source/WTF/wtf/Assertions.cpp
19@@ -68,7 +68,7 @@
20 #include <unistd.h>
21 #endif
22
23-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
24+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
25 #include <cxxabi.h>
26 #include <dlfcn.h>
27 #include <execinfo.h>
28@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f
29
30 void WTFGetBacktrace(void** stack, int* size)
31 {
32-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
33+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
34 *size = backtrace(stack, *size);
35 #elif OS(WINDOWS)
36 // The CaptureStackBackTrace function is available in XP, but it is not defined
37--
382.5.2
39
diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch
new file mode 100644
index 0000000000..77ebf37efa
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch
@@ -0,0 +1,61 @@
1From 30e2ef302a329850ba55c7c458c98cbf396186ec Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Dec 2015 21:47:34 +0000
4Subject: [PATCH] Fix build with non-glibc libraries on linux
5
6qualify isnan() calls with std namespace
7malloc_trim is glibc specific API so guard it with __GLIBC__
8let ctype be used on non-glibc ( musl ) C library
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-Status: Accepted
13
14 Source/JavaScriptCore/runtime/Options.cpp | 2 +-
15 Source/WTF/wtf/DisallowCType.h | 2 +-
16 Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp | 2 ++
17 3 files changed, 4 insertions(+), 2 deletions(-)
18
19diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp
20index fe830b4..c49aade 100644
21--- a/Source/JavaScriptCore/runtime/Options.cpp
22+++ b/Source/JavaScriptCore/runtime/Options.cpp
23@@ -610,7 +610,7 @@ bool Option::operator==(const Option& other) const
24 case Options::Type::unsignedType:
25 return m_entry.unsignedVal == other.m_entry.unsignedVal;
26 case Options::Type::doubleType:
27- return (m_entry.doubleVal == other.m_entry.doubleVal) || (isnan(m_entry.doubleVal) && isnan(other.m_entry.doubleVal));
28+ return (m_entry.doubleVal == other.m_entry.doubleVal) || (std::isnan(m_entry.doubleVal) && std::isnan(other.m_entry.doubleVal));
29 case Options::Type::int32Type:
30 return m_entry.int32Val == other.m_entry.int32Val;
31 case Options::Type::optionRangeType:
32diff --git a/Source/WTF/wtf/DisallowCType.h b/Source/WTF/wtf/DisallowCType.h
33index d85e767..dc6bcab 100644
34--- a/Source/WTF/wtf/DisallowCType.h
35+++ b/Source/WTF/wtf/DisallowCType.h
36@@ -40,7 +40,7 @@
37 // are used from wx headers. On GTK+ for Mac many GTK+ files include <libintl.h>
38 // or <glib/gi18n-lib.h>, which in turn include <xlocale/_ctype.h> which uses
39 // isacii().
40-#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION)
41+#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION) && defined(__GLIBC__)
42
43 #include <ctype.h>
44
45diff --git a/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp b/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
46index ea61909..1495642 100644
47--- a/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
48+++ b/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
49@@ -202,7 +202,9 @@ void MemoryPressureHandler::respondToMemoryPressure(Critical critical, Synchrono
50 void MemoryPressureHandler::platformReleaseMemory(Critical)
51 {
52 ReliefLogger log("Run malloc_trim");
53+#ifdef __GLIBC__
54 malloc_trim(0);
55+#endif
56 }
57
58 void MemoryPressureHandler::ReliefLogger::platformLog()
59--
602.6.4
61
diff --git a/meta/recipes-sato/webkit/webkitgtk/clang.patch b/meta/recipes-sato/webkit/webkitgtk/clang.patch
new file mode 100644
index 0000000000..e5267138bf
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/clang.patch
@@ -0,0 +1,25 @@
1Clang's builtin for clear_cache accepts char* and errors out when using void*,
2using char* work on both gcc and clang since char* is auto-converted to void* in gcc case
3
4Source/JavaScriptCore/assembler/ARM64Assembler.h:2857:33: error: cannot initialize a parameter of type 'char *' with an rvalue of type 'void *'
5 __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
6 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 error generated.
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11Upstream-Status: Accepted
12
13Index: webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
14===================================================================
15--- webkitgtk-2.8.5.orig/Source/JavaScriptCore/assembler/ARM64Assembler.h
16+++ webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
17@@ -2854,7 +2854,7 @@ public:
18 #if OS(LINUX) && COMPILER(GCC)
19 static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
20 {
21- __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
22+ __builtin___clear_cache(reinterpret_cast<char*>(begin), reinterpret_cast<char*>(end));
23 }
24 #endif
25
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.10.4.bb b/meta/recipes-sato/webkit/webkitgtk_2.10.4.bb
index 4d5aeb48eb..098bbbbeef 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.10.4.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.10.4.bb
@@ -12,6 +12,9 @@ LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d842
12 12
13SRC_URI = "\ 13SRC_URI = "\
14 http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \ 14 http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
15 file://clang.patch \
16 file://0001-Enable-backtrace-on-linux-when-using-glibc.patch \
17 file://0001-Fix-build-with-non-glibc-libraries-on-linux.patch \
15 " 18 "
16SRC_URI[md5sum] = "fb010031c6f61c3a1a00793b112badb5" 19SRC_URI[md5sum] = "fb010031c6f61c3a1a00793b112badb5"
17SRC_URI[sha256sum] = "dbf8260da5cac0c74de2d3cce1fe7c519da3cd816a2c769cb6c6d56addd2f055" 20SRC_URI[sha256sum] = "dbf8260da5cac0c74de2d3cce1fe7c519da3cd816a2c769cb6c6d56addd2f055"