Runtime for ARM

Kai Nacke kai at redstar.de
Tue May 14 20:30:10 PDT 2013


On Friday, 15 February 2013 at 09:54:11 UTC, Paolo Invernizzi 
wrote:
> Hi all,
>
> I've read that *maybe* it's possible to use LDC for ARM, so I'm 
> investigating the port effort of an actual D application.
>
> I've compiled the actual 'merge-2.061-2' and ldc has produced 
> an ARM object file:
>
>   ldc2 -march=arm -mtriple=arm-linux-gnueabi -c main.d
>   file main.o
>   main.o: ELF 32-bit LSB relocatable, ARM, version 1 
> (GNU/Linux), not stripped
>
> So now, just before starting to attach the runtime compilation, 
> I'm asking of someone has a ready-to-use 
> tutorial/patch-for-CMakeLists/blogpost or similar for such a 
> things...
>
> Thanks,
> Paolo

Hi Paolo!

Nice to here that you like to work on the ARM port.

As to my knowledge there is no tutorial or patch list.

 From my experience with PowerPC-64bit I can tell you that one of 
the first things you need to do is checking the vararg interface 
(core.vararg, core.stdc.stdarg). It is imported in many files - 
you get a lot of compile errors if this is missing/not working.

Next step in druntime is to look at thread support and GC. For 
ARM, there is already some code. Maybe it works out of the box. 
(You can also choose to postpone this work and use the dummy GC 
as I did.)

In Phobos the module which can make trouble is std.math. It is 
also included in many other modules and contains a fair amount of 
assembler code.

If you solve these issues then you will get a compiling/working 
druntime/phobos library. After that you can find the remaining 
bugs with the help of the test suite and then add some more nice 
stuff (e.g. ARM support in core.cpuid :-) )

Regards
Kai


More information about the digitalmars-d-ldc mailing list