How to use D compiler like DMD or LDC in OpenWrt?

Hi,
As the title says, I want to compile a program written in D language for OpenWRT, but I don't know how to use the D compiler with OpenWRT.
I've tried installing DMD on my host, and writing a Makefile with the statement source ~/dlang/ldc-1.30.0/activate, but that doesn't seem to work.
So is it possible for OpenWRT to use the D compiler? Thank you!

As (usually the) openwrt programs are cross compiled you first need the D compiler compiled for the specific soc (cpu)

DMD only supports x86/x64!
This case, you could use LDC (LLVM D Compiler) or, as some have suggested by @maurer, compile an architecture-specific version of GDC (which is already included in GCC).

Some references:

1 Like