[Mesa-stable] [PATCH] android: fix llvm, elf dependencies for M, N releases

Mauro Rossi issor.oruam at gmail.com
Mon Jan 30 19:57:30 UTC 2017


These changes set the correct llvm version and elf include path
which differ for Marshmallow and Nougat
---
 Android.common.mk             | 14 ++++++++++++--
 src/amd/Android.common.mk     |  2 +-
 src/gallium/Android.common.mk |  2 +-
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/Android.common.mk b/Android.common.mk
index 1cd238e..798318a 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -82,8 +82,18 @@ endif
 endif
 
 ifeq ($(MESA_ENABLE_LLVM),true)
-LOCAL_CFLAGS += \
-	-DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2
+  ifeq ($(MESA_ANDROID_MAJOR_VERSION),5)
+    LOCAL_CFLAGS += -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2
+    ELF_INCLUDES := external/elfutils/0.153/libelf
+  endif
+  ifeq ($(MESA_ANDROID_MAJOR_VERSION),6)
+    LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0
+    ELF_INCLUDES := external/elfutils/src/libelf
+  endif
+  ifeq ($(MESA_ANDROID_MAJOR_VERSION),7)
+    LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0
+    ELF_INCLUDES := external/elfutils/libelf
+  endif
 endif
 
 ifneq ($(LOCAL_IS_HOST_MODULE),true)
diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk
index dfa7e59..faace71 100644
--- a/src/amd/Android.common.mk
+++ b/src/amd/Android.common.mk
@@ -55,7 +55,7 @@ LOCAL_C_INCLUDES := \
 	external/llvm/include \
 	external/llvm/device/include \
 	external/libcxx/include \
-	external/elfutils/$(if $(filter 5,$(MESA_ANDROID_MAJOR_VERSION)),0.153/,$(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)),src/))libelf
+	$(ELF_INCLUDES)
 
 LOCAL_STATIC_LIBRARIES := libLLVMCore
 
diff --git a/src/gallium/Android.common.mk b/src/gallium/Android.common.mk
index 7c6c7ac..8559b5b 100644
--- a/src/gallium/Android.common.mk
+++ b/src/gallium/Android.common.mk
@@ -34,7 +34,7 @@ LOCAL_C_INCLUDES += \
 	external/llvm/include \
 	external/llvm/device/include \
 	external/libcxx/include \
-	external/elfutils/$(if $(filter true,$(MESA_LOLLIPOP_BUILD)),0.153/)libelf
+	$(ELF_INCLUDES)
 endif
 
 include $(MESA_COMMON_MK)
-- 
2.9.3



More information about the mesa-stable mailing list