Cross compiling for ARM board

Simon Friedberger simon.jul2018 at a-oben.org
Thu Jul 5 17:22:49 UTC 2018


Turns out I was pretty close. The following works

export CROSS_COMPILE=arm-linux-gnueabihf-
export ARCH=arm
export CC=${CROSS_COMPILE}gcc
# I think gmp only needs the last line but the other two are standard in
my cross compile environment

./configure --build=haswell-pc-linux-gnu --host=armcortexa7-linux-gnueabihf


The problem was actually that make clean doesn't remove things like
fib_table.h which had been generated for 64 bit during a previous attempt.




On 2018-07-05 18:04, Torbjörn Granlund wrote:
> Simon Friedberger <simon.jul2018 at a-oben.org> writes:
>
>   Well, apparently I missed something vital but yes, I did. :)
>
> You need to set up a cross compiler (and cross assembler, linker,
> include files, libraries).
>
> Then you need to tell GMP about them (CC=blah, etc).
>
> And you need to pass any flags to the compiler which are consistent
> with the CPU (sub-)type you asked GMP to use.
>



More information about the gmp-discuss mailing list