public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 15/53] webkitgtk: Fix build with clang
Date: Fri,  8 Jan 2016 10:18:43 +0000	[thread overview]
Message-ID: <19d62253b48387b5f6aba7ca0beacc76b34ea3ab.1452248145.git.raj.khem@gmail.com> (raw)
In-Reply-To: <604bc7909e229178e6723a5323f99ae33cf7ec7f.1452248145.git.raj.khem@gmail.com>
In-Reply-To: <cover.1452248145.git.raj.khem@gmail.com>

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...nable-backtrace-on-linux-when-using-glibc.patch | 39 ++++++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk/clang.patch     | 25 ++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.10.4.bb       |  2 ++
 3 files changed, 66 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/clang.patch

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 0000000..146087b
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
@@ -0,0 +1,39 @@
+From 0b68ad206d2d90df78d91cad4da19152084014cf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 16 Sep 2015 05:15:04 +0000
+Subject: [PATCH] Enable backtrace on linux when using glibc
+
+We dont have backtrace() implemented on non-glibc libc's on linux
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ Source/WTF/wtf/Assertions.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
+index 191d53f..a4d86b5 100644
+--- a/Source/WTF/wtf/Assertions.cpp
++++ b/Source/WTF/wtf/Assertions.cpp
+@@ -68,7 +68,7 @@
+ #include <unistd.h>
+ #endif
+ 
+-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f
+ 
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+-- 
+2.5.2
+
diff --git a/meta/recipes-sato/webkit/webkitgtk/clang.patch b/meta/recipes-sato/webkit/webkitgtk/clang.patch
new file mode 100644
index 0000000..ef77755
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/clang.patch
@@ -0,0 +1,25 @@
+Clang's builtin for clear_cache accepts char* and errors out when using void*,
+using char* work on both gcc and clang since char* is auto-converted to void* in gcc case
+
+Source/JavaScriptCore/assembler/ARM64Assembler.h:2857:33: error: cannot initialize a parameter of type 'char *' with an rvalue of type 'void *'
+        __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
+                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1 error generated.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+Index: webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
+===================================================================
+--- webkitgtk-2.8.5.orig/Source/JavaScriptCore/assembler/ARM64Assembler.h
++++ webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -2854,7 +2854,7 @@ public:
+ #if OS(LINUX) && COMPILER(GCC)
+     static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
+     {
+-        __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
++        __builtin___clear_cache(reinterpret_cast<char*>(begin), reinterpret_cast<char*>(end));
+     }
+ #endif
+ 
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.10.4.bb b/meta/recipes-sato/webkit/webkitgtk_2.10.4.bb
index 4d5aeb4..f5add32 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.10.4.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.10.4.bb
@@ -12,6 +12,8 @@ LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d842
 
 SRC_URI = "\
   http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
+  file://clang.patch \
+  file://0001-Enable-backtrace-on-linux-when-using-glibc.patch \
   "
 SRC_URI[md5sum] = "fb010031c6f61c3a1a00793b112badb5"
 SRC_URI[sha256sum] = "dbf8260da5cac0c74de2d3cce1fe7c519da3cd816a2c769cb6c6d56addd2f055"
