[Mesa-dev] [PATCH] util/disk_cache: fix zlib linking with LTO build

Steven Newbury steve at snewbury.org.uk
Thu Mar 9 14:39:40 UTC 2017


Introduction of zlib compression for the shader cache means
zlib needs to be explicitly linked to libOSMesa and libstandalone
otherwise build fails when LTO is used.
---
 src/compiler/Makefile.glsl.am          | 1 +
 src/gallium/targets/osmesa/Makefile.am | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/compiler/Makefile.glsl.am
b/src/compiler/Makefile.glsl.am
index 41edb3cf4d..7be607c74c 100644
--- a/src/compiler/Makefile.glsl.am
+++ b/src/compiler/Makefile.glsl.am
@@ -141,6 +141,7 @@ glsl_libstandalone_la_LIBADD =			
	\
 	glsl/libglsl.la					\
 	$(top_builddir)/src/libglsl_util.la		\
 	$(top_builddir)/src/util/libmesautil.la		\
+	$(ZLIB_LIBS)					\
 	$(PTHREAD_LIBS)
 
 glsl_compiler_SOURCES = \
diff --git a/src/gallium/targets/osmesa/Makefile.am
b/src/gallium/targets/osmesa/Makefile.am
index 6d340f1d92..b7b9248126 100644
--- a/src/gallium/targets/osmesa/Makefile.am
+++ b/src/gallium/targets/osmesa/Makefile.am
@@ -66,7 +66,8 @@ lib at OSMESA_LIB@_la_LIBADD = \
 	$(top_builddir)/src/mapi/glapi/libglapi.la \
 	$(SHARED_GLAPI_LIB) \
 	$(OSMESA_LIB_DEPS) \
-	$(CLOCK_LIB)
+	$(CLOCK_LIB) \
+	$(ZLIB_LIBS)
 
 if HAVE_GALLIUM_LLVM
 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170309/880dc9c8/attachment-0001.sig>


More information about the mesa-dev mailing list