Android: correct libz dependency
authorChih-Wei Huang <cwhuang@android-x86.org>
Wed, 17 May 2017 05:10:02 +0000 (13:10 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 17 May 2017 13:04:18 +0000 (14:04 +0100)
Commit 6facb0c0 ("android: fix libz dynamic library dependencies")
unconditionally adds libz as a dependency to all shared libraries.
That is unnecessary.

Commit 85a9b1b5 introduced libz as a dependency to libmesa_util.
So only the shared libraries that use libmesa_util need libz.

Fix Android Lollipop build by adding the include path of zlib to
libmesa_util explicitly instead of getting the path implicitly
from zlib since it doesn't export the include path in Lollipop.

Fixes: 6facb0c0 "android: fix libz dynamic library dependencies"
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Android.common.mk
src/gallium/targets/dri/Android.mk
src/intel/Android.vulkan.mk
src/mesa/drivers/dri/Android.mk
src/util/Android.mk

index 5e7fd9445ad615b77a8a3181666e453b59a8d5f3..a79c33149dd3e65bc5aac8150e5b678463c567d2 100644 (file)
@@ -103,7 +103,3 @@ endif
 
 # Quiet down the build system and remove any .h files from the sources
 LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES))
-
-ifneq ($(LOCAL_IS_HOST_MODULE),true)
-LOCAL_SHARED_LIBRARIES += libz
-endif
index f72551c51cbf897501bad9cc01d6983998de5299..8c8fb5d3d1ca3214c0666b6d9358ae7b920e8e75 100644 (file)
@@ -35,7 +35,8 @@ LOCAL_CFLAGS :=
 LOCAL_SHARED_LIBRARIES := \
        libdl \
        libglapi \
-       libexpat
+       libexpat \
+       libz
 
 $(foreach d, $(MESA_BUILD_GALLIUM), $(eval LOCAL_CFLAGS += $(patsubst HAVE_%,-D%,$(d))))
 
index 831b6584dc89727f7912b6e961a39c67f80d6944..2bf56a41e97b5512b656b376536083d628e8654e 100644 (file)
@@ -231,7 +231,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
        libmesa_intel_compiler \
        libmesa_anv_entrypoints
 
-LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SHARED_LIBRARIES := libdrm libz
 
 include $(MESA_COMMON_MK)
 include $(BUILD_SHARED_LIBRARY)
index d4fb670f84cecbe4a16e5d99025d34913ebbc6a3..53ff4b4f632c727295305a611c2f20aab8959e87 100644 (file)
@@ -51,7 +51,8 @@ MESA_DRI_SHARED_LIBRARIES := \
        libdl \
        libexpat \
        libglapi \
-       liblog
+       liblog \
+       libz
 
 #-----------------------------------------------
 # Build drivers and libmesa_dri_common
index 64aafbe2ee15d2d5a0786d6e3f40a40705dbffd9..facdcf8ed1113df064b6ab81197f6d39c0030c34 100644 (file)
@@ -34,6 +34,7 @@ LOCAL_SRC_FILES := \
        $(MESA_UTIL_FILES)
 
 LOCAL_C_INCLUDES := \
+       external/zlib \
        $(MESA_TOP)/src/mesa \
        $(MESA_TOP)/src/mapi \
        $(MESA_TOP)/src/gallium/include \