Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Android NDK: build c-ares w/ the Standalone Toolchain
export NDK=/tmp/android-ndk-r8b
# Create the standalone toolchain
$NDK/build/tools/ \
--platform=android-9 \
export PATH=/tmp/my-android-toolchain/bin:$PATH
export SYSROOT=/tmp/my-android-toolchain/sysroot
export CC="arm-linux-androideabi-gcc --sysroot $SYSROOT"
# Download the latest release
curl -O
tar xvfz c-ares-1.9.1.tar.gz
# Configure
cd c-ares-1.9.1 && mkdir build
./configure --prefix=$(pwd)/build \
--host=arm-linux-androideabi \
--disable-shared \
# Build and install
make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment