On Wed, 25 Sep 2019 at 21:30, Stefan Frijters via D.gnu <d.gnu@puremagic.com> wrote: > > On Sunday, 22 September 2019 at 10:29:24 UTC, Stefan Frijters > wrote: > > Hi Johannes, > > > > Thank you for the feedback. I've posted some more below so we > > can try to find out what I'm doing wrong. I've added some blank > > lines here and there to make things more readable, but it's all > > very spammy I'm afraid. > > > > [...] > > Well, I've made some progress: > > * I still don't know what causes libtool to misbehave in > parallel, but I've forced libphobos to be built with -j1, so > that's at least a working workaround that doesn't slow down the > rest of the build. > * The nixpkgs wrappers for gcc introduce the -idirafter flag, > which is not accepted by gdc. It looks like this causes the check > for the '-fPIC' flag to fail, and the flag to be dropped. This is > the cause of the linker error for the shared libs. I've hacked > around for a bit and got rid of the flag at the point of the > check, so libphobos now builds correctly (but still with a bunch > of warnings). > * I've added some nix code to generate a wrapper for gdc, like > the ones that are generated for the rest of the GNU compiler > family. >
How does it go about building Ada or Go? Surely those two frontends will run into the same problem also. > With these changes I can now build gdc + libraries and I've > successfully built the example on the dlang.org front page from a > nix shell. > > The PR will need some reviewing from nixpkgs folks for sure since > I did some nasty things. If you need any other eyes to have a look over, don't be afraid to ping. -- Iain