diff options
Diffstat (limited to 'external')
-rw-r--r-- | external/boost/UnpackedTarball_boost.mk | 3 | ||||
-rw-r--r-- | external/boost/boost-android-unified.patch.1 | 28 | ||||
-rw-r--r-- | external/cppunit/ExternalProject_cppunit.mk | 2 | ||||
-rw-r--r-- | external/icu/ExternalProject_icu.mk | 2 | ||||
-rw-r--r-- | external/liborcus/ExternalProject_liborcus.mk | 2 | ||||
-rw-r--r-- | external/liborcus/UnpackedTarball_liborcus.mk | 4 | ||||
-rw-r--r-- | external/nss/ExternalProject_nss.mk | 4 | ||||
-rw-r--r-- | external/nss/nss-android.patch.1 | 30 |
8 files changed, 67 insertions, 8 deletions
diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk index 4156bf7c3261..44ee759141e5 100644 --- a/external/boost/UnpackedTarball_boost.mk +++ b/external/boost/UnpackedTarball_boost.mk @@ -37,6 +37,9 @@ boost_patches += clang-cl.patch.0 boost_patches += boost_1_60_0.undef.warning.patch boost_patches += boost_1_63_0.undef.warning.patch.1 +# https://svn.boost.org/trac10/ticket/13230 +boost_patches += boost-android-unified.patch.1 + $(eval $(call gb_UnpackedTarball_UnpackedTarball,boost)) $(eval $(call gb_UnpackedTarball_set_tarball,boost,$(BOOST_TARBALL))) diff --git a/external/boost/boost-android-unified.patch.1 b/external/boost/boost-android-unified.patch.1 new file mode 100644 index 000000000000..458482a37c28 --- /dev/null +++ b/external/boost/boost-android-unified.patch.1 @@ -0,0 +1,28 @@ +https://svn.boost.org/trac10/ticket/13230 unified headers causing trouble with that.. +diff -ur boost.org/libs/filesystem/src/operations.cpp boost/libs/filesystem/src/operations.cpp +--- boost.org/libs/filesystem/src/operations.cpp 2017-11-22 02:21:33.724304181 +0100 ++++ boost/libs/filesystem/src/operations.cpp 2017-11-22 02:21:59.686302450 +0100 +@@ -11,23 +11,6 @@ + //--------------------------------------------------------------------------------------// + + // define 64-bit offset macros BEFORE including boost/config.hpp (see ticket #5355) +-#if !(defined(__HP_aCC) && defined(_ILP32) && !defined(_STATVFS_ACPP_PROBLEMS_FIXED)) +-#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect, +-#endif +-#if !defined(__PGI) +-#define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX +- // 64-bit systems or on 32-bit systems which don't have files larger +- // than can be represented by a traditional POSIX/UNIX off_t type. +- // OTOH, defining them should kick in 64-bit off_t's (and thus +- // st_size)on 32-bit systems that provide the Large File +- // Support (LFS)interface, such as Linux, Solaris, and IRIX. +- // The defines are given before any headers are included to +- // ensure that they are available to all included headers. +- // That is required at least on Solaris, and possibly on other +- // systems as well. +-#else +-#define _FILE_OFFSET_BITS 64 +-#endif + + // define BOOST_FILESYSTEM_SOURCE so that <boost/filesystem/config.hpp> knows + // the library is being built (possibly exporting rather than importing code) diff --git a/external/cppunit/ExternalProject_cppunit.mk b/external/cppunit/ExternalProject_cppunit.mk index c03b15cac7b0..d4f063b989b3 100644 --- a/external/cppunit/ExternalProject_cppunit.mk +++ b/external/cppunit/ExternalProject_cppunit.mk @@ -52,7 +52,7 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) : $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________NONE) \ $(if $(filter WNT,$(OS)),LDFLAGS="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \ $(if $(filter SOLARIS,$(OS)),LIBS="-lm") \ - $(if $(filter ANDROID,$(OS)),LIBS="-lgnustl_shared -lm") \ + $(if $(filter ANDROID,$(OS)),LIBS="$(gb_STDLIBS)") \ CXXFLAGS="$(cppunit_CXXFLAGS)" \ && cd src \ && $(MAKE) \ diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk index 5bceb14e373b..e1ec30938bf7 100644 --- a/external/icu/ExternalProject_icu.mk +++ b/external/icu/ExternalProject_icu.mk @@ -56,7 +56,7 @@ icu_LDFLAGS:=" \ $(if $(SYSBASE),-L../lib -L../../lib -L../stubdata -L../../stubdata -L$(SYSBASE)/usr/lib) \ $(if $(filter TRUE,$(HAVE_LD_BSYMBOLIC_FUNCTIONS)),\ -Wl$(COMMA)-Bsymbolic-functions -Wl$(COMMA)--dynamic-list-cpp-new -Wl$(COMMA)--dynamic-list-cpp-typeinfo) \ - $(if $(filter ANDROID,$(OS)),-lgnustl_shared -lm)" + $(if $(filter ANDROID,$(OS)),$(gb_STDLIBS))" # DATASUBDIR=data in cross-compiling case, because --disable-tools completely skips the # data directory/doesn't build the requested library in that case (icu/source/Makefile.in) diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk index 01c7c050d04a..928c78e3a267 100644 --- a/external/liborcus/ExternalProject_liborcus.mk +++ b/external/liborcus/ExternalProject_liborcus.mk @@ -44,7 +44,7 @@ else liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams -lboost_filesystem endif ifeq ($(OS),ANDROID) -liborcus_LIBS+=-lgnustl_shared -lm +liborcus_LIBS+=$(gb_STDLIBS) endif liborcus_CPPCLAGS=$(CPPFLAGS) diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index e9270c24a5cb..0dc6627de4a2 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -26,7 +26,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/windows-constants-hack.patch \ )) endif -ifeq ($(OS),ANDROID) + +# TODO: remove once switching arm to llvm-c++ +ifeq ($(ANDROID_APP_ABI),armeabi-v7a) $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/android-workaround.patch \ )) diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk index 8ce10b0a4ee9..e83054ca79b7 100644 --- a/external/nss/ExternalProject_nss.mk +++ b/external/nss/ExternalProject_nss.mk @@ -49,9 +49,9 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta RANLIB="$(RANLIB)" \ NMEDIT="$(NM)edit" \ COMMA=$(COMMA) \ - CC="$(CC)" CCC="$(CXX)" \ + CC="$(CC)$(if $(filter ANDROID,$(OS)), -D_PR_NO_LARGE_FILES=1 -DSQLITE_DISABLE_LFS=1)" CCC="$(CXX)" \ $(if $(CROSS_COMPILING),NSINSTALL="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py") \ - $(if $(filter ANDROID,$(OS)),OS_TARGET=Android OS_TARGET_RELEASE=14 ARCHFLAG="" DEFAULT_COMPILER=clang ANDROID_NDK=$(ANDROID_NDK_HOME) ANDROID_TOOLCHAIN_VERSION=$(ANDROID_GCC_TOOLCHAIN_VERSION)) \ + $(if $(filter ANDROID,$(OS)),OS_TARGET=Android OS_TARGET_RELEASE=14 ARCHFLAG="" DEFAULT_COMPILER=clang ANDROID_NDK=$(ANDROID_NDK_HOME) ANDROID_TOOLCHAIN_VERSION=$(ANDROID_GCC_TOOLCHAIN_VERSION) ANDROID_PREFIX=$(HOST_PLATFORM) ANDROID_SYSROOT=$(SYSBASE) ANDROID_TOOLCHAIN=$(ANDROID_BINUTILS_PREBUILT_ROOT)) \ nss_build_all \ && rm -f $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/*.a \ $(if $(filter MACOSX,$(OS)),\ diff --git a/external/nss/nss-android.patch.1 b/external/nss/nss-android.patch.1 index 0e91502bdfd0..6dc43c1b4ffe 100644 --- a/external/nss/nss-android.patch.1 +++ b/external/nss/nss-android.patch.1 @@ -39,11 +39,37 @@ diff -ur nss.org/nspr/configure nss/nspr/configure diff -ur nss.org/nss/Makefile nss/nss/Makefile --- nss.org/nss/Makefile 2017-09-07 15:29:44.933245745 +0200 +++ nss/nss/Makefile 2017-09-07 15:32:04.347181076 +0200 -@@ -62,6 +62,7 @@ +@@ -62,6 +62,6 @@ ifeq ($(OS_TARGET),Android) NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \ - --target=$(ANDROID_PREFIX) \ +- --target=$(ANDROID_PREFIX) \ + --with-arch=toolchain-default \ --with-android-version=$(OS_TARGET_RELEASE) \ --with-android-toolchain=$(ANDROID_TOOLCHAIN) \ --with-android-platform=$(ANDROID_SYSROOT) +unified headers / ndk16 does have it in it's support module +diff -ur nss.org/nspr/pr/src/md/unix/unix.c nss/nspr/pr/src/md/unix/unix.c +--- nss.org/nspr/pr/src/md/unix/unix.c 2017-11-22 01:19:16.098553361 +0100 ++++ nss/nspr/pr/src/md/unix/unix.c 2017-11-22 01:20:03.794550181 +0100 +@@ -2714,21 +2714,6 @@ + #endif /* defined(_PR_NO_LARGE_FILES) || defined(SOLARIS2_5) */ + + /* Android <= 19 doesn't have mmap64. */ +-#if defined(ANDROID) && __ANDROID_API__ <= 19 +-PR_IMPORT(void) *__mmap2(void *, size_t, int, int, int, size_t); +- +-#define ANDROID_PAGE_SIZE 4096 +- +-static void * +-mmap64(void *addr, size_t len, int prot, int flags, int fd, loff_t offset) +-{ +- if (offset & (ANDROID_PAGE_SIZE - 1)) { +- errno = EINVAL; +- return MAP_FAILED; +- } +- return __mmap2(addr, len, prot, flags, fd, offset / ANDROID_PAGE_SIZE); +-} +-#endif + + #if defined(OSF1) && defined(__GNUC__) + |