In general, it's possible to create a combined work made from parts with different licenses, provided that the licenses are compatible. So if you have part A licensed under, say, the MIT license, and part B licensed under the GPL, then the combined work falls under the GPL (due to the GPL "virability", and since the GPL and MIT are compatible in the sense that the GPL restrictions are a superset of MIT ). You can still later on extract part A and distribute that under the MIT license.
I don't know the details of the D compiler frontend that has now become part of GCC, but I'd imagine its something like that. E.g. the GCC Go frontend is, AFAIK, BSD licensed.
Re:D Language accepted for inclusion in GCC
by ben-schaaf on Wednesday June 21, 2017 @12:02PM
(#14604943)
I don't see how dmd would be mergable with gcc, completely different backends. gdc however is a different story.
Re:D Language accepted for inclusion in GCC
by jpf91 on Wednesday June 21, 2017 @01:06PM
(#14605677)
Although the recent DMD backend license change does not affect GDC, GDC is not a complete standalone implementation of a D compiler.
GDC (and LDC, the LLVM D compiler) use the frontend (lexer, parser,semantic) provided by the DMD reference compiler. GDC and LDC then map the AST produced by the frontend to something GCC and LLVM understand.
The DMD frontend has always been boost licensed. So the licensing question is valid here as we'll include boost frontend code into GCC. But I don't really have an answer to the question ;-)
https://github.com/dlang/dmd/blob/master/LICENSE.txt
I don't mean this to start a fight over licenses I'm just curious how it works when gcc lets other projects in.