D being talked about at gcc.gnu.org (RPM)

Philip Van Hoof spam at pvanhoof.be
Tue Apr 18 08:03:38 PDT 2006


On Tue, 2006-04-18 at 15:57 +0200, Anders F Björklund wrote:
> Philip Van Hoof wrote:
> 
> > I'm planning to build packages for GDC on Fedora and Debian. Not that I
> > know a lot about packaging. It would be, however, very useful to have a
> > build procedure or package management or apt or yum source for GDC.
> ...
> > But if somebody wants to help or maybe if somebody already did such a
> > package, tell me  ;-) 
> 
> Here is my RPM spec: http://www.algonet.se/~afb/d/gdc.spec
> This new version has quite a few options to choose from ?

Cute, you have one!

I was getting mine working already. It's actually compiling. Just
ironing out the specifics and the file list.

http://pvanhoof.be/files/gdc.spec

I was typing this post about it:
-------- 
As the patch of gdc isn't working on the GCC sources which are available
in the source GCC4 package of Fedora Core 4, I had to fix the function.h
part of the patch to something like this:

-- At the bottom of the struct, they added some extra struct members,
the gdc patch can't cope with that. It's a trivial fix --

[root at zeus SOURCES]# cat d/function.diff
--- function.h  2006-04-18 16:30:33.000000000 +0200
+++ function.h.new      2006-04-18 16:31:14.000000000 +0200
@@ -431,6 +431,10 @@
   /* Nonzero if code to initialize arg_pointer_save_area has been emitted.  */
   unsigned int arg_pointer_save_area_init : 1;

+  /* Nonzero if static chain is initialized by something other than
+      static_chain_incoming_rtx. */
+   unsigned int custom_static_chain : 1;
+
   /* Number of units of general registers that need saving in stdarg
      function.  What unit is depends on the backend, either it is number
      of bytes, or it can be number of registers.  */
[root at zeus SOURCES]#

I also added this line tot he setup-gcc.sh script and removed the
function.h part from the gcc-4.0 patch. Of course can this part also be
fixed correctly.

[root at zeus SOURCES]# cat d/setup-gcc.sh | tail -n 4
patch < d/function.diff

echo "GDC setup complete."
exit 0
[root at zeus SOURCES]#

Then I simply did something like: 

[root at zeus SOURCES]# tar zcvf gdc-0.17-1.tar.gz d/

I also have the "gcc-4.0.0-20050520.tar.bz2" of the Fedora Core 4 source
RPM

So that's gcc-4.0.0-20050520.tar.bz2 and gdc-0.17-1.tar.gz
in /usr/src/redhat/SOURCES

Now in /usr/src/redhat/SPECS we put the attached file and then we do
something like this:

rpmbuild -ba /usr/src/redhat/SPECS/gdc.spec

I'm still working on it (actually, it's compiling on my Fedora Core 4
system at this moment). 

But I'm already attaching the spec file so that others can see.
----- 

So, check the URL ;-)

> Unlike the DMD RPM, the Phobos library is included in main.
> It also builds C and C++ packages, as a "side effect" to D.

Okay. Mine isn't building C and C++ packages at this moment. As that
would conflict with the existing build environment.

I wonder if it would be possible to get a working GDC compiler without
having to conflict with the existing compiler setup?

> When GDC gets a new home, we can host binary RPMS there.
> (at least for the major distros, and the source SRPMS ?)

Sounds very good.

> I'm doing Mac packages at http://gdcmac.sourceforge.net/
> and there's been talk about providing MinGW packages too.


Very nice. I'm very interested in all this. Thanks.


> --anders
> 
> PS. I've been using this package spec since 0.10 or so...
>      http://www.digitalmars.com/d/archives/D/gnu/1070.html
>      http://www.digitalmars.com/d/archives/D/gnu/1073.html
>      http://www.digitalmars.com/d/archives/D/gnu/1390.html
>      http://www.digitalmars.com/d/archives/D/gnu/1564.html
>      The spec has change a bit over time, but been useful.




More information about the D.gnu mailing list