From 4e6e18119c0b85ac09b11fbb0c8941a7c520da08 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 1 May 2013 20:08:57 -0600 Subject: [PATCH] add advice on cross-compiling for Android --- src/README | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/README b/src/README index 42309d2679..b1850cf044 100644 --- a/src/README +++ b/src/README @@ -301,6 +301,27 @@ Some less commonly needed `configure' flags: * `--enable-bigendian', if target platform is big-endian. +======================================================================== + Cross-compiling for Android +======================================================================== + +As an example of cross-compiling, to compile for Andriod on ARM using +the NDK, use (all on one line) + + configure --host=arm-linux-androideabi + CPPFLAGS=-I[ndk]/platforms/android-[N]/arch-arm/usr/include + LDFLAGS=-L[ndk]/platforms/android-[N]/arch-arm/usr/lib + --enable-sgc + --enable-racket=racket + +where [ndk] is the path to the installed NDK, [N] is a target version +of Android (such as 14), and + + [ndk]/toolchains/arm-linux-androideabi-[comp]/prebuilt/[platform]/bin + +is in your PATH (so that a suitable `gcc', `ar', etc., are found) for +the [comp] of your choice and the [platform] used to compile. + ======================================================================== CGC versus 3m ========================================================================