Inquiring about cross compilation
Iain Buclaw via D.gnu
d.gnu at puremagic.com
Mon Feb 29 01:07:07 PST 2016
On 29 February 2016 at 09:35, Adrian Matoga via D.gnu <d.gnu at puremagic.com>
wrote:
> On Saturday, 27 February 2016 at 16:27:31 UTC, Ken Burgett wrote:
>
>> I am looking at doing a D project and have installed the DMD compiler on
>> my 64-bit Ubuntu dev system. My target architecture to ARM, as used in the
>> Raspberry PI and other systems. I need to know how I can develop code on
>> Linux x86 and run it on the RPI. Any pointer to an article about this
>> topic is appreciated.
>>
>
> Download x86_64-linux-gnu toolchain targeting arm-linux-gnueabihf from [1]
> (its the second row). For Raspberry Pi it works out of the box, try:
>
> $ /opt/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdc hello.d -o hello
>
> $ file hello
> hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped
>
> To build with dub, you need to pass the --compiler flag, e.g.
>
> $ dub build --compiler=/opt/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdc
>
> This can even build vibe.d apps for RPi, provided that you have all target
> .so files (AFAIK these are libevent, libevent_pthread, libssl and
> libcrypto).
>
> qemu-arm-static can execute statically linked ARM linux apps right on your
> PC.
>
>
I totally forgot about this nice little feature of qemu.
I have this in my old-old list of bookmarked lists for setting up a
Raspbian qemu-chroot.
https://superpiadventures.wordpress.com/
You can of course replace it with any derivative of Debian that supports
RPI.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20160229/c1436bc1/attachment.html>
More information about the D.gnu
mailing list