diff options
authorEmil Velikov <>2017-06-05 00:03:59 +0100
committerAndres Gomez <>2017-06-28 20:15:03 +0300
commit0889282a7dab9b5d37d816daf0eba95c012edb23 (patch)
parentd0201078d58272bc162d71bc68664e86417a7682 (diff) add -pthread to PTHREAD_LIBS
As described inline - follow what's written in the manual and what works for all platforms that Mesa supports. We want to untangle things leaving only -pthread, yet that has a potential of causing regressions. Thus we'll do it as a follow-up patch. As a nice side-effect this resolves issues, where the system lacks, yet the linker does not warn about it and we and up with unresolved symbols. Bugzilla: Cc: Signed-off-by: Emil Velikov <> Reviewed-by: Eric Engestrom <> (cherry picked from commit e5aa806e5f01b842d1af4775f8e4c53282908304)
1 files changed, 5 insertions, 0 deletions
diff --git a/ b/
index b069f541553..f4cc9989f69 100644
--- a/
+++ b/
@@ -837,6 +837,11 @@ dnl is not valid for that platform.
if test "x$android" = xno; then
test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"
+dnl According to the manual when using pthreads, one should add -pthread to
+dnl both compile and link-time arguments.
+dnl In practise that should be sufficient for all platforms, since any
+dnl platforms build with GCC and Clang support the flag.
dnl pthread-stubs is mandatory on BSD platforms, due to the nature of the
dnl project. Even then there's a notable issue as described in the project README