Thread overview
GCC 10.1 Released
May 14
matheus
May 14
M.M.
May 14
As of last week (7th May), GCC 10.1 has now been released.

For the D language front-end, only a small number of incremental, but substantial changes have gone in.  Most notable of the lot has been the addition of `static foreach`, which makes the front-end (the C++ port of DMD) feature complete with DMD version 2.076.1.  There is also now a configurable separation between building Druntime and Phobos, which has allowed many targets to have gained library support for building a D runtime library by disabling the build of Phobos.

See [1] for more information about changes in GDC 10.1.  Sources are available from any of the GCC mirrors [2], or you can clone the git repository [3].


[[GCC 11 Development]]

Now the development cycle has started again, I have ambitions for a number disruptive changes to land during the next release cycle.

1. Switch implementation of the compiler from C++ to D.  Rebase front-end with DMD master.  Taking into account the alignment of release cycles, the aim is for GCC 11.1 to have DMD 2.098.0-beta.1 or 2.098.0-rc.1.  The GCC 11.2 release will then have DMD 2.098.1, plus any other fixes that have gone into stable before the master/stable merge.

2. Update the D demangling library to be in sync with current spec, down-streaming this to GDB/Binutils.  This'll include the ability to decode recent(-ish) ABI changes such as back references, as well as decoding @live and variadic parameter attributes.

3. Dynamically generate C bindings from headers, possibly using a new command-line switch -fdump-d-spec where one can use gcc (or g++, gfortran, gccgo...) to read in sources/headers of one language, and write out bindings in D.  The primary use case of this would be to drop the manual maintenance of core.sys.*; core.stdc.* (and core.stdcxx.*?); and instead generate these modules during the build of libphobos.

4. Turn on library support for the platforms FreeBSD, NetBSD, DragonflyBSD, OpenBSD, MinGW, Darwin, HP-UX/PA, and AIX/PowerPC.  Though given that there'll be a need to bootstrap, expect these ports to also get pushed to a GCC 10.x release too.

I'm not going to tire you with anything more on my TODO list (there are over 50 items), but if any thing sounds interesting, or you feel you could help in any way, please don't hesitate to jump on the #gdc channel in either the Dlang Slack or Freenode IRC.


[[Nota Bene]]

No sooner had the RC for GCC 10 branched, that a bug in std.net.curl was raised relating to the handling of HTTP/2 requests (it can't, as it turns out).  This patch [4] is being backported for the 10.2 release, which is highly important for tools such as dub to be able to function correctly.  The patch has already been applied to Debian and Ubuntu, it would be kind if other package maintainers do the same for their distributions.

Having a look at my own personal site, it is clearly in need of some tender loving care.  A minor styling improvement will be done soon, along with a refresh of all documentation hosted on the site to better reflect the situation now, as opposed to 8 years ago.

I'll also be triggering a rebuild of D compilers for all supported GCC targets, and pushing them to the compiler explorer site [5] maybe sometime next week (there's 198 of them, so please excuse the slowness of the process).

Until next year...

Regards
Iain.

[1] https://gcc.gnu.org/gcc-10/changes.html#d
[2] https://gcc.gnu.org/mirrors.html
[3] git://gcc.gnu.org/git/gcc.git
[4] https://patch-diff.githubusercontent.com/raw/dlang/phobos/pull/6752.diff
[5] https://explore.dgnu.org
May 14
On Thursday, 14 May 2020 at 16:57:20 UTC, Iain Buclaw wrote:
> As of last week (7th May), GCC 10.1 has now been released.
>
> For the D language front-end, only a small number of incremental, but substantial changes have gone in.  Most notable of the lot has been the addition of `static foreach`, which makes the front-end (the C++ port of DMD) feature complete with DMD version 2.076.1.  There is also now a configurable separation between building Druntime and Phobos, which has allowed many targets to have gained library support for building a D runtime library by disabling the build of Phobos.
>
> [...]

Hey Iain!
I love your summary and plans (can you do this more often? ^^), and just wanted to say kudos for the work you do on this! As far as the Linux world is concerned, getting GDC into GCC and keeping it well-integrated and up-to-date it is a major thing to get D established as first-class supported language.
Having that D binding generator will be even more useful for integrating D with existing, bigger codebases written in C or C++.
Keep up the great work! (And I'll get that dub package rebuilt against GDC 10.1 in Debian ASAP ^^)
Cheers,
    Matthias

P.S: As a distribution developer, I would love LDC and GDC to be ABI-compatible, so we wouldn't have to choose a global default... But that's probably an unlikely thing to change anytime soon.
May 14
On Thursday, 14 May 2020 at 17:27:33 UTC, Matthias Klumpp wrote:
> On Thursday, 14 May 2020 at 16:57:20 UTC, Iain Buclaw wrote:
>> As of last week (7th May), GCC 10.1 has now been released.
>>
>> For the D language front-end, only a small number of incremental, but substantial changes have gone in.  Most notable of the lot has been the addition of `static foreach`, which makes the front-end (the C++ port of DMD) feature complete with DMD version 2.076.1.  There is also now a configurable separation between building Druntime and Phobos, which has allowed many targets to have gained library support for building a D runtime library by disabling the build of Phobos.
>>
>> [...]
>
> Hey Iain!
> I love your summary and plans (can you do this more often? ^^),

Thanks for you kind reply.  Do you mean I should venture out the cave more often? :-)


