Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Randy MacLeod <Randy.MacLeod@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH v2] mesa: link mesautil with pthreads
Date: Mon, 22 Jan 2018 11:17:26 -0800	[thread overview]
Message-ID: <20180122191726.45710-1-Randy.MacLeod@windriver.com> (raw)

Cherry-pick fix from mesa upstream:
   23ce168048 link mesautil with pthreads

link mesautil with pthreads to avoid:

../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `u_thread_setname':
/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:66: undefined reference to `pthread_setname_np'
../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `thrd_join':
/builddir/build/BUILD/mesa-17.3.1/src/util/../../include/c11/threads_posix.h:336: undefined reference to `pthread_join'
../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `u_thread_create':
/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:48: undefined reference to `pthread_sigmask'
../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `thrd_create':
/builddir/build/BUILD/mesa-17.3.1/src/util/../../include/c11/threads_posix.h:296: undefined reference to `pthread_create'
../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `u_thread_create':
/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:50: undefined reference to `pthread_sigmask'
/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:50: undefined reference to `pthread_sigmask'
../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `call_once':
/builddir/build/BUILD/mesa-17.3.1/src/util/../../include/c11/threads_posix.h:96: undefined reference to `pthread_once'
../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `u_thread_get_time_nano':
/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:84: undefined reference to `pthread_getcpuclockid'
collect2: error: ld returned 1 exit status

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
---
 .../files/0001-link-mesautil-with-pthreads.patch   | 54 ++++++++++++++++++++++
 meta/recipes-graphics/mesa/mesa_17.3.3.bb          |  1 +
 2 files changed, 55 insertions(+)
 create mode 100644 meta/recipes-graphics/mesa/files/0001-link-mesautil-with-pthreads.patch

diff --git a/meta/recipes-graphics/mesa/files/0001-link-mesautil-with-pthreads.patch b/meta/recipes-graphics/mesa/files/0001-link-mesautil-with-pthreads.patch
new file mode 100644
index 0000000000..38ddf49af6
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-link-mesautil-with-pthreads.patch
@@ -0,0 +1,54 @@
+Upstream-Status: Backport
+Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
+
+From 23ce168048698eeea3df6bb8c9de5be3ca4784cd Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <ignatenko@redhat.com>
+Date: Mon, 1 Jan 2018 22:49:00 +0100
+Subject: [PATCH] link mesautil with pthreads
+
+../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `u_thread_setname':
+/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:66: undefined reference to `pthread_setname_np'
+../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `thrd_join':
+/builddir/build/BUILD/mesa-17.3.1/src/util/../../include/c11/threads_posix.h:336: undefined reference to `pthread_join'
+../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `u_thread_create':
+/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:48: undefined reference to `pthread_sigmask'
+../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `thrd_create':
+/builddir/build/BUILD/mesa-17.3.1/src/util/../../include/c11/threads_posix.h:296: undefined reference to `pthread_create'
+../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `u_thread_create':
+/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:50: undefined reference to `pthread_sigmask'
+/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:50: undefined reference to `pthread_sigmask'
+../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `call_once':
+/builddir/build/BUILD/mesa-17.3.1/src/util/../../include/c11/threads_posix.h:96: undefined reference to `pthread_once'
+../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function `u_thread_get_time_nano':
+/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:84: undefined reference to `pthread_getcpuclockid'
+collect2: error: ld returned 1 exit status
+
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
+---
+ src/util/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/util/Makefile.am b/src/util/Makefile.am
+index a5241ad27b..633907b9fd 100644
+--- a/src/util/Makefile.am
++++ b/src/util/Makefile.am
+@@ -31,6 +31,7 @@ noinst_LTLIBRARIES = \
+ 	libxmlconfig.la
+ 
+ AM_CPPFLAGS = \
++	$(PTHREAD_CFLAGS) \
+ 	-I$(top_srcdir)/include
+ 
+ libmesautil_la_CPPFLAGS = \
+@@ -50,6 +51,7 @@ libmesautil_la_SOURCES = \
+ 	$(MESA_UTIL_GENERATED_FILES)
+ 
+ libmesautil_la_LIBADD = \
++	$(PTHREAD_LIBS) \
+ 	$(CLOCK_LIB) \
+ 	$(ZLIB_LIBS) \
+ 	$(LIBATOMIC_LIBS)
+-- 
+2.14.3
+
diff --git a/meta/recipes-graphics/mesa/mesa_17.3.3.bb b/meta/recipes-graphics/mesa/mesa_17.3.3.bb
index 6e3f29a2c4..623046e116 100644
--- a/meta/recipes-graphics/mesa/mesa_17.3.3.bb
+++ b/meta/recipes-graphics/mesa/mesa_17.3.3.bb
@@ -10,6 +10,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://0001-winsys-svga-drm-Include-sys-types.h.patch \
            file://0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch \
            file://0001-anv_icd.py-improve-reproducible-builds.patch \
+           file://0001-link-mesautil-with-pthreads.patch \
            "
 
 SRC_URI[md5sum] = "139b5f608b371c0d4395596162f88791"
-- 
2.11.0



                 reply	other threads:[~2018-01-22 19:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20180122191726.45710-1-Randy.MacLeod@windriver.com \
    --to=randy.macleod@windriver.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