[Mesa-dev] [PATCH] gbm: add pthread on libgbm LD_FLAGS

Alejandro PiƱeiro apinheiro at igalia.com
Tue May 24 08:21:42 UTC 2016


If not, mesa building fails with the following errors:
/mesa/src/gbm/../../include/c11/threads_posix.h:189: undefined reference to `pthread_mutexattr_init'
/mesa/src/gbm/../../include/c11/threads_posix.h:190: undefined reference to `pthread_mutexattr_settype'
/mesa/source/mesa/src/gbm/../../include/c11/threads_posix.h:192: undefined reference to `pthread_mutexattr_destroy
---
 src/gbm/Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
index aba8d1e..23a341e 100644
--- a/src/gbm/Makefile.am
+++ b/src/gbm/Makefile.am
@@ -23,7 +23,8 @@ libgbm_la_LDFLAGS = \
 	-no-undefined \
 	-version-info 1:0 \
 	$(GC_SECTIONS) \
-	$(LD_NO_UNDEFINED)
+	$(LD_NO_UNDEFINED) \
+	-pthread
 
 libgbm_la_LIBADD = \
 	$(top_builddir)/src/loader/libloader.la \
-- 
2.7.4



More information about the mesa-dev mailing list