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 43766bf8c57a9b383c0d30cd054adddfa93e6877..d662d6018e4f115e75ffdb2ce75114f533d5be06 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 420c8e5734c9456740b3c09c54b7008cf26b91cb..daf3abd1bb3dac7ba5e452610748309f0274f16d 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 e9357597a9bf5d0e25aba7ed19dd8be6aa2bcc5d..bfe3987308959cea3010c22e66fd2a7c51f0ff62 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 78f7b7c61f9375273aa974e2b46b9815812a1f78..1772d250b4b92967db73afddf6d46b08e99b589a 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 f20741e0d0fc1259eb45191e368b43af7a3fd9d9..f63b7daf26ea988facdbffef34d26bd6352c428e 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)