>
> P.S: As a distribution developer, I would love LDC and GDC to be ABI-compatible, so we wouldn't have to choose a global default... But that's probably an unlikely thing to change anytime soon.

Unfortunately there are a few things stacked against us.

1. For best compatibility, GDC and LDC should be based off the same DMD version.  New releases in both language and library can incur many differences, both in what symbols end up in the library, and what signature they have.

2. The compiler<->library interface should be aligned up.  You can't have GDC and LDC emitting moduleinfo symbols into differently named sections.  Otherwise module constructors/destructors won't be picked up and ran if you link against a library built by the other compiler.

3. Maybe skipping a few... assuming that we get all things in sync, and both GDC and LDC are working together more tightly.  The last remaining hurdle is the function calling convention.  As I understand it, LLVM leaves it up to the front-end maintainers to write their own for each target, whereas GCC takes care of such matters for you.  So LDC will have to be modified to strictly only support the system C ABI, ignoring any D-specific differences/extensions (see spec/abi.html in the D language reference).  The only case where it would be the other way round (GDC needs to be fixed to match LDC) is for targets that GCC doesn't support yet, such as aarch64-darwin.

Iain
May 14
On Thursday, 14 May 2020 at 18:10:10 UTC, Iain Buclaw wrote:
> Thanks for you kind reply.  Do you mean I should venture out the cave more often? :-)

I'm not the OP, but yes you should! :)

Anyway thanks for your work and by the way do you have Patreon?

Matheus.
May 14
On Thursday, 14 May 2020 at 16:57:20 UTC, Iain Buclaw wrote:
> As of last week (7th May), GCC 10.1 has now been released.
>
> For the D language front-end, only a small number of incremental, but substantial changes have gone in.  Most notable of the lot has been the addition of `static foreach`, which makes the front-end (the C++ port of DMD) feature complete with DMD version 2.076.1.  There is also now a configurable separation between building Druntime and Phobos, which has allowed many targets to have gained library support for building a D runtime library by disabling the build of Phobos.
>
> [...]

Great work! Great plans! I wish you good luck with your goals, and hope you can attract people to help you. Did you ever consider to mentor a student for Google-summer-of-code?
May 14
On Thursday, 14 May 2020 at 18:18:02 UTC, matheus wrote:
> On Thursday, 14 May 2020 at 18:10:10 UTC, Iain Buclaw wrote:
>> Thanks for you kind reply.  Do you mean I should venture out the cave more often? :-)
>
> I'm not the OP, but yes you should! :)
>
> Anyway thanks for your work and by the way do you have Patreon?
>

That I do not, nor other tools such as Github sponsors either.

I'd first feel more inclined to suggest that people should donate to the D language foundation.  Something could be set-up if pushed however.
May 14
On Thursday, 14 May 2020 at 19:39:27 UTC, M.M. wrote:
> On Thursday, 14 May 2020 at 16:57:20 UTC, Iain Buclaw wrote:
>> As of last week (7th May), GCC 10.1 has now been released.
>>
>> For the D language front-end, only a small number of incremental, but substantial changes have gone in.  Most notable of the lot has been the addition of `static foreach`, which makes the front-end (the C++ port of DMD) feature complete with DMD version 2.076.1.  There is also now a configurable separation between building Druntime and Phobos, which has allowed many targets to have gained library support for building a D runtime library by disabling the build of Phobos.
>>
>> [...]
>
> Great work! Great plans! I wish you good luck with your goals, and hope you can attract people to help you. Did you ever consider to mentor a student for Google-summer-of-code?

We (Amaury and I) did interview a couple of potential students a number of years back, possibly the only time GSOC accepted the Dlang submission.  Nothing came out of it, which was just as well really as all ideas I had were really vague. Besides, I didn't feel like there was much that could be done while D was still not integrated into GCC.

Haven't thought much about it since though.
May 15
On 5/14/2020 9:57 AM, Iain Buclaw wrote:
> As of last week (7th May), GCC 10.1 has now been released.

Thank you, Iain, for your hard and fantastic work!
May 16
On Thursday, 14 May 2020 at 16:57:20 UTC, Iain Buclaw wrote:
> [[GCC 11 Development]]
>
> Now the development cycle has started again, I have ambitions for a number disruptive changes to land during the next release cycle.

Superb! --- gdc is perhaps the most important strategically and I am so glad to see this playing out.
May 16
On Saturday, 16 May 2020 at 00:26:31 UTC, Carl Sturtivant wrote:
> On Thursday, 14 May 2020 at 16:57:20 UTC, Iain Buclaw wrote:
>> [[GCC 11 Development]]
>>
>> Now the development cycle has started again, I have ambitions for a number disruptive changes to land during the next release cycle.
>
> Superb! --- gdc is perhaps the most important strategically and I am so glad to see this playing out.

In fact I would like to characterize compiler progress for D as follows.

dmd --- logistical progress
ldc --- tactical progress
gdc --- strategic progress

:)