diff --git a/Build_android/boost-for-android-x86.patch b/Build_android/boost-for-android-x86.patch index be0957dd3b..4e24b988e3 100644 --- a/Build_android/boost-for-android-x86.patch +++ b/Build_android/boost-for-android-x86.patch @@ -1,8 +1,22 @@ diff --git a/build-android.sh b/build-android.sh -index 40453f7..7ffc050 100755 +index 40453f7..5902fe2 100755 --- a/build-android.sh +++ b/build-android.sh -@@ -258,9 +258,14 @@ case "$NDK_RN" in +@@ -195,8 +195,12 @@ case "$HOST_OS" in + PlatformOS=linux + esac + ++NDK_SOURCE_PROPERTIES=$AndroidNDKRoot"/source.properties" + NDK_RELEASE_FILE=$AndroidNDKRoot"/RELEASE.TXT" +-if [ -f "${NDK_RELEASE_FILE}" ]; then ++if [ -f "${NDK_SOURCE_PROPERTIES}" ]; then ++ version=$(grep -i '^Pkg.Revision =' $NDK_SOURCE_PROPERTIES | cut -f2- -d=) ++ NDK_RN=$(echo $version | awk -F. '{print $1}') ++elif [ -f "${NDK_RELEASE_FILE}" ]; then + NDK_RN=`cat $NDK_RELEASE_FILE | sed 's/^r\(.*\)$/\1/g'` + elif [ -n "${AndroidSourcesDetected}" ]; then + if [ -f "${ANDROID_BUILD_TOP}/ndk/docs/CHANGES.html" ]; then +@@ -258,10 +262,20 @@ case "$NDK_RN" in TOOLSET=gcc-androidR8e ;; "10 (64-bit)") @@ -18,17 +32,23 @@ index 40453f7..7ffc050 100755 + CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/${PlatformOS}-x86_64/bin/clang++ + TOOLSET=clang-androidR8e ;; ++ 11) ++ TOOLCHAIN=llvm ++ CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/${PlatformOS}-x86_64/bin/clang++ ++ TOOLSET=clang-androidR8e ++ ;; *) echo "Undefined or not supported Android NDK version!" -@@ -391,6 +396,7 @@ echo "Building boost for android" + exit 1 +@@ -391,6 +405,7 @@ echo "Building boost for android" export AndroidBinariesPath=`dirname $CXXPATH` export PATH=$AndroidBinariesPath:$PATH export AndroidNDKRoot + export PlatformOS export NO_BZIP2=1 - + cxxflags="" -@@ -405,7 +411,7 @@ echo "Building boost for android" +@@ -405,7 +420,7 @@ echo "Building boost for android" --layout=versioned \ --prefix="./../$BUILD_DIR/" \ $LIBRARIES \ @@ -38,11 +58,11 @@ index 40453f7..7ffc050 100755 } | tee -a $PROGDIR/build.log diff --git a/configs/user-config-boost-1_55_0.jam b/configs/user-config-boost-1_55_0.jam -index 666d4c8..4cd3441 100644 +index 666d4c8..93aba68 100644 --- a/configs/user-config-boost-1_55_0.jam +++ b/configs/user-config-boost-1_55_0.jam @@ -39,93 +39,47 @@ - + import os ; local AndroidNDKRoot = [ os.environ AndroidNDKRoot ] ; +local PlatformOS = [ os.environ PlatformOS ] ; @@ -53,10 +73,10 @@ index 666d4c8..4cd3441 100644 +using clang : androidR8e : -arm-linux-androideabi-g++ -+$(AndroidNDKRoot)/toolchains/llvm-3.6/prebuilt/$(PlatformOS)-x86_64/bin/clang++ ++$(AndroidNDKRoot)/toolchains/llvm/prebuilt/$(PlatformOS)-x86_64/bin/clang++ : -arm-linux-androideabi-ar -+--gcc-toolchain="$(AndroidNDKRoot)/toolchains/x86-4.8/prebuilt/$(PlatformOS)-x86_64" ++--gcc-toolchain="$(AndroidNDKRoot)/toolchains/x86-4.9/prebuilt/$(PlatformOS)-x86_64" -fexceptions -frtti -fpic @@ -89,10 +109,10 @@ index 666d4c8..4cd3441 100644 -g --I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/include --I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include -+-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.8/include -+-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include ++-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/include ++-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include +--target=i686-none-linux-android -+--gcc-toolchain="$(AndroidNDKRoot)/toolchains/x86-4.8/prebuilt/$(PlatformOS)-x86_64" ++--gcc-toolchain="$(AndroidNDKRoot)/toolchains/x86-4.9/prebuilt/$(PlatformOS)-x86_64" +--sysroot=$(AndroidNDKRoot)/platforms/android-9/arch-x86 # @Moss - Above are the 'oficial' android flags -arm diff --git a/Build_android/boost-for-android.patch b/Build_android/boost-for-android.patch index 0b941435e3..2b86e8f833 100644 --- a/Build_android/boost-for-android.patch +++ b/Build_android/boost-for-android.patch @@ -1,8 +1,22 @@ diff --git a/build-android.sh b/build-android.sh -index 40453f7..ad78ddf 100755 +index 40453f7..5902fe2 100755 --- a/build-android.sh +++ b/build-android.sh -@@ -258,9 +258,14 @@ case "$NDK_RN" in +@@ -195,8 +195,12 @@ case "$HOST_OS" in + PlatformOS=linux + esac + ++NDK_SOURCE_PROPERTIES=$AndroidNDKRoot"/source.properties" + NDK_RELEASE_FILE=$AndroidNDKRoot"/RELEASE.TXT" +-if [ -f "${NDK_RELEASE_FILE}" ]; then ++if [ -f "${NDK_SOURCE_PROPERTIES}" ]; then ++ version=$(grep -i '^Pkg.Revision =' $NDK_SOURCE_PROPERTIES | cut -f2- -d=) ++ NDK_RN=$(echo $version | awk -F. '{print $1}') ++elif [ -f "${NDK_RELEASE_FILE}" ]; then + NDK_RN=`cat $NDK_RELEASE_FILE | sed 's/^r\(.*\)$/\1/g'` + elif [ -n "${AndroidSourcesDetected}" ]; then + if [ -f "${ANDROID_BUILD_TOP}/ndk/docs/CHANGES.html" ]; then +@@ -258,10 +262,20 @@ case "$NDK_RN" in TOOLSET=gcc-androidR8e ;; "10 (64-bit)") @@ -18,18 +32,23 @@ index 40453f7..ad78ddf 100755 + CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/${PlatformOS}-x86_64/bin/clang++ + TOOLSET=clang-androidR8e ;; ++ 11) ++ TOOLCHAIN=llvm ++ CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/${PlatformOS}-x86_64/bin/clang++ ++ TOOLSET=clang-androidR8e ++ ;; *) echo "Undefined or not supported Android NDK version!" -@@ -391,6 +396,7 @@ echo "Building boost for android" + exit 1 +@@ -391,6 +405,7 @@ echo "Building boost for android" export AndroidBinariesPath=`dirname $CXXPATH` export PATH=$AndroidBinariesPath:$PATH export AndroidNDKRoot + export PlatformOS export NO_BZIP2=1 - + cxxflags="" -@@ -405,7 +411,7 @@ echo "Building boost for android" - threading=multi \ +@@ -405,7 +420,7 @@ echo "Building boost for android" --layout=versioned \ --prefix="./../$BUILD_DIR/" \ $LIBRARIES \ @@ -39,25 +58,25 @@ index 40453f7..ad78ddf 100755 } | tee -a $PROGDIR/build.log diff --git a/configs/user-config-boost-1_55_0.jam b/configs/user-config-boost-1_55_0.jam -index 666d4c8..df597f6 100644 +index 666d4c8..cdab118 100644 --- a/configs/user-config-boost-1_55_0.jam +++ b/configs/user-config-boost-1_55_0.jam @@ -39,84 +39,44 @@ - + import os ; local AndroidNDKRoot = [ os.environ AndroidNDKRoot ] ; +local PlatformOS = [ os.environ PlatformOS ] ; - + # -------------------------------------------------------------------- -# Is same for 8b, 8c and 8d -using gcc : androidR8b +using clang : androidR8e : -arm-linux-androideabi-g++ -+$(AndroidNDKRoot)/toolchains/llvm-3.6/prebuilt/$(PlatformOS)-x86_64/bin/clang++ ++$(AndroidNDKRoot)/toolchains/llvm/prebuilt/$(PlatformOS)-x86_64/bin/clang++ : -arm-linux-androideabi-ar -+--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(PlatformOS)-x86_64" ++--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(PlatformOS)-x86_64" -fexceptions -frtti -fpic @@ -134,15 +153,15 @@ index 666d4c8..df597f6 100644 -g --I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/include --I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include -+-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.8/include -+-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include ++-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/include ++-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include +--target=armv7-none-linux-androideabi -+--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.8/prebuilt/$(PlatformOS)-x86_64" ++--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/$(PlatformOS)-x86_64" +--sysroot=$(AndroidNDKRoot)/platforms/android-9/arch-arm # @Moss - Above are the 'oficial' android flags arm -fvisibility=hidden -@@ -125,9 +84,11 @@ arm-linux-androideabi-g++ +@@ -125,9 +85,11 @@ arm-linux-androideabi-g++ -D__arm__ -D_REENTRANT -D_GLIBCXX__PTHREADS diff --git a/Build_android/configure.sh b/Build_android/configure.sh index 5cef31364f..75697672a6 100755 --- a/Build_android/configure.sh +++ b/Build_android/configure.sh @@ -193,7 +193,7 @@ then cmake "$DIR/../Release/" \ -DCMAKE_TOOLCHAIN_FILE=../android-cmake/android.toolchain.cmake \ -DANDROID_ABI=armeabi-v7a \ - -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang3.6 \ + -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang3.8 \ -DANDROID_STL=none \ -DANDROID_STL_FORCE_FEATURES=ON \ -DANDROID_NATIVE_API_LEVEL=android-9 \ @@ -209,7 +209,7 @@ then cmake "$DIR/../Release/" \ -DCMAKE_TOOLCHAIN_FILE=../android-cmake/android.toolchain.cmake \ -DANDROID_ABI=armeabi-v7a \ - -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang3.6 \ + -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang3.8 \ -DANDROID_STL=none \ -DANDROID_STL_FORCE_FEATURES=ON \ -DANDROID_NDK="${ANDROID_NDK}" \ @@ -225,7 +225,7 @@ then cmake "$DIR/../Release/" \ -DCMAKE_TOOLCHAIN_FILE=../android-cmake/android.toolchain.cmake \ -DANDROID_ABI=x86 \ - -DANDROID_TOOLCHAIN_NAME=x86-clang3.6 \ + -DANDROID_TOOLCHAIN_NAME=x86-clang3.8 \ -DANDROID_STL=none \ -DANDROID_STL_FORCE_FEATURES=ON \ -DANDROID_NATIVE_API_LEVEL=android-9 \ @@ -241,7 +241,7 @@ then cmake "$DIR/../Release/" \ -DCMAKE_TOOLCHAIN_FILE=../android-cmake/android.toolchain.cmake \ -DANDROID_ABI=x86 \ - -DANDROID_TOOLCHAIN_NAME=x86-clang3.6 \ + -DANDROID_TOOLCHAIN_NAME=x86-clang3.8 \ -DANDROID_STL=none \ -DANDROID_STL_FORCE_FEATURES=ON \ -DANDROID_NDK="${ANDROID_NDK}" \ @@ -251,4 +251,4 @@ then make -j 1 ) ) -fi \ No newline at end of file +fi