Ehem, ARM

Joakim joakim at airpost.net
Fri Nov 15 03:18:04 PST 2013


On Friday, 15 November 2013 at 09:45:42 UTC, Paulo Pinto wrote:
> As far as I know dmd does not support cross compiling.
I started skimming the dmd source to see how it handled porting 
to new platforms and I found the following:

  * Linux Version
  * -------------
  * There are two main issues: hosting the compiler on linux,
  * and generating (targetting) linux executables.
  * The "linux" and "__GNUC__" macros control hosting issues
  * for operating system and compiler dependencies, respectively.
  * To target linux executables, use ELFOBJ for things specific to 
the
  * ELF object file format, and TARGET_LINUX for things specific to
  * the linux memory model.
  * If this is all done right, one could generate a linux object 
file
  * even when compiling on win32, and vice versa.
  * The compiler source code currently uses these macros very 
inconsistently
  * with these goals, and should be fixed.
https://github.com/D-Programming-Language/dmd/blob/master/src/backend/cdef.h#L71

So it appears that the dmd backend has some support for 
cross-compiling, although likely incomplete.


More information about the Digitalmars-d mailing list