glsl: Add pthread libs to cache_test
authorRhys Kidd <rhyskidd@gmail.com>
Wed, 26 Oct 2016 04:13:24 +0000 (00:13 -0400)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 26 Oct 2016 22:49:35 +0000 (09:49 +1100)
Fixes the following compile error, present when the SHA1 library is libgcrypt:

  CCLD     glsl/tests/cache-test
glsl/.libs/libglsl.a(libmesautil_la-mesa-sha1.o): In function `call_once':
/mesa/src/util/../../include/c11/threads_posix.h:96: undefined reference to `pthread_once'

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/Makefile.glsl.am

index 8cc0a4a22e180624ec870f20cc693a465fd5210e..8bfb902f11bca35336d0938a50bafdd405aa105e 100644 (file)
@@ -62,8 +62,11 @@ glsl_tests_blob_test_LDADD =                         \
 
 glsl_tests_cache_test_SOURCES =                                \
        glsl/tests/cache_test.c
+glsl_tests_cache_test_CFLAGS =                         \
+       $(PTHREAD_CFLAGS)
 glsl_tests_cache_test_LDADD =                          \
-       glsl/libglsl.la
+       glsl/libglsl.la                                 \
+       $(PTHREAD_LIBS)
 
 glsl_tests_general_ir_test_SOURCES =                   \
        glsl/tests/builtin_variable_test.cpp            \