diff options
author | Bertrand SIMONNET <bsimonnet@google.com> | 2015-07-01 18:24:39 -0700 |
---|---|---|
committer | Bertrand SIMONNET <bsimonnet@google.com> | 2015-07-09 16:29:58 -0700 |
commit | 92c9b18d6473ffb74904bf9bc51157b8996dff07 (patch) | |
tree | 5772ebd0f27d5026855ca8ab57bdb1d1bb62f70d /androidconfigure | |
parent | a333948b3781b606f91db5a942ed3a34012656e8 (diff) | |
download | curl-92c9b18d6473ffb74904bf9bc51157b8996dff07.tar.gz |
Add script to generate the build configuration.
On a standard linux install, the configure script will generate header
files enabling/disabling features based on the system's configuration.
On android, we don't want to use the host configuration and need to wrap
that call with the right build parameters (CFLAGS, LDFLAGS, etc) in
order to generate the right configuration.
Note: this script should be run everytime we update curl.
BUG: 22347561
Change-Id: Icd44dbd35daa811e16f327fc4ec23f0cbe1d8780
Diffstat (limited to 'androidconfigure')
-rwxr-xr-x | androidconfigure | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/androidconfigure b/androidconfigure new file mode 100755 index 000000000..895465c80 --- /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 + |