[Mesa-dev] [PATCH] android: fix gallium_dri.so can't be loaded by drm_gralloc

Qiang Yu Qiang.Yu at amd.com
Fri Aug 18 00:30:13 UTC 2017


The problem is in gallium/winsys/amdgpu/drm/Android.mk
which will have duplacated symbols when linking
gallium_dri.so for libLLVMCore and libLLVM.

Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
Signed-off-by: Mauro Rossi <issor.oruam at gmail.com>
Signed-off-by: Rob Herring <robherring2 at gmail.com>
---
 Android.mk                              | 7 ++++---
 src/amd/Android.common.mk               | 4 +---
 src/gallium/drivers/radeon/Android.mk   | 2 +-
 src/gallium/drivers/radeonsi/Android.mk | 2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/Android.mk b/Android.mk
index 6571161..5154a56 100644
--- a/Android.mk
+++ b/Android.mk
@@ -93,15 +93,16 @@ define mesa-build-with-llvm
     $(warning Unsupported LLVM version in Android $(MESA_ANDROID_MAJOR_VERSION)),) \
   $(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)), \
     $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0) \
-    $(eval LOCAL_STATIC_LIBRARIES += libLLVMCore) \
+    $(eval LOCAL_SHARED_LIBRARIES += libLLVM) \
     $(eval LOCAL_C_INCLUDES += external/llvm/include external/llvm/device/include),) \
   $(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \
     $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0) \
-    $(eval LOCAL_STATIC_LIBRARIES += libLLVMCore) \
+    $(eval LOCAL_SHARED_LIBRARIES += libLLVM) \
     $(eval LOCAL_C_INCLUDES += external/llvm/include external/llvm/device/include),) \
   $(if $(filter O,$(MESA_ANDROID_MAJOR_VERSION)), \
     $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_PATCH=0) \
-    $(eval LOCAL_HEADER_LIBRARIES += llvm-headers),)
+    $(eval LOCAL_SHARED_LIBRARIES += libLLVM) \
+    $(eval LOCAL_C_INCLUDES += external/llvm/include external/llvm/device/include),)
 endef
 
 # add subdirectories
diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk
index 39d2732..92b2452 100644
--- a/src/amd/Android.common.mk
+++ b/src/amd/Android.common.mk
@@ -54,9 +54,7 @@ LOCAL_C_INCLUDES := \
 	$(call generated-sources-dir-for,STATIC_LIBRARIES,libmesa_nir,,)/nir \
 	$(MESA_TOP)/src/gallium/include \
 	$(MESA_TOP)/src/gallium/auxiliary \
-	$(intermediates)/common \
-	external/llvm/include \
-	external/llvm/device/include
+	$(intermediates)/common
 
 LOCAL_EXPORT_C_INCLUDE_DIRS := \
 	$(LOCAL_PATH)/common
diff --git a/src/gallium/drivers/radeon/Android.mk b/src/gallium/drivers/radeon/Android.mk
index eb1a321..c2d3a1c 100644
--- a/src/gallium/drivers/radeon/Android.mk
+++ b/src/gallium/drivers/radeon/Android.mk
@@ -30,7 +30,7 @@ include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := $(C_SOURCES)
 
-LOCAL_SHARED_LIBRARIES := libdrm_radeon libLLVM
+LOCAL_SHARED_LIBRARIES := libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_radeon
 
 ifeq ($(MESA_ENABLE_LLVM),true)
diff --git a/src/gallium/drivers/radeonsi/Android.mk b/src/gallium/drivers/radeonsi/Android.mk
index 6fff91f..faf3880 100644
--- a/src/gallium/drivers/radeonsi/Android.mk
+++ b/src/gallium/drivers/radeonsi/Android.mk
@@ -40,7 +40,7 @@ LOCAL_C_INCLUDES := \
 
 LOCAL_STATIC_LIBRARIES := libmesa_amd_common
 
-LOCAL_SHARED_LIBRARIES := libdrm_radeon libLLVM
+LOCAL_SHARED_LIBRARIES := libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_radeonsi
 
 $(call mesa-build-with-llvm)
-- 
1.9.1



More information about the mesa-dev mailing list