[oe-commits] [openembedded-core] 05/10: webkitgtk: Prefer -pthread over -lpthread

git at git.openembedded.org git at git.openembedded.org
Wed Feb 5 13:47:57 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 94446ea1bfcb175af6fcaf5969a3a4507fdbf470
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Mon Feb 3 17:45:36 2020 -0800

    webkitgtk: Prefer -pthread over -lpthread
    
    -pthread is compiler driver option which links in needed dependencies
    for pthreads along with -lpthread, this aids in fixing build failures
    on rv64
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch  | 45 ++++++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.26.2.bb       |  1 +
 2 files changed, 46 insertions(+)

diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch
new file mode 100644
index 0000000..268118b
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch
@@ -0,0 +1,45 @@
+From 8ee7806ad2d5606967f7a1529a113fb9d1a386de Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Mon, 3 Feb 2020 17:06:27 -0800
+Subject: [PATCH] Enable THREADS_PREFER_PTHREAD_FLAG
+
+Fixes build failures on risv64
+
+Taken from https://trac.webkit.org/changeset/231843/webkit
+
+ Enable THREADS_PREFER_PTHREAD_FLAG. This uses -pthread instead of
+-lpthread, fixing the 64-bit RISC-V build of the GTK+ port due to
+missing atomic primitives.
+
+Upstream-Status: Submitted [https://trac.webkit.org/changeset/231843/webkit]
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ Source/cmake/OptionsGTK.cmake     | 2 ++
+ Source/cmake/OptionsJSCOnly.cmake | 1 +
+ 2 files changed, 3 insertions(+)
+
+diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
+index d3beef19..6a92856f 100644
+--- a/Source/cmake/OptionsGTK.cmake
++++ b/Source/cmake/OptionsGTK.cmake
+@@ -17,6 +17,8 @@ set(WEBKITGTK_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/webkitgtk-${WEBKIT
+ set(INTROSPECTION_INSTALL_GIRDIR "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0")
+ set(INTROSPECTION_INSTALL_TYPELIBDIR "${LIB_INSTALL_DIR}/girepository-1.0")
+ 
++set(THREADS_PREFER_PTHREAD_FLAG ON)
++
+ find_package(Cairo 1.14.0 REQUIRED)
+ find_package(Fontconfig 2.8.0 REQUIRED)
+ find_package(Freetype 2.4.2 REQUIRED)
+diff --git a/Source/cmake/OptionsJSCOnly.cmake b/Source/cmake/OptionsJSCOnly.cmake
+index b2e87418..326ade23 100644
+--- a/Source/cmake/OptionsJSCOnly.cmake
++++ b/Source/cmake/OptionsJSCOnly.cmake
+@@ -1,3 +1,4 @@
++set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package(Threads REQUIRED)
+ 
+ if (MSVC)
+-- 
+2.25.0
+
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb
index a223cfd..a184d83 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.26.2.bb
@@ -15,6 +15,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch \
            file://0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch \
            file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \
+           file://0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch \
            file://x32_support.patch \
            file://cross-compile.patch \
            file://0001-Fix-build-with-musl.patch \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list