6

Is it possible to cross-compile D source code for MIPS?

For example, I want to compile a D "Hello, world." program that will run on TI AR7-based devices, which have MIPS32 processor and typically run Linux 2.4.17 kernel with MontaVista patches and uClibc (using the MIPS I generic target; ELF 32-bit LSB executable, MIPS, MIPS-I version 1 SYSV).

http://en.wikipedia.org/wiki/TI-AR7

1 Answer 1

7

The reference compiler, DMD, does not generate MIPS code, so you'll have to use GDC and LDC2, which support generating code for whatever architectures their backends support (GCC and LLVM, respectively).

However, it's not a simple as generating the code. To get all of D's features workable, you'll need to port druntime and phobos to MIPS, as druntime is quite architecture specific. Without that, you'll be stuck without a GC, and all the features that entails.

So it is possible, but how possible definitely depends on how dedicated you are.

Sign up to request clarification or add additional context in comments.

1 Comment

The question is if these devices are even capable of running a fully fletched GC in terms of resources.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.