Skip to content

Commit bf56098

Browse files
committed
update android build script, and upgate from 1.1.0f to 1.1.1d
1 parent 2df92c9 commit bf56098

File tree

4 files changed

+8
-19
lines changed

4 files changed

+8
-19
lines changed

tools/build-android-common.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ function set_android_cpu_feature() {
170170
case ${arch} in
171171
arm-v7a | arm-v7a-neon)
172172
export CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -Wno-unused-function -fno-integrated-as -fstrict-aliasing -fPIC -DANDROID -D__ANDROID_API__=${api} -Os -ffunction-sections -fdata-sections $(get_common_includes)"
173-
export CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti -Os -ffunction-sections -fdata-sections"
173+
export CXXFLAGS="-std=c++14 -Os -ffunction-sections -fdata-sections"
174174
export LDFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -Wl,--fix-cortex-a8 -Wl,--gc-sections -Os -ffunction-sections -fdata-sections $(get_common_linked_libraries ${api} ${arch})"
175175
export CPPFLAGS=${CFLAGS}
176176
;;
177177
arm64-v8a)
178178
export CFLAGS="-march=armv8-a -Wno-unused-function -fno-integrated-as -fstrict-aliasing -fPIC -DANDROID -D__ANDROID_API__=${api} -Os -ffunction-sections -fdata-sections $(get_common_includes)"
179-
export CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti -Os -ffunction-sections -fdata-sections"
179+
export CXXFLAGS="-std=c++14 -Os -ffunction-sections -fdata-sections"
180180
export LDFLAGS="-march=armv8-a -Wl,--gc-sections -Os -ffunction-sections -fdata-sections $(get_common_linked_libraries ${api} ${arch})"
181181
export CPPFLAGS=${CFLAGS}
182182
;;
@@ -185,7 +185,7 @@ function set_android_cpu_feature() {
185185
;;
186186
x86-64)
187187
export CFLAGS="-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -Wno-unused-function -fno-integrated-as -fstrict-aliasing -fPIC -DANDROID -D__ANDROID_API__=${api} -Os -ffunction-sections -fdata-sections $(get_common_includes)"
188-
export CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti -Os -ffunction-sections -fdata-sections"
188+
export CXXFLAGS="-std=c++14 -Os -ffunction-sections -fdata-sections"
189189
export LDFLAGS="-march=x86-64 -Wl,--gc-sections -Os -ffunction-sections -fdata-sections $(get_common_linked_libraries ${api} ${arch})"
190190
export CPPFLAGS=${CFLAGS}
191191
;;

tools/build-android-curl.sh

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ABIS=("armeabi-v7a" "arm64-v8a" "x86_64")
4040
ABI_TRIPLES=("arm-linux-androideabi" "aarch64-linux-android" "x86_64-linux-android")
4141
ANDROID_API=23
4242

43-
ARCHS=("arm64")
43+
# ARCHS=("x86_64")
4444

4545
echo "https://github.com/curl/curl/releases/download/${LIB_VERSION}/${LIB_NAME}.tar.gz"
4646

