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

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

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

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

+6
source share
1 answer

The DMD reference compiler does not generate MIPS code, so you will need to use GDC and LDC2 , which support the generation code for any architectures supported by their backend ( GCC and LLVM , respectively).

However, this is not as simple as generating code. In order for all the functionality of D to be functional, you will need to port druntime and phobos to MIPS, since druntime is quite architecture specific. Without this, you will be stuck without the GC and all the features that entail.

So it’s possible, but how much it definitely depends on how devoted you are.

+7
source

Source: https://habr.com/ru/post/889782/


All Articles