On Thu, Oct 28, 2021 at 2:38 PM Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > > > On 10/9/2021 7:32 AM, Iain Buclaw via Gcc-patches wrote: > > Hi, > > > > The implementation of the D front-end in GCC is based on the original > > C++ version of the D programming language compiler, which was ported to > > D itself in version 2.069.0 (released in 2015). To keep it somewhat > > up-to-date, I have been backporting fixes from upstream back into C++, > > but this stopped at version 2.076.1 (released in 2017), and since then > > I've only been keeping the front-end only updated enough to still be > > able to build the latest version of the D language (now 2.098.0). > > > > Reasons for putting off switching to the D implementation immediately > > after GCC 9 has been a mixture of the front-end not being ready to use, > > and current portability status of the D core runtime library. > > > > It has come to the point now that I'm happy enough with the process to > > switch out the C++ sources in gcc/d/dmd with D sources. > > > > Before that, there's only this patch that makes the required changes to > > GCC itself in order to have a D front-end written in D itself. > > > > The rest of the series only changes code in the D language front-end or > > libphobos standard library, so I've left that out for the time being > > until I'm ready to commit it. > > > > The complete set of changes are in the ibuclaw/gdc branch under > > users/ibuclaw. It has been well-tested on x86_64-linux-gnu for about 3 > > years now, and I've also been testing the self-hosted compiler on > > powerpc64le-linux-gnu as well with no regressions from the D language > > testsuite run. > > > > Does anything stand out as being problematic in this patch, or may need > > splitting out first? Or would it be OK for trunk? > > > > Thanks, > > Iain. > > > > --- > > ChangeLog: > > > > * Makefile.def: Add bootstrap to libbacktrace, libphobos, zlib, and > > libatomic. > > * Makefile.in: Regenerate. > > * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Fix command for GDC. > > (STAGE1_CONFIGURE_FLAGS): Add --with-libphobos-druntime-only if > > target-libphobos-bootstrap. > > (STAGE2_CONFIGURE_FLAGS): Likewise. > > * configure: Regenerate. > > * configure.ac: Add support for bootstrapping D front-end. > > > > config/ChangeLog: > > > > * acx.m4 (ACX_PROG_GDC): New m4 function. > > > > gcc/ChangeLog: > > > > * Makefile.in (GDC): New variable. > > (GDCFLAGS): New variable. > > * configure: Regenerate. > > * configure.ac: Add call to ACX_PROG_GDC. Substitute GDCFLAGS. > > > > gcc/po/ChangeLog: > > > > * EXCLUDES: Remove d/dmd sources from list. > Presumably this means that the only way to build D for the first time on > a new target is to cross from an existing target that supports D, right? > > I think that's not unreasonable and I don't think we want to increase > the burden of maintaining an old codebase just for the sake of a > marginally easier bootstrap process for a new target. > > So I think you should go with this whenever you're ready. > > jeff >
There should be some sort of note about this in the documentation, IMO; both install.texi and the "Caveats" section of gcc-12/changes.html (and possibly other places). Eric