1#!/bin/bash 2 3export CC="$(ls "${ANDROID_TOOLCHAIN}" | grep "\-gcc$")" 4export LD="$(ls "${ANDROID_TOOLCHAIN}" | grep "\-ld$")" 5 6T="${ANDROID_BUILD_TOP}" 7CFLAGS=( 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 31CFLAGS="${CFLAGS[@]}" 32./configure --host=arm-linux-androideabi --with-ssl="${T}/external/boringssl" \ 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 36 37