D compiler as part of GCC

Jerry Quinn jlquinn at optonline.net
Mon Jan 18 21:22:45 PST 2010


Eldar Insafutdinov Wrote:

> bearophile Wrote:
> 
> > Jerry Quinn:
> > > I'm interested in creating a D front end for GCC that would be part of the GCC codebase.
> > 
> > What about helping LDC devs create a good D2 implementation instead? It's probably 1/5 or 1/10 of the work you think about, because lot of work is already done, and surely some people will help you (me too).

One reason is that I'm already positioned to contribute code to GCC. and it is more difficult for me to become an LDC dev.  ANother is that GCC has very broad backend support.  I know LLVM backend support is expanding but it still has some distance to go.  GCC is also the default compiler for many Linux distributions, and D be part of that may help it propagate.

I also do think that the construction of another front end would provide positive benefit to the D community by improving the language specification and separating it from implementation.  Of course that's only true if this succeeds :-)

There's also a benefit to the GCC project in terms of improving the docs on the frontend interface.  That's already happened as I've tried to figure out how it works :-)  But that's not so relevant to the folks here.

> > There's Dil, DMD, GDC, LDC, D#, etc, but one good, debugged and well optimizing fully open source D2 compiler is much better than ten broken and/or badly optimizing D compilers.
> > 
> > Bye,
> > bearophile
> 
> I agree that having such a good intent the author of the post should better concentrate his effort on helping GDC/LDC. LDC took couple of years to become usable, and you have to consider that they took an existing front-end.
> 
> Also what I think even when you complete this project, it is not only the licensing issues that are preventing GDC from being included into GCC. They will do that only if they are interested in this project, as it requires maintenance. They will not update GCC-D frontend with every release of GCC just because it is a part of it.

This is very true.  It would require people to be interested in continuing it's existence.

> Having a solid GDC implementation you can be sure that it will be included in distributions (Debian had GDC for quite a long time).

In my mind, the endgame for GDC would be to have the work integrated into the official GCC sources.  That would provide the similar benefits to the ones I'm chasing.  Everyone who touched GDC would have to assign their code to the FSF and the DMD sources would also have to be assigned.  Perhaps that's the right answer in the end but I don't know.  It does seem to be a substantial effort to make that happen.

Jerry




More information about the Digitalmars-d-announce mailing list