OSDN Git Service

android: build with libcxx on android lollipop
authorChih-Wei Huang <cwhuang@android-x86.org>
Wed, 20 May 2015 03:25:39 +0000 (11:25 +0800)
committerEric Anholt <eric@anholt.net>
Tue, 9 Jun 2015 19:25:50 +0000 (12:25 -0700)
On Lollipop, apparently stlport is gone and libcxx must be used instead.
We still support stlport when building on earlier android releases.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Eric Anholt <eric@anholt.net>
Android.common.mk
src/gallium/drivers/nouveau/Android.mk
src/gallium/drivers/r600/Android.mk
src/gallium/targets/dri/Android.mk
src/glsl/Android.mk

index 43766bf..d662d60 100644 (file)
@@ -77,6 +77,7 @@ LOCAL_CFLAGS += \
 endif
 
 LOCAL_CPPFLAGS += \
+       $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-D_USING_LIBCXX) \
        -Wno-error=non-virtual-dtor \
        -Wno-non-virtual-dtor
 
index 420c8e5..daf3abd 100644 (file)
@@ -39,6 +39,10 @@ LOCAL_SRC_FILES := \
 LOCAL_SHARED_LIBRARIES := libdrm libdrm_nouveau
 LOCAL_MODULE := libmesa_pipe_nouveau
 
+ifeq ($(MESA_LOLLIPOP_BUILD),true)
+LOCAL_C_INCLUDES := external/libcxx/include
+else
 include external/stlport/libstlport.mk
+endif
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
index e935759..bfe3987 100644 (file)
@@ -33,6 +33,10 @@ LOCAL_SRC_FILES := $(C_SOURCES) $(CXX_SOURCES)
 LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_r600
 
+ifeq ($(MESA_LOLLIPOP_BUILD),true)
+LOCAL_C_INCLUDES := external/libcxx/include
+else
 include external/stlport/libstlport.mk
+endif
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
index 78f7b7c..1772d25 100644 (file)
@@ -95,7 +95,7 @@ gallium_DRIVERS += libmesa_winsys_svga libmesa_pipe_svga
 LOCAL_CFLAGS += -DGALLIUM_VMWGFX
 endif
 ifneq ($(filter nouveau r600g,$(MESA_GPU_DRIVERS)),)
-LOCAL_SHARED_LIBRARIES += libstlport
+LOCAL_SHARED_LIBRARIES += $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),libc++,libstlport)
 endif
 
 LOCAL_STATIC_LIBRARIES := \
@@ -116,6 +116,7 @@ LOCAL_STATIC_LIBRARIES += \
        libLLVMR600Info \
        libLLVMR600AsmPrinter \
        libelf
+LOCAL_LDLIBS += $(if $(filter true,$(MESA_LOLLIPOP_BUILD)),-lgcc)
 endif
 
 include $(GALLIUM_COMMON_MK)
index f20741e..f63b7da 100644 (file)
@@ -46,7 +46,6 @@ LOCAL_C_INCLUDES := \
 
 LOCAL_MODULE := libmesa_glsl
 
-include external/stlport/libstlport.mk
 include $(LOCAL_PATH)/Android.gen.mk
 include $(MESA_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)