cross compiling gmp

Mike Mohr akihana at gmail.com
Mon Feb 13 20:29:24 CET 2012


I'm attempting once again to run the GMP test suite on my target device.  I
think I've successfully built the test suite binaries as follows:

make check TESTS=check

However, that isn't enough by itself; they have to actually run on the
target device.  I have a way to transfer the binaries (actually any
arbitrary file) to my target device (either an emulator or a physical
device), but in either case the target is embedded.  Which means that there
is no way to run 'make', since the compiler tools are all stored on the
host system and the test suite has been cross-compiled.

If I perform a build for my host system (x86_64 linux) I see that the
Makefiles run through a set of scripts one by one and apparently check the
return codes.  For example, in tests/mpz/Makefile.am, I see that
check_PROGRAMS is set to a list of binaries that will be built and run.
However, since 'make' isn't available in the target environment, this isn't
a viable way to run the tests.

Yet another problem is that the target system doesn't have bash.  As a
result, several of the scripts (e.g. tests/t-bswap) will not run
correctly.  If there is some documentation regarding how to run the actual
binaries by hand, I'd really appreciate a link.

Mike

On Wed, Jan 18, 2012 at 11:56 PM, Torbjorn Granlund <tg at gmplib.org> wrote:

> Mike Mohr <akihana at gmail.com> writes:
>
>  Thank you for sharing the procedure for (only) building the tests.  Is
>  there documentation regarding how the tests are run - i.e. what are
>  the command lines, what is tested when each case completes (i.e. BASH
>  return code?), etc.
>
> The documented method is to do "make check".  You need to check the
> documentation of your (embedded) system for information how to run
> binaries there, if "make check" does not work.
>
> --
> Torbjörn
>


More information about the gmp-discuss mailing list