-- 
2.7.0



  parent reply	other threads:[~2016-01-08 10:19 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 10:19 [PATCH 00/53] musl fixes 3 Khem Raj
2016-01-08 10:18 ` [PATCH 01/53] powertop: Include right headers for timval struct Khem Raj
2016-01-08 10:18 ` [PATCH 02/53] dhcp: Include sys/types.h for u_int* defs Khem Raj
2016-01-08 10:18 ` [PATCH 03/53] blktrace: Include <sys/types.h for dev_t Khem Raj
2016-01-08 10:18 ` [PATCH 04/53] ppp: Fix build with musl Khem Raj
2016-01-08 10:18 ` [PATCH 05/53] tcp-wrappers: " Khem Raj
2016-01-08 10:18 ` [PATCH 06/53] fts: Add recipe Khem Raj
2016-01-08 10:18 ` [PATCH 07/53] connman: include config.h for HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR Khem Raj
2016-01-08 10:18 ` [PATCH 08/53] libcgroup: Add dependency on fts when building on musl Khem Raj
2016-01-08 10:18 ` [PATCH 09/53] linux-libc-headers: Port patches for linux-headers for musl Khem Raj
2016-01-08 10:18 ` [PATCH 10/53] xserver-xorg: Fix build with musl Khem Raj
2016-01-08 10:18 ` [PATCH 11/53] gdk-pixbuf: Fix latent build issue exposed by musl Khem Raj
2016-01-08 10:18 ` [PATCH 12/53] argp-standalone: Add recipe Khem Raj
2016-01-08 10:18 ` [PATCH 13/53] gnutls: Link with libargp on musl and depend on argp-standalone Khem Raj
2016-01-08 10:18 ` [PATCH 14/53] util-linux: Fix ptest builds on musl Khem Raj
2016-01-08 10:18 ` Khem Raj [this message]
2016-01-08 10:18 ` [PATCH 16/53] elfutils: Fix build with uclibc Khem Raj
2016-01-08 10:18 ` [PATCH 17/53] packagegroup-self-hosted.bb: Move glibc-gconv-ibm850 to glibc only case Khem Raj
2016-01-08 10:18 ` [PATCH 18/53] guile: Fix build with uclibc Khem Raj
2016-01-08 10:18 ` [PATCH 19/53] gnutls: Link with libuargp on uclibc Khem Raj
2016-01-08 10:18 ` [PATCH 20/53] mtools: Fix build with uclibc Khem Raj
2016-01-08 16:17   ` Burton, Ross
2016-01-08 16:25     ` Burton, Ross
2016-01-08 17:27       ` Khem Raj
2016-01-08 10:18 ` [PATCH 21/53] parted: " Khem Raj
2016-01-08 10:18 ` [PATCH 22/53] net-tools: Link with libintl on uclibc Khem Raj
2016-01-08 10:18 ` [PATCH 23/53] libdrm: Upgrade 2.4.65 -> 2.4.66 Khem Raj
2016-01-08 10:18 ` [PATCH 24/53] directfb: Fix build with musl Khem Raj
2016-01-09  3:27   ` Andre McCurdy
2016-01-09  7:43     ` Khem Raj
2016-01-09  8:43       ` Khem Raj
2016-01-09  9:58     ` Burton, Ross
2016-01-08 10:18 ` [PATCH 25/53] gzip: " Khem Raj
2016-01-08 10:18 ` [PATCH 26/53] watchdog: " Khem Raj
2016-01-08 10:18 ` [PATCH 27/53] xinetd: " Khem Raj
2016-01-08 10:18 ` [PATCH 28/53] dpkg: Add musleabi to known architectures Khem Raj
2016-01-08 10:18 ` [PATCH 29/53] puzzles: Zero'ise structs before use Khem Raj
2016-01-08 10:18 ` [PATCH 30/53] Revert "glib-2.0: build dependency cleanup" Khem Raj
2016-01-08 10:39   ` Burton, Ross
2016-01-08 17:36     ` Khem Raj
2016-01-08 10:18 ` [PATCH 31/53] apt: Add support for building for musl targets Khem Raj
2016-01-08 10:19 ` [PATCH 32/53] libunwind: backtrace APIs are glibc specific Khem Raj
2016-01-08 10:19 ` [PATCH 33/53] babeltrace: Add missing header for MAXNAMLEN define Khem Raj
2016-01-08 10:19 ` [PATCH 34/53] elfutils: Fix build with musl Khem Raj
2016-01-08 10:19 ` [PATCH 35/53] sysklogd: untangle header inclusion maze Khem Raj
2016-01-08 10:19 ` [PATCH 36/53] console-tools: Include sys/types.h for u_char and u_short defs Khem Raj
2016-01-08 10:19 ` [PATCH 37/53] webkitgtk: Fix build on non-glibc linux systems Khem Raj
2016-01-08 10:19 ` [PATCH 38/53] rt-tests: Fix build with non-gcc compilers Khem Raj
2016-01-08 10:19 ` [PATCH 39/53] webkitgtk: Update patch status Khem Raj
2016-01-08 10:19 ` [PATCH 40/53] tar: Fix build for musl based targets Khem Raj
2016-01-08 10:19 ` [PATCH 41/53] net-tools: Fix build on musl Khem Raj
2016-01-08 10:19 ` [PATCH 42/53] pax: Fix build with musl Khem Raj
2016-01-08 10:19 ` [PATCH 43/53] iputils: " Khem Raj
2016-01-08 10:19 ` [PATCH 44/53] libuser: Fix build when secure getenv is not there Khem Raj
2016-01-08 10:19 ` [PATCH 45/53] iproute2: Fix build with musl Khem Raj
2016-01-08 10:19 ` [PATCH 46/53] irda-utils: Fix header inclusions Khem Raj
2016-01-08 10:19 ` [PATCH 47/53] nspr: Drop older glibc code Khem Raj
2016-01-08 10:19 ` [PATCH 48/53] chkconfig: Avoid using caddr_t Khem Raj
2016-01-08 10:19 ` [PATCH 49/53] tcf-agent: Implement canonicalize_file_name() for musl as well Khem Raj
2016-01-08 10:19 ` [PATCH 50/53] bsd-headers, musl: Add recipe for bsd missing features Khem Raj
2016-01-08 10:19 ` [PATCH 51/53] nfs-utils: Disable tcp-wrappers for musl Khem Raj
2016-01-08 10:19 ` [PATCH 52/53] portmap: Point to tirpc headers and libraries on musl Khem Raj
2016-01-08 10:19 ` [PATCH 53/53] elfutils: Add ALLOW_EMPTY for musl Khem Raj
2016-01-08 10:58 ` [PATCH 00/53] musl fixes 3 Burton, Ross
2016-01-08 14:00 ` Burton, Ross
2016-01-08 14:12   ` Burton, Ross
2016-01-08 14:23     ` Burton, Ross
2016-01-08 17:46     ` Khem Raj
2016-01-08 14:32   ` Burton, Ross
2016-01-08 17:47     ` Khem Raj
2016-01-08 14:53   ` Burton, Ross
2016-01-08 17:57     ` Khem Raj
2016-01-09  9:23     ` Khem Raj
2016-01-09 10:06       ` Burton, Ross
2016-01-08 17:43   ` Khem Raj
2016-01-08 18:29     ` Burton, Ross
2016-01-08 18:34       ` Khem Raj
2016-01-09  8:59         ` Khem Raj
2016-01-08 14:56 ` Burton, Ross
2016-01-08 17:59   ` Khem Raj
2016-01-10 21:10   ` Khem Raj
2016-01-10 21:29     ` Matthias Schiffer
2016-01-10 22:22       ` Phil Blundell
2016-01-10 22:24         ` Paul Eggleton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19d62253b48387b5f6aba7ca0beacc76b34ea3ab.1452248145.git.raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox