Thread overview | |||||
---|---|---|---|---|---|
|
April 13, 2011 D Cross Compiler | ||||
---|---|---|---|---|
| ||||
Can GDC (or DMD) be built as a cross compiler ?? e.g. targeting ARM or MIPS or PowerPC, etc ?? I'm presuming this should be no problem for GCC ?? My development/host platforms are OS X and Debian Linux. Are there any prebuilt binaries for such cross-compilers ?? BTW, does GDC generate C++ code for GCC to compile, or does it directly generate object code ?? I'm presuming the latter. Can D be used in low-level drivers for Linux or other RTOS (e.g. freertos) ?? |
April 13, 2011 Re: D Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brendan Simon (eTRIX) | On 2011-04-13 02:59, Brendan Simon (eTRIX) wrote: > Can GDC (or DMD) be built as a cross compiler ?? e.g. targeting ARM or > MIPS or PowerPC, etc ?? I'm presuming this should be no problem for GCC ?? Theoretically there shouldn't be a problem for GDC or LDC (D frontend with LLVM backend) to generate code for those platforms. But then you would also need to have the runtime ported to the given platform. > My development/host platforms are OS X and Debian Linux. Are there any > prebuilt binaries for such cross-compilers ?? On Mac OS X you should have cross compilers for PowerPC and ARM, both GCC and Clang/LLVM. > BTW, does GDC generate C++ code for GCC to compile, or does it directly > generate object code ?? I'm presuming the latter. It generates object code directly. > Can D be used in low-level drivers for Linux or other RTOS (e.g. > freertos) ?? I guess so. You need to watch out for the runtime. I mean, D has a garbage collector and other stuff in the runtime that C doesn't -- /Jacob Carlborg |
April 13, 2011 Re: D Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brendan Simon (eTRIX) | Hi Brendan, For reference purposes, repeating what I've already said before elsewhere. == Quote from Brendan Simon (eTRIX) (brendan.simon@etrix.com.au)'s article > Can GDC (or DMD) be built as a cross compiler ?? e.g. targeting ARM or MIPS or PowerPC, etc ?? I'm presuming this should be no problem for GCC ?? Yes, but first you'll need to setup a cross-compiler toolchain first. As as, ar, objdump, strip and other binutils don't come bundled with GCC (require a separate step to setup and install). > My development/host platforms are OS X and Debian Linux. Are there any prebuilt binaries for such cross-compilers ?? Nope, I've only really tested ARM <-> i386 and MinGW <-> Linux cross compilers in the past. > BTW, does GDC generate C++ code for GCC to compile, or does it directly generate object code ?? I'm presuming the latter. Neither, it generates straight to the target platform's asm code. It is the job of the toolchain to compile to object code / link. > Can D be used in low-level drivers for Linux or other RTOS (e.g. > freertos) ?? D is not really suitable for a freestanding environment. Especially if you intend to use any non-POD features of the language (C++ has the same problem too). Regards Iain |
Copyright © 1999-2021 by the D Language Foundation