aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand SIMONNET <bsimonnet@google.com>2015-07-16 20:13:01 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-07-16 20:13:01 +0000
commit78ec513997986eee20208465cf51876181caff06 (patch)
tree5772ebd0f27d5026855ca8ab57bdb1d1bb62f70d
parentf9ddbd33390872a6f7c7c7aeb9d3671bee2b347b (diff)
parent92c9b18d6473ffb74904bf9bc51157b8996dff07 (diff)
downloadandroid_external_curl-78ec513997986eee20208465cf51876181caff06.tar.gz
android_external_curl-78ec513997986eee20208465cf51876181caff06.tar.bz2
android_external_curl-78ec513997986eee20208465cf51876181caff06.zip
Merge "Add script to generate the build configuration."
-rwxr-xr-xandroidconfigure36
1 files changed, 36 insertions, 0 deletions
diff --git a/androidconfigure b/androidconfigure
new file mode 100755
index 0000000..895465c
--- /dev/null
+++ b/androidconfigure
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+export CC="$(ls "${ANDROID_TOOLCHAIN}" | grep "\-gcc$")"
+export LD="$(ls "${ANDROID_TOOLCHAIN}" | grep "\-ld$")"
+
+T="${ANDROID_BUILD_TOP}"
+CFLAGS=(
+ "-isystem ${T}/external/libcxx/include"
+ "-isystem ${T}/bionic/libc/include/"
+ "-isystem ${T}/bionic/libc/arch-arm/include"
+ "-isystem ${T}/bionic/libc/kernel/uapi/"
+ "-isystem ${T}/bionic/libc/kernel/uapi/asm-arm/"
+ "-isystem ${T}/bionic/libm/include"
+ "-isystem ${T}/build/core/combo/include/arch/linux-arm/"
+ "-include ${T}/build/core/combo/include/arch/linux-arm/AndroidConfig.h"
+ "-fno-exceptions"
+ "-ffunction-sections"
+ "-fdata-sections"
+ "-fstack-protector"
+ "-fno-short-enums"
+ "-no-canonical-prefixes"
+ "-fmessage-length=0"
+ "-fomit-frame-pointer"
+ "-fPIC"
+ "-fno-strict-aliasing"
+ "-nostdlib"
+)
+
+
+./buildconf
+CFLAGS="${CFLAGS[@]}"
+./configure --host=arm-linux-androideabi --with-ssl="${T}/external/boringssl" \
+ CFLAGS="${CFLAGS}" LIBS="-lc" CPPFLAGS="${CFLAGS} -I${T}/external/zlib/src" \
+ LDFLAGS="-L${ANDROID_PRODUCT_OUT}/obj/lib/" --disable-ntlm-wb --enable-ipv6 \
+ --with-zlib
+