Fixed boost prebuilt libraries

This commit is contained in:
pelya
2011-06-06 18:36:32 +03:00
parent b1925e040c
commit 6539e814fb
22 changed files with 66 additions and 51 deletions

View File

@@ -1,17 +1,24 @@
LOCAL_PATH := $(call my-dir)
BOOST_MODULE := date_time
include $(LOCAL_PATH)/boost.mk
BOOST_MODULE := filesystem
include $(LOCAL_PATH)/boost.mk
BOOST_MODULE := iostreams
include $(LOCAL_PATH)/boost.mk
BOOST_MODULE := program_options
include $(LOCAL_PATH)/boost.mk
BOOST_MODULE := regex
include $(LOCAL_PATH)/boost.mk
BOOST_MODULE := signals
include $(LOCAL_PATH)/boost.mk
BOOST_MODULE := system
include $(LOCAL_PATH)/boost.mk
BOOST_MODULE := thread
include $(LOCAL_PATH)/boost.mk
include $(CLEAR_VARS)
LOCAL_MODULE := $(notdir $(LOCAL_PATH))
#ifeq ($(LOCAL_MODULE),boost)
#$(error Do not use "boost" as dependency, use boost_filesystem, boost_iostreams etc)
#endif
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
ifneq ($(NDK_R5_TOOLCHAIN),)
LOCAL_SRC_FILES := lib/lib$(LOCAL_MODULE).a
include $(PREBUILT_STATIC_LIBRARY)
else
LOCAL_SRC_FILES := dummy.c
include $(BUILD_STATIC_LIBRARY)
$(abspath $(LOCAL_PATH)/../../obj/local/armeabi/lib$(LOCAL_MODULE).a): $(LOCAL_PATH)/lib/lib$(LOCAL_MODULE).a OVERRIDE_CUSTOM_LIB
cp -f $< $@
$(abspath $(LOCAL_PATH)/../../obj/local/armeabi-v7a/lib$(LOCAL_MODULE).a): $(LOCAL_PATH)/lib/lib$(LOCAL_MODULE).a OVERRIDE_CUSTOM_LIB
cp -f $< $@
.PHONY: OVERRIDE_CUSTOM_LIB
OVERRIDE_CUSTOM_LIB:
endif

View File

@@ -1,13 +0,0 @@
diff --git a/patches/001-boost-for-android.patch b/patches/001-boost-for-android.patch
index 6349e3d..7422ccf 100644
--- a/patches/001-boost-for-android.patch
+++ b/patches/001-boost-for-android.patch
@@ -167,7 +167,7 @@ index 271ceb1..0b45250 100644
# override this variable.
-libraries = ;
+# @Moss - Adding needed libs to be valid for android
-+libraries = --with-date_time --with-filesystem --with-program_options --with-regex --with-signals --with-system --with-thread ;
++libraries = --with-date_time --with-filesystem --with-program_options --with-regex --with-signals --with-system --with-thread --with-iostreams ;
# These settings are equivivalent to corresponding command-line
# options.

View File

@@ -1,21 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := boost_$(BOOST_MODULE)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
ifneq ($(NDK_R5_TOOLCHAIN),)
LOCAL_SRC_FILES := lib/libboost_$(BOOST_MODULE).a
include $(PREBUILT_STATIC_LIBRARY)
else
LOCAL_SRC_FILES := dummy.c
include $(BUILD_STATIC_LIBRARY)
$(realpath $(LOCAL_PATH)/../../obj/local/armeabi/libboost_$(BOOST_MODULE).a): $(LOCAL_PATH)/lib/libboost_$(BOOST_MODULE).a OVERRIDE_CUSTOM_LIB
cp -f $< $@
$(realpath $(LOCAL_PATH)/../../obj/local/armeabi-v7a/libboost_$(BOOST_MODULE).a): $(LOCAL_PATH)/libboost_$(BOOST_MODULE).a OVERRIDE_CUSTOM_LIB
cp -f $< $@
.PHONY: OVERRIDE_CUSTOM_LIB
OVERRIDE_CUSTOM_LIB:
endif

View File

@@ -0,0 +1,33 @@
diff --git a/boost/config/user.hpp b/boost/config/user.hpp
index 5a4a9d4..cc268fe 100644
--- a/boost/config/user.hpp
+++ b/boost/config/user.hpp
@@ -13,6 +13,15 @@
// configuration policy:
//
+// Android defines
+#define BOOST_THREAD_LINUX 1
+#define BOOST_HAS_PTHREADS 1
+#define __arm__ 1
+#define _REENTRANT 1
+#define _GLIBCXX__PTHREADS 1
+#define BOOST_HAS_GETTIMEOFDAY 1
+#define BOOST_HAS_UNISTD_H 1
+
// define this to locate a compiler config file:
// #define BOOST_COMPILER_CONFIG <myheader>
diff --git a/boost/interprocess/detail/workaround.hpp b/boost/interprocess/detail/workaround.hpp
index cb3d4a5..221967f 100644
--- a/boost/interprocess/detail/workaround.hpp
+++ b/boost/interprocess/detail/workaround.hpp
@@ -64,7 +64,7 @@
#endif
//Check for XSI shared memory objects. They are available in nearly all UNIX platforms
- #if !defined(__QNXNTO__)
+ #if !defined(__QNXNTO__) && !defined(ANDROID)
# define BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS
#endif

View File

@@ -13,6 +13,15 @@
// configuration policy:
//
// Android defines
#define BOOST_THREAD_LINUX 1
#define BOOST_HAS_PTHREADS 1
#define __arm__ 1
#define _REENTRANT 1
#define _GLIBCXX__PTHREADS 1
#define BOOST_HAS_GETTIMEOFDAY 1
#define BOOST_HAS_UNISTD_H 1
// define this to locate a compiler config file:
// #define BOOST_COMPILER_CONFIG <myheader>

View File

@@ -64,7 +64,7 @@
#endif
//Check for XSI shared memory objects. They are available in nearly all UNIX platforms
#if !defined(__QNXNTO__)
#if !defined(__QNXNTO__) && !defined(ANDROID)
# define BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS
#endif

View File

@@ -1 +0,0 @@
libboost_date_time-gcc45-mt-1_45.a

Binary file not shown.

View File

@@ -1 +0,0 @@
libboost_filesystem-gcc45-mt-1_45.a

Binary file not shown.

View File

@@ -1 +0,0 @@
libboost_iostreams-gcc45-mt-1_45.a

Binary file not shown.

View File

@@ -1 +0,0 @@
libboost_program_options-gcc45-mt-1_45.a

Binary file not shown.

View File

@@ -1 +0,0 @@
libboost_regex-gcc45-mt-1_45.a

Binary file not shown.

View File

@@ -1 +0,0 @@
libboost_signals-gcc45-mt-1_45.a

Binary file not shown.

View File

@@ -1 +0,0 @@
libboost_system-gcc45-mt-1_45.a

Binary file not shown.

View File

@@ -1 +0,0 @@
libboost_thread-gcc45-mt-1_45.a

Binary file not shown.