11diff --git a/build-android.sh b/build-android.sh
2- index 40453f7..ad78ddf 100755
2+ index 40453f7..5902fe2 100755
33--- a/build-android.sh
44+++ b/build-android.sh
5- @@ -258,9 +258,14 @@ case "$NDK_RN" in
5+ @@ -195,8 +195,12 @@ case "$HOST_OS" in
6+ PlatformOS=linux
7+ esac
8+
9+ + NDK_SOURCE_PROPERTIES=$AndroidNDKRoot"/source.properties"
10+ NDK_RELEASE_FILE=$AndroidNDKRoot"/RELEASE.TXT"
11+ - if [ -f "${NDK_RELEASE_FILE}" ]; then
12+ + if [ -f "${NDK_SOURCE_PROPERTIES}" ]; then
13+ + version=$(grep -i '^Pkg.Revision =' $NDK_SOURCE_PROPERTIES | cut -f2- -d=)
14+ + NDK_RN=$(echo $version | awk -F. '{print $1}')
15+ + elif [ -f "${NDK_RELEASE_FILE}" ]; then
16+ NDK_RN=`cat $NDK_RELEASE_FILE | sed 's/^r\(.*\)$/\1/g'`
17+ elif [ -n "${AndroidSourcesDetected}" ]; then
18+ if [ -f "${ANDROID_BUILD_TOP}/ndk/docs/CHANGES.html" ]; then
19+ @@ -258,10 +262,20 @@ case "$NDK_RN" in
620 TOOLSET=gcc-androidR8e
721 ;;
822 "10 (64-bit)")
@@ -18,18 +32,23 @@ index 40453f7..ad78ddf 100755
1832+ CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/${PlatformOS}-x86_64/bin/clang++
1933+ TOOLSET=clang-androidR8e
2034 ;;
35+ + 11)
36+ + TOOLCHAIN=llvm
37+ + CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/${PlatformOS}-x86_64/bin/clang++
38+ + TOOLSET=clang-androidR8e
39+ + ;;
2140 *)
2241 echo "Undefined or not supported Android NDK version!"
23- @@ -391,6 +396,7 @@ echo "Building boost for android"
42+ exit 1
43+ @@ -391,6 +405,7 @@ echo "Building boost for android"
2444 export AndroidBinariesPath=`dirname $CXXPATH`
2545 export PATH=$AndroidBinariesPath:$PATH
2646 export AndroidNDKRoot
2747+ export PlatformOS
2848 export NO_BZIP2=1
29-
49+
3050 cxxflags=""
31- @@ -405,7 +411,7 @@ echo "Building boost for android"
32- threading=multi \
51+ @@ -405,7 +420,7 @@ echo "Building boost for android"
3352 --layout=versioned \
3453 --prefix="./../$BUILD_DIR/" \
3554 $LIBRARIES \
@@ -39,25 +58,25 @@ index 40453f7..ad78ddf 100755
3958 } | tee -a $PROGDIR/build.log
4059
4160diff --git a/configs/user-config-boost-1_55_0.jam b/configs/user-config-boost-1_55_0.jam
42- index 666d4c8..df597f6 100644
61+ index 666d4c8..cdab118 100644
4362--- a/configs/user-config-boost-1_55_0.jam
4463+++ b/configs/user-config-boost-1_55_0.jam
4564@@ -39,84 +39,44 @@
46-
65+
4766 import os ;
4867 local AndroidNDKRoot = [ os.environ AndroidNDKRoot ] ;
4968+ local PlatformOS = [ os.environ PlatformOS ] ;
50-
69+
5170 # --------------------------------------------------------------------
5271- # Is same for 8b, 8c and 8d
5372- using gcc : androidR8b
5473+ using clang : androidR8e
5574 :
5675- arm-linux-androideabi-g++
57- + $(AndroidNDKRoot)/toolchains/llvm-3.6 /prebuilt/$(PlatformOS)-x86_64/bin/clang++
76+ + $(AndroidNDKRoot)/toolchains/llvm/prebuilt/$(PlatformOS)-x86_64/bin/clang++
5877 :
5978- <archiver>arm-linux-androideabi-ar
60- + <compileflags>--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.8 /prebuilt/$(PlatformOS)-x86_64"
79+ + <compileflags>--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.9 /prebuilt/$(PlatformOS)-x86_64"
6180 <compileflags>-fexceptions
6281 <compileflags>-frtti
6382 <compileflags>-fpic
@@ -134,15 +153,15 @@ index 666d4c8..df597f6 100644
134153 <compileflags>-g
135154- <compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/include
136155- <compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include
137- + <compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.8 /include
138- + <compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.8 /libs/armeabi/include
156+ + <compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9 /include
157+ + <compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9 /libs/armeabi/include
139158+ <linkflags>--target=armv7-none-linux-androideabi
140- + <linkflags>--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.8 /prebuilt/$(PlatformOS)-x86_64"
159+ + <linkflags>--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.9 /prebuilt/$(PlatformOS)-x86_64"
141160+ <linkflags>--sysroot=$(AndroidNDKRoot)/platforms/android-9/arch-arm
142161 # @Moss - Above are the 'oficial' android flags
143162 <architecture>arm
144163 <compileflags>-fvisibility=hidden
145- @@ -125,9 +84 ,11 @@ arm-linux-androideabi-g++
164+ @@ -125,9 +85 ,11 @@ arm-linux-androideabi-g++
146165 <cxxflags>-D__arm__
147166 <cxxflags>-D_REENTRANT
148167 <cxxflags>-D_GLIBCXX__PTHREADS
0 commit comments