forked from moritz-wundke/Boost-for-Android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
225 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<compileflags>-gcc-toolchain | ||
<compileflags>$(AndroidNDKRoot)/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 | ||
<compileflags>-target | ||
<compileflags>aarch64-none-linux-android | ||
<compileflags>-fpic | ||
<compileflags>--sysroot | ||
<compileflags>$(AndroidNDKRoot)/sysroot | ||
<compileflags>-isystem | ||
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/aarch64-linux-android | ||
<compileflags>-D__ANDROID_API__=21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<compileflags>-gcc-toolchain | ||
<compileflags>$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 | ||
<compileflags>-target | ||
<compileflags>armv7-none-linux-androideabi15 | ||
<compileflags>-march=armv7-a | ||
<compileflags>-mfloat-abi=softfp | ||
<compileflags>-mfpu=vfpv3-d16 | ||
<compileflags>-mthumb | ||
<compileflags>-fpic | ||
<compileflags>-fno-integrated-as | ||
<compileflags>--sysroot | ||
<compileflags>$(AndroidNDKRoot)/sysroot | ||
<compileflags>-isystem | ||
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/arm-linux-androideabi | ||
<compileflags>-D__ANDROID_API__=15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<compileflags>-gcc-toolchain | ||
<compileflags>$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 | ||
<compileflags>-target | ||
<compileflags>armv5te-none-linux-androideabi15 | ||
<compileflags>-march=armv5te | ||
<compileflags>-mtune=xscale | ||
<compileflags>-msoft-float | ||
<compileflags>-mthumb | ||
<compileflags>-fpic | ||
<compileflags>-fno-integrated-as | ||
<compileflags>--sysroot | ||
<compileflags>$(AndroidNDKRoot)/sysroot | ||
<compileflags>-isystem | ||
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/arm-linux-androideabi | ||
<compileflags>-D__ANDROID_API__=15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
# -------------------------------------------------------------------- | ||
|
||
using clang : %ARCH% | ||
: | ||
$(AndroidBinariesPath)/clang++ | ||
: | ||
<archiver>$(AndroidBinariesPath)/llvm-ar | ||
<compileflags>-fexceptions | ||
<compileflags>-frtti | ||
<compileflags>-ffunction-sections | ||
<compileflags>-funwind-tables | ||
<compileflags>-fstack-protector-strong | ||
<compileflags>-Wno-invalid-command-line-argument | ||
<compileflags>-Wno-unused-command-line-argument | ||
<compileflags>-no-canonical-prefixes | ||
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++/include | ||
<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/llvm-libc++abi/include | ||
<compileflags>-I$(AndroidNDKRoot)/sources/android/support/include | ||
<compileflags>-DANDROID | ||
<compileflags>-Wa,--noexecstack | ||
<compileflags>-Wformat | ||
<compileflags>-Werror=format-security | ||
<compileflags>-DNDEBUG | ||
<compileflags>-O2 | ||
<compileflags>-g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<compileflags>-gcc-toolchain | ||
<compileflags>$(AndroidNDKRoot)/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64 | ||
<compileflags>-target | ||
<compileflags>mipsel-none-linux-android | ||
<compileflags>-mips32 | ||
<compileflags>-fpic | ||
<compileflags>--sysroot | ||
<compileflags>$(AndroidNDKRoot)/sysroot | ||
<compileflags>-isystem | ||
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/mipsel-linux-android | ||
<compileflags>-D__ANDROID_API__=15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<compileflags>-gcc-toolchain | ||
<compileflags>$(AndroidNDKRoot)/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64 | ||
<compileflags>-target | ||
<compileflags>mips64el-none-linux-android | ||
<compileflags>-fpic | ||
<compileflags>-fintegrated-as | ||
<compileflags>--sysroot | ||
<compileflags>$(AndroidNDKRoot)/sysroot | ||
<compileflags>-isystem | ||
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/mips64el-linux-android | ||
<compileflags>-D__ANDROID_API__=21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<compileflags>-gcc-toolchain | ||
<compileflags>$(AndroidNDKRoot)/toolchains/x86-4.9/prebuilt/linux-x86_64 | ||
<compileflags>-target | ||
<compileflags>i686-none-linux-android | ||
<compileflags>-fPIC | ||
<compileflags>-mstackrealign | ||
<compileflags>--sysroot | ||
<compileflags>$(AndroidNDKRoot)/sysroot | ||
<compileflags>-isystem | ||
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/i686-linux-android | ||
<compileflags>-D__ANDROID_API__=15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<compileflags>-gcc-toolchain | ||
<compileflags>$(AndroidNDKRoot)/toolchains/x86_64-4.9/prebuilt/linux-x86_64 | ||
<compileflags>-target | ||
<compileflags>x86_64-none-linux-android | ||
<compileflags>-fPIC | ||
<compileflags>--sysroot | ||
<compileflags>$(AndroidNDKRoot)/sysroot | ||
<compileflags>-isystem | ||
<compileflags>$(AndroidNDKRoot)/sysroot/usr/include/x86_64-linux-android | ||
<compileflags>-D__ANDROID_API__=21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright 2003, 2005 Douglas Gregor | ||
# Copyright 2004 John Maddock | ||
# Copyright 2002, 2003, 2004, 2007 Vladimir Prus | ||
# Distributed under the Boost Software License, Version 1.0. | ||
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
# This file is used to configure your Boost.Build installation. You can modify | ||
# this file in place, or you can place it in a permanent location so that it | ||
# does not get overwritten should you get a new version of Boost.Build. See: | ||
# | ||
# http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html | ||
# | ||
# for documentation about possible permanent locations. | ||
|
||
# This file specifies which toolsets (C++ compilers), libraries, and other | ||
# tools are available. Often, you should be able to just uncomment existing | ||
# example lines and adjust them to taste. The complete list of supported tools, | ||
# and configuration instructions can be found at: | ||
# | ||
# http://boost.org/boost-build2/doc/html/bbv2/reference/tools.html | ||
# | ||
|
||
# This file uses Jam language syntax to describe available tools. Mostly, | ||
# there are 'using' lines, that contain the name of the used tools, and | ||
# parameters to pass to those tools -- where paremeters are separated by | ||
# semicolons. Important syntax notes: | ||
# | ||
# - Both ':' and ';' must be separated from other tokens by whitespace | ||
# - The '\' symbol is a quote character, so when specifying Windows paths you | ||
# should use '/' or '\\' instead. | ||
# | ||
# More details about the syntax can be found at: | ||
# | ||
# http://boost.org/boost-build2/doc/html/bbv2/advanced.html#bbv2.advanced.jam_language | ||
# | ||
# ------------------ | ||
# Android configurations. | ||
# ------------------ | ||
|
||
import os ; | ||
local AndroidNDKRoot = [ os.environ AndroidNDKRoot ] ; | ||
local AndroidBinariesPath = [ os.environ AndroidBinariesPath ] ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
diff -u -r boost_1_66_0.orig/boost/config/user.hpp boost_1_66_0/boost/config/user.hpp | ||
--- boost_1_66_0.orig/boost/config/user.hpp 2017-12-14 00:56:42.000000000 +0100 | ||
+++ boost_1_66_0/boost/config/user.hpp 2018-02-16 10:22:39.000000000 +0100 | ||
@@ -13,6 +13,12 @@ | ||
// configuration policy: | ||
// | ||
|
||
+// Android defines | ||
+// There is problem with std::atomic on android (and some other platforms). | ||
+// See this link for more info: | ||
+// https://code.google.com/p/android/issues/detail?id=42735#makechanges | ||
+#define BOOST_ASIO_DISABLE_STD_ATOMIC 1 | ||
+ | ||
// define this to locate a compiler config file: | ||
// #define BOOST_COMPILER_CONFIG <myheader> | ||
|
||
diff -u -r boost_1_66_0.orig/boost/system/error_code.hpp boost_1_66_0/boost/system/error_code.hpp | ||
--- boost_1_66_0.orig/boost/system/error_code.hpp 2017-12-14 00:56:48.000000000 +0100 | ||
+++ boost_1_66_0/boost/system/error_code.hpp 2018-02-16 10:27:46.000000000 +0100 | ||
@@ -16,6 +16,7 @@ | ||
#include <boost/assert.hpp> | ||
#include <boost/noncopyable.hpp> | ||
#include <boost/utility/enable_if.hpp> | ||
+#include <stdio.h> | ||
#include <ostream> | ||
#include <string> | ||
#include <stdexcept> | ||
diff -u -r boost_1_66_0.orig/libs/filesystem/src/operations.cpp boost_1_66_0/libs/filesystem/src/operations.cpp | ||
--- boost_1_66_0.orig/libs/filesystem/src/operations.cpp 2017-12-14 00:56:42.000000000 +0100 | ||
+++ boost_1_66_0/libs/filesystem/src/operations.cpp 2018-02-16 10:32:44.000000000 +0100 | ||
@@ -207,6 +207,21 @@ | ||
|
||
# if defined(BOOST_POSIX_API) | ||
|
||
+# if defined(__ANDROID__) | ||
+# define truncate libboost_truncate_wrapper | ||
+// truncate() is present in Android libc only starting from ABI 21, so here's a simple wrapper | ||
+static int libboost_truncate_wrapper(const char *path, off_t length) | ||
+{ | ||
+ int fd = open(path, O_WRONLY); | ||
+ if (fd == -1) { | ||
+ return -1; | ||
+ } | ||
+ int status = ftruncate(fd, length); | ||
+ close(fd); | ||
+ return status; | ||
+} | ||
+# endif | ||
+ | ||
typedef int err_t; | ||
|
||
// POSIX uses a 0 return to indicate success |