Windows breakage -- again

Johan Tibell johan.tibell at
Wed Jul 16 21:56:58 UTC 2014

This bug report might shed some light on this:

I wonder if I've misunderstood the GCC docs at
My reading of the docs was that if the platform doesn't support the needed
instructions then GCC will generated a call to e.g. __sync_fetch_and_add_1,
where that function *is provided by GCC* as a fallback. Now I'm wondering
if I'm supposed to supply that fallback.

On Wed, Jul 16, 2014 at 9:32 PM, Páli Gábor János <pali.gabor at>

> 2014-07-16 20:57 GMT+02:00 Niklas Larsson <metaniklas at>:
> > I get the same failure when I try to build HEAD. Turns out the error
> occurs
> > on the 32-bit Windows build, and my successful build was a 64-bit build.
> My
> > 64-bit build still succeeds.
> Perhaps you should specify -march=i586 for the C compiler?
> I have tried Johan's test program (posted in this thread earlier) with
> -march=i386 and it generates a function call for
> __sync_fetch_and_add_1(). (No cmpxchg?)  In case of -march=i486,
> __sync_fetch_and_add_8() is generated (this cpu type does have a
> cmpxchg8b instruction).
> I faced this error earlier because the FreeBSD/i386 builder has been
> failing for a while [1] as it assumes -march=i486 by default.  With
> -march=i586, everything builds just fine.  On GNU/Linux, it is not a
> problem as it builds C code with -march=i686.
> [1]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list