| |
| Posted by Dicebot in reply to Marc Schütz | PermalinkReply |
|
Dicebot
Posted in reply to Marc Schütz
| On Monday, 18 January 2016 at 10:58:52 UTC, Marc Schütz wrote:
> Hi!
>
> I'm working on packaging GDC for openSUSE, and I have a few questions.
>
> Is it possible to make the build process install only D related files, for example cc1d, but not cc1?
>
> If the above works (or I manually exclude generic GCC files from the package), will the D specific binaries be compatible with generic GCC binaries/libs from other GCC versions?
>
> I'm asking this because I'd rather not have to make the GDC package depend on the distribution's default GCC packages, because then I would have to match the GCC versions across the different openSUSE versions...
>
> Any hints?
1)
About not having gcc as dependency - no, as far as I have understood so far, gcc backend is not designed not be used as library for building independent compilers, it only works as a platform which provides set of supported languages. There are plenty of shared libraries/tools between different gcc-based compilers which would conflict if installed all together.
And using different gcc version from distribution default gcc is a good way to screw people systems in a very hideous ways :)
2)
However if you do use the same base GCC version as existing distro gcc there is no need to package common stuff like cc1 (it would conflict) - you can only package D additions and specify system gcc package as dependency.
This is what I do on Arch Linux:
https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/gdc (see PKGBUILD for bash script which builds/packages stuff)
As you can see actual GDC essentials come down to this:
install -D -m755 $srcdir/gcc-build/gcc/gdc $pkgdir/usr/bin/gdc
install -D -m755 $srcdir/gcc-build/gcc/cc1d $pkgdir/usr/lib/gcc/$CHOST/$pkgver/cc1d
install -D -m755 $srcdir/GDMD/dmd-script $pkgdir/usr/bin/gdmd
# + copy/install libphobos2.a and all runtime/phobos modules
|