forked from microsoft/cpprestsdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboost-for-android.patch
More file actions
152 lines (147 loc) · 5.33 KB
/
boost-for-android.patch
File metadata and controls
152 lines (147 loc) · 5.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
diff --git a/build-android.sh b/build-android.sh
index 40453f7..97a3203 100755
--- a/build-android.sh
+++ b/build-android.sh
@@ -258,9 +258,9 @@ case "$NDK_RN" in
TOOLSET=gcc-androidR8e
;;
"10 (64-bit)")
- TOOLCHAIN=${TOOLCHAIN:-arm-linux-androideabi-4.6}
- CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/${PlatformOS}-x86_64/bin/arm-linux-androideabi-g++
- TOOLSET=gcc-androidR8e
+ TOOLCHAIN=llvm-3.4
+ CXXPATH=$AndroidNDKRoot/toolchains/${TOOLCHAIN}/prebuilt/${PlatformOS}-x86_64/bin/clang++
+ TOOLSET=clang-androidR8e
;;
*)
echo "Undefined or not supported Android NDK version!"
@@ -392,6 +392,7 @@ echo "Building boost for android"
export PATH=$AndroidBinariesPath:$PATH
export AndroidNDKRoot
export NO_BZIP2=1
+ export ICONV_PATH="`pwd`/../../libiconv/armeabi-v7a"
cxxflags=""
for flag in $CXXFLAGS; do cxxflags="$cxxflags cxxflags=$flag"; done
@@ -404,8 +405,12 @@ echo "Building boost for android"
threading=multi \
--layout=versioned \
--prefix="./../$BUILD_DIR/" \
+ boost.locale.posix=off \
+ boost.locale.std=on \
+ boost.locale.iconv=on \
+ boost.locale.icu=off \
$LIBRARIES \
- install 2>&1 \
+ release debug install 2>&1 \
|| { dump "ERROR: Failed to build boost for android!" ; exit 1 ; }
} | 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..5f6bab8 100644
--- a/configs/user-config-boost-1_55_0.jam
+++ b/configs/user-config-boost-1_55_0.jam
@@ -41,82 +41,41 @@ import os ;
local AndroidNDKRoot = [ os.environ AndroidNDKRoot ] ;
# --------------------------------------------------------------------
-# Is same for 8b, 8c and 8d
-using gcc : androidR8b
+using clang : androidR8e
:
-arm-linux-androideabi-g++
+$(AndroidNDKRoot)/toolchains/llvm-3.4/prebuilt/linux-x86_64/bin/clang++
:
-<archiver>arm-linux-androideabi-ar
+<compileflags>--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64"
<compileflags>-fexceptions
<compileflags>-frtti
<compileflags>-fpic
<compileflags>-ffunction-sections
<compileflags>-funwind-tables
-<compileflags>-D__ARM_ARCH_5__
-<compileflags>-D__ARM_ARCH_5T__
-<compileflags>-D__ARM_ARCH_5E__
-<compileflags>-D__ARM_ARCH_5TE__
-<compileflags>-Wno-psabi
-<compileflags>-march=armv5te
-<compileflags>-mtune=xscale
-<compileflags>-msoft-float
+<compileflags>-no-canonical-prefixes
+<compileflags>--target=armv7-none-linux-androideabi
+<compileflags>-march=armv7-a
+<compileflags>-mfloat-abi=softfp
+<compileflags>-mfpu=vfpv3-d16
<compileflags>-mthumb
-<compileflags>-Os
-<compileflags>-fomit-frame-pointer
-<compileflags>-fno-strict-aliasing
-<compileflags>-finline-limit=64
-<compileflags>-I$(AndroidNDKRoot)/platforms/android-9/arch-arm/usr/include
-<compileflags>-Wa,--noexecstack
-<compileflags>-DANDROID
-<compileflags>-D__ANDROID__
-<compileflags>-DNDEBUG
-<compileflags>-O2
-<compileflags>-g
-<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/include
-<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include
-# @Moss - Above are the 'oficial' android flags
-<architecture>arm
-<compileflags>-fvisibility=hidden
-<compileflags>-fvisibility-inlines-hidden
-<compileflags>-fdata-sections
-<cxxflags>-D__arm__
-<cxxflags>-D_REENTRANT
-<cxxflags>-D_GLIBCXX__PTHREADS
-;
-
-# --------------------------------------------------------------------
-using gcc : androidR8e
-:
-arm-linux-androideabi-g++
-:
-<archiver>arm-linux-androideabi-ar
-<compileflags>-fexceptions
-<compileflags>-frtti
-<compileflags>-fpic
-<compileflags>-ffunction-sections
-<compileflags>-funwind-tables
+<compileflags>--sysroot="$(AndroidNDKRoot)/platforms/android-9/arch-arm"
<compileflags>-D__ARM_ARCH_5__
<compileflags>-D__ARM_ARCH_5T__
<compileflags>-D__ARM_ARCH_5E__
<compileflags>-D__ARM_ARCH_5TE__
-<compileflags>-Wno-psabi
-<compileflags>-march=armv5te
-<compileflags>-mtune=xscale
-<compileflags>-msoft-float
-<compileflags>-mthumb
<compileflags>-Os
<compileflags>-fomit-frame-pointer
<compileflags>-fno-strict-aliasing
-<compileflags>-finline-limit=64
-<compileflags>-I$(AndroidNDKRoot)/platforms/android-9/arch-arm/usr/include
<compileflags>-Wa,--noexecstack
<compileflags>-DANDROID
<compileflags>-D__ANDROID__
<compileflags>-DNDEBUG
<compileflags>-O2
<compileflags>-g
-<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/include
-<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include
+<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.8/include
+<compileflags>-I$(AndroidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include
+<linkflags>--target=armv7-none-linux-androideabi
+<linkflags>--gcc-toolchain="$(AndroidNDKRoot)/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64"
+<linkflags>--sysroot=$(AndroidNDKRoot)/platforms/android-9/arch-arm
# @Moss - Above are the 'oficial' android flags
<architecture>arm
<compileflags>-fvisibility=hidden
@@ -125,9 +84,11 @@ arm-linux-androideabi-g++
<cxxflags>-D__arm__
<cxxflags>-D_REENTRANT
<cxxflags>-D_GLIBCXX__PTHREADS
+<cxxflags>-std=c++11
;
+
# ------------------
# GCC configuration.
# ------------------