[virglrenderer-devel] [PATCH 1/4] gallium: Add pthread compiler flags

Michal Privoznik mprivozn at redhat.com
Thu Feb 11 13:51:11 CET 2016


There are places in the code where we use pthread_* functions,
but forgot to add corresponding bits onto the compiler command
line. Because of that the build fails:

  CCLD     virgl_test_server
../src/.libs/libvirglrenderer.so: undefined reference to `pthread_sigmask'
../src/.libs/libvirglrenderer.so: undefined reference to `pthread_join'
../src/.libs/libvirglrenderer.so: undefined reference to `pthread_create'
../src/.libs/libvirglrenderer.so: undefined reference to `pthread_mutexattr_init'
../src/.libs/libvirglrenderer.so: undefined reference to `pthread_mutexattr_destroy'
collect2: error: ld returned 1 exit status

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/gallium/auxiliary/Makefile.am | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
index e008734..9c24c1b 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -9,10 +9,14 @@ AM_CFLAGS = \
 	-I$(top_srcdir)/src/gallium/auxiliary/util \
 	-I$(top_srcdir)/src/gallium/auxiliary/ \
 	$(GALLIUM_CFLAGS) \
+	$(PTHREAD_CFLAGS) \
 	$(VISIBILITY_CFLAGS)
 
 AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
 
+AM_LIBADD = \
+	$(PTHREAD_LIBS)
+
 libgallium_la_SOURCES = \
 	$(C_SOURCES) \
 	$(GENERATED_SOURCES) \
-- 
2.4.10



More information about the virglrenderer-devel mailing list