Bertrand SIMONNET | 1b810fe | 2015-07-01 18:24:39 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | export CC="$(ls "${ANDROID_TOOLCHAIN}" | grep "\-gcc$")" |
| 4 | export LD="$(ls "${ANDROID_TOOLCHAIN}" | grep "\-ld$")" |
| 5 | |
| 6 | T="${ANDROID_BUILD_TOP}" |
| 7 | CFLAGS=( |
| 8 | "-isystem ${T}/external/libcxx/include" |
| 9 | "-isystem ${T}/bionic/libc/include/" |
| 10 | "-isystem ${T}/bionic/libc/arch-arm/include" |
| 11 | "-isystem ${T}/bionic/libc/kernel/uapi/" |
| 12 | "-isystem ${T}/bionic/libc/kernel/uapi/asm-arm/" |
| 13 | "-isystem ${T}/bionic/libm/include" |
| 14 | "-isystem ${T}/build/core/combo/include/arch/linux-arm/" |
| 15 | "-include ${T}/build/core/combo/include/arch/linux-arm/AndroidConfig.h" |
| 16 | "-fno-exceptions" |
| 17 | "-ffunction-sections" |
| 18 | "-fdata-sections" |
| 19 | "-fstack-protector" |
| 20 | "-fno-short-enums" |
| 21 | "-no-canonical-prefixes" |
| 22 | "-fmessage-length=0" |
| 23 | "-fomit-frame-pointer" |
| 24 | "-fPIC" |
| 25 | "-fno-strict-aliasing" |
| 26 | "-nostdlib" |
| 27 | ) |
| 28 | |
| 29 | |
| 30 | ./buildconf |
| 31 | CFLAGS="${CFLAGS[@]}" |
Dirk Vogt | 19d55e5 | 2016-12-01 12:16:17 +0100 | [diff] [blame] | 32 | ./configure --host=arm-linux-androideabi --with-ssl="${T}/external/openssl" \ |
Bertrand SIMONNET | 1b810fe | 2015-07-01 18:24:39 -0700 | [diff] [blame] | 33 | CFLAGS="${CFLAGS}" LIBS="-lc" CPPFLAGS="${CFLAGS} -I${T}/external/zlib/src" \ |
| 34 | LDFLAGS="-L${ANDROID_PRODUCT_OUT}/obj/lib/" --disable-ntlm-wb --enable-ipv6 \ |
| 35 | --with-zlib |