darcs patch: Unbreak the GHC build with older versions of gcc

Ian Lynagh igloo at earth.li
Thu Sep 4 19:48:14 EDT 2008


On Sun, Aug 31, 2008 at 08:19:54PM +0100, Ian Lynagh wrote:
> On Thu, Aug 28, 2008 at 09:50:19PM +0200, kili at outback.escape.de wrote:
> > Thu Aug 28 16:27:43 CEST 2008  kili at outback.escape.de
> >   * Unbreak the GHC build with older versions of gcc
> >   
> >   Stg.h must be included before HsBase.h, because the latter contains
> >   function definitions causing older versions of gcc (3.3.5 in my
> >   case) to bail out with "error: global register variable follows a
> >   function definition" on Regs.h, which is included by Stg.h.
> >   
> 
> > hunk ./cbits/PrelIOUtils.c 8
> > -#include "HsBase.h"
> > hunk ./cbits/PrelIOUtils.c 9
> > +#include "HsBase.h"
> 
> This breaks the build for me:
> 
> I haven't looked at why yet.

It turned out that something in Stg.h, perhaps _ISOC99_SOURCE, meant
S_ISSOCK wasn't being defined. I defined _BSD_SOURCE too, and now it's
happy, so I've applied your patch (well, actually a new patch that does
the same thing, because yours now conflicts with more recent changes).


Thanks
Ian



More information about the Libraries mailing list