Closed the-horo closed 2 years ago
The keywords for gcc were just copied from the lastest ebuild. They are generally necessary because unlike other packages, the ones in dlang directly depend on a compiler (selected via USE-flag) and said compiler cannot be keyworded when the package in question is not. A stable package cannot depend on an unstable one.
I had to strip some arch KEYWORDS though. For example there is one for which the d
USE-flag to gcc is masked. You'll see it when you run repoman full -d
on the full set. So essentially: Copy keywords from gcc, then remove the ones that give errors.
As for your questions:
dscanner
I just created the bin directory in src_prepare()
.
Bump the version for gdmd and gdc_frontend in dlang-compilers.eclass.
However, in order to use it to build dmd, some little changes had to be done to dmd.eclass. dlang_compile_bin has $DCFLAGS tied to $DC, so if we used the gdmd wrapper instead of gdc it would error saying that there are unknown options. Another particularity for dlang_compile_bin is that, in the case of gdc, it does not create the directory in which to put the output file, and one has to create it manually; as opposed to ldc and dmd which will create the needed directory(s).
One more thing needed to be changed, in dlang.eclass there is a line in which
-shared-libphobos
is added to $DCFLAGS when the compiler is gdc. If, during the building of dmd by the build.d script, gdc does not receive this flag, there will be linker errors, thus this has to be provided, through several layers of indirection:-q,
prefix since build.d uses the gdmd wrapper; andbuild.d DFLAGS=$DCFLAGS
since the script doesn't pick environment DFLAGS, they have to be given as args like in this line.Though now gdc works as a build compiler for dmd I am not quite satisfied with the current situation:
-shared-libphobos
doesn't sound like a flag that one would want in every build, though I have no idea what it even doesThe changes above I think I'm qualified to implement myself, so I'm just asking for opinions on whether the changes make sense.
One question before this gets merged. I don't know what keywords I am supposed to put for gdc in dlang-compilers.eclass. Should they be all unstable, the same as those of gcc, or is there some upstream reference that documents it?