<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 29 February 2016 at 09:35, Adrian Matoga via D.gnu <span dir="ltr"><<a href="mailto:d.gnu@puremagic.com" target="_blank">d.gnu@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Saturday, 27 February 2016 at 16:27:31 UTC, Ken Burgett wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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.<br>
</blockquote>
<br></span>
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:<br>
<br>
$ /opt/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdc hello.d -o hello<br>
<br>
$ file hello<br>
hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped<br>
<br>
To build with dub, you need to pass the --compiler flag, e.g.<br>
<br>
$ dub build --compiler=/opt/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gdc<br>
<br>
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).<br>
<br>
qemu-arm-static can execute statically linked ARM linux apps right on your PC.<br>
<br></blockquote><div><br></div><div>I totally forgot about this nice little feature of qemu.<br><br></div><div>I have this in my old-old list of bookmarked lists for setting up a Raspbian qemu-chroot.<br><br><a href="https://superpiadventures.wordpress.com/">https://superpiadventures.wordpress.com/</a><br><br></div><div>You can of course replace it with any derivative of Debian that supports RPI.<br></div><div><br>Thanks!<br></div></div></div></div>