Bill Allombert on Fri, 22 Jul 2011 16:27:34 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: cross-compiling pari for Android |
On Thu, Jul 21, 2011 at 09:36:29PM +0200, Bill Allombert wrote: > On Thu, Jul 21, 2011 at 03:17:23PM -0400, Charles Boyd wrote: > > Hi, > > > > I am trying to port PARI/GP to Android by cross compiling with the > > standalone NDK toolchain (contains system headers, libs, C compiler, etc). > > > > The way I am trying to do this is by writing a simple shell script which > > exports the C compiler (et. all) and points to the appropriate Android > > headers and invokes the usual Configure script after all of the > > Android-specific things are taken care of. > > > > There is a problem I keep running into with the Configure script, which > > immediately tries to compile and run the ansi.c program -- the build > > obviously fails since I am compiling for the arm-linux-androideabi target, > > but working on a Linux-x86 host. > > > > This leads me to a few questions: > > > > (1) Is there any simple way to invoke the Configure script without > > performing the tests? > > ./Configure -a > > > If not, how does the Configure script expect me to run > > ARM binaries on an x86 machine? > > By using an emulator (e.g. qemu-arm) and the environment variable > RUNTEST. I see that RUNTEST was not documented. I added the following to the doc: ============ \subsec{Cross-compiling:} When cross-compiling, you can set the environment variable \kbd{RUNTEST} to a program that is able to run the target binaries (e.g. an emulator). It will be used for both the \kbd{Configure} tests and \kbd{make bench}. ============ Incidentally, you can force all the tests to pass by setting RUNTEST to /bin/true Cheers, Bill.