Thread overview
What's up with dmd-cxx?
Jul 17, 2017
Joakim
Jul 17, 2017
Sebastian Wilzbach
Jul 19, 2017
Joakim
Jul 19, 2017
Sebastian Wilzbach
July 17, 2017
Someone enquired in the general forum about bootstrapping the last C++ version of dmd for OpenBSD, so I tried it myself on linux/x64.  Unfortunately, both the origin/2.067 branch and v2.067.1 tag of dmd no longer build with the latest gcc 7.1.1 and clang 4.0.1:

g++ -m64 -c -Wno-deprecated -Wstrict-aliasing -fno-exceptions -fno-rtti -D__pascal= -DMARS=1 -DTARGET_LINUX=1 -DDM_TARGET_CPU_X86=1 -DDMDV2=1  -O2 -DDMDV2=1 -Iroot -MMD -MF port.deps root/port.c                                              In file included from root/port.c:587:0:                                        /usr/include/bits/mathdef.h:19:3: error: #error "Never use <bits/mathdef.h> directly; include <complex.h> instead"                                               # error "Never use <bits/mathdef.h> directly; include <complex.h> instead"        ^~~~~

OK, I know that one, I removed it from ldc sometime back:

https://github.com/ldc-developers/ldc/pull/1447#r60186297

Just remove that linux ifdef and its contents and I get to the backend:

g++ -m64 -c -Wno-deprecated -Wstrict-aliasing -fno-exceptions -fno-rtti -D__pascal= -DMARS=1 -DTARGET_LINUX=1 -DDM_TARGET_CPU_X86=1 -DDMDV2=1  -O2 -DDMDV2=1 -Iroot -Itk -Ibackend -I. -MMD -MF gdag.deps backend/gdag.c                        backend/go.c: In function 'int go_flag(char*)':                                 backend/go.c:82:5: error: narrowing conversion of '-1' from 'int' to 'mftype {aka unsigned int}' inside { } [-Wnarrowing]                                            };                                                                              ^

It appears that nobody is building the last C++ version of dmd and keeping it up to date, which is needed for porting to new platforms. Ldc has a ltsmaster branch, which uses dmdfe 2.068.2 with idgen.d reverted to idgen.c, that's kept up to date and integrated with CI:

https://github.com/ldc-developers/ldc/commits/ltsmaster

Perhaps dmd needs to do the same?  Ian talked of adding a dmd-cxx branch sometime back, looks like dmd needs one:

http://forum.dlang.org/thread/CABOHX+ckJbL1yGyZBz-Lqq1kVWX=XDy50CT_H9=BNvuquP_Mmg@mail.gmail.com

Otherwise, we'll have to tell all porters to use ldc ltsmaster instead, which could be a viable alternative too, since it supports a lot more platforms than dmd.
July 17, 2017
On 2017-07-17 17:56, Joakim via Dlang-internal wrote:
> Perhaps dmd needs to do the same?  Ian talked of adding a dmd-cxx
> branch sometime back, looks like dmd needs one:

Thanks for bringing this up. As everyone was in favor of dmd-cxx, but no one created it, I made the first step and branched dmd-cxx from v2.067.0:

https://github.com/dlang/dmd/tree/dmd-cxx
https://github.com/dlang/druntime/tree/dmd-cxx
https://github.com/dlang/phobos/tree/dmd-cxx

I don't know about the CIs though, probably all of them are going to fail because of the missing config files.
However, at least Travis and CircleCi since a few versions checkout the corresponding branch at the other repositories.
Not sure whether auto-tester does the same.

In any case, PRs to improve/fix dmd-cxx are welcome ;-)
July 19, 2017
On Monday, 17 July 2017 at 19:30:29 UTC, Sebastian Wilzbach wrote:
> On 2017-07-17 17:56, Joakim via Dlang-internal wrote:
>> Perhaps dmd needs to do the same?  Ian talked of adding a dmd-cxx
>> branch sometime back, looks like dmd needs one:
>
> Thanks for bringing this up. As everyone was in favor of dmd-cxx, but no one created it, I made the first step and branched dmd-cxx from v2.067.0:

Thanks, but could you do what Iain asked for in the thread I linked and base it off the v2.068.2 tag instead?

> In any case, PRs to improve/fix dmd-cxx are welcome ;-)

I'll at least get it building again, up to Iain to merge all the other changes he wants.
July 19, 2017
On 2017-07-19 18:39, Joakim via Dlang-internal wrote:
> On Monday, 17 July 2017 at 19:30:29 UTC, Sebastian Wilzbach wrote:
>> On 2017-07-17 17:56, Joakim via Dlang-internal wrote:
>>> Perhaps dmd needs to do the same?  Ian talked of adding a dmd-cxx
>>> branch sometime back, looks like dmd needs one:
>> 
>> Thanks for bringing this up. As everyone was in favor of dmd-cxx, but no one created it, I made the first step and branched dmd-cxx from v2.067.0:
> 
> Thanks, but could you do what Iain asked for in the thread I linked
> and base it off the v2.068.2 tag instead?

Oh I didn't see that. Done.
I also enabled branch protection for this branch, s.t. no one can accidentally force-push to this branch.

>> In any case, PRs to improve/fix dmd-cxx are welcome ;-)
> 
> I'll at least get it building again, up to Iain to merge all the other
> changes he wants.

Cool! As mentioned I don't know whether the auto-tester will work directly, or Brads needs to set up a new branch.