Including GDC in nixpkgs
Stefan Frijters
sfrijters at gmail.com
Wed Sep 25 19:28:21 UTC 2019
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.
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.
More information about the D.gnu
mailing list