Android: rework libelf dependencies
Add libelf as a library dependency rather than explicitly listing its include paths. This should work for Android M and later which have the necessary exported directories in libelf. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:

committed by
Emil Velikov

parent
06260da16e
commit
e2ff12e919
@@ -89,11 +89,9 @@ endif
|
||||
ifeq ($(MESA_ENABLE_LLVM),true)
|
||||
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
|
||||
|
||||
|
@@ -55,8 +55,7 @@ LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/gallium/auxiliary \
|
||||
$(intermediates)/common \
|
||||
external/llvm/include \
|
||||
external/llvm/device/include \
|
||||
$(ELF_INCLUDES)
|
||||
external/llvm/device/include
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS := \
|
||||
$(LOCAL_PATH)/common
|
||||
@@ -65,5 +64,8 @@ LOCAL_STATIC_LIBRARIES := \
|
||||
libLLVMCore \
|
||||
libmesa_nir
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
libelf
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
@@ -32,8 +32,7 @@ LOCAL_C_INCLUDES += \
|
||||
ifeq ($(MESA_ENABLE_LLVM),true)
|
||||
LOCAL_C_INCLUDES += \
|
||||
external/llvm/include \
|
||||
external/llvm/device/include \
|
||||
$(ELF_INCLUDES)
|
||||
external/llvm/device/include
|
||||
endif
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
|
@@ -57,10 +57,7 @@ LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
# sort GALLIUM_SHARED_LIBS to remove any duplicates
|
||||
LOCAL_SHARED_LIBRARIES += $(sort $(GALLIUM_SHARED_LIBS))
|
||||
|
||||
LOCAL_STATIC_LIBRARIES :=
|
||||
|
||||
ifeq ($(MESA_ENABLE_LLVM),true)
|
||||
LOCAL_STATIC_LIBRARIES += libelf
|
||||
LOCAL_LDLIBS += -lgcc
|
||||
endif
|
||||
|
||||
|
Reference in New Issue
Block a user