@@ -91,28 +91,22 @@ configure_make() {
9191
NGHTTP2_OUT_DIR="${pwd_path}/../output/android/nghttp2-${ARCH}"
9292

9393
export LDFLAGS="${LDFLAGS} -L${OPENSSL_OUT_DIR}/lib -L${NGHTTP2_OUT_DIR}/lib"
94-
# export LD="${LD} -L${OPENSSL_OUT_DIR}/lib -L${NGHTTP2_OUT_DIR}/lib"
95-
# export LD_LIBRARY_PATH="-L${OPENSSL_OUT_DIR}/lib -L${NGHTTP2_OUT_DIR}/lib"
96-
# export LD="$LD -rpath -L${OPENSSL_OUT_DIR}/lib -L${NGHTTP2_OUT_DIR}/lib -rpath-link -L${OPENSSL_OUT_DIR}/lib -L${NGHTTP2_OUT_DIR}/lib"
97-
export LDFLAGS="$LDFLAGS -Wl,-rpath-link,-L${NGHTTP2_OUT_DIR}/lib,-L${OPENSSL_OUT_DIR}/lib"
94+
# export LDFLAGS="-Wl,-rpath-link,-L${NGHTTP2_OUT_DIR}/lib,-L${OPENSSL_OUT_DIR}/lib $LDFLAGS "
9895

9996
# read -n1 -p "Press any key to continue..."
10097

10198
if [[ "${ARCH}" == "x86_64" ]]; then
10299

103-
# ./configure android-x86_64 --prefix="${PREFIX_DIR}"
104100
./configure --host=x86_64-linux-android --prefix="${PREFIX_DIR}" --enable-ipv6 --with-ssl=${OPENSSL_OUT_DIR} --with-nghttp2=${NGHTTP2_OUT_DIR} >"${OUTPUT_ROOT}/log/${ARCH}.log" 2>&1
105101

106102
elif [[ "${ARCH}" == "arm" ]]; then
107103

108-
# ./configure android-arm --prefix="${PREFIX_DIR}"
109104
./configure --host=arm-linux-androideabi --prefix="${PREFIX_DIR}" --enable-ipv6 --with-ssl=${OPENSSL_OUT_DIR} --with-nghttp2=${NGHTTP2_OUT_DIR} >"${OUTPUT_ROOT}/log/${ARCH}.log" 2>&1
110105

111106
elif [[ "${ARCH}" == "arm64" ]]; then
112107

113-
export LDFLAGS="$LDFLAGS -Wl,-rpath,-L${NGHTTP2_OUT_DIR}/lib,-L${OPENSSL_OUT_DIR}/lib"
114-
# ./configure android-arm64 --prefix="${PREFIX_DIR}"
115-
./configure --host=aarch64-linux-android --prefix="${PREFIX_DIR}" --enable-ipv6 --with-ssl=${OPENSSL_OUT_DIR} --with-nghttp2=${NGHTTP2_OUT_DIR} >"${OUTPUT_ROOT}/log/${ARCH}.log" 2>&1
108+
# --enable-shared need nghttp2 cpp compile
109+
./configure --host=aarch64-linux-android --prefix="${PREFIX_DIR}" --disable-shared --enable-ipv6 --with-ssl=${OPENSSL_OUT_DIR} --with-nghttp2=${NGHTTP2_OUT_DIR} >"${OUTPUT_ROOT}/log/${ARCH}.log" 2>&1
116110

117111
else
118112
echo "not support" && exit 1

tools/build-android-nghttp2.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,15 @@ configure_make() {
8888

8989
if [[ "${ARCH}" == "x86_64" ]]; then
9090

91-
# ./configure android-x86_64 --prefix="${PREFIX_DIR}"
9291
./configure --host=x86_64-linux-android --prefix="${PREFIX_DIR}" --disable-app --disable-threads --enable-lib-only >"${OUTPUT_ROOT}/log/${ARCH}.log" 2>&1
9392

9493
elif [[ "${ARCH}" == "arm" ]]; then
9594

96-
# ./configure android-arm --prefix="${PREFIX_DIR}"
9795
./configure --host=arm-linux-androideabi --prefix="${PREFIX_DIR}" --disable-app --disable-threads --enable-lib-only >"${OUTPUT_ROOT}/log/${ARCH}.log" 2>&1
9896

9997
elif [[ "${ARCH}" == "arm64" ]]; then
10098

101-
# ./configure android-arm64 --prefix="${PREFIX_DIR}"
99+
# --disable-lib-only need xml2 supc++ stdc++14
102100
./configure --host=aarch64-linux-android --prefix="${PREFIX_DIR}" --disable-app --disable-threads --enable-lib-only >"${OUTPUT_ROOT}/log/${ARCH}.log" 2>&1
103101

104102
else

tools/build-android-openssl.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,14 @@ configure_make() {
9393
if [[ "${ARCH}" == "x86_64" ]]; then
9494

9595
./Configure android-x86_64 --prefix="${PREFIX_DIR}"
96-
# ./Configure android-x86_64 --host=x86_64-linux-android --prefix="${PREFIX_DIR}"
9796

9897
elif [[ "${ARCH}" == "arm" ]]; then
9998

10099
./Configure android-arm --prefix="${PREFIX_DIR}"
101-
# ./Configure --host=arm-linux-androideabi --prefix="${PREFIX_DIR}"
102100

103101
elif [[ "${ARCH}" == "arm64" ]]; then
104102

105103
./Configure android-arm64 --prefix="${PREFIX_DIR}"
106-
# ./Configure --host=aarch64-linux-android --prefix="${PREFIX_DIR}"
107104

108105
else
109106
echo "not support" && exit 1

0 commit comments

Comments
 (0)