"Walter Bright"  wrote in message news:mdj3l3$1hup$1...@digitalmars.com...

Never needed to build a cross compiler.

You did when adding 64-bit targets. ie dmd is a 32->64 and 64->32 cross compiler.

Anyway, in this situation:

We want to target new platform X.
Platform X has a c++ compiler but no D compiler available.
2.067 is the last version that can be built without a D compiler.
DMD master can be built with 2.067 or later.

The obvious (to me) way to get a working compiler on the platform is:
1. Add cross-compiling support targeting X to DMD master
2. Cross-compile DMD for X

Or alternatively:
1. Add ability to target X to 2.067 C++ source
2. Compile 2.067 on X with C++ compiler
3. Add ability to target X to DMD master
4. Compile DMD master with native 2.067 dmd binary

The second method is the only one I can think of that requires 2.067 can be compiled C++-only, and it also seems to require a lot more effort than the cross-compiling method.

Which would you expect to use if adding support to dmd for eg arm/linux?
Is there another method I'm missing?

I think the only hard requirement is that there is a binary package available capable of targeting the platform, or the last C++ version can target it. For platforms that the C++ version has never supported, cross-compiling is the best option to produce the first set of native binaries.

Reply via email to