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

Reply via email to