[fpc-devel] Building cross-compiler for arm-linux on win32

Nikolai Zhubr n-a-zhubr at yandex.ru
Sun Dec 16 20:47:22 CET 2018


Hi,

Yes, "armv7-linux-gnueabi" did the trick for cross-compiling on windows 
as well. I just had to manually rename binary files of binutils so that 
thay match the naming pattern fpc build system expacts. I can provide my 
ready-to-use win32-to-arm binutils 2.31.1 zip if someone is interested.

Besides, I employed the "mkbinutils" script from contribs on the 
website, and I like it quite a lot, although it needed some little 
updating too. Its a pity this script is not mentioned anywhere in 
official recommendations.

I'd like to note that apart from this binutils target pitfall, 
cross-compiling appeared to be surprisingly easy even when both cpu and 
os of the target differ from the host ones. Really fantastic thing. But, 
the documentaion is horribly lacking/incomplete/outdated, and in the 
absence of fine official manual/howto, there are lots of unofficial 
"manuals" floating around, full of wrong/random/irrelevant instructions.

Anyway, this is a great success, thanks to all!


Regards,
Nikolai


16.12.2018 21:01, I wrote:
> Hi,
>
> It seems I've finally cracked this puzzle, somewhat.
>
> My self-built binutils were initially configured for "arm-linux" (That
> is, configure --target="arm-linux"). As soon as I changed this to
> "armv7-linux-gnueabi" (basically as a random guesswork) and rebuilt it
> all including the cross-fpc and my helloworld test on host x86_64-linux
> box again, I do not get much complaints from the build process anymore
> and the resulting executable appeared runnable on the arm device!
>
> Now going to retry it on windows again...
>
>
> Thank you!
>
> Regards,
> Nikolai
>
>




More information about the fpc-devel mailing list